[Libreoffice-commits] .: 5 commits - dtrans/source dtrans/test filter/source io/test oox/source pyuno/source remotebridges/examples store/workben sw/source ucb/workben xmloff/source xmlscript/source
Norbert Thiebaud
nthiebaud at kemper.freedesktop.org
Fri Jun 1 07:43:27 PDT 2012
dtrans/source/cnttype/mcnttfactory.cxx | 4
dtrans/source/cnttype/mcnttype.cxx | 26 +--
dtrans/source/cnttype/wbench/testcnttype.cxx | 22 +--
dtrans/source/generic/clipboardmanager.cxx | 14 -
dtrans/source/generic/generic_clipboard.cxx | 4
dtrans/source/test/test_dtrans.cxx | 18 +-
dtrans/source/win32/clipb/WinClipboard.cxx | 24 +--
dtrans/source/win32/dtobj/DOTransferable.cxx | 2
dtrans/source/win32/dtobj/DataFmtTransl.cxx | 10 -
dtrans/source/win32/dtobj/FetcList.cxx | 5
dtrans/source/win32/dtobj/XTDataObject.cxx | 2
dtrans/source/win32/ftransl/ftransl.cxx | 8 -
dtrans/source/win32/workbench/test_wincb.cxx | 4
dtrans/test/win32/dnd/targetlistener.cxx | 2
filter/source/t602/t602filter.cxx | 20 +-
filter/source/xsltfilter/XSLTFilter.cxx | 45 +++---
io/test/testconnection.cxx | 28 +--
oox/source/export/chartexport.cxx | 110 +++++++--------
pyuno/source/module/pyuno_runtime.cxx | 67 ++++-----
remotebridges/examples/officeclient.cxx | 26 +--
store/workben/t_store.cxx | 20 +-
sw/source/filter/html/htmlform.cxx | 150 ++++++++++-----------
sw/source/filter/ww8/docxattributeoutput.cxx | 4
sw/source/filter/ww8/wrtw8nds.cxx | 4
sw/source/ui/app/docsh.cxx | 12 -
sw/source/ui/config/mailconfigpage.cxx | 4
sw/source/ui/dbui/mailmergehelper.cxx | 6
sw/source/ui/docvw/SidebarWin.cxx | 4
sw/source/ui/uiview/viewling.cxx | 12 -
sw/source/ui/uno/dlelstnr.cxx | 6
sw/source/ui/vba/vbacheckbox.cxx | 10 -
ucb/workben/ucb/ucbdemo.cxx | 2
xmloff/source/core/xmlexp.cxx | 93 ++++++-------
xmloff/source/meta/xmlmetai.cxx | 23 +--
xmloff/source/style/xmlnumfi.cxx | 6
xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 24 +--
36 files changed, 403 insertions(+), 418 deletions(-)
New commits:
commit df9ecb71c7b2622a082849b556dba5008d271b6a
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Jun 1 09:39:35 2012 -0500
targeted string re-work
Change-Id: I44518bb1b464bb0b458c0b5f1c249ef160ea3b26
diff --git a/dtrans/source/cnttype/mcnttfactory.cxx b/dtrans/source/cnttype/mcnttfactory.cxx
index 71ca6d9..5c01ec7 100644
--- a/dtrans/source/cnttype/mcnttfactory.cxx
+++ b/dtrans/source/cnttype/mcnttfactory.cxx
@@ -59,7 +59,7 @@ namespace
Sequence< OUString > SAL_CALL MimeContentTypeFactory_getSupportedServiceNames( )
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory"));
+ aRet[0] = OUString("com.sun.star.datatransfer.MimeContentTypeFactory");
return aRet;
}
}
@@ -91,7 +91,7 @@ Reference< XMimeContentType > CMimeContentTypeFactory::createMimeContentType( co
OUString SAL_CALL CMimeContentTypeFactory::getImplementationName( )
throw( RuntimeException )
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM( MIMECONTENTTYPEFACTORY_IMPL_NAME ));
+ return OUString( MIMECONTENTTYPEFACTORY_IMPL_NAME );
}
// -------------------------------------------------
diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx
index 14b2010..9b14b78 100644
--- a/dtrans/source/cnttype/mcnttype.cxx
+++ b/dtrans/source/cnttype/mcnttype.cxx
@@ -85,7 +85,7 @@ OUString SAL_CALL CMimeContentType::getMediaSubtype( ) throw(RuntimeException)
OUString SAL_CALL CMimeContentType::getFullMediaType( ) throw(RuntimeException)
{
- return m_MediaType + OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + m_MediaSubtype;
+ return m_MediaType + OUString("/") + m_MediaSubtype;
}
//------------------------------------------------------------------------
@@ -206,7 +206,7 @@ void SAL_CALL CMimeContentType::type( void )
{
if ( isInRange( m_nxtSym, sToken ) )
m_MediaType += m_nxtSym;
- else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("/ ")) ) )
+ else if ( isInRange( m_nxtSym, OUString("/ ") ) )
break;
else
throw IllegalArgumentException( );
@@ -215,7 +215,7 @@ void SAL_CALL CMimeContentType::type( void )
// check FOLLOW( type )
skipSpaces( );
- acceptSym( OUString(RTL_CONSTASCII_USTRINGPARAM("/")) );
+ acceptSym( OUString("/") );
subtype( );
}
@@ -238,7 +238,7 @@ void SAL_CALL CMimeContentType::subtype( void )
{
if ( isInRange( m_nxtSym, sToken ) )
m_MediaSubtype += m_nxtSym;
- else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("; ")) ) )
+ else if ( isInRange( m_nxtSym, OUString("; ") ) )
break;
else
throw IllegalArgumentException( );
@@ -259,13 +259,13 @@ void SAL_CALL CMimeContentType::trailer( void )
rtl::OUString sToken(TOKEN);
while( !m_nxtSym.isEmpty( ) )
{
- if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM("(")) )
+ if ( m_nxtSym == OUString("(") )
{
getSym( );
comment( );
- acceptSym( OUString(RTL_CONSTASCII_USTRINGPARAM(")")) );
+ acceptSym( OUString(")") );
}
- else if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM(";")) )
+ else if ( m_nxtSym == OUString(";") )
{
// get the parameter name
getSym( );
@@ -277,7 +277,7 @@ void SAL_CALL CMimeContentType::trailer( void )
OUString pname = pName( );
skipSpaces();
- acceptSym( OUString(RTL_CONSTASCII_USTRINGPARAM("=")) );
+ acceptSym( OUString("=") );
// get the parameter value
skipSpaces( );
@@ -308,7 +308,7 @@ OUString SAL_CALL CMimeContentType::pName( )
{
if ( isInRange( m_nxtSym, sToken ) )
pname += m_nxtSym;
- else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("= ")) ) )
+ else if ( isInRange( m_nxtSym, OUString("= ") ) )
break;
else
throw IllegalArgumentException( );
@@ -328,7 +328,7 @@ OUString SAL_CALL CMimeContentType::pValue( )
rtl::OUString sToken(TOKEN);
// quoted pvalue
- if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM( "\"" )) )
+ if ( m_nxtSym == OUString( "\"" ) )
{
getSym( );
pvalue = quotedPValue( );
@@ -375,7 +375,7 @@ OUString SAL_CALL CMimeContentType::quotedPValue( )
else if ( isInRange( m_nxtSym, rtl::OUString(TOKEN) + rtl::OUString(TSPECIALS) + rtl::OUString(SPACE) ) )
{
pvalue += m_nxtSym;
- if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM( "\"" )) )
+ if ( m_nxtSym == OUString( "\"" ) )
bAfterQuoteSign = sal_True;
else
bAfterQuoteSign = sal_False;
@@ -401,7 +401,7 @@ OUString SAL_CALL CMimeContentType::nonquotedPValue( )
{
if ( isInRange( m_nxtSym, sToken ) )
pvalue += m_nxtSym;
- else if ( isInRange( m_nxtSym, OUString(RTL_CONSTASCII_USTRINGPARAM("; ")) ) )
+ else if ( isInRange( m_nxtSym, OUString("; ") ) )
break;
else
throw IllegalArgumentException( );
@@ -421,7 +421,7 @@ void SAL_CALL CMimeContentType::comment( void )
{
if ( isInRange( m_nxtSym, rtl::OUString(TOKEN) + rtl::OUString(SPACE) ) )
getSym( );
- else if ( m_nxtSym == OUString(RTL_CONSTASCII_USTRINGPARAM(")")) )
+ else if ( m_nxtSym == OUString(")") )
break;
else
throw IllegalArgumentException( );
diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx
index 011b2c4..4c95f07 100644
--- a/dtrans/source/cnttype/wbench/testcnttype.cxx
+++ b/dtrans/source/cnttype/wbench/testcnttype.cxx
@@ -93,7 +93,7 @@ void CheckMimeContentType( const OUString& aCntType, const OUString& aType, cons
pvalue = xMimeCntType->getParameterValue( param );
}
- pvalue = xMimeCntType->getParameterValue( OUString(RTL_CONSTASCII_USTRINGPARAM("aparam")) );
+ pvalue = xMimeCntType->getParameterValue( OUString("aparam") );
}
catch( IllegalArgumentException& )
{
@@ -175,32 +175,32 @@ sal_Bool processCntTypesAndWriteResultIntoFile( char* fname, vector< string >& v
Reference< XMimeContentType > xMCntTyp = cnttypeFactory->createMimeContentType( OUString::createFromAscii( iter->c_str( ) ) );
- fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Type: %s\n")), xMCntTyp->getMediaType( ).getStr( ) );
- fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Subtype: %s\n")), xMCntTyp->getMediaSubtype( ).getStr( ) );
+ fwprintf( fstream, OUString("Type: %s\n"), xMCntTyp->getMediaType( ).getStr( ) );
+ fwprintf( fstream, OUString("Subtype: %s\n"), xMCntTyp->getMediaSubtype( ).getStr( ) );
Sequence< OUString > seqParam = xMCntTyp->getParameters( );
sal_Int32 nParams = seqParam.getLength( );
for ( sal_Int32 i = 0; i < nParams; i++ )
{
- fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("PName: %s\n")), seqParam[i].getStr( ) );
- fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("PValue: %s\n")), xMCntTyp->getParameterValue( seqParam[i] ).getStr( ) );
+ fwprintf( fstream, OUString("PName: %s\n"), seqParam[i].getStr( ) );
+ fwprintf( fstream, OUString("PValue: %s\n"), xMCntTyp->getParameterValue( seqParam[i] ).getStr( ) );
}
}
catch( IllegalArgumentException& ex )
{
- fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Fehlerhafter Content-Type gelesen!!!\n\n")) );
+ fwprintf( fstream, OUString("Fehlerhafter Content-Type gelesen!!!\n\n") );
}
catch( NoSuchElementException& )
{
- fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Parameterwert nicht vorhanden\n")) );
+ fwprintf( fstream, OUString("Parameterwert nicht vorhanden\n") );
}
catch( ... )
{
- fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("Unbekannter Fehler!!!\n\n")) );
+ fwprintf( fstream, OUString("Unbekannter Fehler!!!\n\n") );
}
- fwprintf( fstream, OUString(RTL_CONSTASCII_USTRINGPARAM("\n#############################################\n\n")) );
+ fwprintf( fstream, OUString("\n#############################################\n\n") );
}
fclose( fstream );
@@ -220,7 +220,7 @@ int SAL_CALL main( int nArgc, char* argv[] )
//-------------------------------------------------
// get the global service-manager
//-------------------------------------------------
- OUString rdbName = OUString( RTL_CONSTASCII_USTRINGPARAM( RDB_SYSPATH ) );
+ OUString rdbName = OUString( RDB_SYSPATH );
Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) );
// Print a message if an error occurred.
@@ -240,7 +240,7 @@ int SAL_CALL main( int nArgc, char* argv[] )
}
Reference< XMimeContentTypeFactory >
- xMCntTypeFactory( g_xFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory")) ), UNO_QUERY );
+ xMCntTypeFactory( g_xFactory->createInstance( OUString("com.sun.star.datatransfer.MimeContentTypeFactory") ), UNO_QUERY );
if ( !xMCntTypeFactory.is( ) )
{
diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx
index c8b2ab4..fba3e64 100644
--- a/dtrans/source/generic/clipboardmanager.cxx
+++ b/dtrans/source/generic/clipboardmanager.cxx
@@ -45,7 +45,7 @@ using ::rtl::OUString;
ClipboardManager::ClipboardManager():
WeakComponentImplHelper3< XClipboardManager, XEventListener, XServiceInfo > (m_aMutex),
- m_aDefaultName(OUString(RTL_CONSTASCII_USTRINGPARAM("default")))
+ m_aDefaultName(OUString("default"))
{
}
@@ -60,7 +60,7 @@ ClipboardManager::~ClipboardManager()
OUString SAL_CALL ClipboardManager::getImplementationName( )
throw(RuntimeException)
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM(CLIPBOARDMANAGER_IMPLEMENTATION_NAME));
+ return OUString(CLIPBOARDMANAGER_IMPLEMENTATION_NAME);
}
// ------------------------------------------------------------------------
@@ -94,7 +94,7 @@ Reference< XClipboard > SAL_CALL ClipboardManager::getClipboard( const OUString&
// object is disposed already
if (rBHelper.bDisposed)
- throw DisposedException(OUString(RTL_CONSTASCII_USTRINGPARAM("object is disposed.")),
+ throw DisposedException(OUString("object is disposed."),
static_cast < XClipboardManager * > (this));
ClipboardMap::iterator iter =
@@ -115,13 +115,13 @@ void SAL_CALL ClipboardManager::addClipboard( const Reference< XClipboard >& xCl
// check parameter
if (!xClipboard.is())
- throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")),
+ throw IllegalArgumentException(OUString("empty reference"),
static_cast < XClipboardManager * > (this), 1);
// the name "default" is reserved for internal use
OUString aName = xClipboard->getName();
if (m_aDefaultName.compareTo(aName) == 0)
- throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("name reserved")),
+ throw IllegalArgumentException(OUString("name reserved"),
static_cast < XClipboardManager * > (this), 1);
// try to add new clipboard to the list
@@ -164,7 +164,7 @@ Sequence< OUString > SAL_CALL ClipboardManager::listClipboardNames()
MutexGuard aGuard(m_aMutex);
if (rBHelper.bDisposed)
- throw DisposedException(OUString(RTL_CONSTASCII_USTRINGPARAM("object is disposed.")),
+ throw DisposedException(OUString("object is disposed."),
static_cast < XClipboardManager * > (this));
if (rBHelper.bInDispose)
@@ -253,7 +253,7 @@ Sequence< OUString > SAL_CALL ClipboardManager_getSupportedServiceNames()
{
Sequence < OUString > SupportedServicesNames( 1 );
SupportedServicesNames[0] =
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.ClipboardManager"));
+ OUString("com.sun.star.datatransfer.clipboard.ClipboardManager");
return SupportedServicesNames;
}
diff --git a/dtrans/source/generic/generic_clipboard.cxx b/dtrans/source/generic/generic_clipboard.cxx
index 320ef93..275e091 100644
--- a/dtrans/source/generic/generic_clipboard.cxx
+++ b/dtrans/source/generic/generic_clipboard.cxx
@@ -73,7 +73,7 @@ void SAL_CALL GenericClipboard::initialize( const Sequence< Any >& aArguments )
OUString SAL_CALL GenericClipboard::getImplementationName( )
throw(RuntimeException)
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM(GENERIC_CLIPBOARD_IMPLEMENTATION_NAME));
+ return OUString(GENERIC_CLIPBOARD_IMPLEMENTATION_NAME);
}
// ------------------------------------------------------------------------
@@ -190,7 +190,7 @@ void SAL_CALL GenericClipboard::removeClipboardListener( const Reference< XClipb
Sequence< OUString > SAL_CALL GenericClipboard_getSupportedServiceNames()
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.GenericClipboard"));
+ aRet[0] = OUString("com.sun.star.datatransfer.clipboard.GenericClipboard");
return aRet;
}
diff --git a/dtrans/source/test/test_dtrans.cxx b/dtrans/source/test/test_dtrans.cxx
index 4b53d8d..c0a8941 100644
--- a/dtrans/source/test/test_dtrans.cxx
+++ b/dtrans/source/test/test_dtrans.cxx
@@ -232,7 +232,7 @@ private:
StringTransferable::StringTransferable( ) :
m_seqDFlv( 1 ),
m_receivedLostOwnership( sal_False ),
- m_Data( OUString(RTL_CONSTASCII_USTRINGPARAM("clipboard test content")) )
+ m_Data( OUString("clipboard test content") )
{
DataFlavor df;
@@ -244,7 +244,7 @@ StringTransferable::StringTransferable( ) :
*/
//df.MimeType = L"text/plain; charset=windows1252";
- df.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM("text/html"));
+ df.MimeType = OUString("text/html");
df.DataType = getCppuType( ( Sequence< sal_Int8 >* )0 );
m_seqDFlv[0] = df;
@@ -355,10 +355,10 @@ int SAL_CALL main( int argc, const char* argv[] )
//--------------------------------------------------------------
Sequence< Any > arguments(1);
- arguments[0] = makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) );
+ arguments[0] = makeAny( OUString("generic") );
Reference< XClipboard > xClipboard( xServiceManager->createInstanceWithArguments(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.GenericClipboard")),
+ OUString("com.sun.star.datatransfer.clipboard.GenericClipboard"),
arguments ), UNO_QUERY );
ENSURE( xClipboard.is(), "*** ERROR *** generic clipboard service could not be created." );
@@ -438,7 +438,7 @@ int SAL_CALL main( int argc, const char* argv[] )
//--------------------------------------------------------------
Reference< XClipboardManager > xClipboardManager( xServiceManager->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.ClipboardManager")) ), UNO_QUERY );
+ OUString("com.sun.star.datatransfer.clipboard.ClipboardManager") ), UNO_QUERY );
ENSURE( xClipboardManager.is(), "*** ERROR *** clipboard manager service could not be created." );
@@ -451,14 +451,14 @@ int SAL_CALL main( int argc, const char* argv[] )
TEST( "initial number of clipboards (0): ", xClipboardManager->listClipboardNames().getLength() == 0 );
PERFORM( "insertion of generic clipboard: ", xClipboardManager->addClipboard( xClipboard ) );
TEST( "number of inserted clipboards (1): ", xClipboardManager->listClipboardNames().getLength() == 1 );
- TEST( "name of inserted clipboard (generic): ", xClipboardManager->listClipboardNames()[0] == OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) );
- TEST( "inserted clipboard instance: ", xClipboardManager->getClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ) == xClipboard );
- PERFORM( "removal of generic clipboard: ", xClipboardManager->removeClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) ) );
+ TEST( "name of inserted clipboard (generic): ", xClipboardManager->listClipboardNames()[0] == OUString("generic") );
+ TEST( "inserted clipboard instance: ", xClipboardManager->getClipboard( OUString("generic") ) == xClipboard );
+ PERFORM( "removal of generic clipboard: ", xClipboardManager->removeClipboard( OUString("generic") ) );
TEST( "number of inserted clipboards (0): ", xClipboardManager->listClipboardNames().getLength() == 0 );
TRACE( "Testing inserted clipboard instance (none): " );
try
{
- xClipboardManager->getClipboard( OUString(RTL_CONSTASCII_USTRINGPARAM("generic")) );
+ xClipboardManager->getClipboard( OUString("generic") );
TRACE( "FAILED\n" );
}
catch (const NoSuchElementException&)
diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx
index 30bb0e2..f77e518 100644
--- a/dtrans/source/win32/clipb/WinClipboard.cxx
+++ b/dtrans/source/win32/clipb/WinClipboard.cxx
@@ -66,7 +66,7 @@ namespace
Sequence< OUString > SAL_CALL WinClipboard_getSupportedServiceNames()
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.clipboard.SystemClipboard"));
+ aRet[0] = OUString("com.sun.star.datatransfer.clipboard.SystemClipboard");
return aRet;
}
}
@@ -100,7 +100,7 @@ Reference< XTransferable > SAL_CALL CWinClipboard::getContents( ) throw( Runtime
MutexGuard aGuard( m_aMutex );
if ( rBHelper.bDisposed )
- throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
+ throw DisposedException( OUString("object is already disposed"),
static_cast< XClipboardEx* >( this ) );
if ( NULL != m_pImpl.get( ) )
@@ -120,7 +120,7 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra
MutexGuard aGuard( m_aMutex );
if ( rBHelper.bDisposed )
- throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
+ throw DisposedException( OUString("object is already disposed"),
static_cast< XClipboardEx* >( this ) );
if ( NULL != m_pImpl.get( ) )
@@ -134,13 +134,13 @@ void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTra
OUString SAL_CALL CWinClipboard::getName( ) throw( RuntimeException )
{
if ( rBHelper.bDisposed )
- throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
+ throw DisposedException( OUString("object is already disposed"),
static_cast< XClipboardEx* >( this ) );
if ( NULL != m_pImpl.get( ) )
return m_pImpl->getName( );
- return OUString(RTL_CONSTASCII_USTRINGPARAM(""));
+ return OUString("");
}
//========================================================================
@@ -152,7 +152,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException )
MutexGuard aGuard( m_aMutex );
if ( rBHelper.bDisposed )
- throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
+ throw DisposedException( OUString("object is already disposed"),
static_cast< XClipboardEx* >( this ) );
if ( NULL != m_pImpl.get( ) )
@@ -166,7 +166,7 @@ void SAL_CALL CWinClipboard::flushClipboard( ) throw( RuntimeException )
sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities( ) throw( RuntimeException )
{
if ( rBHelper.bDisposed )
- throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
+ throw DisposedException( OUString("object is already disposed"),
static_cast< XClipboardEx* >( this ) );
if ( NULL != m_pImpl.get( ) )
@@ -187,12 +187,12 @@ void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardLi
throw( RuntimeException )
{
if ( rBHelper.bDisposed )
- throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
+ throw DisposedException( OUString("object is already disposed"),
static_cast< XClipboardEx* >( this ) );
// check input parameter
if ( !listener.is( ) )
- throw IllegalArgumentException( OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")),
+ throw IllegalArgumentException( OUString("empty reference"),
static_cast< XClipboardEx* >( this ),
1 );
@@ -207,12 +207,12 @@ void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboar
throw( RuntimeException )
{
if ( rBHelper.bDisposed )
- throw DisposedException( OUString(RTL_CONSTASCII_USTRINGPARAM("object is already disposed")),
+ throw DisposedException( OUString("object is already disposed"),
static_cast< XClipboardEx* >( this ) );
// check input parameter
if ( !listener.is( ) )
- throw IllegalArgumentException( OUString(RTL_CONSTASCII_USTRINGPARAM("empty reference")),
+ throw IllegalArgumentException( OUString("empty reference"),
static_cast< XClipboardEx* >( this ),
1 );
@@ -291,7 +291,7 @@ void SAL_CALL CWinClipboard::disposing()
OUString SAL_CALL CWinClipboard::getImplementationName( )
throw(RuntimeException)
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM( WINCLIPBOARD_IMPL_NAME ));
+ return OUString( WINCLIPBOARD_IMPL_NAME );
}
// -------------------------------------------------
diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx
index 499509e..49922a3 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.cxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.cxx
@@ -509,7 +509,7 @@ sal_Bool SAL_CALL CDOTransferable::compareDataFlavors(
if ( !m_rXMimeCntFactory.is( ) )
{
m_rXMimeCntFactory = Reference< XMimeContentTypeFactory >( m_SrvMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory")) ), UNO_QUERY );
+ OUString("com.sun.star.datatransfer.MimeContentTypeFactory") ), UNO_QUERY );
}
OSL_ASSERT( m_rXMimeCntFactory.is( ) );
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx
index 3c6ba1a..09abf83 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx
+++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx
@@ -75,11 +75,11 @@ const Type CPPUTYPE_OUSTRING = getCppuType((OUString*)0);
const Type CPPUTYPE_SEQSALINT8 = getCppuType((Sequence< sal_Int8>*)0);
const sal_Int32 MAX_CLIPFORMAT_NAME = 256;
-const OUString TEXT_PLAIN_CHARSET (RTL_CONSTASCII_USTRINGPARAM("text/plain;charset="));
-const OUString HPNAME_OEM_ANSI_TEXT (RTL_CONSTASCII_USTRINGPARAM("OEM/ANSI Text"));
+const OUString TEXT_PLAIN_CHARSET ("text/plain;charset=");
+const OUString HPNAME_OEM_ANSI_TEXT ("OEM/ANSI Text");
-const OUString HTML_FORMAT_NAME_WINDOWS (RTL_CONSTASCII_USTRINGPARAM("HTML Format"));
-const OUString HTML_FORMAT_NAME_SOFFICE (RTL_CONSTASCII_USTRINGPARAM("HTML (HyperText Markup Language)"));
+const OUString HTML_FORMAT_NAME_WINDOWS ("HTML Format");
+const OUString HTML_FORMAT_NAME_SOFFICE ("HTML (HyperText Markup Language"));
//------------------------------------------------------------------------
//
@@ -89,7 +89,7 @@ CDataFormatTranslator::CDataFormatTranslator( const Reference< XMultiServiceFact
m_SrvMgr( aServiceManager )
{
m_XDataFormatTranslator = Reference< XDataFormatTranslator >(
- m_SrvMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.DataFormatTranslator")) ), UNO_QUERY );
+ m_SrvMgr->createInstance( OUString("com.sun.star.datatransfer.DataFormatTranslator") ), UNO_QUERY );
}
//------------------------------------------------------------------------
diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx
index 3599da8..0083861 100644
--- a/dtrans/source/win32/dtobj/FetcList.cxx
+++ b/dtrans/source/win32/dtobj/FetcList.cxx
@@ -281,7 +281,7 @@ void SAL_CALL CFormatRegistrar::RegisterFormats(
aFormatEtcContainer.addFormatEtc( fetc );
// and HTML Format
- OUString htmlFormat( RTL_CONSTASCII_USTRINGPARAM("HTML Format") );
+ OUString htmlFormat( "HTML Format" );
aFormatEtcContainer.addFormatEtc(
m_DataFormatTranslator.getFormatEtcForClipformatName( htmlFormat ) );
}
@@ -359,8 +359,7 @@ OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor&
try
{
Reference< XMimeContentTypeFactory > xMimeFac(
- m_SrvMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( \
- "com.sun.star.datatransfer.MimeContentTypeFactory" )) ), UNO_QUERY );
+ m_SrvMgr->createInstance( OUString( "com.sun.star.datatransfer.MimeContentTypeFactory" ) ), UNO_QUERY );
if( xMimeFac.is( ) )
{
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index 31028ac..9c522c3 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -455,7 +455,7 @@ void SAL_CALL CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium( FORMATETC&
DataFlavor aFlavor;
// creating a DataFlavor on the fly
- aFlavor.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM("text/html"));
+ aFlavor.MimeType = OUString("text/html");
aFlavor.DataType = getCppuType( (Sequence< sal_Int8 >*)0 );
Any aAny = m_XTransferable->getTransferData( aFlavor );
diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index 7bd6966..c73ab12 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -55,10 +55,10 @@
#define CPPUTYPE_DEFAULT CPPUTYPE_SEQSALINT8
#define CPPUTYPE_OUSTR getCppuType( (const ::rtl::OUString*) 0 )
#define CPPUTYPE_SALINT32 getCppuType( ( sal_Int32 * ) 0 )
-#define OUSTR( str ) OUString(RTL_CONSTASCII_USTRINGPARAM( #str ))
+#define OUSTR( str ) OUString( #str )
#define EMPTY_OUSTR OUString()
-const rtl::OUString Windows_FormatName (RTL_CONSTASCII_USTRINGPARAM("windows_formatname"));
+const rtl::OUString Windows_FormatName ("windows_formatname");
const com::sun::star::uno::Type CppuType_ByteSequence = ::getCppuType((const com::sun::star::uno::Sequence<sal_Int8>*)0);
const com::sun::star::uno::Type CppuType_String = ::getCppuType((const ::rtl::OUString*)0);
@@ -84,7 +84,7 @@ namespace MODULE_PRIVATE
Sequence< OUString > SAL_CALL DataFormatTranslator_getSupportedServiceNames( )
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.DataFormatTranslator"));
+ aRet[0] = OUString("com.sun.star.datatransfer.DataFormatTranslator");
return aRet;
}
}
@@ -231,7 +231,7 @@ DataFlavor SAL_CALL CDataFormatTranslator::getDataFlavorFromSystemDataType( cons
OUString SAL_CALL CDataFormatTranslator::getImplementationName( )
throw( RuntimeException )
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME ));
+ return OUString( IMPL_NAME );
}
// -------------------------------------------------
diff --git a/dtrans/source/win32/workbench/test_wincb.cxx b/dtrans/source/win32/workbench/test_wincb.cxx
index 3801f67..ac06786 100644
--- a/dtrans/source/win32/workbench/test_wincb.cxx
+++ b/dtrans/source/win32/workbench/test_wincb.cxx
@@ -163,7 +163,7 @@ private:
CTransferable::CTransferable( ) :
m_FlavorList( 1 ),
- m_Data( OUString(RTL_CONSTASCII_USTRINGPARAM("Ich habe mir ein neues Fahrrad gekauft!")) )
+ m_Data( OUString("Ich habe mir ein neues Fahrrad gekauft!") )
{
DataFlavor df;
@@ -269,7 +269,7 @@ int SAL_CALL main( int nArgc, char* Argv[] )
// get the global service-manager
//-------------------------------------------------
- OUString rdbName = OUString( RTL_CONSTASCII_USTRINGPARAM( RDB_SYSPATH ) );
+ OUString rdbName = OUString( RDB_SYSPATH );
Reference< XMultiServiceFactory > g_xFactory( createRegistryServiceFactory( rdbName ) );
// Print a message if an error occurred.
diff --git a/dtrans/test/win32/dnd/targetlistener.cxx b/dtrans/test/win32/dnd/targetlistener.cxx
index 2a24c17..2d2fa2a 100644
--- a/dtrans/test/win32/dnd/targetlistener.cxx
+++ b/dtrans/test/win32/dnd/targetlistener.cxx
@@ -53,7 +53,7 @@ void SAL_CALL DropTargetListener::drop( const DropTargetDropEvent& e )
{
e.Context->rejectDrop();
- DataFlavor flavor( OUString(OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=windows-1252"))),
+ DataFlavor flavor( OUString(OUString("text/plain;charset=windows-1252")),
OUString(L"Text plain"), getCppuType( ( Sequence<sal_Int8>*)0 ) );
Any anyData= e.Transferable->getTransferData( flavor);
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index 9e70b88..f3ebd2f 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -251,8 +251,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
OUString(
"com.sun.star.util.PathSubstitution" )),
UNO_QUERY);
- OUString aWorkingDir(subs->getSubstituteVariableValue(OUString(
- "$(progurl"))));
+ OUString aWorkingDir(subs->getSubstituteVariableValue(OUString( "$(progurl)")));
INetURLObject aObj(aWorkingDir);
aObj.setFinalSlash();
bool bWasAbsolute;
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 03f1c28..56ee7fa 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -133,7 +133,7 @@ static void getRuntimeImpl( PyRef & globalDict, PyRef &runtimeImpl )
PyThreadState * state = PyThreadState_Get();
if( ! state )
{
- throw RuntimeException( OUString( "python global interpreter must be held (thread must be attached" )),
+ throw RuntimeException( OUString( "python global interpreter must be held (thread must be attached)" ),
Reference< XInterface > () );
}
@@ -361,7 +361,7 @@ Runtime::Runtime() throw( RuntimeException )
{
throw RuntimeException(
OUString( "pyuno runtime is not initialized, "
- "(the pyuno.bootstrap needs to be called before using any uno classes")),
+ "(the pyuno.bootstrap needs to be called before using any uno classes)"),
Reference< XInterface > () );
}
impl = reinterpret_cast< RuntimeImpl * > (runtime.get());
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 41a7fb2..0a2a43a 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -171,8 +171,7 @@ lcl_initGenerator(SvXMLImport & rImport,
xPath->registerNS(GetXMLToken(XML_NP_OFFICE),GetXMLToken(XML_N_OFFICE));
xPath->registerNS(GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META));
- ::rtl::OUString const expr(
- "string(/office:document-meta/office:meta/meta:generator"));
+ ::rtl::OUString const expr( "string(/office:document-meta/office:meta/meta:generator)");
uno::Reference< xml::xpath::XXPathObject > const xObj(
xPath->eval(xDoc.get(), expr), uno::UNO_SET_THROW);
OUString const value(xObj->getString());
commit a30795ce516b273a3a56a136b9b8802a23dd632a
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Jun 1 09:17:54 2012 -0500
targeted string re-work
Change-Id: I96ce39a3982d7d638283c18a5913c1df13979b1f
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 9a567ae..0106a9a 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -168,7 +168,7 @@ T602ImportFilter::~T602ImportFilter()
/* if ( aFilterName == "T602Document" || aTypeName == "writer_T602_Document" )
// preselection by type (extension) or filter name: no reason to check type
- return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "writer_T602_Document" ) ); */
+ return rtl::OUString( "writer_T602_Document" ); */
::com::sun::star::uno::Sequence< sal_Int8 > aData;
size_t numBytes = 4;
@@ -180,7 +180,7 @@ T602ImportFilter::~T602ImportFilter()
(aData[1] != 'C') || (aData[2] != 'T') || (aData[3] != ' '))
return ::rtl::OUString();
- return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "writer_T602_Document" ) );
+ return rtl::OUString( "writer_T602_Document" );
}
// XFilter
@@ -271,7 +271,7 @@ sal_Bool SAL_CALL T602ImportFilter::importImpl( const Sequence< ::com::sun::star
}
// An XML import service: what we push sax messages to..
- OUString sXMLImportService ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.XMLImporter" ) );
+ OUString sXMLImportService ( "com.sun.star.comp.Writer.XMLImporter" );
mxHandler = Reference< XDocumentHandler >( mxMSF->createInstance( sXMLImportService ), UNO_QUERY );
@@ -883,7 +883,7 @@ Sequence< OUString > SAL_CALL T602ImportFilter::getSupportedServiceNames( )
OUString T602ImportFilter_getImplementationName ()
throw (RuntimeException)
{
- return OUString ( RTL_CONSTASCII_USTRINGPARAM ( IMPLEMENTATION_NAME ) );
+ return OUString ( IMPLEMENTATION_NAME );
}
#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
@@ -899,8 +899,8 @@ Sequence< OUString > SAL_CALL T602ImportFilter_getSupportedServiceNames( )
{
Sequence < OUString > aRet(2);
OUString* pArray = aRet.getArray();
- pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
- pArray[1] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) );
+ pArray[0] = OUString ( SERVICE_NAME1 );
+ pArray[1] = OUString ( SERVICE_NAME2 );
return aRet;
}
#undef SERVICE_NAME2
@@ -1015,12 +1015,12 @@ sal_Bool T602ImportFilterDialog::OptionsDlg()
ous[2] = getResStr(T602FILTER_STR_ENCODING_CP895);
ous[3] = getResStr(T602FILTER_STR_ENCODING_KOI8CS2);
any <<= ous;
- xPSetCodeLB->setPropertyValue(OUString( RTL_CONSTASCII_USTRINGPARAM( "StringItemList" )), any);
+ xPSetCodeLB->setPropertyValue(OUString( "StringItemList" ), any);
Sequence < sal_Int16 > shr(1);
shr[0] = ini.forcecode ? ((sal_Int16) ini.xcode) + 1 : 0;
any <<= shr;
- xPSetCodeLB->setPropertyValue(OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" )), any);
+ xPSetCodeLB->setPropertyValue(OUString( "SelectedItems" ), any);
Reference < XInterface > AzbCheckBoxModel = _Inst("com.sun.star.awt.UnoControlCheckBoxModel");
Reference < XPropertySet > xPSetAzbukaCB( AzbCheckBoxModel, UNO_QUERY );
@@ -1211,7 +1211,7 @@ Sequence< OUString > SAL_CALL T602ImportFilterDialog::getSupportedServiceNames(
OUString T602ImportFilterDialog_getImplementationName ()
throw (RuntimeException)
{
- return OUString ( RTL_CONSTASCII_USTRINGPARAM ( IMPLEMENTATION_NAME ) );
+ return OUString ( IMPLEMENTATION_NAME );
}
#define SERVICE_NAME "com.sun.star.ui.dialogs.FilterOptionsDialog"
@@ -1226,7 +1226,7 @@ Sequence< OUString > SAL_CALL T602ImportFilterDialog_getSupportedServiceNames(
{
Sequence < OUString > aRet(1);
OUString* pArray = aRet.getArray();
- pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
+ pArray[0] = OUString ( SERVICE_NAME );
return aRet;
}
#undef SERVICE_NAME
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index b42e1f3..9e70b88 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -191,17 +191,17 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
css::uno::Reference<XPropertySet> xProps(m_rServiceFactory,
UNO_QUERY_THROW);
xContext.set(xProps->getPropertyValue(::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))),
+ "DefaultContext" )),
UNO_QUERY_THROW);
css::uno::Reference<XMacroExpander>
xMacroExpander(
xContext->getValueByName(
::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" ))),
+ "/singletons/com.sun.star.util.theMacroExpander" )),
UNO_QUERY_THROW);
sExpandedUrl = xMacroExpander->expandMacros(sUrl);
sal_Int32 nPos = sExpandedUrl.indexOf(::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.expand:" )));
+ "vnd.sun.star.expand:" ));
if (nPos != -1)
sExpandedUrl = sExpandedUrl.copy(nPos + 20);
}
@@ -249,10 +249,10 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
subs(
m_rServiceFactory->createInstance(
OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.PathSubstitution" ))),
+ "com.sun.star.util.PathSubstitution" )),
UNO_QUERY);
OUString aWorkingDir(subs->getSubstituteVariableValue(OUString(
- RTL_CONSTASCII_USTRINGPARAM("$(progurl)"))));
+ "$(progurl"))));
INetURLObject aObj(aWorkingDir);
aObj.setFinalSlash();
bool bWasAbsolute;
@@ -303,7 +303,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
xSaxParser(
m_rServiceFactory->createInstance(
OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser" ))),
+ "com.sun.star.xml.sax.Parser" )),
UNO_QUERY);
OSL_ASSERT(xSaxParser.is());
if (!xSaxParser.is())
@@ -313,17 +313,17 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
Sequence<Any> args(3);
NamedValue nv;
- nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "StylesheetURL" ));
+ nv.Name = OUString( "StylesheetURL" );
nv.Value <<= expandUrl(udStyleSheet);
args[0] <<= nv;
- nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "SourceURL" ));
+ nv.Name = OUString( "SourceURL" );
nv.Value <<= aURL;
args[1] <<= nv;
- nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "SourceBaseURL" ));
+ nv.Name = OUString( "SourceBaseURL" );
nv.Value <<= OUString(INetURLObject(aURL).getBase());
args[2] <<= nv;
- OUString serviceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.documentconversion.LibXSLTTransformer"));
+ OUString serviceName("com.sun.star.comp.documentconversion.LibXSLTTransformer");
if (!msUserData[1].isEmpty())
serviceName = msUserData[1];
@@ -349,7 +349,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
pipeout(
m_rServiceFactory->createInstance(
OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.Pipe" ))),
+ "com.sun.star.io.Pipe" )),
UNO_QUERY);
css::uno::Reference<XInputStream> pipein(pipeout, UNO_QUERY);
@@ -375,7 +375,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
if (xInterActionHandler.is()) {
Sequence<Any> excArgs(0);
::com::sun::star::ucb::InteractiveAugmentedIOException exc(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Timeout!")),
+ rtl::OUString("Timeout!"),
static_cast< OWeakObject * >( this ),
InteractionClassification_ERROR,
::com::sun::star::ucb::IOErrorCode_GENERAL,
@@ -461,33 +461,33 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
setDelegate(css::uno::Reference<XExtendedDocumentHandler> (
m_rServiceFactory->createInstance(
OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" ))),
+ "com.sun.star.xml.sax.Writer" )),
UNO_QUERY));
}
// create transformer
Sequence<Any> args(4);
NamedValue nv;
- nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "StylesheetURL" ));
+ nv.Name = OUString( "StylesheetURL" );
nv.Value <<= expandUrl(udStyleSheet);
args[0] <<= nv;
- nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "TargetURL" ));
+ nv.Name = OUString( "TargetURL" );
nv.Value <<= sURL;
args[1] <<= nv;
- nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "DoctypeSystem" ));
+ nv.Name = OUString( "DoctypeSystem" );
nv.Value <<= aDoctypeSystem;
args[2] <<= nv;
- nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "DoctypePublic" ));
+ nv.Name = OUString( "DoctypePublic" );
nv.Value <<= aDoctypePublic;
args[3] <<= nv;
- nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "TargetBaseURL" ));
+ nv.Name = OUString( "TargetBaseURL" );
INetURLObject ineturl(sURL);
ineturl.removeSegment();
m_aExportBaseUrl = ineturl.GetMainURL(INetURLObject::NO_DECODE);
nv.Value <<= m_aExportBaseUrl;
args[3] <<= nv;
- OUString serviceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.documentconversion.LibXSLTTransformer"));
+ OUString serviceName("com.sun.star.comp.documentconversion.LibXSLTTransformer");
if (!msUserData[1].isEmpty())
serviceName = msUserData[1];
@@ -505,7 +505,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
pipeout(
m_rServiceFactory->createInstance(
OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.Pipe" ))),
+ "com.sun.star.io.Pipe" )),
UNO_QUERY);
css::uno::Reference<XInputStream> pipein(pipeout, UNO_QUERY);
@@ -600,7 +600,7 @@ extern "C"
Sequence<OUString> serviceNames(1);
serviceNames.getArray()[0]
= OUString(
- RTL_CONSTASCII_USTRINGPARAM( FILTER_SERVICE_NAME ));
+ FILTER_SERVICE_NAME );
css::uno::Reference<XSingleServiceFactory>
xFactory(
@@ -622,7 +622,7 @@ extern "C"
Sequence<OUString> serviceNames(1);
serviceNames.getArray()[0]
= OUString(
- RTL_CONSTASCII_USTRINGPARAM( TRANSFORMER_SERVICE_NAME ));
+ TRANSFORMER_SERVICE_NAME );
css::uno::Reference<XSingleServiceFactory>
xFactory(
createSingleFactory(
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 92f9e75..9d68be9 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -121,10 +121,10 @@ DBG(extern void dump_pset(Reference< XPropertySet > rXPropSet));
namespace oox { namespace drawingml {
#define GETA(propName) \
- GetProperty( rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( #propName ) ) )
+ GetProperty( rXPropSet, String( #propName ) )
#define GETAD(propName) \
- ( GetPropertyAndState( rXPropSet, rXPropState, String( RTL_CONSTASCII_USTRINGPARAM( #propName ) ), eState ) && eState == beans::PropertyState_DIRECT_VALUE )
+ ( GetPropertyAndState( rXPropSet, rXPropState, String( #propName ), eState ) && eState == beans::PropertyState_DIRECT_VALUE )
#define GET(variable, propName) \
if ( GETA(propName) ) \
@@ -137,7 +137,7 @@ Reference< uno::XComponentContext > lcl_getComponentContext()
{
Reference< beans::XPropertySet > xFactProp( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
if( xFactProp.is())
- xFactProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext"))) >>= xContext;
+ xFactProp->getPropertyValue(OUString("DefaultContext")) >>= xContext;
}
catch( uno::Exception& )
{}
@@ -161,7 +161,7 @@ public:
return ( xProp.is() &&
(xProp->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Role" )) ) >>= aRole ) &&
+ OUString( "Role" ) ) >>= aRole ) &&
m_aRole.equals( aRole ));
}
@@ -214,9 +214,9 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen
{
(void)ex; // avoid warning for pro build
OSL_FAIL( rtl::OUStringToOString(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
+ OUString( "Exception caught. Type: " ) +
OUString::createFromAscii( typeid( ex ).name()) +
- OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
+ OUString( ", Message: " ) +
ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
}
@@ -231,7 +231,7 @@ Reference< chart2::data::XDataSource > lcl_createDataSource(
if( xContext.is() )
xSink.set(
xContext->getServiceManager()->createInstanceWithContext(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.data.DataSource")),
+ OUString("com.sun.star.chart2.data.DataSource"),
xContext ), uno::UNO_QUERY_THROW );
if( xSink.is())
xSink->setData( aData );
@@ -297,12 +297,12 @@ Reference< chart2::data::XDataSource > lcl_pressUsedDataIntoRectangularFormat( c
//the first x-values is always the next sequence //todo ... other x-values get lost for old format
Reference< chart2::data::XLabeledDataSequence > xXValues(
- lcl_getDataSequenceByRole( aSeriesSeqVector, OUString(RTL_CONSTASCII_USTRINGPARAM("values-x")) ) );
+ lcl_getDataSequenceByRole( aSeriesSeqVector, OUString("values-x") ) );
if( xXValues.is() )
aLabeledSeqVector.push_back( xXValues );
//add all other sequences now without x-values
- lcl_MatchesRole aHasXValues( OUString(RTL_CONSTASCII_USTRINGPARAM("values-x")) );
+ lcl_MatchesRole aHasXValues( OUString("values-x") );
for( sal_Int32 nN=0; nN<aSeriesSeqVector.getLength(); nN++ )
{
if( !aHasXValues( aSeriesSeqVector[nN] ) )
@@ -325,16 +325,16 @@ bool lcl_isSeriesAttachedToFirstAxis(
sal_Int32 nAxisIndex = 0;
Reference< beans::XPropertySet > xProp( xDataSeries, uno::UNO_QUERY_THROW );
if( xProp.is() )
- xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("AttachedAxisIndex") ) ) >>= nAxisIndex;
+ xProp->getPropertyValue( OUString( "AttachedAxisIndex" ) ) >>= nAxisIndex;
bResult = (0==nAxisIndex);
}
catch( const uno::Exception & ex )
{
(void)ex; // avoid warning for pro build
OSL_FAIL( rtl::OUStringToOString(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
+ OUString( "Exception caught. Type: " ) +
OUString::createFromAscii( typeid( ex ).name()) +
- OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
+ OUString( ", Message: " ) +
ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
}
@@ -507,7 +507,7 @@ OUString ChartExport::parseFormula( const OUString& rRange )
{
try
{
- xParser.set( xSF->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.FormulaParser")) ), UNO_QUERY );
+ xParser.set( xSF->createInstance( OUString("com.sun.star.sheet.FormulaParser") ), UNO_QUERY );
}
catch( Exception& )
{
@@ -519,12 +519,12 @@ OUString ChartExport::parseFormula( const OUString& rRange )
Reference< XPropertySet > xParserProps( xParser, uno::UNO_QUERY );
if( xParserProps.is() )
{
- xParserProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FormulaConvention")), uno::makeAny(::com::sun::star::sheet::AddressConvention::OOO) );
+ xParserProps->setPropertyValue( OUString("FormulaConvention"), uno::makeAny(::com::sun::star::sheet::AddressConvention::OOO) );
}
uno::Sequence<sheet::FormulaToken> aTokens = xParser->parseFormula( rRange, CellAddress( 0, 0, 0 ) );
if( xParserProps.is() )
{
- xParserProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FormulaConvention")), uno::makeAny(::com::sun::star::sheet::AddressConvention::XL_OOX) );
+ xParserProps->setPropertyValue( OUString("FormulaConvention"), uno::makeAny(::com::sun::star::sheet::AddressConvention::XL_OOX) );
}
aResult = xParser->printFormula( aTokens, CellAddress( 0, 0, 0 ) );
}
@@ -698,9 +698,9 @@ void ChartExport::InitRangeSegmentationProperties( const Reference< chart2::XCha
{
(void)ex; // avoid warning for pro build
OSL_FAIL( rtl::OUStringToOString(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
+ OUString( "Exception caught. Type: " ) +
OUString::createFromAscii( typeid( ex ).name()) +
- OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
+ OUString( ", Message: " ) +
ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
}
}
@@ -742,7 +742,7 @@ void ChartExport::_ExportContent()
if( xServ.is())
{
if( xServ->supportsService(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.ChartTableAddressSupplier"))))
+ OUString("com.sun.star.chart.ChartTableAddressSupplier")))
{
Reference< beans::XPropertySet > xProp( xServ, uno::UNO_QUERY );
if( xProp.is())
@@ -752,13 +752,13 @@ void ChartExport::_ExportContent()
{
OUString sChartAddress;
aAny = xProp->getPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("ChartRangeAddress")));
+ OUString("ChartRangeAddress"));
aAny >>= msChartAddress;
//maExportHelper.SetChartRangeAddress( sChartAddress );
OUString sTableNumberList;
aAny = xProp->getPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("TableNumberList")));
+ OUString("TableNumberList"));
aAny >>= msTableNumberList;
//maExportHelper.SetTableNumberList( sTableNumberList );
@@ -829,13 +829,13 @@ void ChartExport::exportChart( Reference< ::com::sun::star::chart::XChartDocumen
try
{
Any aAny( xDocPropSet->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "HasMainTitle" ))));
+ OUString( "HasMainTitle" )));
aAny >>= bHasMainTitle;
aAny = xDocPropSet->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "HasSubTitle" )));
+ OUString( "HasSubTitle" ));
aAny >>= bHasSubTitle;
aAny = xDocPropSet->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "HasLegend" )));
+ OUString( "HasLegend" ));
aAny >>= bHasLegend;
}
catch( beans::UnknownPropertyException & )
@@ -912,7 +912,7 @@ void ChartExport::exportLegend( Reference< ::com::sun::star::chart::XChartDocume
try
{
Any aAny( xProp->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Alignment" ))));
+ OUString( "Alignment" )));
aAny >>= aLegendPos;
}
catch( beans::UnknownPropertyException & )
@@ -963,7 +963,7 @@ void ChartExport::exportTitle( Reference< XShape > xShape )
Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
if( xPropSet.is())
{
- xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "String" ))) >>= sText;
+ xPropSet->getPropertyValue( OUString( "String" )) >>= sText;
}
if( sText.isEmpty() )
return;
@@ -983,7 +983,7 @@ void ChartExport::exportTitle( Reference< XShape > xShape )
// TODO: bodyPr
const char* sWritingMode = NULL;
sal_Bool bVertical = sal_False;
- xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "StackedText" ))) >>= bVertical;
+ xPropSet->getPropertyValue( OUString( "StackedText" )) >>= bVertical;
if( bVertical )
sWritingMode = "wordArtVert";
@@ -1461,7 +1461,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
sal_Bool bJapaneseCandleSticks = sal_False;
Reference< beans::XPropertySet > xCTProp( xChartType, uno::UNO_QUERY );
if( xCTProp.is())
- xCTProp->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Japanese"))) >>= bJapaneseCandleSticks;
+ xCTProp->getPropertyValue( OUString("Japanese")) >>= bJapaneseCandleSticks;
exportCandleStickSeries(
xDSCnt->getDataSeries(), bJapaneseCandleSticks, nAttachedAxis );
return;
@@ -1493,7 +1493,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
{
Reference< beans::XPropertySet > xSeqProp( xTempValueSeq, uno::UNO_QUERY );
if( xSeqProp.is())
- xSeqProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Role"))) >>= aRole;
+ xSeqProp->getPropertyValue(OUString("Role")) >>= aRole;
// "main" sequence
if( aRole.equals( aLabelRole ))
{
@@ -1588,7 +1588,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
|| (eChartType == chart::TYPEID_BUBBLE) )
{
// export xVal
- Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM("values-x")) ) );
+ Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString("values-x") ) );
if( xSequence.is() )
{
Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
@@ -1601,7 +1601,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
if( eChartType == chart::TYPEID_BUBBLE )
{
// export yVal
- Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM("values-y")) ) );
+ Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString("values-y") ) );
if( xSequence.is() )
{
Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
@@ -1840,39 +1840,39 @@ void ChartExport::InitPlotArea( )
if (xServiceInfo.is())
{
if (xServiceInfo->supportsService(
- OUString(RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.chart.ChartAxisXSupplier"))))
+ OUString("com.sun.star.chart.ChartAxisXSupplier")))
{
xDiagramProperties->getPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("HasXAxis"))) >>= mbHasXAxis;
+ OUString("HasXAxis")) >>= mbHasXAxis;
}
if (xServiceInfo->supportsService(
- OUString(RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.chart.ChartAxisYSupplier"))))
+ OUString("com.sun.star.chart.ChartAxisYSupplier")))
{
xDiagramProperties->getPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("HasYAxis"))) >>= mbHasYAxis;
+ OUString("HasYAxis")) >>= mbHasYAxis;
}
if (xServiceInfo->supportsService(
- OUString(RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.chart.ChartAxisZSupplier"))))
+ OUString("com.sun.star.chart.ChartAxisZSupplier")))
{
xDiagramProperties->getPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("HasZAxis"))) >>= mbHasZAxis;
+ OUString("HasZAxis")) >>= mbHasZAxis;
}
if (xServiceInfo->supportsService(
- OUString(RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.chart.ChartTwoAxisXSupplier"))))
+ OUString("com.sun.star.chart.ChartTwoAxisXSupplier")))
{
xDiagramProperties->getPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("HasSecondaryXAxis"))) >>= mbHasSecondaryXAxis;
+ OUString("HasSecondaryXAxis")) >>= mbHasSecondaryXAxis;
}
if (xServiceInfo->supportsService(
- OUString(RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.chart.ChartTwoAxisYSupplier"))))
+ OUString("com.sun.star.chart.ChartTwoAxisYSupplier")))
{
xDiagramProperties->getPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("HasSecondaryYAxis"))) >>= mbHasSecondaryYAxis;
+ OUString("HasSecondaryYAxis")) >>= mbHasSecondaryYAxis;
}
}
xDiagramProperties->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("Dim3D"))) >>= mbIs3DChart;
+ OUString ("Dim3D")) >>= mbIs3DChart;
Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY );
if( mbHasCategoryLabels && mxNewDiagram.is())
@@ -1912,29 +1912,29 @@ void ChartExport::exportAxis( AxisIdPair aAxisIdPair )
Reference< XPropertySet > xDiagramProperties (mxDiagram, uno::UNO_QUERY);
xDiagramProperties->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("HasXAxisTitle"))) >>= bHasXAxisTitle;
+ OUString ("HasXAxisTitle")) >>= bHasXAxisTitle;
xDiagramProperties->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("HasYAxisTitle"))) >>= bHasYAxisTitle;
+ OUString ("HasYAxisTitle")) >>= bHasYAxisTitle;
xDiagramProperties->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("HasZAxisTitle"))) >>= bHasZAxisTitle;
+ OUString ("HasZAxisTitle")) >>= bHasZAxisTitle;
xDiagramProperties->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("HasSecondaryXAxisTitle"))) >>= bHasSecondaryXAxisTitle;
+ OUString ("HasSecondaryXAxisTitle")) >>= bHasSecondaryXAxisTitle;
xDiagramProperties->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("HasSecondaryYAxisTitle"))) >>= bHasSecondaryYAxisTitle;
+ OUString ("HasSecondaryYAxisTitle")) >>= bHasSecondaryYAxisTitle;
xDiagramProperties->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("HasXAxisGrid"))) >>= bHasXAxisMajorGrid;
+ OUString ("HasXAxisGrid")) >>= bHasXAxisMajorGrid;
xDiagramProperties->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("HasYAxisGrid"))) >>= bHasYAxisMajorGrid;
+ OUString ("HasYAxisGrid")) >>= bHasYAxisMajorGrid;
xDiagramProperties->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("HasZAxisGrid"))) >>= bHasZAxisMajorGrid;
+ OUString ("HasZAxisGrid")) >>= bHasZAxisMajorGrid;
xDiagramProperties->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("HasXAxisHelpGrid"))) >>= bHasXAxisMinorGrid;
+ OUString ("HasXAxisHelpGrid")) >>= bHasXAxisMinorGrid;
xDiagramProperties->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("HasYAxisHelpGrid"))) >>= bHasYAxisMinorGrid;
+ OUString ("HasYAxisHelpGrid")) >>= bHasYAxisMinorGrid;
xDiagramProperties->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("HasZAxisHelpGrid"))) >>= bHasZAxisMinorGrid;
+ OUString ("HasZAxisHelpGrid")) >>= bHasZAxisMinorGrid;
Reference< XPropertySet > xAxisProp;
Reference< drawing::XShape > xAxisTitle;
@@ -2105,7 +2105,7 @@ void ChartExport::_exportAxis(
if( xAxisProp.is() )
{
xAxisProp->getPropertyValue(
- OUString (RTL_CONSTASCII_USTRINGPARAM ("Visible"))) >>= bVisible;
+ OUString ("Visible")) >>= bVisible;
}
if( !bVisible )
@@ -2322,10 +2322,10 @@ void ChartExport::exportDataPoints(
if( xSeriesProperties.is())
{
Any aAny = xSeriesProperties->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "AttributedDataPoints" )));
+ OUString( "AttributedDataPoints" ));
aAny >>= aDataPointSeq;
xSeriesProperties->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "VaryColorsByPoint" ))) >>= bVaryColorsByPoint;
+ OUString( "VaryColorsByPoint" )) >>= bVaryColorsByPoint;
}
const sal_Int32 * pPoints = aDataPointSeq.getConstArray();
commit 9601b63509f07069b90144f53b2e55f74d04a483
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Jun 1 09:15:09 2012 -0500
targeted string re-work
Change-Id: Ibe5c739c3066f3e706a44b64d4ad775abde9662c
diff --git a/io/test/testconnection.cxx b/io/test/testconnection.cxx
index 708daf3..64979e0 100644
--- a/io/test/testconnection.cxx
+++ b/io/test/testconnection.cxx
@@ -180,46 +180,46 @@ void testConnection( const OUString &sConnectionDescription ,
int SAL_CALL main( int argc, char * argv[] )
{
Reference< XMultiServiceFactory > xMgr(
- createRegistryServiceFactory( OUString( RTL_CONSTASCII_USTRINGPARAM("applicat.rdb")) ) );
+ createRegistryServiceFactory( OUString( "applicat.rdb") ) );
Reference< XImplementationRegistration > xImplReg(
- xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) ), UNO_QUERY );
+ xMgr->createInstance( OUString("com.sun.star.registry.ImplementationRegistration") ), UNO_QUERY );
OSL_ENSURE( xImplReg.is(), "### no impl reg!" );
OUString aLibName =
- OUString(RTL_CONSTASCII_USTRINGPARAM( "connector.uno" SAL_DLLEXTENSION ));
+ OUString( "connector.uno" SAL_DLLEXTENSION );
xImplReg->registerImplementation(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), aLibName, Reference< XSimpleRegistry >() );
+ OUString("com.sun.star.loader.SharedLibrary"), aLibName, Reference< XSimpleRegistry >() );
- aLibName = OUString(RTL_CONSTASCII_USTRINGPARAM( "acceptor.uno" SAL_DLLEXTENSION ));
+ aLibName = OUString( "acceptor.uno" SAL_DLLEXTENSION );
xImplReg->registerImplementation(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), aLibName, Reference< XSimpleRegistry >() );
+ OUString("com.sun.star.loader.SharedLibrary"), aLibName, Reference< XSimpleRegistry >() );
Reference < XAcceptor > rAcceptor(
xMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.Acceptor")) ) , UNO_QUERY );
+ OUString("com.sun.star.connection.Acceptor") ) , UNO_QUERY );
Reference < XAcceptor > rAcceptorPipe(
xMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.Acceptor")) ) , UNO_QUERY );
+ OUString("com.sun.star.connection.Acceptor") ) , UNO_QUERY );
Reference < XConnector > rConnector(
- xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.Connector")) ) , UNO_QUERY );
+ xMgr->createInstance( OUString("com.sun.star.connection.Connector") ) , UNO_QUERY );
printf( "Testing sockets" );
fflush( stdout );
- testConnection( OUString(RTL_CONSTASCII_USTRINGPARAM("socket,host=localhost,port=2001")), rAcceptor , rConnector );
+ testConnection( OUString("socket,host=localhost,port=2001"), rAcceptor , rConnector );
printf( " Done\n" );
printf( "Testing pipe" );
fflush( stdout );
- testConnection( OUString(RTL_CONSTASCII_USTRINGPARAM("pipe,name=bla")) , rAcceptorPipe , rConnector );
+ testConnection( OUString("pipe,name=bla") , rAcceptorPipe , rConnector );
printf( " Done\n" );
// check, if errornous strings make any problem
rAcceptor = Reference< XAcceptor > (
- xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.connection.Acceptor")) ),
+ xMgr->createInstance( OUString("com.sun.star.connection.Acceptor") ),
UNO_QUERY );
try
@@ -251,14 +251,14 @@ int SAL_CALL main( int argc, char * argv[] )
}
- MyThread thread( rAcceptor , OUString(RTL_CONSTASCII_USTRINGPARAM("socket,host=localhost,port=2001")) );
+ MyThread thread( rAcceptor , OUString("socket,host=localhost,port=2001") );
thread.create();
TimeValue value = {0,1};
osl_waitThread( &value );
try
{
- rAcceptor->accept( OUString(RTL_CONSTASCII_USTRINGPARAM("socket,host=localhost,port=2001")) );
+ rAcceptor->accept( OUString("socket,host=localhost,port=2001") );
OSL_FAIL( "already existing exception expected" );
}
catch( AlreadyAcceptingException & )
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index e7023bc..03f1c28 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -69,7 +69,7 @@ using com::sun::star::beans::XIntrospection;
namespace pyuno
{
-#define USTR_ASCII(x) OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
+#define USTR_ASCII(x) OUString( x )
static PyTypeObject RuntimeImpl_Type =
{
@@ -133,8 +133,7 @@ static void getRuntimeImpl( PyRef & globalDict, PyRef &runtimeImpl )
PyThreadState * state = PyThreadState_Get();
if( ! state )
{
- throw RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM(
- "python global interpreter must be held (thread must be attached)" )),
+ throw RuntimeException( OUString( "python global interpreter must be held (thread must be attached" )),
Reference< XInterface > () );
}
@@ -142,8 +141,7 @@ static void getRuntimeImpl( PyRef & globalDict, PyRef &runtimeImpl )
if( ! globalDict.is() ) // FATAL !
{
- throw RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM(
- "can't find __main__ module" )), Reference< XInterface > ());
+ throw RuntimeException( OUString( "can't find __main__ module" ), Reference< XInterface > ());
}
runtimeImpl = PyDict_GetItemString( globalDict.get() , "pyuno_runtime" );
}
@@ -182,7 +180,7 @@ static void readLoggingConfig( sal_Int32 *pLevel, FILE **ppFile )
reinterpret_cast< oslGenericFunction >(readLoggingConfig),
(rtl_uString **) &fileName );
fileName = OUString( fileName.getStr(), fileName.lastIndexOf( '/' )+1 );
- fileName += OUString(RTL_CONSTASCII_USTRINGPARAM( SAL_CONFIGFILE("pyuno") ));
+ fileName += OUString( SAL_CONFIGFILE("pyuno" ));
rtl::Bootstrap bootstrapHandle( fileName );
OUString str;
@@ -246,7 +244,7 @@ PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx )
RuntimeImpl *me = PyObject_New (RuntimeImpl, &RuntimeImpl_Type);
if( ! me )
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "cannot instantiate pyuno::RuntimeImpl" ) ),
+ OUString( "cannot instantiate pyuno::RuntimeImpl" ),
Reference< XInterface > () );
me->cargo = 0;
// must use a different struct here, as the PyObject_New
@@ -259,60 +257,59 @@ PyRef stRuntimeImpl::create( const Reference< XComponentContext > &ctx )
c->xContext = ctx;
c->xInvocation = Reference< XSingleServiceFactory > (
ctx->getServiceManager()->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.Invocation" ) ),
+ OUString( "com.sun.star.script.Invocation" ),
ctx ),
UNO_QUERY );
if( ! c->xInvocation.is() )
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "pyuno: couldn't instantiate invocation service" ) ),
+ OUString( "pyuno: couldn't instantiate invocation service" ),
Reference< XInterface > () );
c->xTypeConverter = Reference< XTypeConverter > (
ctx->getServiceManager()->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.Converter" ) ),
+ OUString( "com.sun.star.script.Converter" ),
ctx ),
UNO_QUERY );
if( ! c->xTypeConverter.is() )
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "pyuno: couldn't instantiate typeconverter service" )),
+ OUString( "pyuno: couldn't instantiate typeconverter service" ),
Reference< XInterface > () );
c->xCoreReflection = Reference< XIdlReflection > (
ctx->getServiceManager()->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.reflection.CoreReflection" ) ),
+ OUString( "com.sun.star.reflection.CoreReflection" ),
ctx ),
UNO_QUERY );
if( ! c->xCoreReflection.is() )
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "pyuno: couldn't instantiate corereflection service" )),
+ OUString( "pyuno: couldn't instantiate corereflection service" ),
Reference< XInterface > () );
c->xAdapterFactory = Reference< XInvocationAdapterFactory2 > (
ctx->getServiceManager()->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.InvocationAdapterFactory" ) ),
+ OUString( "com.sun.star.script.InvocationAdapterFactory" ),
ctx ),
UNO_QUERY );
if( ! c->xAdapterFactory.is() )
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "pyuno: couldn't instantiate invocation adapter factory service" )),
+ OUString( "pyuno: couldn't instantiate invocation adapter factory service" ),
Reference< XInterface > () );
c->xIntrospection = Reference< XIntrospection > (
ctx->getServiceManager()->createInstanceWithContext(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.beans.Introspection" ) ),
+ OUString( "com.sun.star.beans.Introspection" ),
ctx ),
UNO_QUERY );
if( ! c->xIntrospection.is() )
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "pyuno: couldn't instantiate introspection service" )),
+ OUString( "pyuno: couldn't instantiate introspection service" ),
Reference< XInterface > () );
- Any a = ctx->getValueByName(OUString(
- RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theTypeDescriptionManager" )) );
+ Any a = ctx->getValueByName(OUString( "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ) );
a >>= c->xTdMgr;
if( ! c->xTdMgr.is() )
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "pyuno: couldn't retrieve typedescriptionmanager" )),
+ OUString( "pyuno: couldn't retrieve typedescriptionmanager" ),
Reference< XInterface > () );
me->cargo =c;
@@ -338,8 +335,7 @@ void Runtime::initialize( const Reference< XComponentContext > & ctx )
if( runtime.is() && impl->cargo->valid )
{
- throw RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM(
- "pyuno runtime has already been initialized before" ) ),
+ throw RuntimeException( OUString( "pyuno runtime has already been initialized before" ),
Reference< XInterface > () );
}
PyRef keep( RuntimeImpl::create( ctx ) );
@@ -364,8 +360,8 @@ Runtime::Runtime() throw( RuntimeException )
if( ! runtime.is() )
{
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("pyuno runtime is not initialized, "
- "(the pyuno.bootstrap needs to be called before using any uno classes)")),
+ OUString( "pyuno runtime is not initialized, "
+ "(the pyuno.bootstrap needs to be called before using any uno classes")),
Reference< XInterface > () );
}
impl = reinterpret_cast< RuntimeImpl * > (runtime.get());
@@ -399,8 +395,7 @@ PyRef Runtime::any2PyObject (const Any &a ) const
{
if( ! impl->cargo->valid )
{
- throw RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM(
- "pyuno runtime must be initialized before calling any2PyObject" )),
+ throw RuntimeException( OUString( "pyuno runtime must be initialized before calling any2PyObject" ),
Reference< XInterface > () );
}
@@ -640,8 +635,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
{
if( ! impl->cargo->valid )
{
- throw RuntimeException( OUString( RTL_CONSTASCII_USTRINGPARAM(
- "pyuno runtime must be initialized before calling any2PyObject" )),
+ throw RuntimeException( OUString( "pyuno runtime must be initialized before calling any2PyObject" ),
Reference< XInterface > () );
}
@@ -834,9 +828,8 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
else
{
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "uno.Any instance not accepted during method call, "
- "use uno.invoke instead" ) ),
+ OUString( "uno.Any instance not accepted during method call, "
+ "use uno.invoke instead" ),
Reference< XInterface > () );
}
}
@@ -931,17 +924,17 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue,
}
else
{
- str = OUString(RTL_CONSTASCII_USTRINGPARAM("Couldn't find uno._uno_extract_printable_stacktrace"));
+ str = OUString("Couldn't find uno._uno_extract_printable_stacktrace");
}
}
else
{
- str = OUString(RTL_CONSTASCII_USTRINGPARAM("Could not load uno.py, no stacktrace available"));
+ str = OUString("Could not load uno.py, no stacktrace available");
if ( !e.Message.isEmpty() )
{
- str += OUString (RTL_CONSTASCII_USTRINGPARAM(" (Error loading uno.py: "));
+ str += OUString (" (Error loading uno.py: ");
str += e.Message;
- str += OUString (RTL_CONSTASCII_USTRINGPARAM(")"));
+ str += OUString (")");
}
}
@@ -949,7 +942,7 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue,
else
{
// it may occur, that no traceback is given (e.g. only native code below)
- str = OUString( RTL_CONSTASCII_USTRINGPARAM( "no traceback available" ) );
+ str = OUString( "no traceback available" );
}
if( isInstanceOfStructOrException( excValue.get() ) )
@@ -1026,7 +1019,7 @@ PyThreadAttach::PyThreadAttach( PyInterpreterState *interp)
tstate = PyThreadState_New( interp );
if( !tstate )
throw RuntimeException(
- OUString(RTL_CONSTASCII_USTRINGPARAM( "Couldn't create a pythreadstate" ) ),
+ OUString( "Couldn't create a pythreadstate" ),
Reference< XInterface > () );
PyEval_AcquireThread( tstate);
// set LC_NUMERIC to "C"
diff --git a/remotebridges/examples/officeclient.cxx b/remotebridges/examples/officeclient.cxx
index adce0c1..8844db0 100644
--- a/remotebridges/examples/officeclient.cxx
+++ b/remotebridges/examples/officeclient.cxx
@@ -92,7 +92,7 @@ void OfficeClientMain::testWriter( const Reference< XComponent > & rComponent )
Reference< XTextCursor > rCursor = rText->createTextCursor();
Reference< XTextRange > rRange ( rCursor , UNO_QUERY );
- rText->insertString( rRange, OUString(RTL_CONSTASCII_USTRINGPARAM("This text has been posted by the officeclient component")), sal_False );
+ rText->insertString( rRange, OUString("This text has been posted by the officeclient component"), sal_False );
}
/********************
@@ -105,7 +105,7 @@ void OfficeClientMain::registerServices( )
Reference < XImplementationRegistration > rImplementationRegistration(
m_xSMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration"))),
+ OUString("com.sun.star.registry.ImplementationRegistration")),
UNO_QUERY );
if( ! rImplementationRegistration.is() )
@@ -116,13 +116,13 @@ void OfficeClientMain::registerServices( )
OUString aSharedLibrary[4];
aSharedLibrary[0] =
- OUString(RTL_CONSTASCII_USTRINGPARAM( "connector.uno" SAL_DLLEXTENSION ));
+ OUString( "connector.uno" SAL_DLLEXTENSION );
aSharedLibrary[1] =
- OUString(RTL_CONSTASCII_USTRINGPARAM( "remotebridge.uno" SAL_DLLEXTENSION ));
+ OUString( "remotebridge.uno" SAL_DLLEXTENSION );
aSharedLibrary[2] =
- OUString(RTL_CONSTASCII_USTRINGPARAM( "bridgefac.uno" SAL_DLLEXTENSION ));
+ OUString( "bridgefac.uno" SAL_DLLEXTENSION );
aSharedLibrary[3] =
- OUString(RTL_CONSTASCII_USTRINGPARAM( "uuresolver.uno" SAL_DLLEXTENSION ));
+ OUString( "uuresolver.uno" SAL_DLLEXTENSION );
sal_Int32 i;
for( i = 0 ; i < 4 ; i ++ )
@@ -135,7 +135,7 @@ void OfficeClientMain::registerServices( )
{
// register the needed services in the servicemanager
rImplementationRegistration->registerImplementation(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
+ OUString("com.sun.star.loader.SharedLibrary"),
aDllName,
Reference< XSimpleRegistry > () );
}
@@ -156,7 +156,7 @@ sal_Int32 OfficeClientMain::run( const Sequence< OUString > & aArguments ) throw
try {
registerServices();
Reference < XInterface > r =
- m_xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")) );
+ m_xSMgr->createInstance( OUString("com.sun.star.bridge.UnoUrlResolver") );
Reference < XUnoUrlResolver > rResolver( r , UNO_QUERY );
r = rResolver->resolve( aArguments.getConstArray()[0] );
@@ -165,12 +165,12 @@ sal_Int32 OfficeClientMain::run( const Sequence< OUString > & aArguments ) throw
{
printf( "got the remote NamingService\n" );
- r = rNamingService->getRegisteredObject(OUString(RTL_CONSTASCII_USTRINGPARAM("StarOffice.ServiceManager")));
+ r = rNamingService->getRegisteredObject(OUString("StarOffice.ServiceManager"));
Reference< XMultiServiceFactory > rRemoteSMgr( r , UNO_QUERY );
Reference < XComponentLoader > rLoader(
- rRemoteSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop" ))),
+ rRemoteSMgr->createInstance( OUString( "com.sun.star.frame.Desktop" )),
UNO_QUERY );
if( rLoader.is() )
@@ -198,7 +198,7 @@ sal_Int32 OfficeClientMain::run( const Sequence< OUString > & aArguments ) throw
Reference< XComponent > rComponent =
rLoader->loadComponentFromURL(
OUString::createFromAscii( urls[i] ) ,
- OUString( RTL_CONSTASCII_USTRINGPARAM("_blank")),
+ OUString( "_blank"),
0 ,
Sequence < ::com::sun::star::beans::PropertyValue >() );
@@ -262,7 +262,7 @@ Sequence< OUString > getSupportedServiceNames()
if( !pNames )
{
static Sequence< OUString > seqNames(2);
- seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.example.OfficeClientExample"));
+ seqNames.getArray()[0] = OUString("com.sun.star.bridge.example.OfficeClientExample");
pNames = &seqNames;
}
}
@@ -287,7 +287,7 @@ sal_Bool SAL_CALL component_writeInfo(
{
Reference< XRegistryKey > xNewKey(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" )) ) );
+ OUString( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" ) ) );
const Sequence< OUString > & rSNL = getSupportedServiceNames();
const OUString * pArray = rSNL.getConstArray();
diff --git a/store/workben/t_store.cxx b/store/workben/t_store.cxx
index c48d9fe..a6184eb 100644
--- a/store/workben/t_store.cxx
+++ b/store/workben/t_store.cxx
@@ -172,7 +172,7 @@ DirectoryTraveller::DirectoryTraveller (
m_nCount (0)
{
m_aPath += rName;
- m_aPath += OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ m_aPath += OUString("/");
}
/*
@@ -344,7 +344,7 @@ int SAL_CALL main (int argc, char **argv)
}
// Stream Read/Write.
- OUString aPath (RTL_CONSTASCII_USTRINGPARAM("/"));
+ OUString aPath ("/");
if ((nOptions & OPTION_READ) || (nOptions & OPTION_WRITE))
{
// Mode.
@@ -366,9 +366,9 @@ int SAL_CALL main (int argc, char **argv)
for (int i = 0; i < _DEMOSTOR_LOOPS; i++)
{
- OUString aName (RTL_CONSTASCII_USTRINGPARAM("demostor-"));
+ OUString aName ("demostor-");
aName += OUString::valueOf ((sal_Int32)(i + 1), 10);
- aName += OUString(RTL_CONSTASCII_USTRINGPARAM (".dat"));
+ aName += OUString(".dat");
#if (_DEMOSTOR_REMOVE == 1)
eErrCode = aFile.remove (aPath, aName);
@@ -456,7 +456,7 @@ int SAL_CALL main (int argc, char **argv)
{
// Create symlink to (root) directory.
eErrCode = aFile.symlink (
- aPath, OUString(RTL_CONSTASCII_USTRINGPARAM("000000/")),
+ aPath, OUString("000000/"),
OUString(), aPath);
OSL_POSTCOND(
((eErrCode == store_E_None ) ||
@@ -464,11 +464,11 @@ int SAL_CALL main (int argc, char **argv)
"t_store::main(): store_symlink() failed");
// Create symlink to file.
- OUString aLinkName (RTL_CONSTASCII_USTRINGPARAM("demostor-1.lnk"));
+ OUString aLinkName ("demostor-1.lnk");
eErrCode = aFile.symlink (
aPath, aLinkName,
- aPath, OUString(RTL_CONSTASCII_USTRINGPARAM("demostor-1.dat")));
+ aPath, OUString("demostor-1.dat"));
OSL_POSTCOND(
((eErrCode == store_E_None ) ||
(eErrCode == store_E_AlreadyExists) ),
@@ -477,7 +477,7 @@ int SAL_CALL main (int argc, char **argv)
(eErrCode == store_E_AlreadyExists) )
{
OUString aShortcut (
- RTL_CONSTASCII_USTRINGPARAM("Shortcut to demostor-1.dat"));
+ "Shortcut to demostor-1.dat");
eErrCode = aFile.rename (
aPath, aLinkName,
aPath, aShortcut);
@@ -488,7 +488,7 @@ int SAL_CALL main (int argc, char **argv)
}
// Create directory.
- OUString aDirName (RTL_CONSTASCII_USTRINGPARAM("demostor-1.dir"));
+ OUString aDirName ("demostor-1.dir");
store::OStoreDirectory aDir;
eErrCode = aDir.create (
@@ -515,7 +515,7 @@ int SAL_CALL main (int argc, char **argv)
{
// Open symlink entry.
eErrCode = aRootDir.create (
- aFile, aPath, OUString(RTL_CONSTASCII_USTRINGPARAM("000000")),
+ aFile, aPath, OUString("000000"),
store_AccessReadOnly);
}
else
commit 4de8cc346590de52170f438b3a0f29f322dcb66b
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Jun 1 09:10:49 2012 -0500
targeted string re-work
Change-Id: Ieb2e362853f146f58370a60511cc75ab64fe439e
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 8cdb4bf..1b7e776 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -633,25 +633,25 @@ static void lcl_html_setFixedFontProperty(
DEFAULTFONT_FLAGS_ONLYONE ) );
Any aTmp;
aTmp <<= OUString( aFixedFont.GetName() );
- rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontName")), aTmp );
+ rPropSet->setPropertyValue( OUString("FontName"), aTmp );
aTmp <<= OUString( aFixedFont.GetStyleName() );
- rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontStyleName")),
+ rPropSet->setPropertyValue( OUString("FontStyleName"),
aTmp );
aTmp <<= (sal_Int16) aFixedFont.GetFamily();
- rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontFamily")), aTmp );
+ rPropSet->setPropertyValue( OUString("FontFamily"), aTmp );
aTmp <<= (sal_Int16) aFixedFont.GetCharSet();
- rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontCharset")),
+ rPropSet->setPropertyValue( OUString("FontCharset"),
aTmp );
aTmp <<= (sal_Int16) aFixedFont.GetPitch();
- rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontPitch")), aTmp );
+ rPropSet->setPropertyValue( OUString("FontPitch"), aTmp );
float fVal(10.);
aTmp.setValue( &fVal, ::getCppuType(&fVal ));
- rPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FontHeight")), aTmp );
+ rPropSet->setPropertyValue( OUString("FontHeight"), aTmp );
}
class SwHTMLFormPendingStackData_Impl: public SwPendingStackData
@@ -961,7 +961,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
uno::Reference< XInterface > xCreate =
rServiceFactory ->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape")));
+ OUString("com.sun.star.drawing.ControlShape"));
if( !xCreate.is() )
return xShape;
@@ -1001,11 +1001,11 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
Any aAny2;
aAny2 <<= (sal_Int32)nLeftSpace;
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("LeftMargin")), aAny2 );
+ OUString("LeftMargin"), aAny2 );
aAny2 <<= (sal_Int32)nRightSpace;
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("RightMargin")), aAny2 );
+ OUString("RightMargin"), aAny2 );
}
// oberen/unteren Rand setzen
@@ -1032,16 +1032,16 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
uno::Any aAny2;
aAny2 <<= (sal_Int32)nUpperSpace;
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("TopMargin")), aAny2 );
+ OUString("TopMargin"), aAny2 );
aAny2 <<= (sal_Int32)nLowerSpace;
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), aAny2 );
+ OUString("BottomMargin"), aAny2 );
}
uno::Reference< beans::XPropertySetInfo > xPropSetInfo =
rFCompPropSet->getPropertySetInfo();
- OUString sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("BackgroundColor"));
+ OUString sPropName = OUString("BackgroundColor");
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_BACKGROUND, sal_True,
&pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1057,7 +1057,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
- sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("TextColor"));
+ sPropName = OUString("TextColor");
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_COLOR, sal_True,
&pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1067,7 +1067,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontHeight"));
+ sPropName = OUString("FontHeight");
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_FONTSIZE,
sal_True, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1082,31 +1082,31 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
&pItem ) )
{
const SvxFontItem *pFontItem = (SvxFontItem *)pItem;
- sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontName"));
+ sPropName = OUString("FontName");
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp <<= OUString( pFontItem->GetFamilyName() );
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontStyleName"));
+ sPropName = OUString("FontStyleName");
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp <<= OUString( pFontItem->GetStyleName() );
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontFamily"));
+ sPropName = OUString("FontFamily");
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp <<= (sal_Int16)pFontItem->GetFamily() ;
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontCharset"));
+ sPropName = OUString("FontCharset");
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp <<= (sal_Int16)pFontItem->GetCharSet() ;
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontPitch"));
+ sPropName = OUString("FontPitch");
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp <<= (sal_Int16)pFontItem->GetPitch() ;
@@ -1114,7 +1114,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
}
- sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontWeight"));
+ sPropName = OUString("FontWeight");
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_WEIGHT,
sal_True, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1125,7 +1125,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontSlant"));
+ sPropName = OUString("FontSlant");
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_POSTURE,
sal_True, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1134,7 +1134,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontUnderline"));
+ sPropName = OUString("FontUnderline");
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_UNDERLINE,
sal_True, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1143,7 +1143,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
- sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("FontStrikeout"));
+ sPropName = OUString("FontStrikeout");
if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_CHRATR_CROSSEDOUT,
sal_True, &pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
@@ -1231,18 +1231,18 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
aTmp <<= (sal_Int16)nVertOri ;
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrient")), aTmp );
+ OUString("VertOrient"), aTmp );
}
aTmp <<= (sal_Int16)nAnchorType ;
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorType")), aTmp );
+ OUString("AnchorType"), aTmp );
if( text::TextContentAnchorType_AT_PAGE == nAnchorType )
{
aTmp <<= (sal_Int16) 1 ;
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorPageNo")), aTmp );
+ OUString("AnchorPageNo"), aTmp );
}
else
{
@@ -1255,30 +1255,30 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
aTmp.setValue( &xTxtRg,
::getCppuType((uno::Reference< text::XTextRange>*)0));
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("TextRange")), aTmp );
+ OUString("TextRange"), aTmp );
}
if( bSetPos )
{
aTmp <<= (sal_Int16)text::HoriOrientation::NONE;
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrient")), aTmp );
+ OUString("HoriOrient"), aTmp );
aTmp <<= (sal_Int32)nXPos ;
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")), aTmp );
+ OUString("HoriOrientPosition"), aTmp );
aTmp <<= (sal_Int16)text::VertOrientation::NONE;
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrient")), aTmp );
+ OUString("VertOrient"), aTmp );
aTmp <<= (sal_Int32)nYPos ;
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")), aTmp );
+ OUString("VertOrientPosition"), aTmp );
}
if( bSetSurround )
{
aTmp <<= (sal_Int16)nSurround ;
xShapePropSet->setPropertyValue(
- OUString(RTL_CONSTASCII_USTRINGPARAM("Surround")), aTmp );
+ OUString("Surround"), aTmp );
}
pFormImpl->GetShapes()->add(xShape);
@@ -1404,7 +1404,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend )
return;
uno::Reference< XInterface > xInt = rSrvcMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.Form")) );
+ OUString("com.sun.star.form.component.Form") );
if( !xInt.is() )
return;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list