[Libreoffice-commits] .: sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Nov 1 19:22:27 PDT 2010
sc/source/ui/vba/vbaapplication.cxx | 118 +++++++++++++++++++-----------------
sc/source/ui/vba/vbapane.cxx | 20 +++---
2 files changed, 73 insertions(+), 65 deletions(-)
New commits:
commit 74f7af7967d054cf949bb14bc6decd4ee105a46a
Author: Joost Eekhoorn <joost.eekhoorn at gmail.com>
Date: Mon Nov 1 22:21:27 2010 -0400
Replace rtl::OUString::createFromAscii with RTL_CONSTASCII_USTRINGPARAM.
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 8c9581a..5c2d797 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -301,7 +301,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
Reference< view::XSelectionSupplier > xSelSupp( xModel->getCurrentController(), UNO_QUERY_THROW );
Reference< beans::XPropertySet > xPropSet( xSelSupp, UNO_QUERY_THROW );
- OUString aPropName = OUString::createFromAscii( SC_UNO_FILTERED_RANGE_SELECTION );
+ OUString aPropName( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_FILTERED_RANGE_SELECTION ) );
uno::Any aOldVal = xPropSet->getPropertyValue( aPropName );
uno::Any any;
any <<= sal_False;
@@ -313,7 +313,7 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
if (!aSelection.is())
{
throw uno::RuntimeException(
- rtl::OUString::createFromAscii("failed to obtain current selection"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("failed to obtain current selection")),
uno::Reference< uno::XInterface >() );
}
@@ -338,8 +338,8 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
}
return uno::makeAny( uno::Reference< msforms::XShape >(new ScVbaShape( this, mxContext, xShape, xShapes, xModel, ScVbaShape::getType( xShape ) ) ) );
}
- else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRange")) ||
- xServiceInfo->supportsService( rtl::OUString::createFromAscii("com.sun.star.sheet.SheetCellRanges")))
+ else if( xServiceInfo->supportsService( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SheetCellRange")) ) ||
+ xServiceInfo->supportsService( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SheetCellRanges")) ) )
{
uno::Reference< table::XCellRange > xRange( aSelection, ::uno::UNO_QUERY);
if ( !xRange.is() )
@@ -353,7 +353,8 @@ ScVbaApplication::getSelection() throw (uno::RuntimeException)
}
else
{
- throw uno::RuntimeException( sImplementationName + rtl::OUString::createFromAscii(" not supported"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( sImplementationName + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ " not supported")), uno::Reference< uno::XInterface >() );
}
}
@@ -364,10 +365,10 @@ ScVbaApplication::getActiveCell() throw (uno::RuntimeException )
uno::Reference< table::XCellRange > xRange( xView->getActiveSheet(), ::uno::UNO_QUERY_THROW);
ScTabViewShell* pViewShell = excel::getCurrentBestViewShell(mxContext);
if ( !pViewShell )
- throw uno::RuntimeException( rtl::OUString::createFromAscii("No ViewShell available"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No ViewShell available")), uno::Reference< uno::XInterface >() );
ScViewData* pTabView = pViewShell->GetViewData();
if ( !pTabView )
- throw uno::RuntimeException( rtl::OUString::createFromAscii("No ViewData available"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No ViewData available")), uno::Reference< uno::XInterface >() );
sal_Int32 nCursorX = pTabView->GetCurX();
sal_Int32 nCursorY = pTabView->GetCurY();
@@ -399,8 +400,8 @@ ScVbaApplication::Worksheets( const uno::Any& aIndex ) throw (uno::RuntimeExcept
else
// Fixme - check if this is reasonable/desired behavior
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "No ActiveWorkBook available" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No ActiveWorkBook available" )),
+ uno::Reference< uno::XInterface >() );
return result;
}
@@ -535,7 +536,7 @@ ScVbaApplication::setStatusBar( const uno::Any& _statusbar ) throw (uno::Runtime
}
}
else
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid prarameter. It should be a string or False" ),
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid prarameter. It should be a string or False" )),
uno::Reference< uno::XInterface >() );
}
@@ -607,7 +608,9 @@ ScVbaApplication::Names( const css::uno::Any& aIndex ) throw ( uno::RuntimeExcep
{
uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xPropertySet( xModel, uno::UNO_QUERY_THROW );
- uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("NamedRanges")) , uno::UNO_QUERY_THROW );
+ uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "NamedRanges" )) ), uno::UNO_QUERY_THROW );
+
css::uno::Reference< excel::XNames > xNames ( new ScVbaNames( this , mxContext , xNamedRanges , xModel ) );
if ( aIndex.getValueTypeClass() == uno::TypeClass_VOID )
{
@@ -635,8 +638,8 @@ ScVbaApplication::getActiveSheet() throw (uno::RuntimeException)
if ( !result.is() )
{
// Fixme - check if this is reasonable/desired behavior
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "No activeSheet available" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No activeSheet available" )),
+ uno::Reference< uno::XInterface >() );
}
return result;
@@ -667,7 +670,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
bScroll = aScroll;
}
else
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "sencond parameter should be boolean" ),
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "second parameter should be boolean" )),
uno::Reference< uno::XInterface >() );
}
@@ -709,11 +712,11 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
{
//maybe this should be a procedure name
//TODO for procedure name
- //browse::XBrowseNodeFactory is a singlton. OUString::createFromAscii( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory")
+ //browse::XBrowseNodeFactory is a singlton. OUString(RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory"))
//and the createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) to get a root browse::XBrowseNode.
//for query XInvocation interface.
//but how to directly get the XInvocation?
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "invalid reference for range name, it should be procedure name" ),
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid reference for range name, it should be procedure name" )),
uno::Reference< uno::XInterface >() );
}
return;
@@ -748,7 +751,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro
}
return;
}
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "invalid reference or name" ),
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid reference or name" )),
uno::Reference< uno::XInterface >() );
}
@@ -886,7 +889,7 @@ ScVbaApplication::setIteration(sal_Bool bIteration) throw (uno::RuntimeException
uno::Any aIteration;
aIteration <<= bIteration;
- OUString aPropName = OUString::createFromAscii( "IsIterationEnabled" );
+ OUString aPropName(RTL_CONSTASCII_USTRINGPARAM( "IsIterationEnabled" ));
uno::Reference< XCollection > xWorkbooks( new ScVbaWorkbooks( this, mxContext ) );
sal_Int32 nCount = xWorkbooks->getCount();
@@ -928,7 +931,8 @@ void SAL_CALL ScVbaApplication::setSheetsInNewWorkbook( sal_Int32 SheetsInNewWor
{
if ( SheetsInNewWorkbook < 1 || SheetsInNewWorkbook > MAXTAB )
{
- DebugHelper::exception( OUString::createFromAscii("The number must be between 1 and 255"), uno::Exception(), SbERR_METHOD_FAILED, OUString() );
+ DebugHelper::exception( OUString(RTL_CONSTASCII_USTRINGPARAM("The number must be between 1 and 255")),
+ uno::Exception(), SbERR_METHOD_FAILED, OUString() );
}
else
{
@@ -951,7 +955,7 @@ uno::Reference< beans::XPropertySet > lcl_getPathSettingsService( const uno::Ref
if ( !xPathSettings.is() )
{
uno::Reference< lang::XMultiComponentFactory > xSMgr( xContext->getServiceManager(), uno::UNO_QUERY_THROW );
- xPathSettings.set( xSMgr->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.util.PathSettings"), xContext), uno::UNO_QUERY_THROW );
+ xPathSettings.set( xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSettings")), xContext ), uno::UNO_QUERY_THROW );
}
return xPathSettings;
}
@@ -1373,7 +1377,7 @@ ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& Fi
uno::Any aRet = uno::makeAny( sal_False );
try
{
- const ::rtl::OUString sServiceName = ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.FilePicker" );
+ const rtl::OUString sServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ));
uno::Reference< lang::XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
// Set the type of File Picker Dialog: TemplateDescription::FILEOPEN_SIMPLE.
uno::Sequence< uno::Any > aDialogType( 1 );
@@ -1405,7 +1409,8 @@ ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& Fi
}
else if ( nCommaID < 0 && nIndex == 1 )
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid FileFilter format!" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid FileFilter format!" )),
+ uno::Reference< uno::XInterface >() );
}
xFilterManager->appendFilter( aFilterTitleToken, aFilterToken );
if ( nFilterIndex == nIndex )
@@ -1528,7 +1533,7 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
uno::Any strRet;
try
{
- const ::rtl::OUString sServiceName = ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.FilePicker" );
+ const rtl::OUString sServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ));
uno::Reference< lang::XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
uno::Sequence< uno::Any > aDialogType( 1 );
@@ -1568,7 +1573,8 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
}
else if ( nCommaID < 0 && nIndex == 1 )
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid FileFilter format!" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Invalid FileFilter format!" )),
+ uno::Reference< uno::XInterface >() );
}
FileFilterMap::const_iterator aIt = mFilterNameMap.find( aFilterTitleToken );
@@ -1633,7 +1639,7 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
if ( sFileExtension.equalsAscii("") )
{
sFileExtension = sFirstFilter.equalsAscii("*.*") ? sFileExtension : sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
- aPathStr = sFileExtension.equalsAscii("") ? aPathStr : aPathStr + ::rtl::OUString::createFromAscii(".") + sFileExtension;
+ aPathStr = sFileExtension.equalsAscii("") ? aPathStr : aPathStr + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
}
else
{
@@ -1646,7 +1652,7 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
do
{
::rtl::OUString aFilterToken = sSelectedFilters.getToken( 0, ';' , nSemicolonID );
- if ( aFilterToken.trim().equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("*.") + sFileExtension) )
+ if ( aFilterToken.trim().equalsIgnoreAsciiCase( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*.")) + sFileExtension) )
{
bValidFilter = sal_True;
break;
@@ -1660,8 +1666,10 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi
}
if ( !bValidFilter )
{
- sFileExtension = sFirstFilter.equalsAscii("*.*") ? ::rtl::OUString::createFromAscii("") : sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
- aPathStr = sFileExtension.equalsAscii("") ? aPathStr : aPathStr + ::rtl::OUString::createFromAscii(".") + sFileExtension;
+ sFileExtension = sFirstFilter.equalsAscii("*.*") ? rtl::OUString()
+ : sFirstFilter.copy( sFirstFilter.indexOfAsciiL("*.", 2) + 2 );
+ aPathStr = sFileExtension.equalsAscii("") ? aPathStr
+ : aPathStr + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".")) + sFileExtension;
}
}
}
@@ -1704,33 +1712,33 @@ ConvertCountryCode(const OUString& language)
{
sal_Int32 nCode = 0;
- if( language == OUString::createFromAscii("ar") ) nCode = 966; // Arabic
- else if ( language == OUString::createFromAscii("cs") ) nCode = 42; // Czech
- else if ( language == OUString::createFromAscii("da") ) nCode = 45; // Danish
- else if ( language == OUString::createFromAscii("de") ) nCode = 49; // German
- else if ( language == OUString::createFromAscii("en") ) nCode = 1; // English
- else if ( language == OUString::createFromAscii("es") ) nCode = 34; // Spanish
- else if ( language == OUString::createFromAscii("el") ) nCode = 30; // Greek
- else if ( language == OUString::createFromAscii("fa") ) nCode = 98; // Persian = Farsi
- else if ( language == OUString::createFromAscii("fi") ) nCode = 358; // Finnish
- else if ( language == OUString::createFromAscii("fr") ) nCode = 33; // French
- else if ( language == OUString::createFromAscii("he") ) nCode = 972; // Hebrew
- else if ( language == OUString::createFromAscii("hi") ) nCode = 91; // Indian = Hindi
- else if ( language == OUString::createFromAscii("hu") ) nCode = 36; // Hungarian
- else if ( language == OUString::createFromAscii("it") ) nCode = 39; // Italian
- else if ( language == OUString::createFromAscii("ja") ) nCode = 81; // Japanese
- else if ( language == OUString::createFromAscii("ko") ) nCode = 82; // Korean
- else if ( language == OUString::createFromAscii("nl") ) nCode = 31; // Dutch
- else if ( language == OUString::createFromAscii("no") ) nCode = 47; // Norwegian
- else if ( language == OUString::createFromAscii("pl") ) nCode = 48; // Polish
- else if ( language == OUString::createFromAscii("pt") ) nCode = 351; // Portuguese
- else if ( language == OUString::createFromAscii("ru") ) nCode = 7; // Russian
- else if ( language == OUString::createFromAscii("sv") ) nCode = 46; // Swedish
- else if ( language == OUString::createFromAscii("th") ) nCode = 66; // Thai
- else if ( language == OUString::createFromAscii("tk") ) nCode = 90; // Turkish
- else if ( language == OUString::createFromAscii("ur") ) nCode = 92; // Urdu
- else if ( language == OUString::createFromAscii("vi") ) nCode = 84; // Vietnamese
- else if ( language == OUString::createFromAscii("zh") ) nCode = 86; // Simplified Chinese
+ if( language == OUString(RTL_CONSTASCII_USTRINGPARAM("ar")) ) nCode = 966; // Arabic
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("cs")) ) nCode = 42; // Czech
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("da")) ) nCode = 45; // Danish
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("de")) ) nCode = 49; // German
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("en")) ) nCode = 1; // English
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("es")) ) nCode = 34; // Spanish
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("el")) ) nCode = 30; // Greek
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("fa")) ) nCode = 98; // Persian = Farsi
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("fi")) ) nCode = 358; // Finnish
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("fr")) ) nCode = 33; // French
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("he")) ) nCode = 972; // Hebrew
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("hi")) ) nCode = 91; // Indian = Hindi
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("hu")) ) nCode = 36; // Hungarian
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("it")) ) nCode = 39; // Italian
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("ja")) ) nCode = 81; // Japanese
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("ko")) ) nCode = 82; // Korean
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("nl")) ) nCode = 31; // Dutch
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("no")) ) nCode = 47; // Norwegian
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("pl")) ) nCode = 48; // Polish
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("pt")) ) nCode = 351; // Portuguese
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("ru")) ) nCode = 7; // Russian
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("sv")) ) nCode = 46; // Swedish
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("th")) ) nCode = 66; // Thai
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("tk")) ) nCode = 90; // Turkish
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("ur")) ) nCode = 92; // Urdu
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("vi")) ) nCode = 84; // Vietnamese
+ else if ( language == OUString(RTL_CONSTASCII_USTRINGPARAM("zh")) ) nCode = 86; // Simplified Chinese
return nCode;
}
diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx
index ee32fc3..77c41de 100644
--- a/sc/source/ui/vba/vbapane.cxx
+++ b/sc/source/ui/vba/vbapane.cxx
@@ -57,7 +57,7 @@ ScVbaPane::setScrollColumn( sal_Int32 _scrollcolumn ) throw (uno::RuntimeExcepti
{
if( _scrollcolumn < 1 )
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Column number should not less than 1" ),
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Column number should not less than 1" )),
uno::Reference< uno::XInterface >() );
}
m_xViewPane->setFirstVisibleColumn( _scrollcolumn - 1 );
@@ -74,7 +74,7 @@ ScVbaPane::setScrollRow( sal_Int32 _scrollrow ) throw (uno::RuntimeException)
{
if( _scrollrow < 1 )
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Row number should not less than 1" ),
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Row number should not less than 1" )),
uno::Reference< uno::XInterface >() );
}
m_xViewPane->setFirstVisibleRow( _scrollrow - 1 );
@@ -108,7 +108,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( Down >>= down )
downRows += down;
else
- messageBuffer += rtl::OUString::createFromAscii( "Error getting parameter: Down\n" );
+ messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: Down\n" ));
}
if( Up.hasValue() )
{
@@ -116,7 +116,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( Up >>= up )
downRows -= up;
else
- messageBuffer += rtl::OUString::createFromAscii( "Error getting parameter: Up\n" );
+ messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: Up\n" ));
}
if( ToRight.hasValue() )
{
@@ -124,7 +124,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( ToRight >>= right )
rightCols += right;
else
- messageBuffer += rtl::OUString::createFromAscii( "Error getting parameter: ToRight\n" );
+ messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: ToRight\n" ));
}
if( ToLeft.hasValue() )
{
@@ -132,7 +132,7 @@ ScVbaPane::SmallScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( ToLeft >>= left )
rightCols -= left;
else
- messageBuffer += rtl::OUString::createFromAscii( "Error getting parameter: ToLeft\n" );
+ messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: ToLeft\n" ));
}
if( messageBuffer.getLength() > 0 )
throw(uno::RuntimeException( messageBuffer, uno::Reference< uno::XInterface >() ) );
@@ -163,7 +163,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( Down >>= down )
downPages += down;
else
- messageBuffer += rtl::OUString::createFromAscii( "Error getting parameter: Down\n" );
+ messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: Down\n" ));
}
if( Up.hasValue() )
{
@@ -171,7 +171,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( Up >>= up )
downPages -= up;
else
- messageBuffer += rtl::OUString::createFromAscii( "Error getting parameter: Up\n" );
+ messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: Up\n" ));
}
if( ToRight.hasValue() )
{
@@ -179,7 +179,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( ToRight >>= right )
acrossPages += right;
else
- messageBuffer += rtl::OUString::createFromAscii( "Error getting parameter: ToRight\n" );
+ messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: ToRight\n" ));
}
if( ToLeft.hasValue() )
{
@@ -187,7 +187,7 @@ ScVbaPane::LargeScroll( const uno::Any& Down, const uno::Any& Up, const uno::Any
if( ToLeft >>= left )
acrossPages -= left;
else
- messageBuffer += rtl::OUString::createFromAscii( "Error getting parameter: ToLeft\n" );
+ messageBuffer += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Error getting parameter: ToLeft\n" ));
}
if( messageBuffer.getLength() > 0 )
throw(uno::RuntimeException( messageBuffer, uno::Reference< uno::XInterface >() ) );
More information about the Libreoffice-commits
mailing list