summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorGert Faller <gertfaller@aliceadsl.fr>2010-11-10 14:43:14 +0100
committerDavid Tardon <dtardon@redhat.com>2010-11-10 14:43:14 +0100
commita74bb3dec9e0cf8e381f25e8bde70b8efedf33ca (patch)
tree4ae309ee00cf843a438f222e0199902fc1234f1a /vbahelper
parent986e40bc10ee410b54b05b141ef8a06dc9dcc141 (diff)
RTL_CONSTASCII_USTRINGPARAM in libs-core
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/inc/vbahelper/vbacollectionimpl.hxx4
-rw-r--r--vbahelper/inc/vbahelper/vbapropvalue.hxx2
-rw-r--r--vbahelper/source/msforms/vbacheckbox.hxx2
-rw-r--r--vbahelper/source/msforms/vbacombobox.hxx2
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx10
-rw-r--r--vbahelper/source/msforms/vbalabel.hxx2
-rw-r--r--vbahelper/source/msforms/vbalistbox.cxx20
-rw-r--r--vbahelper/source/msforms/vbalistbox.hxx2
-rw-r--r--vbahelper/source/msforms/vbalistcontrolhelper.cxx14
-rw-r--r--vbahelper/source/msforms/vbamultipage.hxx2
-rw-r--r--vbahelper/source/msforms/vbaprogressbar.hxx2
-rw-r--r--vbahelper/source/msforms/vbaradiobutton.hxx2
-rw-r--r--vbahelper/source/msforms/vbatextbox.hxx2
-rw-r--r--vbahelper/source/msforms/vbatogglebutton.hxx2
-rw-r--r--vbahelper/source/msforms/vbauserform.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbacolorformat.cxx14
-rw-r--r--vbahelper/source/vbahelper/vbacommandbar.cxx6
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrol.cxx16
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrols.cxx30
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.cxx12
-rw-r--r--vbahelper/source/vbahelper/vbacommandbars.cxx12
-rw-r--r--vbahelper/source/vbahelper/vbadocumentsbase.cxx12
-rw-r--r--vbahelper/source/vbahelper/vbafillformat.cxx16
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx8
-rw-r--r--vbahelper/source/vbahelper/vbalineformat.cxx100
-rw-r--r--vbahelper/source/vbahelper/vbapictureformat.cxx12
-rw-r--r--vbahelper/source/vbahelper/vbashape.cxx52
-rw-r--r--vbahelper/source/vbahelper/vbashaperange.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbashapes.cxx48
-rw-r--r--vbahelper/source/vbahelper/vbatextframe.cxx24
31 files changed, 219 insertions, 219 deletions
diff --git a/vbahelper/inc/vbahelper/vbacollectionimpl.hxx b/vbahelper/inc/vbahelper/vbacollectionimpl.hxx
index 0df452f25b..2c114a4c76 100644
--- a/vbahelper/inc/vbahelper/vbacollectionimpl.hxx
+++ b/vbahelper/inc/vbahelper/vbacollectionimpl.hxx
@@ -305,8 +305,8 @@ public:
if ( ( Index1 >>= nIndex ) != sal_True )
{
rtl::OUString message;
- message = rtl::OUString::createFromAscii(
- "Couldn't convert index to Int32");
+ message = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Couldn't convert index to Int32"));
throw css::lang::IndexOutOfBoundsException( message,
css::uno::Reference< css::uno::XInterface >() );
}
diff --git a/vbahelper/inc/vbahelper/vbapropvalue.hxx b/vbahelper/inc/vbahelper/vbapropvalue.hxx
index dbfb44419a..5068f3235d 100644
--- a/vbahelper/inc/vbahelper/vbapropvalue.hxx
+++ b/vbahelper/inc/vbahelper/vbapropvalue.hxx
@@ -52,7 +52,7 @@ public:
virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
- rtl::OUString SAL_CALL getDefaultPropertyName() throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ rtl::OUString SAL_CALL getDefaultPropertyName() throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
};
#endif //SC_VBA_PROPVALULE_HXX
diff --git a/vbahelper/source/msforms/vbacheckbox.hxx b/vbahelper/source/msforms/vbacheckbox.hxx
index b3940b03f4..0dbba7412e 100644
--- a/vbahelper/source/msforms/vbacheckbox.hxx
+++ b/vbahelper/source/msforms/vbacheckbox.hxx
@@ -45,7 +45,7 @@ public:
virtual css::uno::Any SAL_CALL getValue() throw (css::uno::RuntimeException);
virtual void SAL_CALL setValue( const css::uno::Any& _value ) throw (css::uno::RuntimeException);
// XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
//XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
diff --git a/vbahelper/source/msforms/vbacombobox.hxx b/vbahelper/source/msforms/vbacombobox.hxx
index 9f9b059626..77a546e678 100644
--- a/vbahelper/source/msforms/vbacombobox.hxx
+++ b/vbahelper/source/msforms/vbacombobox.hxx
@@ -69,7 +69,7 @@ public:
virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException);
// XDefaultProperty
- ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
//XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index fcc9a4a1f3..6b14bed48e 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -95,7 +95,7 @@ ScVbaControl::getWindowPeer() throw (uno::RuntimeException)
}
catch( uno::Exception )
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "The Control does not exsit" ),
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("The Control does not exsit")),
uno::Reference< uno::XInterface >() );
}
return xWinPeer;
@@ -448,7 +448,7 @@ void ScVbaControl::fireEvent( script::ScriptEvent& evt )
aEvt.Source = m_xEmptyFormControl;
// Set up proper scriptcode
uno::Reference< lang::XMultiServiceFactory > xDocFac( m_xModel, uno::UNO_QUERY_THROW );
- uno::Reference< document::XCodeNameQuery > xNameQuery( xDocFac->createInstance( rtl::OUString::createFromAscii( "ooo.vba.VBACodeNameProvider" ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XCodeNameQuery > xNameQuery( xDocFac->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.VBACodeNameProvider")) ), uno::UNO_QUERY_THROW );
uno::Reference< uno::XInterface > xIf( xControlShape->getControl(), uno::UNO_QUERY_THROW );
evt.ScriptCode = xNameQuery->getCodeNameForObject( xIf );
evt.Arguments[ 0 ] = uno::makeAny( aEvt );
@@ -544,8 +544,8 @@ ScVbaControl* ScVbaControlFactory::createControl(const uno::Reference< drawing::
case form::FormComponentType::IMAGECONTROL:
return new ScVbaImage( xVbaParent, m_xContext, xControlShape, m_xModel, new ConcreteXShapeGeometryAttributes( m_xContext, uno::Reference< drawing::XShape >( xControlShape, uno::UNO_QUERY_THROW ) ) );
default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Donot support this Control Type." ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Donot support this Control Type." )), uno::Reference< uno::XInterface >() );
}
}
@@ -596,7 +596,7 @@ ScVbaControl* ScVbaControlFactory::createControl( const uno::Reference< awt::XCo
else if ( xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.custom.awt.UnoControlSystemAXContainerModel") ) ) )
pControl = new VbaSystemAXControl( xVbaParent, m_xContext, xControl, m_xModel, new UserFormGeometryHelper( m_xContext, xControl ) );
else
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Unsupported control " ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unsupported control ")), uno::Reference< uno::XInterface >() );
return pControl;
}
diff --git a/vbahelper/source/msforms/vbalabel.hxx b/vbahelper/source/msforms/vbalabel.hxx
index 24623e16a1..3619c06e15 100644
--- a/vbahelper/source/msforms/vbalabel.hxx
+++ b/vbahelper/source/msforms/vbalabel.hxx
@@ -51,7 +51,7 @@ public:
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
// XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
};
#endif //SC_VBA_LABEL_HXX
diff --git a/vbahelper/source/msforms/vbalistbox.cxx b/vbahelper/source/msforms/vbalistbox.cxx
index d830e109db..a29c1312ee 100644
--- a/vbahelper/source/msforms/vbalistbox.cxx
+++ b/vbahelper/source/msforms/vbalistbox.cxx
@@ -73,8 +73,8 @@ ScVbaListBox::getValue() throw (uno::RuntimeException)
m_xProps->getPropertyValue( SELECTEDITEMS ) >>= sSelection;
m_xProps->getPropertyValue( ITEMS ) >>= sItems;
if( getMultiSelect() )
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Attribute use invalid." )), uno::Reference< uno::XInterface >() );
uno::Any aRet;
if ( sSelection.getLength() )
aRet = uno::makeAny( sItems[ sSelection[ 0 ] ] );
@@ -86,8 +86,8 @@ ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
{
if( getMultiSelect() )
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Attribute use invalid." )), uno::Reference< uno::XInterface >() );
}
rtl::OUString sValue = getAnyAsString( _value );
uno::Sequence< rtl::OUString > sList;
@@ -105,8 +105,8 @@ ScVbaListBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
}
}
if( nValue == -1 )
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Attribute use invalid." ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Attribute use invalid." )), uno::Reference< uno::XInterface >() );
uno::Sequence< sal_Int16 > nSelectedIndices(1);
uno::Sequence< sal_Int16 > nOldSelectedIndices;
@@ -158,8 +158,8 @@ ScVbaListBox::Selected( sal_Int32 index ) throw (css::uno::RuntimeException)
// the indices are but sal_Int16
sal_Int16 nIndex = static_cast< sal_Int16 >( index );
if( nIndex < 0 || nIndex >= nLength )
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Error Number." ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Error Number." )), uno::Reference< uno::XInterface >() );
m_nIndex = nIndex;
return uno::makeAny( uno::Reference< XPropValue > ( new ScVbaPropValue( this ) ) );
}
@@ -192,8 +192,8 @@ ScVbaListBox::setValueEvent( const uno::Any& value )
{
sal_Bool bValue = sal_False;
if( !(value >>= bValue) )
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Invalid type\n. need boolean." ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Invalid type\n. need boolean." )), uno::Reference< uno::XInterface >() );
uno::Sequence< sal_Int16 > nList;
m_xProps->getPropertyValue( SELECTEDITEMS ) >>= nList;
sal_Int16 nLength = static_cast<sal_Int16>( nList.getLength() );
diff --git a/vbahelper/source/msforms/vbalistbox.hxx b/vbahelper/source/msforms/vbalistbox.hxx
index 9eee80c480..a35f100f4b 100644
--- a/vbahelper/source/msforms/vbalistbox.hxx
+++ b/vbahelper/source/msforms/vbalistbox.hxx
@@ -72,7 +72,7 @@ public:
virtual void SAL_CALL setRowSource( const rtl::OUString& _rowsource ) throw (css::uno::RuntimeException);
// XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
//XHelperInterface
virtual rtl::OUString& getServiceImplName();
diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.cxx b/vbahelper/source/msforms/vbalistcontrolhelper.cxx
index a41dfe30ce..696b52bfb4 100644
--- a/vbahelper/source/msforms/vbalistcontrolhelper.cxx
+++ b/vbahelper/source/msforms/vbalistcontrolhelper.cxx
@@ -28,8 +28,8 @@ ListPropListener::ListPropListener( const uno::Reference< beans::XPropertySet >&
void ListPropListener::setValueEvent( const uno::Any& value )
{
if( m_pvargIndex.hasValue() || m_pvarColumn.hasValue() )
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Bad argument" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Bad argument" )), uno::Reference< uno::XInterface >() );
m_xProps->setPropertyValue( ITEMS, value );
}
@@ -45,13 +45,13 @@ uno::Any ListPropListener::getValueEvent()
sal_Int16 nIndex = -1;
m_pvargIndex >>= nIndex;
if( nIndex < 0 || nIndex >= nLength )
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Bad row Index" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Bad row Index" )), uno::Reference< uno::XInterface >() );
aRet <<= sList[ nIndex ];
}
else if ( m_pvarColumn.hasValue() ) // pvarColumn on its own would be bad
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "Bad column Index" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Bad column Index" )), uno::Reference< uno::XInterface >() );
else // List() ( e.g. no args )
{
uno::Sequence< uno::Sequence< rtl::OUString > > sReturnArray( nLength );
@@ -130,7 +130,7 @@ ListControlHelper::removeItem( const uno::Any& index ) throw (uno::RuntimeExcept
uno::Sequence< rtl::OUString > sList;
m_xProps->getPropertyValue( ITEMS ) >>= sList;
if( nIndex < 0 || nIndex > ( sList.getLength() - 1 ) )
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid index" ), uno::Reference< uno::XInterface > () );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid index")), uno::Reference< uno::XInterface > () );
if( sList.hasElements() )
{
if( sList.getLength() == 1 )
diff --git a/vbahelper/source/msforms/vbamultipage.hxx b/vbahelper/source/msforms/vbamultipage.hxx
index d3f58786a6..34fdb01a93 100644
--- a/vbahelper/source/msforms/vbamultipage.hxx
+++ b/vbahelper/source/msforms/vbamultipage.hxx
@@ -52,7 +52,7 @@ public:
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
// XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
};
#endif //SC_VBA_LABEL_HXX
diff --git a/vbahelper/source/msforms/vbaprogressbar.hxx b/vbahelper/source/msforms/vbaprogressbar.hxx
index 9f313c5bb5..e022bd9f52 100644
--- a/vbahelper/source/msforms/vbaprogressbar.hxx
+++ b/vbahelper/source/msforms/vbaprogressbar.hxx
@@ -47,7 +47,7 @@ public:
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
// XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
};
#endif //SC_VBA_LABEL_HXX
diff --git a/vbahelper/source/msforms/vbaradiobutton.hxx b/vbahelper/source/msforms/vbaradiobutton.hxx
index fda0f00e66..0bcbb33f15 100644
--- a/vbahelper/source/msforms/vbaradiobutton.hxx
+++ b/vbahelper/source/msforms/vbaradiobutton.hxx
@@ -47,7 +47,7 @@ public:
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
// XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
};
#endif //SC_VBA_RADIOBUTTON_HXX
diff --git a/vbahelper/source/msforms/vbatextbox.hxx b/vbahelper/source/msforms/vbatextbox.hxx
index c53cf7672f..548ae2ab47 100644
--- a/vbahelper/source/msforms/vbatextbox.hxx
+++ b/vbahelper/source/msforms/vbatextbox.hxx
@@ -49,7 +49,7 @@ public:
virtual sal_Bool SAL_CALL getMultiline() throw (css::uno::RuntimeException);
virtual void SAL_CALL setMultiline( sal_Bool _multiline ) throw (css::uno::RuntimeException);
// XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
//XHelperInterface
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
diff --git a/vbahelper/source/msforms/vbatogglebutton.hxx b/vbahelper/source/msforms/vbatogglebutton.hxx
index 5ccbe2ccfc..540069de3d 100644
--- a/vbahelper/source/msforms/vbatogglebutton.hxx
+++ b/vbahelper/source/msforms/vbatogglebutton.hxx
@@ -51,7 +51,7 @@ public:
virtual rtl::OUString& getServiceImplName();
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
// XDefaultProperty
- rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); }
+ rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); }
};
#endif //SC_VBA_TOGGLEBUTTON_HXX
diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx
index ec3bcb7bac..afbe84830d 100644
--- a/vbahelper/source/msforms/vbauserform.cxx
+++ b/vbahelper/source/msforms/vbauserform.cxx
@@ -268,7 +268,7 @@ ScVbaUserForm::hasProperty( const ::rtl::OUString& aName ) throw (uno::RuntimeEx
uno::Reference< beans::XPropertySet > xDlgProps( xControl->getModel(), uno::UNO_QUERY );
if ( xDlgProps.is() )
{
- uno::Reference< container::XNameContainer > xAllChildren( xDlgProps->getPropertyValue( rtl::OUString::createFromAscii("AllDialogChildren" ) ), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameContainer > xAllChildren( xDlgProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllDialogChildren")) ), uno::UNO_QUERY_THROW );
sal_Bool bRes = xAllChildren->hasByName( aName );
OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d ---> %d", rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xAllChildren.is(), bRes );
return bRes;
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 0539ae5c34..ca90e36bfb 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -299,8 +299,8 @@ VbaApplicationBase::getVersion() throw (uno::RuntimeException)
uno::Any SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, const uno::Any& varg1, const uno::Any& varg2, const uno::Any& varg3, const uno::Any& varg4, const uno::Any& varg5, const uno::Any& varg6, const uno::Any& varg7, const uno::Any& varg8, const uno::Any& varg9, const uno::Any& varg10, const uno::Any& varg11, const uno::Any& varg12, const uno::Any& varg13, const uno::Any& varg14, const uno::Any& varg15, const uno::Any& varg16, const uno::Any& varg17, const uno::Any& varg18, const uno::Any& varg19, const uno::Any& varg20, const uno::Any& varg21, const uno::Any& varg22, const uno::Any& varg23, const uno::Any& varg24, const uno::Any& varg25, const uno::Any& varg26, const uno::Any& varg27, const uno::Any& varg28, const uno::Any& varg29, const uno::Any& varg30 ) throw (uno::RuntimeException)
{
- ::rtl::OUString sSeparator = ::rtl::OUString::createFromAscii("/");
- ::rtl::OUString sMacroSeparator = ::rtl::OUString::createFromAscii("!");
+ ::rtl::OUString sSeparator(RTL_CONSTASCII_USTRINGPARAM("/");
+ ::rtl::OUString sMacroSeparator(RTL_CONSTASCII_USTRINGPARAM("!");
::rtl::OUString sMacro_only_Name;
sal_Int32 Position_MacroSeparator = MacroName.indexOf(sMacroSeparator);
diff --git a/vbahelper/source/vbahelper/vbacolorformat.cxx b/vbahelper/source/vbahelper/vbacolorformat.cxx
index 2590911bf0..f51b29757e 100644
--- a/vbahelper/source/vbahelper/vbacolorformat.cxx
+++ b/vbahelper/source/vbahelper/vbacolorformat.cxx
@@ -77,20 +77,20 @@ ScVbaColorFormat::getRGB() throw (uno::RuntimeException)
switch( m_nColorFormatType )
{
case ColorFormatType::LINEFORMAT_FORECOLOR:
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("LineColor") ) >>= nRGB;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineColor")) ) >>= nRGB;
break;
case ColorFormatType::LINEFORMAT_BACKCOLOR:
//TODO BackColor not supported
- // m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("Color"), uno::makeAny( nRGB ) );
+ // m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Color")), uno::makeAny( nRGB ) );
break;
case ColorFormatType::FILLFORMAT_FORECOLOR:
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("FillColor") ) >>= nRGB;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FillColor")) ) >>= nRGB;
break;
case ColorFormatType::FILLFORMAT_BACKCOLOR:
nRGB = m_nFillFormatBackColor;
break;
default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Second parameter of ColorFormat is wrong."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second parameter of ColorFormat is wrong.")), uno::Reference< uno::XInterface >() );
}
nRGB = OORGBToXLRGB( nRGB );
return nRGB;
@@ -103,13 +103,13 @@ ScVbaColorFormat::setRGB( sal_Int32 _rgb ) throw (uno::RuntimeException)
switch( m_nColorFormatType )
{
case ColorFormatType::LINEFORMAT_FORECOLOR:
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineColor" ), uno::makeAny( nRGB ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineColor")), uno::makeAny( nRGB ) );
break;
case ColorFormatType::LINEFORMAT_BACKCOLOR:
// TODO BackColor not supported
break;
case ColorFormatType::FILLFORMAT_FORECOLOR:
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "FillColor" ), uno::makeAny( nRGB ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FillColor")), uno::makeAny( nRGB ) );
if( m_pFillFormat )
{
m_pFillFormat->setForeColorAndInternalStyle(nRGB);
@@ -123,7 +123,7 @@ ScVbaColorFormat::setRGB( sal_Int32 _rgb ) throw (uno::RuntimeException)
}
break;
default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Second parameter of ColorFormat is wrong."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Second parameter of ColorFormat is wrong.")), uno::Reference< uno::XInterface >() );
}
}
diff --git a/vbahelper/source/vbahelper/vbacommandbar.cxx b/vbahelper/source/vbahelper/vbacommandbar.cxx
index e0955163d9..c87bf24383 100644
--- a/vbahelper/source/vbahelper/vbacommandbar.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbar.cxx
@@ -47,7 +47,7 @@ ScVbaCommandBar::getName() throw ( uno::RuntimeException )
{
// This will get a "NULL length string" when Name is not set.
uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
- uno::Any aName = xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("UIName") );
+ uno::Any aName = xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")) );
rtl::OUString sName;
aName >>= sName;
if( sName.getLength() < 1 )
@@ -78,7 +78,7 @@ void SAL_CALL
ScVbaCommandBar::setName( const ::rtl::OUString& _name ) throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("UIName"), uno::makeAny( _name ) );
+ xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")), uno::makeAny( _name ) );
pCBarHelper->ApplyChange( m_sResourceUrl, m_xBarSettings );
}
@@ -160,7 +160,7 @@ ScVbaCommandBar::Controls( const uno::Any& aIndex ) throw (script::BasicErrorExc
{
uno::Reference< frame::XLayoutManager > xLayoutManager = pCBarHelper->getLayoutManager();
uno::Reference< beans::XPropertySet > xPropertySet( xLayoutManager->getElement( m_sResourceUrl ), uno::UNO_QUERY_THROW );
- xMenu.set( xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("XMenuBar") ), uno::UNO_QUERY );
+ xMenu.set( xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("XMenuBar")) ), uno::UNO_QUERY );
}
uno::Reference< XCommandBarControls > xCommandBarControls( new ScVbaCommandBarControls( this, mxContext, m_xBarSettings, pCBarHelper, m_xBarSettings, m_sResourceUrl, xMenu ) );
if( aIndex.hasValue() )
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
index 449c9e4d82..642ec2c3c7 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
@@ -54,7 +54,7 @@ ScVbaCommandBarControl::getCaption() throw ( uno::RuntimeException )
{
// "Label" always empty
rtl::OUString sCaption;
- getPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("Label") ) >>= sCaption;
+ getPropertyValue( m_aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")) ) >>= sCaption;
return sCaption;
}
@@ -62,7 +62,7 @@ void SAL_CALL
ScVbaCommandBarControl::setCaption( const ::rtl::OUString& _caption ) throw (uno::RuntimeException)
{
rtl::OUString sCaption = _caption.replace('&','~');
- setPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("Label"), uno::makeAny( sCaption ) );
+ setPropertyValue( m_aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Label")), uno::makeAny( sCaption ) );
ApplyChange();
}
@@ -70,7 +70,7 @@ ScVbaCommandBarControl::setCaption( const ::rtl::OUString& _caption ) throw (uno
ScVbaCommandBarControl::getOnAction() throw (uno::RuntimeException)
{
rtl::OUString sCommandURL;
- getPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("CommandURL") ) >>= sCommandURL;
+ getPropertyValue( m_aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CommandURL")) ) >>= sCommandURL;
return sCommandURL;
}
@@ -84,7 +84,7 @@ ScVbaCommandBarControl::setOnAction( const ::rtl::OUString& _onaction ) throw (u
{
rtl::OUString aCommandURL = ooo::vba::makeMacroURL( aResolvedMacro.ResolvedMacro() );
OSL_TRACE(" ScVbaCommandBarControl::setOnAction: %s", rtl::OUStringToOString( aCommandURL, RTL_TEXTENCODING_UTF8 ).getStr() );
- setPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("CommandURL"), uno::makeAny( aCommandURL ) );
+ setPropertyValue( m_aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CommandURL")), uno::makeAny( aCommandURL ) );
ApplyChange();
}
}
@@ -93,7 +93,7 @@ ScVbaCommandBarControl::setOnAction( const ::rtl::OUString& _onaction ) throw (u
ScVbaCommandBarControl::getVisible() throw (uno::RuntimeException)
{
sal_Bool bVisible = sal_True;
- uno::Any aValue = getPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("IsVisible") );
+ uno::Any aValue = getPropertyValue( m_aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsVisible")) );
if( aValue.hasValue() )
aValue >>= bVisible;
return bVisible;
@@ -101,10 +101,10 @@ ScVbaCommandBarControl::getVisible() throw (uno::RuntimeException)
void SAL_CALL
ScVbaCommandBarControl::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException)
{
- uno::Any aValue = getPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("IsVisible") );
+ uno::Any aValue = getPropertyValue( m_aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsVisible")) );
if( aValue.hasValue() )
{
- setPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii("IsVisible"), uno::makeAny( _visible ) );
+ setPropertyValue( m_aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsVisible")), uno::makeAny( _visible ) );
ApplyChange();
}
}
@@ -175,7 +175,7 @@ ScVbaCommandBarControl::Controls( const uno::Any& aIndex ) throw (script::BasicE
{
// only Popup Menu has controls
uno::Reference< container::XIndexAccess > xSubMenu;
- getPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_CONTAINER ) ) >>= xSubMenu;
+ getPropertyValue( m_aPropertyValues, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_CONTAINER )) ) >>= xSubMenu;
if( !xSubMenu.is() )
throw uno::RuntimeException();
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
index 6e409f8e84..3c8c531628 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
@@ -65,15 +65,15 @@ uno::Sequence< beans::PropertyValue > ScVbaCommandBarControls::CreateMenuItemDat
{
uno::Sequence< beans::PropertyValue > aProps(5);
- aProps[0].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_COMMANDURL );
+ aProps[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL ));
aProps[0].Value <<= sCommandURL;
- aProps[1].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_HELPURL );
+ aProps[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_HELPURL ));
aProps[1].Value <<= sHelpURL;
- aProps[2].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_LABEL );
+ aProps[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_LABEL ));
aProps[2].Value <<= sLabel;
- aProps[3].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_TYPE );
+ aProps[3].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TYPE ));
aProps[3].Value <<= nType;
- aProps[4].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_CONTAINER );
+ aProps[4].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_CONTAINER ));
aProps[4].Value = aSubMenu;
return aProps;
@@ -83,19 +83,19 @@ uno::Sequence< beans::PropertyValue > ScVbaCommandBarControls::CreateToolbarItem
{
uno::Sequence< beans::PropertyValue > aProps(7);
- aProps[0].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_COMMANDURL );
+ aProps[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL ));
aProps[0].Value <<= sCommandURL;
- aProps[1].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_HELPURL );
+ aProps[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_HELPURL ));
aProps[1].Value <<= sHelpURL;
- aProps[2].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_LABEL );
+ aProps[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_LABEL ));
aProps[2].Value <<= sLabel;
- aProps[3].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_TYPE );
+ aProps[3].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TYPE ));
aProps[3].Value <<= nType;
- aProps[4].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_CONTAINER );
+ aProps[4].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_CONTAINER ));
aProps[4].Value = aSubMenu;
- aProps[5].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_ISVISIBLE );
+ aProps[5].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_ISVISIBLE ));
aProps[5].Value <<= isVisible;
- aProps[6].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_STYLE );
+ aProps[6].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_STYLE ));
aProps[6].Value <<= nStyle;
return aProps;
@@ -122,7 +122,7 @@ ScVbaCommandBarControls::createCollectionObject( const uno::Any& aSource )
uno::Sequence< beans::PropertyValue > aProps;
m_xIndexAccess->getByIndex( nPosition ) >>= aProps;
uno::Reference< container::XIndexAccess > xSubMenu;
- getPropertyValue( aProps, rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_CONTAINER ) ) >>= xSubMenu;
+ getPropertyValue( aProps, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_CONTAINER )) ) >>= xSubMenu;
ScVbaCommandBarControl* pNewCommandBarControl = NULL;
if( xSubMenu.is() )
pNewCommandBarControl = new ScVbaCommandBarPopup( this, mxContext, m_xIndexAccess, pCBarHelper, m_xBarSettings, m_sResourceUrl, nPosition, sal_True, m_xMenu );
@@ -161,8 +161,8 @@ ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const un
{
// Parameter is not supported
// the following name needs to be individually created;
- rtl::OUString sLabel( rtl::OUString::createFromAscii("Custom") );
- rtl::OUString sCommandUrl = rtl::OUString::createFromAscii( CUSTOM_MENU_STR ) + sLabel;
+ rtl::OUString sLabel(RTL_CONSTASCII_USTRINGPARAM("Custom"));
+ rtl::OUString sCommandUrl(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( CUSTOM_MENU_STR)) + sLabel);
sal_Int32 nType = office::MsoControlType::msoControlButton;
sal_Int32 nPosition = 0;
sal_Bool bTemporary = sal_True;
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index d8302bb321..ac15b8a7d0 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -185,7 +185,7 @@ uno::Reference< frame::XLayoutManager > VbaCommandBarHelper::getLayoutManager()
{
uno::Reference< frame::XFrame > xFrame( getModel()->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xPropertySet( xFrame, uno::UNO_QUERY_THROW );
- uno::Reference< frame::XLayoutManager > xLayoutManager( xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("LayoutManager") ), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XLayoutManager > xLayoutManager( xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager")) ), uno::UNO_QUERY_THROW );
return xLayoutManager;
}
@@ -195,7 +195,7 @@ sal_Bool VbaCommandBarHelper::hasToolbar( const rtl::OUString& sResourceUrl, con
{
rtl::OUString sUIName;
uno::Reference< beans::XPropertySet > xPropertySet( m_xDocCfgMgr->getSettings( sResourceUrl, sal_False ), uno::UNO_QUERY_THROW );
- xPropertySet->getPropertyValue( rtl::OUString::createFromAscii(ITEM_DESCRIPTOR_UINAME) ) >>= sUIName;
+ xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ITEM_DESCRIPTOR_UINAME)) ) >>= sUIName;
if( sName.equalsIgnoreAsciiCase( sUIName ) )
return sal_True;
}
@@ -216,7 +216,7 @@ rtl::OUString VbaCommandBarHelper::findToolbarByName( const css::uno::Reference<
for( sal_Int32 i = 0; i < allNames.getLength(); i++ )
{
sResourceUrl = allNames[i];
- if(sResourceUrl.indexOf( rtl::OUString::createFromAscii( ITEM_TOOLBAR_URL ) ) == 0 )
+ if(sResourceUrl.indexOf( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_TOOLBAR_URL )) ) == 0 )
{
if( hasToolbar( sResourceUrl, sName ) )
return sResourceUrl;
@@ -241,7 +241,7 @@ sal_Int32 VbaCommandBarHelper::findControlByName( const css::uno::Reference< css
{
rtl::OUString sLabel;
xIndexAccess->getByIndex( i ) >>= aProps;
- getPropertyValue( aProps, rtl::OUString::createFromAscii(ITEM_DESCRIPTOR_LABEL) ) >>= sLabel;
+ getPropertyValue( aProps, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ITEM_DESCRIPTOR_LABEL)) ) >>= sLabel;
// handle the hotkey marker '~' (remove in toolbars (?), replace by '&' in menus)
::rtl::OUStringBuffer aBuffer;
sal_Int32 index = sLabel.indexOf( sal_Unicode('~') );
@@ -268,8 +268,8 @@ sal_Int32 VbaCommandBarHelper::findControlByName( const css::uno::Reference< css
rtl::OUString VbaCommandBarHelper::generateCustomURL()
{
- rtl::OUString url = rtl::OUString::createFromAscii( ITEM_TOOLBAR_URL );
- url += rtl::OUString::createFromAscii( CUSTOM_TOOLBAR_STR );
+ rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM( ITEM_TOOLBAR_URL ));
+ url += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( CUSTOM_TOOLBAR_STR ));
// use a random number to minimize possible clash with existing custom toolbars
srand( unsigned( time( NULL ) ));
diff --git a/vbahelper/source/vbahelper/vbacommandbars.cxx b/vbahelper/source/vbahelper/vbacommandbars.cxx
index 6b6a547150..02a516dd04 100644
--- a/vbahelper/source/vbahelper/vbacommandbars.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbars.cxx
@@ -68,7 +68,7 @@ public:
if( hasMoreElements() )
{
rtl::OUString sResourceUrl( m_sNames[ m_nCurrentPosition++ ] );
- if( sResourceUrl.indexOf( rtl::OUString::createFromAscii("private:resource/toolbar/") ) != -1 )
+ if( sResourceUrl.indexOf( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/")) ) != -1 )
{
uno::Reference< container::XIndexAccess > xCBarSetting = m_pCBarHelper->getSettings( sResourceUrl );
uno::Reference< XCommandBar > xCommandBar( new ScVbaCommandBar( m_xParent, m_xContext, m_pCBarHelper, xCBarSetting, sResourceUrl, sal_False, sal_False ) );
@@ -123,7 +123,7 @@ ScVbaCommandBars::createCollectionObject( const uno::Any& aSource )
if( sBarName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM("Worksheet Menu Bar") ) )
{
// spreadsheet menu bar
- sResourceUrl = rtl::OUString::createFromAscii( ITEM_MENUBAR_URL );
+ sResourceUrl = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_MENUBAR_URL ));
bMenu = sal_True;
}
else if( sBarName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM("Cell") ) )
@@ -137,7 +137,7 @@ ScVbaCommandBars::createCollectionObject( const uno::Any& aSource )
if( sBarName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM("Menu Bar") ) )
{
// text processor menu bar
- sResourceUrl = rtl::OUString::createFromAscii( ITEM_MENUBAR_URL );
+ sResourceUrl = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ITEM_MENUBAR_URL ));
bMenu = sal_True;
}
}
@@ -203,7 +203,7 @@ ScVbaCommandBars::getCount() throw(css::uno::RuntimeException)
uno::Sequence< ::rtl::OUString > allNames = m_xNameAccess->getElementNames();
for( sal_Int32 i = 0; i < allNames.getLength(); i++ )
{
- if(allNames[i].indexOf( rtl::OUString::createFromAscii("private:resource/toolbar/") ) != -1 )
+ if(allNames[i].indexOf( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/")) ) != -1 )
{
nCount++;
}
@@ -227,9 +227,9 @@ ScVbaCommandBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) th
{
uno::Any aSource;
if( m_pCBarHelper->getModuleId().equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" ) )
- aSource <<= rtl::OUString::createFromAscii( "Worksheet Menu Bar" );
+ aSource <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Worksheet Menu Bar"));
else if( m_pCBarHelper->getModuleId().equalsAscii("com.sun.star.text.TextDocument") )
- aSource <<= rtl::OUString::createFromAscii( "Menu Bar" );
+ aSource <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Menu Bar"));
if( aSource.hasValue() )
return createCollectionObject( aSource );
}
diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
index ad25c4c652..4c74742c85 100644
--- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
@@ -58,8 +58,8 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-static const rtl::OUString sSpreadsheetDocument( rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" ) );
-static const rtl::OUString sTextDocument( rtl::OUString::createFromAscii( "com.sun.star.text.TextDocument" ) );
+static const rtl::OUString sSpreadsheetDocument( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument") );
+static const rtl::OUString sTextDocument( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument") );
typedef std::hash_map< rtl::OUString,
sal_Int32, ::rtl::OUStringHash,
@@ -89,7 +89,7 @@ public:
m_xContext->getServiceManager(), uno::UNO_QUERY_THROW );
uno::Reference< frame::XDesktop > xDesktop
- (xSMgr->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"), m_xContext), uno::UNO_QUERY_THROW );
+ (xSMgr->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")), m_xContext), uno::UNO_QUERY_THROW );
uno::Reference< container::XEnumeration > mxComponents = xDesktop->getComponents()->createEnumeration();
while( mxComponents->hasMoreElements() )
{
@@ -228,7 +228,7 @@ VbaDocumentsBase::Add() throw (uno::RuntimeException)
uno::Reference< frame::XComponentLoader > xLoader(
xSMgr->createInstanceWithContext(
- ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")),
mxContext), uno::UNO_QUERY_THROW );
rtl::OUString sURL;
if( meDocType == WORD_DOCUMENT )
@@ -274,11 +274,11 @@ VbaDocumentsBase::Open( const rtl::OUString& rFileName, const uno::Any& ReadOnly
uno::Reference< lang::XMultiComponentFactory > xSMgr(
mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
uno::Reference< frame::XDesktop > xDesktop
- (xSMgr->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop") , mxContext),
+ (xSMgr->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) , mxContext),
uno::UNO_QUERY_THROW );
uno::Reference< frame::XComponentLoader > xLoader(
xSMgr->createInstanceWithContext(
- ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")),
mxContext),
uno::UNO_QUERY_THROW );
diff --git a/vbahelper/source/vbahelper/vbafillformat.cxx b/vbahelper/source/vbahelper/vbafillformat.cxx
index 89d074e89e..23a6e469dd 100644
--- a/vbahelper/source/vbahelper/vbafillformat.cxx
+++ b/vbahelper/source/vbahelper/vbafillformat.cxx
@@ -50,7 +50,7 @@ ScVbaFillFormat::setFillStyle( drawing::FillStyle nFillStyle ) throw (uno::Runti
m_nFillStyle = nFillStyle;
if( m_nFillStyle == drawing::FillStyle_GRADIENT )
{
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("FillStyle"), uno::makeAny( drawing::FillStyle_GRADIENT ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FillStyle")), uno::makeAny( drawing::FillStyle_GRADIENT ) );
awt::Gradient aGradient;
// AXIAL
// RADIAL
@@ -67,11 +67,11 @@ ScVbaFillFormat::setFillStyle( drawing::FillStyle nFillStyle ) throw (uno::Runti
aGradient.StartIntensity = 100;
aGradient.EndIntensity = 100;
aGradient.StepCount = 1;
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("FillGradient"), uno::makeAny( aGradient ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FillGradient")), uno::makeAny( aGradient ) );
}
else if( m_nFillStyle == drawing::FillStyle_SOLID )
{
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("FillStyle"), uno::makeAny(drawing::FillStyle_SOLID) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FillStyle")), uno::makeAny(drawing::FillStyle_SOLID) );
}
}
@@ -87,7 +87,7 @@ sal_Bool SAL_CALL
ScVbaFillFormat::getVisible() throw (uno::RuntimeException)
{
drawing::FillStyle nFillStyle;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("FillStyle") ) >>= nFillStyle;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FillStyle")) ) >>= nFillStyle;
if( nFillStyle == drawing::FillStyle_NONE )
return sal_False;
return sal_True;
@@ -97,10 +97,10 @@ void SAL_CALL
ScVbaFillFormat::setVisible( sal_Bool _visible ) throw (uno::RuntimeException)
{
drawing::FillStyle aFillStyle;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("FillStyle") ) >>= aFillStyle;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FillStyle")) ) >>= aFillStyle;
if( !_visible )
{
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("FillStyle"), uno::makeAny( drawing::FillStyle_NONE ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FillStyle")), uno::makeAny( drawing::FillStyle_NONE ) );
}
else
{
@@ -116,7 +116,7 @@ ScVbaFillFormat::getTransparency() throw (uno::RuntimeException)
{
sal_Int16 nTransparence = 0;
double dTransparence = 0;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "FillTransparence" ) ) >>= nTransparence;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FillTransparence")) ) >>= nTransparence;
dTransparence = static_cast<double>( nTransparence );
dTransparence /= 100;
return dTransparence;
@@ -126,7 +126,7 @@ void SAL_CALL
ScVbaFillFormat::setTransparency( double _transparency ) throw (uno::RuntimeException)
{
sal_Int16 nTransparence = static_cast< sal_Int16 >( _transparency * 100 );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "FillTransparence" ), uno::makeAny( nTransparence ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FillTransparence")), uno::makeAny( nTransparence ) );
}
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index d7996bc70e..cdf94c5dce 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -127,7 +127,7 @@ getIntrospectionAccess( const uno::Any& aObject ) throw (uno::RuntimeException)
if( !xIntrospection.is() )
{
uno::Reference< lang::XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
- xIntrospection.set( xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.beans.Introspection") ), uno::UNO_QUERY_THROW );
+ xIntrospection.set( xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Introspection")) ), uno::UNO_QUERY_THROW );
}
return xIntrospection->inspect( aObject );
}
@@ -558,7 +558,7 @@ rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeEx
break;
}
default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid type, can't convert" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid type, can't convert")), uno::Reference< uno::XInterface >() );
}
return sString;
}
@@ -1191,7 +1191,7 @@ void UserFormGeometryHelper::setHeight( double nHeight )
ShapeHelper::ShapeHelper( const css::uno::Reference< css::drawing::XShape >& _xShape) throw (css::script::BasicErrorException ) : xShape( _xShape )
{
if( !xShape.is() )
- throw css::uno::RuntimeException( rtl::OUString::createFromAscii("No valid shape for helper"), css::uno::Reference< css::uno::XInterface >() );
+ throw css::uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No valid shape for helper")), css::uno::Reference< css::uno::XInterface >() );
}
double ShapeHelper::getHeight()
@@ -1265,7 +1265,7 @@ void UserFormGeometryHelper::setHeight( double nHeight )
void DebugHelper::exception( const rtl::OUString& DetailedMessage, const css::uno::Exception& ex, int err, const rtl::OUString& /*additionalArgument*/ ) throw( css::script::BasicErrorException )
{
// #TODO #FIXME ( do we want to support additionalArg here )
- throw css::script::BasicErrorException( DetailedMessage.concat( rtl::OUString::createFromAscii(" ") ).concat( ex.Message ), css::uno::Reference< css::uno::XInterface >(), err, rtl::OUString() );
+ throw css::script::BasicErrorException( DetailedMessage.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")) ).concat( ex.Message ), css::uno::Reference< css::uno::XInterface >(), err, rtl::OUString() );
}
void DebugHelper::exception( int err, const rtl::OUString& additionalArgument ) throw( css::script::BasicErrorException )
diff --git a/vbahelper/source/vbahelper/vbalineformat.cxx b/vbahelper/source/vbahelper/vbalineformat.cxx
index 58c00be4dc..06787b0a9c 100644
--- a/vbahelper/source/vbahelper/vbalineformat.cxx
+++ b/vbahelper/source/vbahelper/vbalineformat.cxx
@@ -54,39 +54,39 @@ sal_Int32
ScVbaLineFormat::convertLineStartEndNameToArrowheadStyle( rtl::OUString sLineName )
{
sal_Int32 nLineType = office::MsoArrowheadStyle::msoArrowheadNone;
- if (sLineName.equals(rtl::OUString::createFromAscii("Small Arrow")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Arrow")) ||
- sLineName.equals(rtl::OUString::createFromAscii("msArrowEnd")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Double Arrow")))
+ if (sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Small Arrow"))) ||
+ sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Arrow"))) ||
+ sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("msArrowEnd"))) ||
+ sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Double Arrow"))))
{
// msoArrowheadTriangle
nLineType = office::MsoArrowheadStyle::msoArrowheadTriangle;
}
- else if (sLineName.equals(rtl::OUString::createFromAscii("Square 45")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Square")) ||
- sLineName.equals(rtl::OUString::createFromAscii("msArrowDiamondEnd")))
+ else if (sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Square 45"))) ||
+ sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Square"))) ||
+ sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("msArrowDiamondEnd"))))
{
// msoArrowheadDiamond
nLineType = office::MsoArrowheadStyle::msoArrowheadDiamond;
}
- else if (sLineName.equals(rtl::OUString::createFromAscii("Circle")) ||
- sLineName.equals(rtl::OUString::createFromAscii("msArrowOvalEnd")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Dimension Lines")) )
+ else if (sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Circle"))) ||
+ sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("msArrowOvalEnd"))) ||
+ sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Dimension Lines"))) )
{
// msoArrowheadOval
nLineType = office::MsoArrowheadStyle::msoArrowheadOval;
}
- else if (sLineName.equals(rtl::OUString::createFromAscii("Arrow concave")) ||
- sLineName.equals(rtl::OUString::createFromAscii("msArrowStealthEnd")))
+ else if (sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Arrow concave"))) ||
+ sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("msArrowStealthEnd"))))
{
// msoArrowheadStealth
nLineType = office::MsoArrowheadStyle::msoArrowheadStealth;
}
- else if (sLineName.equals(rtl::OUString::createFromAscii("Rounded short Arrow")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Rounded large Arrow")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Symmetric Arrow")) ||
- sLineName.equals(rtl::OUString::createFromAscii("msArrowOpenEnd")) ||
- sLineName.equals(rtl::OUString::createFromAscii("Line Arrow")))
+ else if (sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Rounded short Arrow"))) ||
+ sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Rounded large Arrow"))) ||
+ sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Symmetric Arrow"))) ||
+ sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("msArrowOpenEnd"))) ||
+ sLineName.equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Line Arrow"))))
{
// msoArrowheadOpen
nLineType = office::MsoArrowheadStyle::msoArrowheadOpen;
@@ -105,19 +105,19 @@ ScVbaLineFormat::convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadSt
switch( nArrowheadStyle )
{
case office::MsoArrowheadStyle::msoArrowheadNone:
- return rtl::OUString(rtl::OUString::createFromAscii( "" ) );
+ return rtl::OUString();
case office::MsoArrowheadStyle::msoArrowheadStealth:
- return rtl::OUString::createFromAscii( "Arrow concave" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Arrow concave"));
case office::MsoArrowheadStyle::msoArrowheadOpen:
- return rtl::OUString::createFromAscii("Line Arrow" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Line Arrow"));
case office::MsoArrowheadStyle::msoArrowheadOval:
- return rtl::OUString::createFromAscii("Circle" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Circle"));
case office::MsoArrowheadStyle::msoArrowheadDiamond:
- return rtl::OUString::createFromAscii( "Square 45" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Square 45"));
case office::MsoArrowheadStyle::msoArrowheadTriangle:
- return rtl::OUString::createFromAscii( "Arrow" );
+ return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Arrow"));
default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Invalid Arrow Style!"), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid Arrow Style!")), uno::Reference< uno::XInterface >() );
}
}
@@ -127,10 +127,10 @@ ScVbaLineFormat::getBeginArrowheadStyle() throw (uno::RuntimeException)
{
sal_Int32 nLineType = office::MsoArrowheadStyle::msoArrowheadNone;
rtl::OUString sLineName;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineStartName" ) ) >>= sLineName;
- if( ( sLineName.getLength() > 7 ) && ( sLineName.indexOf( rtl::OUString::createFromAscii( "msArray" ) ) ) != -1 )
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineStartName")) ) >>= sLineName;
+ if( ( sLineName.getLength() > 7 ) && ( sLineName.indexOf( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("msArray")) ) ) != -1 )
{
- sal_Int32 nIndex = sLineName.indexOf( rtl::OUString::createFromAscii(" ") );
+ sal_Int32 nIndex = sLineName.indexOf( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")) );
rtl::OUString sName = sLineName.copy( 0, nIndex );
//sal_Int32 nSize = sLineName.copy( nIndex + 1 ).toInt32();
nLineType = convertLineStartEndNameToArrowheadStyle( sName );
@@ -146,31 +146,31 @@ void SAL_CALL
ScVbaLineFormat::setBeginArrowheadStyle( sal_Int32 _beginarrowheadstyle ) throw (uno::RuntimeException)
{
rtl::OUString sArrayName = convertArrowheadStyleToLineStartEndName( _beginarrowheadstyle );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineStartName" ), uno::makeAny( sArrayName ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineStartName")), uno::makeAny( sArrayName ) );
}
sal_Int32 SAL_CALL
ScVbaLineFormat::getBeginArrowheadLength() throw (uno::RuntimeException)
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property 'EndArrowheadWidth' is not supported.")), uno::Reference< uno::XInterface >() );
}
void SAL_CALL
ScVbaLineFormat::setBeginArrowheadLength( sal_Int32 /*_beginarrowheadlength*/ ) throw (uno::RuntimeException)
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property 'EndArrowheadWidth' is not supported.")), uno::Reference< uno::XInterface >() );
}
sal_Int32 SAL_CALL
ScVbaLineFormat::getBeginArrowheadWidth() throw (uno::RuntimeException)
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property 'EndArrowheadWidth' is not supported.")), uno::Reference< uno::XInterface >() );
}
void SAL_CALL
ScVbaLineFormat::setBeginArrowheadWidth( sal_Int32 /*_beginarrowheadwidth*/ ) throw (uno::RuntimeException)
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property 'EndArrowheadWidth' is not supported.")), uno::Reference< uno::XInterface >() );
}
sal_Int32 SAL_CALL
@@ -187,32 +187,32 @@ ScVbaLineFormat::setEndArrowheadStylel( sal_Int32 /*_endarrowheadstylel*/ ) thro
sal_Int32 SAL_CALL
ScVbaLineFormat::getEndArrowheadLength() throw (uno::RuntimeException)
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property 'EndArrowheadWidth' is not supported.")), uno::Reference< uno::XInterface >() );
}
void SAL_CALL
ScVbaLineFormat::setEndArrowheadLength( sal_Int32 /*_endarrowheadlength*/ ) throw (uno::RuntimeException)
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property 'EndArrowheadWidth' is not supported.")), uno::Reference< uno::XInterface >() );
}
sal_Int32 SAL_CALL
ScVbaLineFormat::getEndArrowheadWidth() throw (uno::RuntimeException)
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property 'EndArrowheadWidth' is not supported.")), uno::Reference< uno::XInterface >() );
}
void SAL_CALL
ScVbaLineFormat::setEndArrowheadWidth( sal_Int32 /*_endarrowheadwidth*/ ) throw (uno::RuntimeException)
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Property 'EndArrowheadWidth' is not supported."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property 'EndArrowheadWidth' is not supported.")), uno::Reference< uno::XInterface >() );
}
double SAL_CALL
ScVbaLineFormat::getWeight() throw (uno::RuntimeException)
{
sal_Int32 nLineWidth=0;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineWidth") ) >>= nLineWidth;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineWidth")) ) >>= nLineWidth;
double dLineWidth = Millimeter::getInPoints( nLineWidth );
return dLineWidth;
}
@@ -221,7 +221,7 @@ void SAL_CALL
ScVbaLineFormat::setWeight( double _weight ) throw (uno::RuntimeException)
{
if( _weight < 0 )
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Parameter: Must be positv."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Parameter: Must be positive.")), uno::Reference< uno::XInterface >() );
if( _weight == 0 )
_weight = 0.5;
m_nLineWeight = _weight;
@@ -229,7 +229,7 @@ ScVbaLineFormat::setWeight( double _weight ) throw (uno::RuntimeException)
aMillimeter.setInPoints( _weight );
sal_Int32 nLineWidth = static_cast<sal_Int32>( aMillimeter.getInHundredthsOfOneMillimeter() );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineWidth" ), uno::makeAny( nLineWidth ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineWidth")), uno::makeAny( nLineWidth ) );
setDashStyle( m_nLineDashStyle );
}
@@ -237,7 +237,7 @@ sal_Bool SAL_CALL
ScVbaLineFormat::getVisible() throw (uno::RuntimeException)
{
drawing::LineStyle aLineStyle;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ) ) >>= aLineStyle;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineStyle")) ) >>= aLineStyle;
if( aLineStyle == drawing::LineStyle_NONE )
{
return sal_False;
@@ -249,11 +249,11 @@ void SAL_CALL
ScVbaLineFormat::setVisible( sal_Bool _visible ) throw (uno::RuntimeException)
{
drawing::LineStyle aLineStyle;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ) ) >>= aLineStyle;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineStyle")) ) >>= aLineStyle;
if( !_visible )
{
aLineStyle = drawing::LineStyle_NONE;
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ), uno::makeAny( aLineStyle ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineStyle")), uno::makeAny( aLineStyle ) );
}
else
{
@@ -268,7 +268,7 @@ double SAL_CALL
ScVbaLineFormat::getTransparency() throw (uno::RuntimeException)
{
sal_Int16 nTransparency = 0;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineTransparence" ) ) >>= nTransparency;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineTransparence")) ) >>= nTransparency;
double fTransparency = static_cast<double>( nTransparency );
return fTransparency / 100;
}
@@ -277,7 +277,7 @@ void SAL_CALL
ScVbaLineFormat::setTransparency( double _transparency ) throw (uno::RuntimeException)
{
sal_Int16 nTransparency = static_cast<sal_Int16>( _transparency * 100 );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineTransparence" ), uno::makeAny( nTransparency ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineTransparence")), uno::makeAny( nTransparency ) );
}
sal_Int16 SAL_CALL
@@ -302,13 +302,13 @@ ScVbaLineFormat::getDashStyle() throw (uno::RuntimeException)
{
drawing::LineStyle eLineStyle;
//LineStyle integer in Xray
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ) ) >>= eLineStyle;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineStyle")) ) >>= eLineStyle;
if( eLineStyle == drawing::LineStyle_SOLID )
m_nLineDashStyle = office::MsoLineDashStyle::msoLineSolid;
else
{
drawing::LineDash aLineDash;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "LineDash" ) ) >>= aLineDash;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineDash")) ) >>= aLineDash;
if( aLineDash.Dots == 0 )
{
//LineDash
@@ -354,11 +354,11 @@ ScVbaLineFormat::setDashStyle( sal_Int32 _dashstyle ) throw (uno::RuntimeExcepti
m_nLineDashStyle = _dashstyle;
if( _dashstyle == office::MsoLineDashStyle::msoLineSolid )
{
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ), uno::makeAny( drawing::LineStyle_SOLID ));
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineStyle")), uno::makeAny( drawing::LineStyle_SOLID ));
}
else
{
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ), uno::makeAny( drawing::LineStyle_DASH ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineStyle")), uno::makeAny( drawing::LineStyle_DASH ) );
drawing::LineDash pLineDash;
Millimeter aMillimeter( m_nLineWeight );
sal_Int32 nPixel = static_cast< sal_Int32 >( aMillimeter.getInHundredthsOfOneMillimeter() );
@@ -414,9 +414,9 @@ ScVbaLineFormat::setDashStyle( sal_Int32 _dashstyle ) throw (uno::RuntimeExcepti
pLineDash.Distance = nPixel;
break;
default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii("this MsoLineDashStyle is not supported."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("this MsoLineDashStyle is not supported.")), uno::Reference< uno::XInterface >() );
}
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "LineDash" ), uno::makeAny( pLineDash ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineDash")), uno::makeAny( pLineDash ) );
}
}
diff --git a/vbahelper/source/vbahelper/vbapictureformat.cxx b/vbahelper/source/vbahelper/vbapictureformat.cxx
index 37117daf01..34d3cf736d 100644
--- a/vbahelper/source/vbahelper/vbapictureformat.cxx
+++ b/vbahelper/source/vbahelper/vbapictureformat.cxx
@@ -43,11 +43,11 @@ ScVbaPictureFormat::checkParameterRangeInDouble( double nRange, double nMin, dou
{
if( nRange < nMin )
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Parameter out of range, value is too small.") , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Parameter out of range, value is too small.")) , uno::Reference< uno::XInterface >() );
}
if( nRange > nMax )
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii("Parameter out of range, value is too high.") , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Parameter out of range, value is too high.")) , uno::Reference< uno::XInterface >() );
}
}
@@ -56,7 +56,7 @@ double SAL_CALL
ScVbaPictureFormat::getBrightness() throw (uno::RuntimeException)
{
sal_Int16 nLuminance = 0;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("AdjustLuminance") ) >>= nLuminance;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AdjustLuminance")) ) >>= nLuminance;
double fBrightness = static_cast< double >( nLuminance );
fBrightness = ( fBrightness +100 ) / 200;
return fBrightness;
@@ -68,14 +68,14 @@ ScVbaPictureFormat::setBrightness( double _brightness ) throw (uno::RuntimeExcep
checkParameterRangeInDouble( _brightness, 0.0, 1.0 );
double fLuminance = _brightness * 200 - 100;
sal_Int16 nLuminance = static_cast< sal_Int16 >( fLuminance );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("AdjustLuminance"), uno::makeAny( nLuminance ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AdjustLuminance")), uno::makeAny( nLuminance ) );
}
double SAL_CALL
ScVbaPictureFormat::getContrast() throw (uno::RuntimeException)
{
sal_Int16 nContrast = 0;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("AdjustContrast") ) >>= nContrast;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AdjustContrast")) ) >>= nContrast;
double fContrast = static_cast< double >( nContrast );
fContrast = ( fContrast + 100 ) / 200;
return fContrast;
@@ -87,7 +87,7 @@ ScVbaPictureFormat::setContrast( double _contrast ) throw (uno::RuntimeException
checkParameterRangeInDouble( _contrast, 0.0, 1.0 );
double fContrast = _contrast * 200 - 100;
sal_Int16 nContrast = static_cast< sal_Int16 >( fContrast );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii("AdjustContrast"), uno::makeAny( nContrast ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AdjustContrast")), uno::makeAny( nContrast ) );
}
diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx
index 7eafdfde1b..ca368e4471 100644
--- a/vbahelper/source/vbahelper/vbashape.cxx
+++ b/vbahelper/source/vbahelper/vbashape.cxx
@@ -142,22 +142,22 @@ ScVbaShape::getType( const css::uno::Reference< drawing::XShape > xShape ) throw
sShapeType = xShapeDescriptor->getShapeType();
OSL_TRACE("ScVbaShape::getType: %s", rtl::OUStringToOString( sShapeType, RTL_TEXTENCODING_UTF8 ).getStr() );
// office::MsoShapeType::msoDiagram to "com.sun.star.drawing.GroupShape"
- if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.GroupShape" ) ) )
+ if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GroupShape")) ) )
return office::MsoShapeType::msoGroup;
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.GraphicObjectShape" ) ) )
+ else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicObjectShape")) ) )
return office::MsoShapeType::msoPicture;
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.ControlShape" ) ) ||
- sShapeType.equals( rtl::OUString::createFromAscii( "FrameShape" ) ) )
+ else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape")) ) ||
+ sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameShape")) ) )
return office::MsoShapeType::msoOLEControlObject;
// OOo don't support office::MsoShapeType::msoComment as a Shape.
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.OLE2Shape" ) ) )
+ else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")) ) )
return office::MsoShapeType::msoChart;
// Art characters office::MsoShapeType::msoTextEffect, in OOo corresponding to "com.sun.star.drawing.CustomShape"
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.ConnectorShape" ) ) )
+ else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ConnectorShape")) ) )
{
enum drawing::ConnectorType connectorType;
uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY_THROW );
- xPropertySet->getPropertyValue( rtl::OUString::createFromAscii("EdgeKind")) >>= connectorType;
+ xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EdgeKind"))) >>= connectorType;
if( connectorType == drawing::ConnectorType_CURVE )
return office::MsoShapeType::msoFreeform;
else if( connectorType == drawing::ConnectorType_LINE )
@@ -165,15 +165,15 @@ ScVbaShape::getType( const css::uno::Reference< drawing::XShape > xShape ) throw
else
return office::MsoShapeType::msoAutoShape;
}
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.LineShape" ) ) )
+ else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.LineShape")) ) )
return office::MsoShapeType::msoLine;
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.CustomShape" ) ) ||
- sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.RectangleShape") ) )
+ else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape")) ) ||
+ sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.RectangleShape")) ) )
return office::MsoShapeType::msoAutoShape;
- else if( sShapeType.equals( rtl::OUString::createFromAscii( "com.sun.star.drawing.TextShape" ) ) )
+ else if( sShapeType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.TextShape")) ) )
return office::MsoShapeType::msoTextBox;
else
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "the shape type do not be supported: " ) + sShapeType, uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("the shape type do not be supported: ")) + sShapeType, uno::Reference< uno::XInterface >() );
}
// Attributes
@@ -246,7 +246,7 @@ ScVbaShape::setLeft( double _left ) throw (uno::RuntimeException)
{
sal_Int32 nLeft = 0;
nLeft = Millimeter::getInHundredthsOfOneMillimeter( _left );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "HoriOrientPosition" ), uno::makeAny( nLeft ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")), uno::makeAny( nLeft ) );
}
}
@@ -278,7 +278,7 @@ ScVbaShape::setTop( double _top ) throw (uno::RuntimeException)
{
sal_Int32 nTop = 0;
nTop = Millimeter::getInHundredthsOfOneMillimeter( _top );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "VertOrientPosition" ), uno::makeAny( nTop ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")), uno::makeAny( nTop ) );
}
}
@@ -299,7 +299,7 @@ sal_Int32 SAL_CALL
ScVbaShape::getZOrderPosition() throw (uno::RuntimeException)
{
sal_Int32 nZOrderPosition = 0;
- uno::Any aZOrderPosition = m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "ZOrder" ) );
+ uno::Any aZOrderPosition = m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZOrder")) );
aZOrderPosition >>= nZOrderPosition;
return nZOrderPosition + 1;
}
@@ -315,7 +315,7 @@ ScVbaShape::getRotation() throw (uno::RuntimeException)
{
double dRotation = 0;
sal_Int32 nRotation = 0;
- m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "RotateAngle" ) ) >>= nRotation;
+ m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RotateAngle")) ) >>= nRotation;
dRotation = static_cast< double >( nRotation /100 );
return dRotation;
}
@@ -324,7 +324,7 @@ void SAL_CALL
ScVbaShape::setRotation( double _rotation ) throw (uno::RuntimeException)
{
sal_Int32 nRotation = static_cast < sal_Int32 > ( _rotation * 100 );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "RotateAngle" ), uno::makeAny( nRotation ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RotateAngle")), uno::makeAny( nRotation ) );
}
uno::Reference< msforms::XLineFormat > SAL_CALL
@@ -375,33 +375,33 @@ void SAL_CALL
ScVbaShape::ZOrder( sal_Int32 ZOrderCmd ) throw (uno::RuntimeException)
{
sal_Int32 nOrderPositon;
- uno::Any aOrderPostion = m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "ZOrder" ) );
+ uno::Any aOrderPostion = m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZOrder")) );
aOrderPostion >>= nOrderPositon;
switch( ZOrderCmd )
{
case office::MsoZOrderCmd::msoBringToFront:
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "ZOrder" ), uno::makeAny( SAL_MAX_INT32 ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZOrder")), uno::makeAny( SAL_MAX_INT32 ) );
break;
case office::MsoZOrderCmd::msoSendToBack:
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "ZOrder" ), uno::makeAny( (sal_Int32)0 ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZOrder")), uno::makeAny( (sal_Int32)0 ) );
break;
case office::MsoZOrderCmd::msoBringForward:
nOrderPositon += 1;
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "ZOrder" ), uno::makeAny( nOrderPositon ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZOrder")), uno::makeAny( nOrderPositon ) );
break;
case office::MsoZOrderCmd::msoSendBackward:
if( nOrderPositon > 0 )
{
nOrderPositon -= 1;
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "ZOrder" ), uno::makeAny( nOrderPositon ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZOrder")), uno::makeAny( nOrderPositon ) );
}
break;
// below two commands use with Writer for text and image object.
case office::MsoZOrderCmd::msoBringInFrontOfText:
case office::MsoZOrderCmd::msoSendBehindText:
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "This ZOrderCmd is not implemented, it is use with writer." ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("This ZOrderCmd is not implemented, it is use with writer.")), uno::Reference< uno::XInterface >() );
default:
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "Invalid Parameter." ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid Parameter.")), uno::Reference< uno::XInterface >() );
}
}
@@ -454,7 +454,7 @@ ScVbaShape::ScaleHeight( double Factor, sal_Bool /*RelativeToOriginalSize*/, sal
}
else
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "ScaleHeight.Scale wrong value is given." ) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScaleHeight.Scale wrong value is given.")) , uno::Reference< uno::XInterface >() );
}
}
@@ -483,7 +483,7 @@ ScVbaShape::ScaleWidth( double Factor, sal_Bool /*RelativeToOriginalSize*/, sal_
}
else
{
- throw uno::RuntimeException( rtl::OUString::createFromAscii( "ScaleHeight.Scale wrong value is given." ) , uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScaleHeight.Scale wrong value is given.")) , uno::Reference< uno::XInterface >() );
}
}
diff --git a/vbahelper/source/vbahelper/vbashaperange.cxx b/vbahelper/source/vbahelper/vbashaperange.cxx
index 4de8745c87..ec15b5fe5e 100644
--- a/vbahelper/source/vbahelper/vbashaperange.cxx
+++ b/vbahelper/source/vbahelper/vbashaperange.cxx
@@ -83,7 +83,7 @@ ScVbaShapeRange::getShapes() throw (uno::RuntimeException)
if ( !m_xShapes.is() )
{
uno::Reference< lang::XMultiServiceFactory > xMSF( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
- m_xShapes.set( xMSF->createInstance( rtl::OUString::createFromAscii( "com.sun.star.drawing.ShapeCollection" ) ), uno::UNO_QUERY_THROW );
+ m_xShapes.set( xMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ShapeCollection")) ), uno::UNO_QUERY_THROW );
sal_Int32 nLen = m_xIndexAccess->getCount();
for ( sal_Int32 index = 0; index < nLen; ++index )
m_xShapes->add( uno::Reference< drawing::XShape >( m_xIndexAccess->getByIndex( index ), uno::UNO_QUERY_THROW ) );
diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx
index 018da926f2..570e4030b3 100644
--- a/vbahelper/source/vbahelper/vbashapes.cxx
+++ b/vbahelper/source/vbahelper/vbashapes.cxx
@@ -236,7 +236,7 @@ ScVbaShapes::createShape( rtl::OUString service ) throw (css::uno::RuntimeExcept
uno::Any
ScVbaShapes::AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, uno::Any aRange ) throw (css::uno::RuntimeException)
{
- rtl::OUString sCreateShapeName( rtl::OUString::createFromAscii( "com.sun.star.drawing.RectangleShape" ) );
+ rtl::OUString sCreateShapeName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.RectangleShape")) );
sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( startX );
sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( startY );
sal_Int32 nWidth = Millimeter::getInHundredthsOfOneMillimeter( nLineWidth );
@@ -245,7 +245,7 @@ ScVbaShapes::AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWi
uno::Reference< drawing::XShape > xShape( createShape( sCreateShapeName ), uno::UNO_QUERY_THROW );
m_xShapes->add( xShape );
- rtl::OUString sName = createName( rtl::OUString::createFromAscii( "Rectangle" ) );
+ rtl::OUString sName(createName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Rectangle")) ));
setDefaultShapeProperties( xShape );
setShape_NameProperty( xShape, sName );
@@ -268,7 +268,7 @@ ScVbaShapes::AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWi
uno::Any
ScVbaShapes::AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, uno::Any aRange ) throw (css::uno::RuntimeException)
{
- rtl::OUString sCreateShapeName( rtl::OUString::createFromAscii( "com.sun.star.drawing.EllipseShape" ) );
+ rtl::OUString sCreateShapeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.EllipseShape") );
sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( startX );
sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( startY );
sal_Int32 nWidth = Millimeter::getInHundredthsOfOneMillimeter( nLineWidth );
@@ -290,7 +290,7 @@ ScVbaShapes::AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidt
setShape_AnchorTypeAndRangeProperty(xShape, _aRange);
*/
- rtl::OUString name = createName( rtl::OUString::createFromAscii( "Oval" ));
+ rtl::OUString name(createName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Oval"))));
setDefaultShapeProperties(xShape);
setShape_NameProperty(xShape, name);
@@ -321,12 +321,12 @@ ScVbaShapes::AddLine( sal_Int32 StartX, sal_Int32 StartY, sal_Int32 endX, sal_In
sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( StartX );
sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( StartY );
- uno::Reference< drawing::XShape > xShape( createShape( rtl::OUString::createFromAscii("com.sun.star.drawing.LineShape") ), uno::UNO_QUERY_THROW );
+ uno::Reference< drawing::XShape > xShape( createShape( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.LineShape")) ), uno::UNO_QUERY_THROW );
m_xShapes->add( xShape );
awt::Point aMovePositionIfRange( 0, 0 );
- rtl::OUString name = createName( rtl::OUString::createFromAscii( "Line" ) );
+ rtl::OUString name(createName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Line")) ));
setDefaultShapeProperties(xShape);
setShape_NameProperty(xShape, name);
@@ -373,7 +373,7 @@ ScVbaShapes::AddTextbox( sal_Int32 _nOrientation, sal_Int32 _nLeft, sal_Int32 _n
uno::Any
ScVbaShapes::AddTextboxInWriter( sal_Int32 /*_nOrientation*/, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight ) throw (uno::RuntimeException)
{
- rtl::OUString sCreateShapeName( rtl::OUString::createFromAscii( "com.sun.star.drawing.TextShape" ) );
+ rtl::OUString sCreateShapeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.TextShape") );
sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( _nLeft );
sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( _nTop );
sal_Int32 nWidth = Millimeter::getInHundredthsOfOneMillimeter( _nWidth );
@@ -384,7 +384,7 @@ ScVbaShapes::AddTextboxInWriter( sal_Int32 /*_nOrientation*/, sal_Int32 _nLeft,
setDefaultShapeProperties(xShape);
- rtl::OUString sName = createName( rtl::OUString::createFromAscii( "Text Box") );
+ rtl::OUString sName(createName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Text Box")) ));
setShape_NameProperty( xShape, sName );
awt::Size size;
@@ -393,23 +393,23 @@ ScVbaShapes::AddTextboxInWriter( sal_Int32 /*_nOrientation*/, sal_Int32 _nLeft,
xShape->setSize(size);
uno::Reference< beans::XPropertySet > xShapeProps( xShape, uno::UNO_QUERY_THROW );
- xShapeProps->setPropertyValue( rtl::OUString::createFromAscii( "AnchorType" ), uno::makeAny( text::TextContentAnchorType_AT_PAGE ) );
- xShapeProps->setPropertyValue( rtl::OUString::createFromAscii( "HoriOrientRelation" ), uno::makeAny( text::RelOrientation::PAGE_LEFT ) );
- xShapeProps->setPropertyValue( rtl::OUString::createFromAscii( "HoriOrient" ), uno::makeAny( text::HoriOrientation::NONE ) );
- xShapeProps->setPropertyValue( rtl::OUString::createFromAscii( "HoriOrientPosition" ), uno::makeAny( nXPos ) );
+ xShapeProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AnchorType")), uno::makeAny( text::TextContentAnchorType_AT_PAGE ) );
+ xShapeProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientRelation")), uno::makeAny( text::RelOrientation::PAGE_LEFT ) );
+ xShapeProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrient")), uno::makeAny( text::HoriOrientation::NONE ) );
+ xShapeProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")), uno::makeAny( nXPos ) );
- xShapeProps->setPropertyValue( rtl::OUString::createFromAscii( "VertOrientRelation" ), uno::makeAny( text::RelOrientation::PAGE_FRAME ) );
- xShapeProps->setPropertyValue( rtl::OUString::createFromAscii( "VertOrient" ), uno::makeAny( text::VertOrientation::NONE ) );
- xShapeProps->setPropertyValue( rtl::OUString::createFromAscii( "VertOrientPosition" ), uno::makeAny( nYPos ) );
+ xShapeProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientRelation")), uno::makeAny( text::RelOrientation::PAGE_FRAME ) );
+ xShapeProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrient")), uno::makeAny( text::VertOrientation::NONE ) );
+ xShapeProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")), uno::makeAny( nYPos ) );
// set to visible
drawing::LineStyle aLineStyle = drawing::LineStyle_SOLID;
- xShapeProps->setPropertyValue( rtl::OUString::createFromAscii( "LineStyle" ), uno::makeAny( aLineStyle ) );
+ xShapeProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LineStyle")), uno::makeAny( aLineStyle ) );
// set to font
sal_Int16 nLayerId = 1;
- rtl::OUString sLayerName = rtl::OUString::createFromAscii("Heaven");
- xShapeProps->setPropertyValue( rtl::OUString::createFromAscii( "LayerID" ), uno::makeAny( nLayerId ) );
- xShapeProps->setPropertyValue( rtl::OUString::createFromAscii( "LayerName" ), uno::makeAny( sLayerName ) );
+ rtl::OUString sLayerName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Heaven"));
+ xShapeProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LayerID")), uno::makeAny( nLayerId ) );
+ xShapeProps->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LayerName")), uno::makeAny( sLayerName ) );
ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, m_xModel, ScVbaShape::getType( xShape ) );
@@ -448,11 +448,11 @@ void
ScVbaShapes::setDefaultShapeProperties( uno::Reference< drawing::XShape > xShape ) throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "FillStyle" ), uno::makeAny( rtl::OUString::createFromAscii( "SOLID" ) ) );
- xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "FillColor"), uno::makeAny( sal_Int32(0xFFFFFF) ) );
- xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "TextWordWrap"), uno::makeAny( text::WrapTextMode_THROUGHT ) );
+ xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FillStyle")), uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SOLID")) ) );
+ xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FillColor")), uno::makeAny( sal_Int32(0xFFFFFF) ) );
+ xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextWordWrap")), uno::makeAny( text::WrapTextMode_THROUGHT ) );
//not find in OOo2.3
- //xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "Opaque"), uno::makeAny( sal_True ) );
+ //xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Opaque")), uno::makeAny( sal_True ) );
}
void
@@ -461,7 +461,7 @@ ScVbaShapes::setShape_NameProperty( uno::Reference< css::drawing::XShape > xShap
uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY_THROW );
try
{
- xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "Name" ), uno::makeAny( sName ) );
+ xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), uno::makeAny( sName ) );
}
catch( script::BasicErrorException e )
{
diff --git a/vbahelper/source/vbahelper/vbatextframe.cxx b/vbahelper/source/vbahelper/vbatextframe.cxx
index 8f6f9e2c15..e215416a59 100644
--- a/vbahelper/source/vbahelper/vbatextframe.cxx
+++ b/vbahelper/source/vbahelper/vbatextframe.cxx
@@ -44,8 +44,8 @@ VbaTextFrame::setAsMSObehavior()
//set property TextWordWrap default as False.
// TextFitToSize control the text content. it seems we should set the default as False.
// com.sun.star.drawing.TextFitToSizeType.NONE
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "TextWordWrap" ), uno::makeAny( sal_False ) );
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "TextFitToSize" ), uno::makeAny( drawing::TextFitToSizeType_NONE ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextWordWrap")), uno::makeAny( sal_False ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextFitToSize")), uno::makeAny( drawing::TextFitToSizeType_NONE ) );
}
sal_Int32 VbaTextFrame::getMargin( rtl::OUString sMarginType )
@@ -70,7 +70,7 @@ VbaTextFrame::getAutoSize() throw (uno::RuntimeException)
// TextFitToSize control the text content.
// and in mso, there isnot option TextWordWrap which means auto wrap. the default is False.
sal_Bool bAutosize = sal_False;
- uno::Any aTextAutoGrowHeight = m_xPropertySet->getPropertyValue( rtl::OUString::createFromAscii( "TextAutoGrowHeight" ) );
+ uno::Any aTextAutoGrowHeight = m_xPropertySet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextAutoGrowHeight")) );
aTextAutoGrowHeight >>= bAutosize;
return bAutosize;
}
@@ -79,13 +79,13 @@ void SAL_CALL
VbaTextFrame::setAutoSize( sal_Bool _autosize ) throw (uno::RuntimeException)
{
setAsMSObehavior();
- m_xPropertySet->setPropertyValue( rtl::OUString::createFromAscii( "TextAutoGrowHeight" ), uno::makeAny( _autosize ) );
+ m_xPropertySet->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextAutoGrowHeight")), uno::makeAny( _autosize ) );
}
float SAL_CALL
VbaTextFrame::getMarginBottom() throw (uno::RuntimeException)
{
- sal_Int32 nMargin = getMargin( rtl::OUString::createFromAscii( "TextLowerDistance" ) );
+ sal_Int32 nMargin = getMargin( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextLowerDistance")) );
float fMargin = (float)Millimeter::getInPoints( nMargin );
return fMargin;
}
@@ -93,13 +93,13 @@ VbaTextFrame::getMarginBottom() throw (uno::RuntimeException)
void SAL_CALL
VbaTextFrame::setMarginBottom( float _marginbottom ) throw (uno::RuntimeException)
{
- setMargin( rtl::OUString::createFromAscii( "TextLowerDistance" ), _marginbottom );
+ setMargin( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextLowerDistance")), _marginbottom );
}
float SAL_CALL
VbaTextFrame::getMarginTop() throw (uno::RuntimeException)
{
- sal_Int32 nMargin = getMargin( rtl::OUString::createFromAscii( "TextUpperDistance" ) );
+ sal_Int32 nMargin = getMargin( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextUpperDistance")) );
float fMargin = (float)Millimeter::getInPoints( nMargin );
return fMargin;
}
@@ -107,13 +107,13 @@ VbaTextFrame::getMarginTop() throw (uno::RuntimeException)
void SAL_CALL
VbaTextFrame::setMarginTop( float _margintop ) throw (uno::RuntimeException)
{
- setMargin( rtl::OUString::createFromAscii( "TextUpperDistance" ), _margintop );
+ setMargin( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextUpperDistance")), _margintop );
}
float SAL_CALL
VbaTextFrame::getMarginLeft() throw (uno::RuntimeException)
{
- sal_Int32 nMargin = getMargin( rtl::OUString::createFromAscii( "TextLeftDistance" ) );
+ sal_Int32 nMargin = getMargin( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextLeftDistance")) );
float fMargin = (float)Millimeter::getInPoints( nMargin );
return fMargin;
}
@@ -121,13 +121,13 @@ VbaTextFrame::getMarginLeft() throw (uno::RuntimeException)
void SAL_CALL
VbaTextFrame::setMarginLeft( float _marginleft ) throw (uno::RuntimeException)
{
- setMargin( rtl::OUString::createFromAscii( "TextLeftDistance" ), _marginleft );
+ setMargin( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextLeftDistance")), _marginleft );
}
float SAL_CALL
VbaTextFrame::getMarginRight() throw (uno::RuntimeException)
{
- sal_Int32 nMargin = getMargin( rtl::OUString::createFromAscii( "TextRightDistance" ) );
+ sal_Int32 nMargin = getMargin( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextRightDistance")) );
float fMargin = (float)Millimeter::getInPoints( nMargin );
return fMargin;
}
@@ -135,7 +135,7 @@ VbaTextFrame::getMarginRight() throw (uno::RuntimeException)
void SAL_CALL
VbaTextFrame::setMarginRight( float _marginright ) throw (uno::RuntimeException)
{
- setMargin( rtl::OUString::createFromAscii( "TextRightDistance" ), _marginright );
+ setMargin( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextRightDistance")), _marginright );
}