[Libreoffice-commits] .: vbahelper/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Sep 8 13:49:18 PDT 2012
vbahelper/source/vbahelper/vbaapplicationbase.cxx | 48 +++----
vbahelper/source/vbahelper/vbacolorformat.cxx | 22 +--
vbahelper/source/vbahelper/vbacolorformat.hxx | 4
vbahelper/source/vbahelper/vbacommandbar.cxx | 46 +++---
vbahelper/source/vbahelper/vbacommandbar.hxx | 24 +--
vbahelper/source/vbahelper/vbacommandbarcontrol.cxx | 76 +++++------
vbahelper/source/vbahelper/vbacommandbarcontrol.hxx | 28 ++--
vbahelper/source/vbahelper/vbacommandbarcontrols.cxx | 72 +++++-----
vbahelper/source/vbahelper/vbacommandbarcontrols.hxx | 20 +--
vbahelper/source/vbahelper/vbacommandbarhelper.cxx | 88 ++++++-------
vbahelper/source/vbahelper/vbacommandbarhelper.hxx | 18 +-
vbahelper/source/vbahelper/vbacommandbars.hxx | 4
vbahelper/source/vbahelper/vbadocumentsbase.cxx | 62 ++++-----
vbahelper/source/vbahelper/vbafillformat.cxx | 26 +--
vbahelper/source/vbahelper/vbafillformat.hxx | 4
vbahelper/source/vbahelper/vbaglobalbase.cxx | 2
vbahelper/source/vbahelper/vbahelper.cxx | 125 +++++++++----------
vbahelper/source/vbahelper/vbalineformat.cxx | 82 ++++++------
vbahelper/source/vbahelper/vbalineformat.hxx | 8 -
vbahelper/source/vbahelper/vbapictureformat.cxx | 22 +--
vbahelper/source/vbahelper/vbapictureformat.hxx | 4
vbahelper/source/vbahelper/vbashape.cxx | 84 ++++++------
vbahelper/source/vbahelper/vbashaperange.cxx | 14 +-
vbahelper/source/vbahelper/vbatextframe.cxx | 40 +++---
24 files changed, 456 insertions(+), 467 deletions(-)
New commits:
commit 6ed2f211251a45c9653f80ad2e228a5ee83e17a8
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date: Thu Sep 6 22:35:52 2012 -0300
More OUString cleanup in vbahelper
Change-Id: Ie9c650da762e9d5afea9018dd2c6496fcd14ca6f
Reviewed-on: https://gerrit.libreoffice.org/577
Reviewed-by: Olivier Hallot <olivier.hallot at alta.org.br>
Tested-by: Olivier Hallot <olivier.hallot at alta.org.br>
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index d9ce6b7..abdbe10 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -53,7 +53,7 @@ using namespace ::ooo::vba;
#define OFFICEVERSION "11.0"
// ====VbaTimerInfo==================================
-typedef ::std::pair< ::rtl::OUString, ::std::pair< double, double > > VbaTimerInfo;
+typedef ::std::pair< OUString, ::std::pair< double, double > > VbaTimerInfo;
// ====VbaTimer==================================
class VbaTimer
@@ -98,10 +98,10 @@ public:
return (sal_Int32) nResult;
}
- void Start( const ::rtl::Reference< VbaApplicationBase > xBase, const ::rtl::OUString& aFunction, double nFrom, double nTo )
+ void Start( const ::rtl::Reference< VbaApplicationBase > xBase, const OUString& aFunction, double nFrom, double nTo )
{
if ( !xBase.is() || aFunction.isEmpty() )
- throw uno::RuntimeException( ::rtl::OUString( "Unexpected arguments!" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Unexpected arguments!" , uno::Reference< uno::XInterface >() );
m_xBase = xBase;
m_aTimerInfo = VbaTimerInfo( aFunction, ::std::pair< double, double >( nFrom, nTo ) );
@@ -206,8 +206,8 @@ VbaApplicationBase::getDisplayStatusBar() throw (uno::RuntimeException)
uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
if( xProps.is() ){
- uno::Reference< frame::XLayoutManager > xLayoutManager( xProps->getPropertyValue( rtl::OUString("LayoutManager") ), uno::UNO_QUERY_THROW );
- rtl::OUString url( "private:resource/statusbar/statusbar" );
+ uno::Reference< frame::XLayoutManager > xLayoutManager( xProps->getPropertyValue( "LayoutManager"), uno::UNO_QUERY_THROW );
+ OUString url( "private:resource/statusbar/statusbar" );
if( xLayoutManager.is() && xLayoutManager->isElementVisible( url ) ){
return sal_True;
}
@@ -223,8 +223,8 @@ VbaApplicationBase::setDisplayStatusBar(sal_Bool bDisplayStatusBar) throw (uno::
uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
if( xProps.is() ){
- uno::Reference< frame::XLayoutManager > xLayoutManager( xProps->getPropertyValue( rtl::OUString("LayoutManager") ), uno::UNO_QUERY_THROW );
- rtl::OUString url( "private:resource/statusbar/statusbar" );
+ uno::Reference< frame::XLayoutManager > xLayoutManager( xProps->getPropertyValue( "LayoutManager" ), uno::UNO_QUERY_THROW );
+ OUString url( "private:resource/statusbar/statusbar" );
if( xLayoutManager.is() ){
if( bDisplayStatusBar && !xLayoutManager->isElementVisible( url ) ){
if( !xLayoutManager->showElement( url ) )
@@ -270,11 +270,11 @@ void SAL_CALL VbaApplicationBase::setVisible( sal_Bool bVisible ) throw (uno::Ru
void SAL_CALL
-VbaApplicationBase::OnKey( const ::rtl::OUString& Key, const uno::Any& Procedure ) throw (uno::RuntimeException)
+VbaApplicationBase::OnKey( const OUString& Key, const uno::Any& Procedure ) throw (uno::RuntimeException)
{
// parse the Key & modifiers
awt::KeyEvent aKeyEvent = parseKeyEvent( Key );
- rtl::OUString MacroName;
+ OUString MacroName;
Procedure >>= MacroName;
uno::Reference< frame::XModel > xModel;
SbMethod* pMeth = StarBASIC::GetActiveMethod();
@@ -300,15 +300,15 @@ VbaApplicationBase::CommandBars( const uno::Any& aIndex ) throw (uno::RuntimeExc
return uno::makeAny( xCommandBars );
}
-::rtl::OUString SAL_CALL
+OUString SAL_CALL
VbaApplicationBase::getVersion() throw (uno::RuntimeException)
{
- return rtl::OUString(OFFICEVERSION);
+ return OUString(OFFICEVERSION);
}
-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)
+uno::Any SAL_CALL VbaApplicationBase::Run( const 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 aMacroName = MacroName.trim();
+ OUString aMacroName = MacroName.trim();
if (0 == aMacroName.indexOf('!'))
aMacroName = aMacroName.copy(1).trim();
@@ -352,21 +352,21 @@ uno::Any SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, con
}
else
{
- throw uno::RuntimeException( rtl::OUString( "The macro doesn't exist" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "The macro doesn't exist" , uno::Reference< uno::XInterface >() );
}
}
-void SAL_CALL VbaApplicationBase::OnTime( const uno::Any& aEarliestTime, const ::rtl::OUString& aFunction, const uno::Any& aLatestTime, const uno::Any& aSchedule )
+void SAL_CALL VbaApplicationBase::OnTime( const uno::Any& aEarliestTime, const OUString& aFunction, const uno::Any& aLatestTime, const uno::Any& aSchedule )
throw ( uno::RuntimeException )
{
if ( aFunction.isEmpty() )
- throw uno::RuntimeException( ::rtl::OUString( "Unexpected function name!" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Unexpected function name!" , uno::Reference< uno::XInterface >() );
double nEarliestTime = 0;
double nLatestTime = 0;
if ( !( aEarliestTime >>= nEarliestTime )
|| ( aLatestTime.hasValue() && !( aLatestTime >>= nLatestTime ) ) )
- throw uno::RuntimeException( ::rtl::OUString( "Only double is supported as time for now!" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Only double is supported as time for now!" , uno::Reference< uno::XInterface >() );
sal_Bool bSetTimer = sal_True;
aSchedule >>= bSetTimer;
@@ -405,7 +405,7 @@ uno::Any SAL_CALL VbaApplicationBase::getVBE() throw (uno::RuntimeException)
aArgs[ 0 ] <<= getCurrentDocument();
uno::Reference< lang::XMultiComponentFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_SET_THROW );
uno::Reference< uno::XInterface > xVBE = xServiceManager->createInstanceWithArgumentsAndContext(
- ::rtl::OUString( "ooo.vba.vbide.VBE" ), aArgs, mxContext );
+ "ooo.vba.vbide.VBE" , aArgs, mxContext );
return uno::Any( xVBE );
}
catch( const uno::Exception& )
@@ -414,20 +414,20 @@ uno::Any SAL_CALL VbaApplicationBase::getVBE() throw (uno::RuntimeException)
return uno::Any();
}
-rtl::OUString
+OUString
VbaApplicationBase::getServiceImplName()
{
- return rtl::OUString("VbaApplicationBase");
+ return OUString("VbaApplicationBase");
}
-uno::Sequence<rtl::OUString>
+uno::Sequence<OUString>
VbaApplicationBase::getServiceNames()
{
- static uno::Sequence< rtl::OUString > aServiceNames;
+ static uno::Sequence< OUString > aServiceNames;
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.VbaApplicationBase" );
+ aServiceNames[ 0 ] = "ooo.vba.VbaApplicationBase";
}
return aServiceNames;
}
@@ -436,7 +436,7 @@ void SAL_CALL VbaApplicationBase::Undo()
throw (uno::RuntimeException)
{
uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW );
- dispatchRequests( xModel, ::rtl::OUString( ".uno:Undo" ) );
+ dispatchRequests( xModel, ".uno:Undo" );
}
void VbaApplicationBase::Quit() throw (uno::RuntimeException)
diff --git a/vbahelper/source/vbahelper/vbacolorformat.cxx b/vbahelper/source/vbahelper/vbacolorformat.cxx
index 1f50045..7496d2b 100644
--- a/vbahelper/source/vbahelper/vbacolorformat.cxx
+++ b/vbahelper/source/vbahelper/vbacolorformat.cxx
@@ -62,20 +62,20 @@ ScVbaColorFormat::getRGB() throw (uno::RuntimeException)
switch( m_nColorFormatType )
{
case ColorFormatType::LINEFORMAT_FORECOLOR:
- m_xPropertySet->getPropertyValue( rtl::OUString("LineColor") ) >>= nRGB;
+ m_xPropertySet->getPropertyValue( "LineColor" ) >>= nRGB;
break;
case ColorFormatType::LINEFORMAT_BACKCOLOR:
//TODO BackColor not supported
// m_xPropertySet->setPropertyValue( rtl::OUString("Color"), uno::makeAny( nRGB ) );
break;
case ColorFormatType::FILLFORMAT_FORECOLOR:
- m_xPropertySet->getPropertyValue( rtl::OUString("FillColor") ) >>= nRGB;
+ m_xPropertySet->getPropertyValue( "FillColor" ) >>= nRGB;
break;
case ColorFormatType::FILLFORMAT_BACKCOLOR:
nRGB = m_nFillFormatBackColor;
break;
default:
- throw uno::RuntimeException( rtl::OUString("Second parameter of ColorFormat is wrong."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Second parameter of ColorFormat is wrong." , uno::Reference< uno::XInterface >() );
}
nRGB = OORGBToXLRGB( nRGB );
return nRGB;
@@ -88,13 +88,13 @@ ScVbaColorFormat::setRGB( sal_Int32 _rgb ) throw (uno::RuntimeException)
switch( m_nColorFormatType )
{
case ColorFormatType::LINEFORMAT_FORECOLOR:
- m_xPropertySet->setPropertyValue( rtl::OUString("LineColor"), uno::makeAny( nRGB ) );
+ m_xPropertySet->setPropertyValue( "LineColor" , uno::makeAny( nRGB ) );
break;
case ColorFormatType::LINEFORMAT_BACKCOLOR:
// TODO BackColor not supported
break;
case ColorFormatType::FILLFORMAT_FORECOLOR:
- m_xPropertySet->setPropertyValue( rtl::OUString("FillColor"), uno::makeAny( nRGB ) );
+ m_xPropertySet->setPropertyValue( "FillColor" , uno::makeAny( nRGB ) );
if( m_pFillFormat )
{
m_pFillFormat->setForeColorAndInternalStyle(nRGB);
@@ -108,7 +108,7 @@ ScVbaColorFormat::setRGB( sal_Int32 _rgb ) throw (uno::RuntimeException)
}
break;
default:
- throw uno::RuntimeException( rtl::OUString("Second parameter of ColorFormat is wrong."), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Second parameter of ColorFormat is wrong." , uno::Reference< uno::XInterface >() );
}
}
@@ -151,20 +151,20 @@ ScVbaColorFormat::setSchemeColor( sal_Int32 _schemecolor ) throw (uno::RuntimeEx
setRGB( nColor );
}
-rtl::OUString
+OUString
ScVbaColorFormat::getServiceImplName()
{
- return rtl::OUString("ScVbaColorFormat");
+ return OUString("ScVbaColorFormat");
}
-uno::Sequence< rtl::OUString >
+uno::Sequence< OUString >
ScVbaColorFormat::getServiceNames()
{
- static uno::Sequence< rtl::OUString > aServiceNames;
+ static uno::Sequence< OUString > aServiceNames;
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.msforms.ColorFormat" );
+ aServiceNames[ 0 ] = "ooo.vba.msforms.ColorFormat";
}
return aServiceNames;
}
diff --git a/vbahelper/source/vbahelper/vbacolorformat.hxx b/vbahelper/source/vbahelper/vbacolorformat.hxx
index 4de4b86..881a643 100644
--- a/vbahelper/source/vbahelper/vbacolorformat.hxx
+++ b/vbahelper/source/vbahelper/vbacolorformat.hxx
@@ -100,8 +100,8 @@ private:
sal_Int16 m_nColorFormatType;
sal_Int32 m_nFillFormatBackColor;
protected:
- virtual rtl::OUString getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ virtual OUString getServiceImplName();
+ virtual css::uno::Sequence<OUString> getServiceNames();
public:
ScVbaColorFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XHelperInterface > xInternalParent, const css::uno::Reference< css::drawing::XShape > xShape, const sal_Int16 nColorFormatType );
diff --git a/vbahelper/source/vbahelper/vbacommandbar.cxx b/vbahelper/source/vbahelper/vbacommandbar.cxx
index bd9482c..305c980 100644
--- a/vbahelper/source/vbahelper/vbacommandbar.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbar.cxx
@@ -29,17 +29,17 @@
using namespace com::sun::star;
using namespace ooo::vba;
-ScVbaCommandBar::ScVbaCommandBar( const uno::Reference< ov::XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, VbaCommandBarHelperRef pHelper, const uno::Reference< container::XIndexAccess >& xBarSettings, const rtl::OUString& sResourceUrl, sal_Bool bIsMenu ) throw( uno::RuntimeException ) : CommandBar_BASE( xParent, xContext ), pCBarHelper( pHelper ), m_xBarSettings( xBarSettings ), m_sResourceUrl( sResourceUrl ), m_bIsMenu( bIsMenu )
+ScVbaCommandBar::ScVbaCommandBar( const uno::Reference< ov::XHelperInterface > xParent, const uno::Reference< uno::XComponentContext > xContext, VbaCommandBarHelperRef pHelper, const uno::Reference< container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, sal_Bool bIsMenu ) throw( uno::RuntimeException ) : CommandBar_BASE( xParent, xContext ), pCBarHelper( pHelper ), m_xBarSettings( xBarSettings ), m_sResourceUrl( sResourceUrl ), m_bIsMenu( bIsMenu )
{
}
-::rtl::OUString SAL_CALL
+OUString SAL_CALL
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("UIName") );
- rtl::OUString sName;
+ uno::Any aName = xPropertySet->getPropertyValue( "UIName" );
+ OUString sName;
aName >>= sName;
if( sName.isEmpty() )
{
@@ -48,9 +48,9 @@ ScVbaCommandBar::getName() throw ( uno::RuntimeException )
if( m_sResourceUrl.equalsAscii( ITEM_MENUBAR_URL ) )
{
if( pCBarHelper->getModuleId() == "com.sun.star.sheet.SpreadsheetDocument" )
- sName = rtl::OUString( "Worksheet Menu Bar" );
+ sName = "Worksheet Menu Bar";
else if( pCBarHelper->getModuleId() == "com.sun.star.text.TextDocument" )
- sName = rtl::OUString( "Menu Bar" );
+ sName = "Menu Bar";
return sName;
}
}
@@ -60,16 +60,16 @@ ScVbaCommandBar::getName() throw ( uno::RuntimeException )
{
uno::Sequence< beans::PropertyValue > aToolBar;
xNameAccess->getByName( m_sResourceUrl ) >>= aToolBar;
- getPropertyValue( aToolBar, rtl::OUString( "UIName" ) ) >>= sName;
+ getPropertyValue( aToolBar, "UIName" ) >>= sName;
}
}
return sName;
}
void SAL_CALL
-ScVbaCommandBar::setName( const ::rtl::OUString& _name ) throw (uno::RuntimeException)
+ScVbaCommandBar::setName( const OUString& _name ) throw (uno::RuntimeException)
{
uno::Reference< beans::XPropertySet > xPropertySet( m_xBarSettings, uno::UNO_QUERY_THROW );
- xPropertySet->setPropertyValue( rtl::OUString("UIName"), uno::makeAny( _name ) );
+ xPropertySet->setPropertyValue( "UIName" , uno::makeAny( _name ) );
pCBarHelper->ApplyChange( m_sResourceUrl, m_xBarSettings );
}
@@ -88,7 +88,7 @@ ScVbaCommandBar::getVisible() throw (uno::RuntimeException)
{
uno::Sequence< beans::PropertyValue > aToolBar;
xNameAccess->getByName( m_sResourceUrl ) >>= aToolBar;
- getPropertyValue( aToolBar, rtl::OUString( "Visible" ) ) >>= bVisible;
+ getPropertyValue( aToolBar, "Visible" ) >>= bVisible;
}
}
catch (const uno::Exception&)
@@ -170,20 +170,20 @@ ScVbaCommandBar::FindControl( const uno::Any& /*aType*/, const uno::Any& /*aId*/
return uno::makeAny( uno::Reference< XCommandBarControl > () );
}
-rtl::OUString
+OUString
ScVbaCommandBar::getServiceImplName()
{
- return rtl::OUString("ScVbaCommandBar");
+ return OUString("ScVbaCommandBar");
}
-uno::Sequence<rtl::OUString>
+uno::Sequence<OUString>
ScVbaCommandBar::getServiceNames()
{
- static uno::Sequence< rtl::OUString > aServiceNames;
+ static uno::Sequence< OUString > aServiceNames;
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.CommandBar" );
+ aServiceNames[ 0 ] = "ooo.vba.CommandBar";
}
return aServiceNames;
}
@@ -192,19 +192,19 @@ ScVbaCommandBar::getServiceNames()
VbaDummyCommandBar::VbaDummyCommandBar(
const uno::Reference< ov::XHelperInterface > xParent,
const uno::Reference< uno::XComponentContext > xContext,
- const ::rtl::OUString& rName, sal_Int32 nType ) throw( uno::RuntimeException ) :
+ const OUString& rName, sal_Int32 nType ) throw( uno::RuntimeException ) :
CommandBar_BASE( xParent, xContext ),
maName( rName ),
mnType( nType )
{
}
-::rtl::OUString SAL_CALL VbaDummyCommandBar::getName() throw ( uno::RuntimeException )
+OUString SAL_CALL VbaDummyCommandBar::getName() throw ( uno::RuntimeException )
{
return maName;
}
-void SAL_CALL VbaDummyCommandBar::setName( const ::rtl::OUString& _name ) throw (uno::RuntimeException)
+void SAL_CALL VbaDummyCommandBar::setName( const OUString& _name ) throw (uno::RuntimeException)
{
maName = _name;
}
@@ -256,18 +256,18 @@ uno::Any SAL_CALL VbaDummyCommandBar::FindControl( const uno::Any& /*aType*/, co
return uno::Any( uno::Reference< XCommandBarControl >() );
}
-rtl::OUString VbaDummyCommandBar::getServiceImplName()
+OUString VbaDummyCommandBar::getServiceImplName()
{
- return rtl::OUString("VbaDummyCommandBar");
+ return OUString("VbaDummyCommandBar");
}
-uno::Sequence< rtl::OUString > VbaDummyCommandBar::getServiceNames()
+uno::Sequence< OUString > VbaDummyCommandBar::getServiceNames()
{
- static uno::Sequence< rtl::OUString > aServiceNames;
+ static uno::Sequence< OUString > aServiceNames;
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.CommandBar" );
+ aServiceNames[ 0 ] = "ooo.vba.CommandBar";
}
return aServiceNames;
}
diff --git a/vbahelper/source/vbahelper/vbacommandbar.hxx b/vbahelper/source/vbahelper/vbacommandbar.hxx
index d539bf0..1054dea 100644
--- a/vbahelper/source/vbahelper/vbacommandbar.hxx
+++ b/vbahelper/source/vbahelper/vbacommandbar.hxx
@@ -37,17 +37,17 @@ class ScVbaCommandBar : public CommandBar_BASE
private:
VbaCommandBarHelperRef pCBarHelper;
css::uno::Reference< css::container::XIndexAccess > m_xBarSettings;
- rtl::OUString m_sResourceUrl;
+ OUString m_sResourceUrl;
sal_Bool m_bIsMenu;
public:
- ScVbaCommandBar( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const rtl::OUString& sResourceUrl, sal_Bool bIsMenu ) throw( css::uno::RuntimeException );
+ ScVbaCommandBar( const css::uno::Reference< ov::XHelperInterface > xParent, const css::uno::Reference< css::uno::XComponentContext > xContext, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, sal_Bool bIsMenu ) throw( css::uno::RuntimeException );
sal_Bool IsMenu() const { return m_bIsMenu; }
// Attributes
- virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setName( const ::rtl::OUString& _name ) throw (css::uno::RuntimeException);
+ virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setName( const OUString& _name ) throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
virtual void SAL_CALL setVisible( ::sal_Bool _visible ) throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getEnabled() throw (css::uno::RuntimeException);
@@ -60,8 +60,8 @@ public:
virtual css::uno::Any SAL_CALL FindControl( const css::uno::Any& aType, const css::uno::Any& aId, const css::uno::Any& aTag, const css::uno::Any& aVisible, const css::uno::Any& aRecursive ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
// XHelperInterface
- virtual rtl::OUString getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ virtual OUString getServiceImplName();
+ virtual css::uno::Sequence<OUString> getServiceNames();
};
/** Dummy command bar implementation. Does nothing but provide its name. */
@@ -71,12 +71,12 @@ public:
VbaDummyCommandBar(
const css::uno::Reference< ov::XHelperInterface > xParent,
const css::uno::Reference< css::uno::XComponentContext > xContext,
- const ::rtl::OUString& rName,
+ const OUString& rName,
sal_Int32 nType ) throw( css::uno::RuntimeException );
// Attributes
- virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setName( const ::rtl::OUString& _name ) throw (css::uno::RuntimeException);
+ virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setName( const OUString& _name ) throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
virtual void SAL_CALL setVisible( ::sal_Bool _visible ) throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getEnabled() throw (css::uno::RuntimeException);
@@ -89,11 +89,11 @@ public:
virtual css::uno::Any SAL_CALL FindControl( const css::uno::Any& aType, const css::uno::Any& aId, const css::uno::Any& aTag, const css::uno::Any& aVisible, const css::uno::Any& aRecursive ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
// XHelperInterface
- virtual rtl::OUString getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ virtual OUString getServiceImplName();
+ virtual css::uno::Sequence<OUString> getServiceNames();
private:
- ::rtl::OUString maName;
+ OUString maName;
sal_Int32 mnType;
};
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
index 2c7c50d..4be6c82 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
@@ -24,7 +24,7 @@
using namespace com::sun::star;
using namespace ooo::vba;
-ScVbaCommandBarControl::ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const rtl::OUString& sResourceUrl ) throw (css::uno::RuntimeException) : CommandBarControl_BASE( xParent, xContext ), pCBarHelper( pHelper ), m_sResourceUrl( sResourceUrl ), m_xCurrentSettings( xSettings ), m_xBarSettings( xBarSettings ), m_nPosition( 0 ), m_bTemporary( sal_True )
+ScVbaCommandBarControl::ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl ) throw (css::uno::RuntimeException) : CommandBarControl_BASE( xParent, xContext ), pCBarHelper( pHelper ), m_sResourceUrl( sResourceUrl ), m_xCurrentSettings( xSettings ), m_xBarSettings( xBarSettings ), m_nPosition( 0 ), m_bTemporary( sal_True )
{
}
@@ -35,42 +35,42 @@ void ScVbaCommandBarControl::ApplyChange() throw ( uno::RuntimeException )
pCBarHelper->ApplyChange( m_sResourceUrl, m_xBarSettings );
}
-::rtl::OUString SAL_CALL
+OUString SAL_CALL
ScVbaCommandBarControl::getCaption() throw ( uno::RuntimeException )
{
// "Label" always empty
- rtl::OUString sCaption;
- getPropertyValue( m_aPropertyValues, rtl::OUString("Label") ) >>= sCaption;
+ OUString sCaption;
+ getPropertyValue( m_aPropertyValues, "Label" ) >>= sCaption;
return sCaption;
}
void SAL_CALL
-ScVbaCommandBarControl::setCaption( const ::rtl::OUString& _caption ) throw (uno::RuntimeException)
+ScVbaCommandBarControl::setCaption( const OUString& _caption ) throw (uno::RuntimeException)
{
- rtl::OUString sCaption = _caption.replace('&','~');
- setPropertyValue( m_aPropertyValues, rtl::OUString("Label"), uno::makeAny( sCaption ) );
+ OUString sCaption = _caption.replace('&','~');
+ setPropertyValue( m_aPropertyValues, "Label" , uno::makeAny( sCaption ) );
ApplyChange();
}
-::rtl::OUString SAL_CALL
+OUString SAL_CALL
ScVbaCommandBarControl::getOnAction() throw (uno::RuntimeException)
{
- rtl::OUString sCommandURL;
- getPropertyValue( m_aPropertyValues, rtl::OUString("CommandURL") ) >>= sCommandURL;
+ OUString sCommandURL;
+ getPropertyValue( m_aPropertyValues, "CommandURL" ) >>= sCommandURL;
return sCommandURL;
}
void SAL_CALL
-ScVbaCommandBarControl::setOnAction( const ::rtl::OUString& _onaction ) throw (uno::RuntimeException)
+ScVbaCommandBarControl::setOnAction( const OUString& _onaction ) throw (uno::RuntimeException)
{
// get the current model
uno::Reference< frame::XModel > xModel( pCBarHelper->getModel() );
MacroResolvedInfo aResolvedMacro = ooo::vba::resolveVBAMacro( getSfxObjShell( xModel ), _onaction, true );
if ( aResolvedMacro.mbFound )
{
- rtl::OUString aCommandURL = ooo::vba::makeMacroURL( aResolvedMacro.msResolvedMacro );
- OSL_TRACE(" ScVbaCommandBarControl::setOnAction: %s", rtl::OUStringToOString( aCommandURL, RTL_TEXTENCODING_UTF8 ).getStr() );
- setPropertyValue( m_aPropertyValues, rtl::OUString("CommandURL"), uno::makeAny( aCommandURL ) );
+ OUString aCommandURL = ooo::vba::makeMacroURL( aResolvedMacro.msResolvedMacro );
+ OSL_TRACE(" ScVbaCommandBarControl::setOnAction: %s", OUStringToOString( aCommandURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+ setPropertyValue( m_aPropertyValues, "CommandURL" , uno::makeAny( aCommandURL ) );
ApplyChange();
}
}
@@ -79,7 +79,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( ITEM_DESCRIPTOR_ISVISIBLE ) );
+ uno::Any aValue = getPropertyValue( m_aPropertyValues, ITEM_DESCRIPTOR_ISVISIBLE );
if( aValue.hasValue() )
aValue >>= bVisible;
return bVisible;
@@ -87,10 +87,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( ITEM_DESCRIPTOR_ISVISIBLE ) );
+ uno::Any aValue = getPropertyValue( m_aPropertyValues, ITEM_DESCRIPTOR_ISVISIBLE );
if( aValue.hasValue() )
{
- setPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_ISVISIBLE ), uno::makeAny( _visible ) );
+ setPropertyValue( m_aPropertyValues, ITEM_DESCRIPTOR_ISVISIBLE , uno::makeAny( _visible ) );
ApplyChange();
}
}
@@ -100,7 +100,7 @@ ScVbaCommandBarControl::getEnabled() throw (uno::RuntimeException)
{
sal_Bool bEnabled = sal_True;
- uno::Any aValue = getPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_ENABLED ) );
+ uno::Any aValue = getPropertyValue( m_aPropertyValues, ITEM_DESCRIPTOR_ENABLED );
if( aValue.hasValue() )
{
aValue >>= bEnabled;
@@ -116,10 +116,10 @@ ScVbaCommandBarControl::getEnabled() throw (uno::RuntimeException)
void SAL_CALL
ScVbaCommandBarControl::setEnabled( sal_Bool _enabled ) throw (uno::RuntimeException)
{
- uno::Any aValue = getPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_ENABLED ) );
+ uno::Any aValue = getPropertyValue( m_aPropertyValues, ITEM_DESCRIPTOR_ENABLED );
if( aValue.hasValue() )
{
- setPropertyValue( m_aPropertyValues, rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_ENABLED ), uno::makeAny( _enabled ) );
+ setPropertyValue( m_aPropertyValues, ITEM_DESCRIPTOR_ENABLED , uno::makeAny( _enabled ) );
ApplyChange();
}
else
@@ -163,7 +163,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( ITEM_DESCRIPTOR_CONTAINER ) ) >>= xSubMenu;
+ getPropertyValue( m_aPropertyValues, ITEM_DESCRIPTOR_CONTAINER ) >>= xSubMenu;
if( !xSubMenu.is() )
throw uno::RuntimeException();
@@ -175,72 +175,72 @@ ScVbaCommandBarControl::Controls( const uno::Any& aIndex ) throw (script::BasicE
return uno::makeAny( xCommandBarControls );
}
-rtl::OUString
+OUString
ScVbaCommandBarControl::getServiceImplName()
{
- return rtl::OUString("ScVbaCommandBarControl");
+ return OUString("ScVbaCommandBarControl");
}
-uno::Sequence<rtl::OUString>
+uno::Sequence<OUString>
ScVbaCommandBarControl::getServiceNames()
{
- static uno::Sequence< rtl::OUString > aServiceNames;
+ static uno::Sequence< OUString > aServiceNames;
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.CommandBarControl" );
+ aServiceNames[ 0 ] = "ooo.vba.CommandBarControl";
}
return aServiceNames;
}
//////////// ScVbaCommandBarPopup //////////////////////////////
-ScVbaCommandBarPopup::ScVbaCommandBarPopup( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const rtl::OUString& sResourceUrl, sal_Int32 nPosition, sal_Bool bTemporary ) throw (css::uno::RuntimeException) : CommandBarPopup_BASE( xParent, xContext, xSettings, pHelper, xBarSettings, sResourceUrl )
+ScVbaCommandBarPopup::ScVbaCommandBarPopup( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, sal_Int32 nPosition, sal_Bool bTemporary ) throw (css::uno::RuntimeException) : CommandBarPopup_BASE( xParent, xContext, xSettings, pHelper, xBarSettings, sResourceUrl )
{
m_nPosition = nPosition;
m_bTemporary = bTemporary;
m_xCurrentSettings->getByIndex( m_nPosition ) >>= m_aPropertyValues;
}
-rtl::OUString
+OUString
ScVbaCommandBarPopup::getServiceImplName()
{
- return rtl::OUString("ScVbaCommandBarPopup");
+ return OUString("ScVbaCommandBarPopup");
}
-uno::Sequence<rtl::OUString>
+uno::Sequence<OUString>
ScVbaCommandBarPopup::getServiceNames()
{
- static uno::Sequence< rtl::OUString > aServiceNames;
+ static uno::Sequence< OUString > aServiceNames;
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.CommandBarPopup" );
+ aServiceNames[ 0 ] = "ooo.vba.CommandBarPopup";
}
return aServiceNames;
}
//////////// ScVbaCommandBarButton //////////////////////////////
-ScVbaCommandBarButton::ScVbaCommandBarButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const rtl::OUString& sResourceUrl, sal_Int32 nPosition, sal_Bool bTemporary ) throw (css::uno::RuntimeException) : CommandBarButton_BASE( xParent, xContext, xSettings, pHelper, xBarSettings, sResourceUrl )
+ScVbaCommandBarButton::ScVbaCommandBarButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, sal_Int32 nPosition, sal_Bool bTemporary ) throw (css::uno::RuntimeException) : CommandBarButton_BASE( xParent, xContext, xSettings, pHelper, xBarSettings, sResourceUrl )
{
m_nPosition = nPosition;
m_bTemporary = bTemporary;
m_xCurrentSettings->getByIndex( m_nPosition ) >>= m_aPropertyValues;
}
-rtl::OUString
+OUString
ScVbaCommandBarButton::getServiceImplName()
{
- return rtl::OUString("ScVbaCommandBarButton");
+ return OUString("ScVbaCommandBarButton");
}
-uno::Sequence<rtl::OUString>
+uno::Sequence<OUString>
ScVbaCommandBarButton::getServiceNames()
{
- static uno::Sequence< rtl::OUString > aServiceNames;
+ static uno::Sequence< OUString > aServiceNames;
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.CommandBarButton" );
+ aServiceNames[ 0 ] = "ooo.vba.CommandBarButton";
}
return aServiceNames;
}
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx
index 7e9beb3..409d868 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx
@@ -34,7 +34,7 @@ class ScVbaCommandBarControl : public CommandBarControl_BASE
{
protected:
VbaCommandBarHelperRef pCBarHelper;
- rtl::OUString m_sResourceUrl;
+ OUString m_sResourceUrl;
css::uno::Reference< css::container::XIndexAccess > m_xCurrentSettings;
css::uno::Reference< css::container::XIndexAccess > m_xBarSettings;
css::uno::Sequence< css::beans::PropertyValue > m_aPropertyValues;
@@ -46,13 +46,13 @@ private:
void ApplyChange() throw (css::uno::RuntimeException);
public:
- ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const rtl::OUString& sResourceUrl ) throw (css::uno::RuntimeException);
+ ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl ) throw (css::uno::RuntimeException);
// Attributes
- virtual ::rtl::OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setCaption( const ::rtl::OUString& _caption ) throw (css::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getOnAction() throw (css::uno::RuntimeException);
- virtual void SAL_CALL setOnAction( const ::rtl::OUString& _onaction ) throw (css::uno::RuntimeException);
+ virtual OUString SAL_CALL getCaption() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setCaption( const OUString& _caption ) throw (css::uno::RuntimeException);
+ virtual OUString SAL_CALL getOnAction() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setOnAction( const OUString& _onaction ) throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
virtual void SAL_CALL setVisible( ::sal_Bool _visible ) throw (css::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL getEnabled() throw (css::uno::RuntimeException);
@@ -69,38 +69,38 @@ public:
virtual css::uno::Any SAL_CALL Controls( const css::uno::Any& aIndex ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
// XHelperInterface
- virtual rtl::OUString getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ virtual OUString getServiceImplName();
+ virtual css::uno::Sequence<OUString> getServiceNames();
};
typedef cppu::ImplInheritanceHelper1< ScVbaCommandBarControl, ov::XCommandBarPopup > CommandBarPopup_BASE;
class ScVbaCommandBarPopup : public CommandBarPopup_BASE
{
public:
- ScVbaCommandBarPopup( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const rtl::OUString& sResourceUrl, sal_Int32 nPosition, sal_Bool bTemporary ) throw (css::uno::RuntimeException);
+ ScVbaCommandBarPopup( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, sal_Int32 nPosition, sal_Bool bTemporary ) throw (css::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException)
{
return ov::office::MsoControlType::msoControlPopup;
}
// XHelperInterface
- virtual rtl::OUString getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ virtual OUString getServiceImplName();
+ virtual css::uno::Sequence<OUString> getServiceNames();
};
typedef cppu::ImplInheritanceHelper1< ScVbaCommandBarControl, ov::XCommandBarButton > CommandBarButton_BASE;
class ScVbaCommandBarButton : public CommandBarButton_BASE
{
public:
- ScVbaCommandBarButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const rtl::OUString& sResourceUrl, sal_Int32 nPosition, sal_Bool bTemporary ) throw (css::uno::RuntimeException);
+ ScVbaCommandBarButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, sal_Int32 nPosition, sal_Bool bTemporary ) throw (css::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException)
{
return ov::office::MsoControlType::msoControlButton;
}
// XHelperInterface
- virtual rtl::OUString getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ virtual OUString getServiceImplName();
+ virtual css::uno::Sequence<OUString> getServiceNames();
};
#endif//SC_VBA_COMMANDBARCONTROL_HXX
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
index c073014..12fbe00 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
@@ -47,14 +47,14 @@ public:
}
};
-ScVbaCommandBarControls::ScVbaCommandBarControls( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess>& xIndexAccess, VbaCommandBarHelperRef pHelper, const uno::Reference< container::XIndexAccess>& xBarSettings, const rtl::OUString& sResourceUrl ) throw (uno::RuntimeException) : CommandBarControls_BASE( xParent, xContext, xIndexAccess ), pCBarHelper( pHelper ), m_xBarSettings( xBarSettings ), m_sResourceUrl( sResourceUrl )
+ScVbaCommandBarControls::ScVbaCommandBarControls( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess>& xIndexAccess, VbaCommandBarHelperRef pHelper, const uno::Reference< container::XIndexAccess>& xBarSettings, const OUString& sResourceUrl ) throw (uno::RuntimeException) : CommandBarControls_BASE( xParent, xContext, xIndexAccess ), pCBarHelper( pHelper ), m_xBarSettings( xBarSettings ), m_sResourceUrl( sResourceUrl )
{
m_bIsMenu = sResourceUrl.equalsAscii( ITEM_MENUBAR_URL ) ? sal_True : sal_False;
}
-uno::Sequence< beans::PropertyValue > ScVbaCommandBarControls::CreateMenuItemData( const rtl::OUString& sCommandURL,
- const rtl::OUString& sHelpURL,
- const rtl::OUString& sLabel,
+uno::Sequence< beans::PropertyValue > ScVbaCommandBarControls::CreateMenuItemData( const OUString& sCommandURL,
+ const OUString& sHelpURL,
+ const OUString& sLabel,
sal_uInt16 nType,
const uno::Any& aSubMenu,
sal_Bool isVisible,
@@ -62,41 +62,41 @@ uno::Sequence< beans::PropertyValue > ScVbaCommandBarControls::CreateMenuItemDat
{
uno::Sequence< beans::PropertyValue > aProps(7);
- aProps[0].Name = rtl::OUString( ITEM_DESCRIPTOR_COMMANDURL );
+ aProps[0].Name = ITEM_DESCRIPTOR_COMMANDURL;
aProps[0].Value <<= sCommandURL;
- aProps[1].Name = rtl::OUString( ITEM_DESCRIPTOR_HELPURL );
+ aProps[1].Name = ITEM_DESCRIPTOR_HELPURL;
aProps[1].Value <<= sHelpURL;
- aProps[2].Name = rtl::OUString( ITEM_DESCRIPTOR_LABEL );
+ aProps[2].Name = ITEM_DESCRIPTOR_LABEL;
aProps[2].Value <<= sLabel;
- aProps[3].Name = rtl::OUString( ITEM_DESCRIPTOR_TYPE );
+ aProps[3].Name = ITEM_DESCRIPTOR_TYPE;
aProps[3].Value <<= nType;
- aProps[4].Name = rtl::OUString( ITEM_DESCRIPTOR_CONTAINER );
+ aProps[4].Name = ITEM_DESCRIPTOR_CONTAINER;
aProps[4].Value = aSubMenu;
- aProps[5].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_ISVISIBLE );
+ aProps[5].Name = ITEM_DESCRIPTOR_ISVISIBLE;
aProps[5].Value <<= isVisible;
- aProps[6].Name = rtl::OUString::createFromAscii( ITEM_DESCRIPTOR_ENABLED );
+ aProps[6].Name = ITEM_DESCRIPTOR_ENABLED;
aProps[6].Value <<= isEnabled;
return aProps;
}
-uno::Sequence< beans::PropertyValue > ScVbaCommandBarControls::CreateToolbarItemData( const rtl::OUString& sCommandURL, const rtl::OUString& sHelpURL, const rtl::OUString& sLabel, sal_uInt16 nType, const uno::Any& aSubMenu, sal_Bool isVisible, sal_Int32 nStyle )
+uno::Sequence< beans::PropertyValue > ScVbaCommandBarControls::CreateToolbarItemData( const OUString& sCommandURL, const OUString& sHelpURL, const OUString& sLabel, sal_uInt16 nType, const uno::Any& aSubMenu, sal_Bool isVisible, sal_Int32 nStyle )
{
uno::Sequence< beans::PropertyValue > aProps(7);
- aProps[0].Name = rtl::OUString( ITEM_DESCRIPTOR_COMMANDURL );
+ aProps[0].Name = ITEM_DESCRIPTOR_COMMANDURL;
aProps[0].Value <<= sCommandURL;
- aProps[1].Name = rtl::OUString( ITEM_DESCRIPTOR_HELPURL );
+ aProps[1].Name = ITEM_DESCRIPTOR_HELPURL;
aProps[1].Value <<= sHelpURL;
- aProps[2].Name = rtl::OUString( ITEM_DESCRIPTOR_LABEL );
+ aProps[2].Name = ITEM_DESCRIPTOR_LABEL;
aProps[2].Value <<= sLabel;
- aProps[3].Name = rtl::OUString( ITEM_DESCRIPTOR_TYPE );
+ aProps[3].Name = ITEM_DESCRIPTOR_TYPE;
aProps[3].Value <<= nType;
- aProps[4].Name = rtl::OUString( ITEM_DESCRIPTOR_CONTAINER );
+ aProps[4].Name = ITEM_DESCRIPTOR_CONTAINER;
aProps[4].Value = aSubMenu;
- aProps[5].Name = rtl::OUString( ITEM_DESCRIPTOR_ISVISIBLE );
+ aProps[5].Name = ITEM_DESCRIPTOR_ISVISIBLE;
aProps[5].Value <<= isVisible;
- aProps[6].Name = rtl::OUString( ITEM_DESCRIPTOR_STYLE );
+ aProps[6].Name = ITEM_DESCRIPTOR_STYLE;
aProps[6].Value <<= nStyle;
return aProps;
@@ -123,7 +123,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( ITEM_DESCRIPTOR_CONTAINER ) ) >>= xSubMenu;
+ getPropertyValue( aProps, 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 );
@@ -140,7 +140,7 @@ ScVbaCommandBarControls::Item( const uno::Any& aIndex, const uno::Any& /*aIndex*
sal_Int32 nPosition = -1;
if( aIndex.getValueTypeClass() == uno::TypeClass_STRING )
{
- rtl::OUString sName;
+ OUString sName;
aIndex >>= sName;
nPosition = VbaCommandBarHelper::findControlByName( m_xIndexAccess, sName, m_bIsMenu );
}
@@ -162,8 +162,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("Custom");
- rtl::OUString sCommandUrl(rtl::OUString( CUSTOM_MENU_STR) + sLabel);
+ OUString sLabel("Custom");
+ OUString sCommandUrl( CUSTOM_MENU_STR + sLabel);
sal_Int32 nType = office::MsoControlType::msoControlButton;
sal_Int32 nPosition = 0;
sal_Bool bTemporary = sal_True;
@@ -175,11 +175,11 @@ ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const un
if( nType != office::MsoControlType::msoControlButton &&
nType != office::MsoControlType::msoControlPopup )
- throw uno::RuntimeException( rtl::OUString( "Not implemented" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() );
if( Id.hasValue() || Parameter.hasValue( ) )
{
- throw uno::RuntimeException( rtl::OUString( "Not implemented" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() );
}
if( Before.hasValue() )
@@ -200,7 +200,7 @@ ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const un
// create control
uno::Sequence< beans::PropertyValue > aProps;
- rtl::OUString sHelpUrl;
+ OUString sHelpUrl;
sal_uInt16 nItemType = 0;
if( IsMenu() )
{
@@ -229,20 +229,20 @@ ScVbaCommandBarControls::Add( const uno::Any& Type, const uno::Any& Id, const un
}
// XHelperInterface
-rtl::OUString
+OUString
ScVbaCommandBarControls::getServiceImplName()
{
- return rtl::OUString("ScVbaCommandBarControls");
+ return OUString("ScVbaCommandBarControls");
}
-uno::Sequence<rtl::OUString>
+uno::Sequence<OUString>
ScVbaCommandBarControls::getServiceNames()
{
- static uno::Sequence< rtl::OUString > aServiceNames;
+ static uno::Sequence< OUString > aServiceNames;
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.CommandBarControls" );
+ aServiceNames[ 0 ] = "ooo.vba.CommandBarControls";
}
return aServiceNames;
}
@@ -303,18 +303,18 @@ uno::Reference< XCommandBarControl > SAL_CALL VbaDummyCommandBarControls::Add(
}
// XHelperInterface
-rtl::OUString VbaDummyCommandBarControls::getServiceImplName()
+OUString VbaDummyCommandBarControls::getServiceImplName()
{
- return rtl::OUString("VbaDummyCommandBarControls");
+ return OUString("VbaDummyCommandBarControls");
}
-uno::Sequence<rtl::OUString> VbaDummyCommandBarControls::getServiceNames()
+uno::Sequence<OUString> VbaDummyCommandBarControls::getServiceNames()
{
- static uno::Sequence< rtl::OUString > aServiceNames;
+ static uno::Sequence< OUString > aServiceNames;
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.CommandBarControls" );
+ aServiceNames[ 0 ] = "ooo.vba.CommandBarControls";
}
return aServiceNames;
}
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx b/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx
index b84a265..9ff92f9 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx
@@ -32,20 +32,20 @@ class ScVbaCommandBarControls : public CommandBarControls_BASE
private:
VbaCommandBarHelperRef pCBarHelper;
css::uno::Reference< css::container::XIndexAccess > m_xBarSettings;
- rtl::OUString m_sResourceUrl;
+ OUString m_sResourceUrl;
sal_Bool m_bIsMenu;
- css::uno::Sequence< css::beans::PropertyValue > CreateMenuItemData( const rtl::OUString& sCommandURL,
- const rtl::OUString& sHelpURL,
- const rtl::OUString& sLabel,
+ css::uno::Sequence< css::beans::PropertyValue > CreateMenuItemData( const OUString& sCommandURL,
+ const OUString& sHelpURL,
+ const OUString& sLabel,
sal_uInt16 nType,
const css::uno::Any& aSubMenu,
sal_Bool isVisible,
sal_Bool isEnabled );
- css::uno::Sequence< css::beans::PropertyValue > CreateToolbarItemData( const rtl::OUString& sCommandURL, const rtl::OUString& sHelpURL, const rtl::OUString& sLabel, sal_uInt16 nType, const css::uno::Any& aSubMenu, sal_Bool isVisible, sal_Int32 nStyle );
+ css::uno::Sequence< css::beans::PropertyValue > CreateToolbarItemData( const OUString& sCommandURL, const OUString& sHelpURL, const OUString& sLabel, sal_uInt16 nType, const css::uno::Any& aSubMenu, sal_Bool isVisible, sal_Int32 nStyle );
public:
- ScVbaCommandBarControls( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const rtl::OUString& sResourceUrl ) throw( css::uno::RuntimeException );
+ ScVbaCommandBarControls( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, VbaCommandBarHelperRef pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl ) throw( css::uno::RuntimeException );
sal_Bool IsMenu(){ return m_bIsMenu; }
// XEnumerationAccess
@@ -57,8 +57,8 @@ public:
virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index, const css::uno::Any& /*Index2*/ ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::XCommandBarControl > SAL_CALL Add( const css::uno::Any& Type, const css::uno::Any& Id, const css::uno::Any& Parameter, const css::uno::Any& Before, const css::uno::Any& Temporary ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
// XHelperInterface
- virtual rtl::OUString getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ virtual OUString getServiceImplName();
+ virtual css::uno::Sequence<OUString> getServiceNames();
};
class VbaDummyCommandBarControls : public CommandBarControls_BASE
@@ -77,8 +77,8 @@ public:
virtual css::uno::Any SAL_CALL Item( const css::uno::Any& Index, const css::uno::Any& /*Index2*/ ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< ov::XCommandBarControl > SAL_CALL Add( const css::uno::Any& Type, const css::uno::Any& Id, const css::uno::Any& Parameter, const css::uno::Any& Before, const css::uno::Any& Temporary ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
// XHelperInterface
- virtual rtl::OUString getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ virtual OUString getServiceImplName();
+ virtual css::uno::Sequence<OUString> getServiceNames();
};
#endif//SC_VBA_COMMANDBARCONTROLS_HXX
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index b29d014..9595def 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -33,9 +33,7 @@
using namespace com::sun::star;
using namespace ooo::vba;
-#define CREATEOUSTRING(asciistr) rtl::OUString(asciistr)
-
-typedef std::map< rtl::OUString, rtl::OUString > MSO2OOCommandbarMap;
+typedef std::map< OUString, OUString > MSO2OOCommandbarMap;
class MSO2OOCommandbarHelper
{
@@ -46,17 +44,17 @@ private:
MSO2OOCommandbarHelper()
{
// Buildin toolbars
- maBuildinToolbarMap.insert( std::make_pair( CREATEOUSTRING("Standard"),CREATEOUSTRING("private:resource/toolbar/standardbar") ) );
- maBuildinToolbarMap.insert( std::make_pair( CREATEOUSTRING("Formatting"),CREATEOUSTRING("private:resource/toolbar/formatobjectbar") ) );
- maBuildinToolbarMap.insert( std::make_pair( CREATEOUSTRING("Drawing"),CREATEOUSTRING("private:resource/toolbar/drawbar") ) );
- maBuildinToolbarMap.insert( std::make_pair( CREATEOUSTRING("Toolbar List"),CREATEOUSTRING("private:resource/toolbar/toolbar") ) );
- maBuildinToolbarMap.insert( std::make_pair( CREATEOUSTRING("Forms"),CREATEOUSTRING("private:resource/toolbar/formcontrols") ) );
- maBuildinToolbarMap.insert( std::make_pair( CREATEOUSTRING("Form Controls"),CREATEOUSTRING("private:resource/toolbar/formcontrols") ) );
- maBuildinToolbarMap.insert( std::make_pair( CREATEOUSTRING("Full Screen"),CREATEOUSTRING("private:resource/toolbar/fullscreenbar") ) );
- maBuildinToolbarMap.insert( std::make_pair( CREATEOUSTRING("Chart"),CREATEOUSTRING("private:resource/toolbar/flowchartshapes") ) );
- maBuildinToolbarMap.insert( std::make_pair( CREATEOUSTRING("Picture"),CREATEOUSTRING("private:resource/toolbar/graphicobjectbar") ) );
- maBuildinToolbarMap.insert( std::make_pair( CREATEOUSTRING("WordArt"),CREATEOUSTRING("private:resource/toolbar/fontworkobjectbar") ) );
- maBuildinToolbarMap.insert( std::make_pair( CREATEOUSTRING("3-D Settings"),CREATEOUSTRING("private:resource/toolbar/extrusionobjectbar") ) );
+ maBuildinToolbarMap.insert( std::make_pair( OUString("Standard") , OUString("private:resource/toolbar/standardbar" ) ) );
+ maBuildinToolbarMap.insert( std::make_pair( OUString("Formatting"), OUString("private:resource/toolbar/formatobjectbar") ) );
+ maBuildinToolbarMap.insert( std::make_pair( OUString("Drawing"), OUString("private:resource/toolbar/drawbar") ) );
+ maBuildinToolbarMap.insert( std::make_pair( OUString("Toolbar List"), OUString("private:resource/toolbar/toolbar") ) );
+ maBuildinToolbarMap.insert( std::make_pair( OUString("Forms"), OUString("private:resource/toolbar/formcontrols") ) );
+ maBuildinToolbarMap.insert( std::make_pair( OUString("Form Controls"),OUString("private:resource/toolbar/formcontrols") ) );
+ maBuildinToolbarMap.insert( std::make_pair( OUString("Full Screen"), OUString("private:resource/toolbar/fullscreenbar") ) );
+ maBuildinToolbarMap.insert( std::make_pair( OUString("Chart"), OUString("private:resource/toolbar/flowchartshapes") ) );
+ maBuildinToolbarMap.insert( std::make_pair( OUString("Picture"), OUString("private:resource/toolbar/graphicobjectbar") ) );
+ maBuildinToolbarMap.insert( std::make_pair( OUString("WordArt"), OUString("private:resource/toolbar/fontworkobjectbar") ) );
+ maBuildinToolbarMap.insert( std::make_pair( OUString("3-D Settings"), OUString("private:resource/toolbar/extrusionobjectbar") ) );
}
public:
@@ -70,16 +68,16 @@ public:
return pMSO2OOCommandbarHelper;
}
- rtl::OUString findBuildinToolbar( const rtl::OUString& sToolbarName )
+ OUString findBuildinToolbar( const OUString& sToolbarName )
{
MSO2OOCommandbarMap::iterator it = maBuildinToolbarMap.begin();
for(; it != maBuildinToolbarMap.end(); ++it )
{
- rtl::OUString sName = it->first;
+ OUString sName = it->first;
if( sName.equalsIgnoreAsciiCase( sToolbarName ) )
return it->second;
}
- return rtl::OUString();
+ return OUString();
}
};
@@ -97,18 +95,18 @@ void VbaCommandBarHelper::Init( ) throw (css::uno::RuntimeException)
m_xDocCfgMgr = xUICfgSupplier->getUIConfigurationManager();
uno::Reference< lang::XServiceInfo > xServiceInfo( mxModel, uno::UNO_QUERY_THROW );
- if( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.sheet.SpreadsheetDocument" ) ) )
+ if( xServiceInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
{
- maModuleId = rtl::OUString( "com.sun.star.sheet.SpreadsheetDocument" );
+ maModuleId = "com.sun.star.sheet.SpreadsheetDocument";
}
- else if( xServiceInfo->supportsService( rtl::OUString( "com.sun.star.text.TextDocument" ) ) )
+ else if( xServiceInfo->supportsService( "com.sun.star.text.TextDocument" ) )
{
- maModuleId = rtl::OUString( "com.sun.star.text.TextDocument" );
+ maModuleId = "com.sun.star.text.TextDocument";
}
if( maModuleId.isEmpty() )
{
- throw uno::RuntimeException( rtl::OUString( "Not implemented" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() );
}
uno::Reference< lang::XMultiServiceFactory > xServiceManager( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
@@ -118,12 +116,12 @@ void VbaCommandBarHelper::Init( ) throw (css::uno::RuntimeException)
m_xAppCfgMgr.set( xUICfgMgrSupp->getUIConfigurationManager( maModuleId ), uno::UNO_QUERY_THROW );
- css::uno::Reference< css::container::XNameAccess > xNameAccess( xServiceManager->createInstance( rtl::OUString( "com.sun.star.ui.WindowStateConfiguration" )), uno::UNO_QUERY_THROW );
+ css::uno::Reference< css::container::XNameAccess > xNameAccess( xServiceManager->createInstance( "com.sun.star.ui.WindowStateConfiguration" ), uno::UNO_QUERY_THROW );
m_xWindowState.set( xNameAccess->getByName( maModuleId ), uno::UNO_QUERY_THROW );
}
-css::uno::Reference< css::container::XIndexAccess > VbaCommandBarHelper::getSettings( const rtl::OUString& sResourceUrl ) throw (css::uno::RuntimeException)
+css::uno::Reference< css::container::XIndexAccess > VbaCommandBarHelper::getSettings( const OUString& sResourceUrl ) throw (css::uno::RuntimeException)
{
if( m_xDocCfgMgr->hasSettings( sResourceUrl ) )
return m_xDocCfgMgr->getSettings( sResourceUrl, sal_True );
@@ -136,7 +134,7 @@ css::uno::Reference< css::container::XIndexAccess > VbaCommandBarHelper::getSett
}
}
-void VbaCommandBarHelper::removeSettings( const rtl::OUString& sResourceUrl ) throw (css::uno::RuntimeException)
+void VbaCommandBarHelper::removeSettings( const OUString& sResourceUrl ) throw (css::uno::RuntimeException)
{
if( m_xDocCfgMgr->hasSettings( sResourceUrl ) )
m_xDocCfgMgr->removeSettings( sResourceUrl );
@@ -146,7 +144,7 @@ void VbaCommandBarHelper::removeSettings( const rtl::OUString& sResourceUrl ) th
// persistChanges();
}
-void VbaCommandBarHelper::ApplyChange( const rtl::OUString& sResourceUrl, const css::uno::Reference< css::container::XIndexAccess >& xSettings, sal_Bool bTemporary ) throw (css::uno::RuntimeException)
+void VbaCommandBarHelper::ApplyChange( const OUString& sResourceUrl, const css::uno::Reference< css::container::XIndexAccess >& xSettings, sal_Bool bTemporary ) throw (css::uno::RuntimeException)
{
if( m_xDocCfgMgr->hasSettings( sResourceUrl ) )
{
@@ -178,17 +176,17 @@ 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("LayoutManager") ), uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XLayoutManager > xLayoutManager( xPropertySet->getPropertyValue( "LayoutManager" ), uno::UNO_QUERY_THROW );
return xLayoutManager;
}
-sal_Bool VbaCommandBarHelper::hasToolbar( const rtl::OUString& sResourceUrl, const rtl::OUString& sName ) throw (css::uno::RuntimeException)
+sal_Bool VbaCommandBarHelper::hasToolbar( const OUString& sResourceUrl, const OUString& sName ) throw (css::uno::RuntimeException)
{
if( m_xDocCfgMgr->hasSettings( sResourceUrl ) )
{
- rtl::OUString sUIName;
+ OUString sUIName;
uno::Reference< beans::XPropertySet > xPropertySet( m_xDocCfgMgr->getSettings( sResourceUrl, sal_False ), uno::UNO_QUERY_THROW );
- xPropertySet->getPropertyValue( rtl::OUString(ITEM_DESCRIPTOR_UINAME) ) >>= sUIName;
+ xPropertySet->getPropertyValue( ITEM_DESCRIPTOR_UINAME ) >>= sUIName;
if( sName.equalsIgnoreAsciiCase( sUIName ) )
return sal_True;
}
@@ -196,16 +194,16 @@ sal_Bool VbaCommandBarHelper::hasToolbar( const rtl::OUString& sResourceUrl, con
}
// return the resource url if found
-rtl::OUString VbaCommandBarHelper::findToolbarByName( const css::uno::Reference< css::container::XNameAccess >& xNameAccess, const rtl::OUString& sName ) throw (css::uno::RuntimeException)
+OUString VbaCommandBarHelper::findToolbarByName( const css::uno::Reference< css::container::XNameAccess >& xNameAccess, const OUString& sName ) throw (css::uno::RuntimeException)
{
- rtl::OUString sResourceUrl;
+ OUString sResourceUrl;
// check if it is an buildin toolbar
sResourceUrl = MSO2OOCommandbarHelper::getMSO2OOCommandbarHelper()->findBuildinToolbar( sName );
if( !sResourceUrl.isEmpty() )
return sResourceUrl;
- uno::Sequence< ::rtl::OUString > allNames = xNameAccess->getElementNames();
+ uno::Sequence< OUString > allNames = xNameAccess->getElementNames();
for( sal_Int32 i = 0; i < allNames.getLength(); i++ )
{
sResourceUrl = allNames[i];
@@ -217,26 +215,26 @@ rtl::OUString VbaCommandBarHelper::findToolbarByName( const css::uno::Reference<
}
// the customize toolbars creating during importing, shoud found there.
- static rtl::OUString sToolbarPrefix( "private:resource/toolbar/custom_" );
+ static OUString sToolbarPrefix( "private:resource/toolbar/custom_" );
sResourceUrl = sToolbarPrefix.concat( sName );
if( hasToolbar( sResourceUrl, sName ) )
return sResourceUrl;
- return rtl::OUString();
+ return OUString();
}
// if found, return the position of the control. if not found, return -1
-sal_Int32 VbaCommandBarHelper::findControlByName( const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, const rtl::OUString& sName, bool bMenu ) throw (css::uno::RuntimeException)
+sal_Int32 VbaCommandBarHelper::findControlByName( const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, const OUString& sName, bool bMenu ) throw (css::uno::RuntimeException)
{
sal_Int32 nCount = xIndexAccess->getCount();
css::uno::Sequence< css::beans::PropertyValue > aProps;
for( sal_Int32 i = 0; i < nCount; i++ )
{
- rtl::OUString sLabel;
+ OUString sLabel;
xIndexAccess->getByIndex( i ) >>= aProps;
- getPropertyValue( aProps, rtl::OUString(ITEM_DESCRIPTOR_LABEL) ) >>= sLabel;
+ getPropertyValue( aProps, ITEM_DESCRIPTOR_LABEL ) >>= sLabel;
// handle the hotkey marker '~' (remove in toolbars (?), replace by '&' in menus)
- ::rtl::OUStringBuffer aBuffer;
+ OUStringBuffer aBuffer;
sal_Int32 index = sLabel.indexOf( sal_Unicode('~') );
if( index < 0 )
{
@@ -249,8 +247,8 @@ sal_Int32 VbaCommandBarHelper::findControlByName( const css::uno::Reference< css
aBuffer.append( sal_Unicode( '&' ) );
aBuffer.append( sLabel.copy( index + 1 ) );
}
- rtl::OUString sNewLabel = aBuffer.makeStringAndClear();
- OSL_TRACE("VbaCommandBarHelper::findControlByName, control name: %s", rtl::OUStringToOString( sNewLabel, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OUString sNewLabel = aBuffer.makeStringAndClear();
+ OSL_TRACE("VbaCommandBarHelper::findControlByName, control name: %s", OUStringToOString( sNewLabel, RTL_TEXTENCODING_UTF8 ).getStr() );
if( sName.equalsIgnoreAsciiCase( sNewLabel ) )
return i;
}
@@ -259,14 +257,14 @@ sal_Int32 VbaCommandBarHelper::findControlByName( const css::uno::Reference< css
return -1;
}
-rtl::OUString VbaCommandBarHelper::generateCustomURL()
+OUString VbaCommandBarHelper::generateCustomURL()
{
- rtl::OUString url( ITEM_TOOLBAR_URL );
- url += rtl::OUString( CUSTOM_TOOLBAR_STR );
+ OUString url( ITEM_TOOLBAR_URL );
+ url += CUSTOM_TOOLBAR_STR;
// use a random number to minimize possible clash with existing custom toolbars
srand( unsigned( time( NULL ) ));
- url += rtl::OUString::valueOf( sal_Int64( rand() ), 16 );
+ url += OUString::valueOf( sal_Int64( rand() ), 16 );
return url;
}
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx
index ca06464..bd47c69 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx
@@ -57,10 +57,10 @@ private:
css::uno::Reference< css::ui::XUIConfigurationManager > m_xDocCfgMgr; // current document
css::uno::Reference< css::ui::XUIConfigurationManager > m_xAppCfgMgr;
css::uno::Reference< css::container::XNameAccess > m_xWindowState;
- rtl::OUString maModuleId;
+ OUString maModuleId;
void Init() throw (css::uno::RuntimeException);
- sal_Bool hasToolbar( const rtl::OUString& sResourceUrl, const rtl::OUString& sName ) throw (css::uno::RuntimeException);
+ sal_Bool hasToolbar( const OUString& sResourceUrl, const OUString& sName ) throw (css::uno::RuntimeException);
public:
VbaCommandBarHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel ) throw( css::uno::RuntimeException );
@@ -79,16 +79,16 @@ public:
return m_xWindowState;
}
sal_Bool persistChanges() throw (css::uno::RuntimeException);
- css::uno::Reference< css::container::XIndexAccess > getSettings( const rtl::OUString& sResourceUrl ) throw (css::uno::RuntimeException);
- void removeSettings( const rtl::OUString& sResourceUrl ) throw (css::uno::RuntimeException);
- void ApplyChange( const rtl::OUString& sResourceUrl, const css::uno::Reference< css::container::XIndexAccess >& xSettings, sal_Bool bTemporary = sal_True ) throw (css::uno::RuntimeException);
+ css::uno::Reference< css::container::XIndexAccess > getSettings( const OUString& sResourceUrl ) throw (css::uno::RuntimeException);
+ void removeSettings( const OUString& sResourceUrl ) throw (css::uno::RuntimeException);
+ void ApplyChange( const OUString& sResourceUrl, const css::uno::Reference< css::container::XIndexAccess >& xSettings, sal_Bool bTemporary = sal_True ) throw (css::uno::RuntimeException);
css::uno::Reference< css::frame::XLayoutManager > getLayoutManager() throw (css::uno::RuntimeException);
- const rtl::OUString getModuleId() const { return maModuleId; }
- rtl::OUString findToolbarByName( const css::uno::Reference< css::container::XNameAccess >& xNameAccess, const rtl::OUString& sName ) throw (css::uno::RuntimeException);
- static sal_Int32 findControlByName( const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, const rtl::OUString& sName, bool bMenu = false ) throw (css::uno::RuntimeException);
- static rtl::OUString generateCustomURL();
+ const OUString getModuleId() const { return maModuleId; }
+ OUString findToolbarByName( const css::uno::Reference< css::container::XNameAccess >& xNameAccess, const OUString& sName ) throw (css::uno::RuntimeException);
+ static sal_Int32 findControlByName( const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, const OUString& sName, bool bMenu = false ) throw (css::uno::RuntimeException);
+ static OUString generateCustomURL();
};
#endif //VBA_COMMANDBARHELPER_HXX
diff --git a/vbahelper/source/vbahelper/vbacommandbars.hxx b/vbahelper/source/vbahelper/vbacommandbars.hxx
index 20adb1a..1616af3 100644
--- a/vbahelper/source/vbahelper/vbacommandbars.hxx
+++ b/vbahelper/source/vbahelper/vbacommandbars.hxx
@@ -48,8 +48,8 @@ public:
virtual sal_Int32 SAL_CALL getCount() throw(css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Item( const css::uno::Any& aIndex, const css::uno::Any& /*aIndex2*/ ) throw( css::uno::RuntimeException);
// XHelperInterface
- virtual rtl::OUString getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ virtual OUString getServiceImplName();
+ virtual css::uno::Sequence<OUString> getServiceNames();
};
#endif//SC_VBA_COMMANDBARS_HXX
diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
index 91eb888..dee8925 100644
--- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
@@ -57,9 +57,9 @@ using namespace ::com::sun::star;
static const char aSpreadsheetDocument[] = "com.sun.star.sheet.SpreadsheetDocument";
static const char aTextDocument[] = "com.sun.star.text.TextDocument";
-typedef boost::unordered_map< rtl::OUString,
-sal_Int32, ::rtl::OUStringHash,
-::std::equal_to< ::rtl::OUString > > NameIndexHash;
+typedef boost::unordered_map< OUString,
+sal_Int32, OUStringHash,
+::std::equal_to< OUString > > NameIndexHash;
typedef std::vector < uno::Reference< frame::XModel > > Documents;
@@ -85,7 +85,7 @@ public:
m_xContext->getServiceManager(), uno::UNO_QUERY_THROW );
uno::Reference< frame::XDesktop > xDesktop
- (xSMgr->createInstanceWithContext(::rtl::OUString("com.sun.star.frame.Desktop"), m_xContext), uno::UNO_QUERY_THROW );
+ (xSMgr->createInstanceWithContext( "com.sun.star.frame.Desktop" , m_xContext), uno::UNO_QUERY_THROW );
uno::Reference< container::XEnumeration > mxComponents = xDesktop->getComponents()->createEnumeration();
while( mxComponents->hasMoreElements() )
{
@@ -137,12 +137,12 @@ public:
{
uno::Reference< lang::XServiceInfo > xServiceInfo( xEnum->nextElement(), uno::UNO_QUERY );
if ( xServiceInfo.is()
- && ( ( xServiceInfo->supportsService( rtl::OUString(aSpreadsheetDocument) ) && meDocType == VbaDocumentsBase::EXCEL_DOCUMENT )
- || ( xServiceInfo->supportsService( rtl::OUString(aTextDocument) ) && meDocType == VbaDocumentsBase::WORD_DOCUMENT ) ) )
+ && ( ( xServiceInfo->supportsService( OUString(aSpreadsheetDocument) ) && meDocType == VbaDocumentsBase::EXCEL_DOCUMENT )
+ || ( xServiceInfo->supportsService( OUString(aTextDocument) ) && meDocType == VbaDocumentsBase::WORD_DOCUMENT ) ) )
{
uno::Reference< frame::XModel > xModel( xServiceInfo, uno::UNO_QUERY_THROW ); // that the spreadsheetdocument is a xmodel is a given
m_documents.push_back( xModel );
- rtl::OUString sName;
+ OUString sName;
uno::Reference< ::ooo::vba::XDocumentBase > xVbaDocument = new VbaDocumentBase( uno::Reference< XHelperInterface >(), xContext, xModel );
if ( xVbaDocument.is() )
{
@@ -184,7 +184,7 @@ public:
}
//XNameAccess
- virtual uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
+ virtual uno::Any SAL_CALL getByName( const OUString& aName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{
NameIndexHash::const_iterator it = namesToIndices.find( aName );
if ( it == namesToIndices.end() )
@@ -193,10 +193,10 @@ public:
}
- virtual uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException)
+ virtual uno::Sequence< OUString > SAL_CALL getElementNames( ) throw (uno::RuntimeException)
{
- uno::Sequence< ::rtl::OUString > names( namesToIndices.size() );
- ::rtl::OUString* pString = names.getArray();
+ uno::Sequence< OUString > names( namesToIndices.size() );
+ OUString* pString = names.getArray();
NameIndexHash::const_iterator it = namesToIndices.begin();
NameIndexHash::const_iterator it_end = namesToIndices.end();
for ( ; it != it_end; ++it, ++pString )
@@ -204,7 +204,7 @@ public:
return names;
}
- virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (uno::RuntimeException)
+ virtual ::sal_Bool SAL_CALL hasByName( const OUString& aName ) throw (uno::RuntimeException)
{
NameIndexHash::const_iterator it = namesToIndices.find( aName );
return (it != namesToIndices.end());
@@ -253,26 +253,23 @@ uno::Any VbaDocumentsBase::createDocument() throw (uno::RuntimeException)
mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
uno::Reference< frame::XComponentLoader > xLoader(
- xSMgr->createInstanceWithContext(
- ::rtl::OUString("com.sun.star.frame.Desktop"),
- mxContext), uno::UNO_QUERY_THROW );
- rtl::OUString sURL;
+ xSMgr->createInstanceWithContext("com.sun.star.frame.Desktop" , mxContext), uno::UNO_QUERY_THROW );
+ OUString sURL;
if( meDocType == WORD_DOCUMENT )
- sURL = rtl::OUString( "private:factory/swriter" );
+ sURL = "private:factory/swriter";
else if( meDocType == EXCEL_DOCUMENT )
- sURL = rtl::OUString( "private:factory/scalc" );
+ sURL = "private:factory/scalc";
else
- throw uno::RuntimeException( rtl::OUString( "Not implemented" ), uno::Reference< uno::XInterface >() );
+ throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() );
// prepare the media descriptor
::comphelper::MediaDescriptor aMediaDesc;
aMediaDesc[ ::comphelper::MediaDescriptor::PROP_MACROEXECUTIONMODE() ] <<= document::MacroExecMode::USE_CONFIG;
- aMediaDesc.setComponentDataEntry( ::rtl::OUString( "ApplyFormDesignMode" ), uno::Any( false ) );
+ aMediaDesc.setComponentDataEntry( "ApplyFormDesignMode" , uno::Any( false ) );
- // craete the new document
+ // create the new document
uno::Reference< lang::XComponent > xComponent = xLoader->loadComponentFromURL(
- sURL ,
- rtl::OUString( "_blank" ), 0,
+ sURL , "_blank", 0,
aMediaDesc.getAsConstPropertyValueList() );
// #163808# lock document controllers and container window if specified by application
@@ -295,7 +292,7 @@ void VbaDocumentsBase::closeDocuments() throw (uno::RuntimeException)
}
// #TODO# #FIXME# can any of the unused params below be used?
-uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException)
+uno::Any VbaDocumentsBase::openDocument( const OUString& rFileName, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException)
{
// #163808# determine state of Application.ScreenUpdating and Application.Interactive symbols (before new document is opened)
uno::Reference< XApplicationBase > xApplication( Application(), uno::UNO_QUERY );
@@ -303,7 +300,7 @@ uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const u
sal_Bool bInteractive = !xApplication.is() || xApplication->getInteractive();
// we need to detect if this is a URL, if not then assume its a file path
- rtl::OUString aURL;
+ OUString aURL;
INetURLObject aObj;
aObj.SetURL( rFileName );
bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
@@ -313,18 +310,13 @@ uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const u
osl::FileBase::getFileURLFromSystemPath( rFileName, aURL );
uno::Reference< lang::XMultiComponentFactory > xSMgr(
mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
- uno::Reference< frame::XDesktop > xDesktop
- (xSMgr->createInstanceWithContext(::rtl::OUString("com.sun.star.frame.Desktop") , mxContext),
- uno::UNO_QUERY_THROW );
+ uno::Reference< frame::XDesktop > xDesktop(xSMgr->createInstanceWithContext( "com.sun.star.frame.Desktop" , mxContext), uno::UNO_QUERY_THROW );
uno::Reference< frame::XComponentLoader > xLoader(
- xSMgr->createInstanceWithContext(
- ::rtl::OUString("com.sun.star.frame.Desktop"),
- mxContext),
- uno::UNO_QUERY_THROW );
+ xSMgr->createInstanceWithContext( "com.sun.star.frame.Desktop" , mxContext), uno::UNO_QUERY_THROW );
uno::Sequence< beans::PropertyValue > sProps( rProps );
sProps.realloc( sProps.getLength() + 1 );
- sProps[ sProps.getLength() - 1 ].Name = rtl::OUString( "MacroExecutionMode" );
+ sProps[ sProps.getLength() - 1 ].Name = "MacroExecutionMode";
sProps[ sProps.getLength() - 1 ].Value <<= document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN;
if ( ReadOnly.hasValue() )
@@ -333,13 +325,13 @@ uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const u
if ( bIsReadOnly )
{
sProps.realloc( sProps.getLength() + 1 );
- sProps[ sProps.getLength() - 1 ].Name = rtl::OUString( "ReadOnly" );
+ sProps[ sProps.getLength() - 1 ].Name = "ReadOnly";
sProps[ sProps.getLength() - 1 ].Value <<= true;
}
}
uno::Reference< lang::XComponent > xComponent = xLoader->loadComponentFromURL( aURL,
- rtl::OUString( "_default" ),
+ "_default" ,
frame::FrameSearchFlag::CREATE,
sProps);
diff --git a/vbahelper/source/vbahelper/vbafillformat.cxx b/vbahelper/source/vbahelper/vbafillformat.cxx
index 01dfd85..3142709 100644
--- a/vbahelper/source/vbahelper/vbafillformat.cxx
+++ b/vbahelper/source/vbahelper/vbafillformat.cxx
@@ -41,7 +41,7 @@ ScVbaFillFormat::setFillStyle( drawing::FillStyle nFillStyle ) throw (uno::Runti
m_nFillStyle = nFillStyle;
if( m_nFillStyle == drawing::FillStyle_GRADIENT )
{
- m_xPropertySet->setPropertyValue( rtl::OUString("FillStyle"), uno::makeAny( drawing::FillStyle_GRADIENT ) );
+ m_xPropertySet->setPropertyValue( "FillStyle" , uno::makeAny( drawing::FillStyle_GRADIENT ) );
awt::Gradient aGradient;
// AXIAL
// RADIAL
@@ -58,11 +58,11 @@ ScVbaFillFormat::setFillStyle( drawing::FillStyle nFillStyle ) throw (uno::Runti
aGradient.StartIntensity = 100;
aGradient.EndIntensity = 100;
aGradient.StepCount = 1;
- m_xPropertySet->setPropertyValue( rtl::OUString("FillGradient"), uno::makeAny( aGradient ) );
+ m_xPropertySet->setPropertyValue( "FillGradient" , uno::makeAny( aGradient ) );
}
else if( m_nFillStyle == drawing::FillStyle_SOLID )
{
- m_xPropertySet->setPropertyValue( rtl::OUString("FillStyle"), uno::makeAny(drawing::FillStyle_SOLID) );
+ m_xPropertySet->setPropertyValue( "FillStyle" , uno::makeAny(drawing::FillStyle_SOLID) );
}
}
@@ -78,7 +78,7 @@ sal_Bool SAL_CALL
ScVbaFillFormat::getVisible() throw (uno::RuntimeException)
{
drawing::FillStyle nFillStyle;
- m_xPropertySet->getPropertyValue( rtl::OUString("FillStyle") ) >>= nFillStyle;
+ m_xPropertySet->getPropertyValue( "FillStyle" ) >>= nFillStyle;
if( nFillStyle == drawing::FillStyle_NONE )
return sal_False;
return sal_True;
@@ -88,10 +88,10 @@ void SAL_CALL
ScVbaFillFormat::setVisible( sal_Bool _visible ) throw (uno::RuntimeException)
{
drawing::FillStyle aFillStyle;
- m_xPropertySet->getPropertyValue( rtl::OUString("FillStyle") ) >>= aFillStyle;
+ m_xPropertySet->getPropertyValue( "FillStyle" ) >>= aFillStyle;
if( !_visible )
{
- m_xPropertySet->setPropertyValue( rtl::OUString("FillStyle"), uno::makeAny( drawing::FillStyle_NONE ) );
+ m_xPropertySet->setPropertyValue( "FillStyle" , uno::makeAny( drawing::FillStyle_NONE ) );
}
else
{
@@ -107,7 +107,7 @@ ScVbaFillFormat::getTransparency() throw (uno::RuntimeException)
{
sal_Int16 nTransparence = 0;
double dTransparence = 0;
- m_xPropertySet->getPropertyValue( rtl::OUString("FillTransparence") ) >>= nTransparence;
+ m_xPropertySet->getPropertyValue( "FillTransparence" ) >>= nTransparence;
dTransparence = static_cast<double>( nTransparence );
dTransparence /= 100;
return dTransparence;
@@ -117,7 +117,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("FillTransparence"), uno::makeAny( nTransparence ) );
+ m_xPropertySet->setPropertyValue( "FillTransparence" , uno::makeAny( nTransparence ) );
}
@@ -169,20 +169,20 @@ ScVbaFillFormat::ForeColor() throw (uno::RuntimeException)
return m_xColorFormat;
}
-rtl::OUString
+OUString
ScVbaFillFormat::getServiceImplName()
{
- return rtl::OUString("ScVbaFillFormat");
+ return OUString("ScVbaFillFormat");
}
-uno::Sequence< rtl::OUString >
+uno::Sequence< OUString >
ScVbaFillFormat::getServiceNames()
{
- static uno::Sequence< rtl::OUString > aServiceNames;
+ static uno::Sequence< OUString > aServiceNames;
if ( aServiceNames.getLength() == 0 )
{
aServiceNames.realloc( 1 );
- aServiceNames[ 0 ] = rtl::OUString( "ooo.vba.msforms.FillFormat" );
+ aServiceNames[ 0 ] = "ooo.vba.msforms.FillFormat";
}
return aServiceNames;
}
diff --git a/vbahelper/source/vbahelper/vbafillformat.hxx b/vbahelper/source/vbahelper/vbafillformat.hxx
index 37aa6e4..9bd0ffb 100644
--- a/vbahelper/source/vbahelper/vbafillformat.hxx
+++ b/vbahelper/source/vbahelper/vbafillformat.hxx
@@ -39,8 +39,8 @@ private:
private:
void setFillStyle( css::drawing::FillStyle nFillStyle ) throw (css::uno::RuntimeException);
protected:
- virtual rtl::OUString getServiceImplName();
- virtual css::uno::Sequence<rtl::OUString> getServiceNames();
+ virtual OUString getServiceImplName();
+ virtual css::uno::Sequence<OUString> getServiceNames();
public:
ScVbaFillFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape > xShape );
diff --git a/vbahelper/source/vbahelper/vbaglobalbase.cxx b/vbahelper/source/vbahelper/vbaglobalbase.cxx
index b5327c1..28f755d 100644
--- a/vbahelper/source/vbahelper/vbaglobalbase.cxx
+++ b/vbahelper/source/vbahelper/vbaglobalbase.cxx
@@ -36,7 +36,7 @@ const uno::Reference< ov::XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext, const OUString& sDocCtxName )
: Globals_BASE( xParent, xContext )
, msDocCtxName( sDocCtxName )
- , msApplication( RTL_CONSTASCII_USTRINGPARAM("Application") )
+ , msApplication( "Application" )
{
// overwrite context with custom one ( that contains the application )
// wrap the service manager as we don't want the disposing context to tear down the 'normal' ServiceManager ( or at least thats what the code appears like it wants to do )
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 748a4c0..301cd76 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -111,7 +111,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("com.sun.star.beans.Introspection") ), uno::UNO_QUERY_THROW );
+ xIntrospection.set( xFactory->createInstance( "com.sun.star.beans.Introspection" ), uno::UNO_QUERY_THROW );
}
return xIntrospection->inspect( aObject );
}
@@ -145,18 +145,18 @@ void dispatchExecute(SfxViewShell* pViewShell, sal_uInt16 nSlot, SfxCallMode nCa
}
void
-dispatchRequests (const uno::Reference< frame::XModel>& xModel, const rtl::OUString & aUrl, const uno::Sequence< beans::PropertyValue >& sProps )
+dispatchRequests (const uno::Reference< frame::XModel>& xModel, const OUString & aUrl, const uno::Sequence< beans::PropertyValue >& sProps )
{
util::URL url;
url.Complete = aUrl;
- rtl::OUString emptyString = rtl::OUString( "" );
+ OUString emptyString( "" );
uno::Reference<frame::XController> xController = xModel->getCurrentController();
uno::Reference<frame::XFrame> xFrame = xController->getFrame();
uno::Reference<frame::XDispatchProvider> xDispatchProvider (xFrame,uno::UNO_QUERY_THROW);
try
{
uno::Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
- uno::Reference<uno::XComponentContext > xContext( xProps->getPropertyValue( rtl::OUString( "DefaultContext" )), uno::UNO_QUERY_THROW );
+ uno::Reference<uno::XComponentContext > xContext( xProps->getPropertyValue( "DefaultContext" ), uno::UNO_QUERY_THROW );
if ( !xContext.is() )
return;
@@ -195,14 +195,14 @@ dispatchRequests (const uno::Reference< frame::XModel>& xModel, const rtl::OUStr
}
void
-dispatchRequests( const uno::Reference< frame::XModel>& xModel, const rtl::OUString& aUrl )
+dispatchRequests( const uno::Reference< frame::XModel>& xModel, const OUString& aUrl )
{
uno::Sequence<beans::PropertyValue> dispatchProps;
dispatchRequests( xModel, aUrl, dispatchProps );
}
uno::Reference< frame::XModel >
-getCurrentDoc( const rtl::OUString& sKey ) throw (uno::RuntimeException)
+getCurrentDoc( const OUString& sKey ) throw (uno::RuntimeException)
{
uno::Reference< frame::XModel > xModel;
SbxObject* pBasic = dynamic_cast< SbxObject* > ( SFX_APP()->GetBasic() );
@@ -236,27 +236,27 @@ getCurrentDoc( const rtl::OUString& sKey ) throw (uno::RuntimeException)
!xModel.is() )
{
throw uno::RuntimeException(
- rtl::OUString( "Can't extract model from basic ( it's obviously not set yet therefore don't know the current document context)"), uno::Reference< uno::XInterface >() );
+ "Can't extract model from basic ( it's obviously not set yet therefore don't know the current document context)" , uno::Reference< uno::XInterface >() );
}
else
{
OSL_TRACE("Have model points to url %s",
- ::rtl::OUStringToOString( xModel->getURL(),
+ OUStringToOString( xModel->getURL(),
RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
}
else
{
- OSL_TRACE("Failed to get %s", rtl::OUStringToOString( sKey, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_TRACE("Failed to get %s", OUStringToOString( sKey, RTL_TEXTENCODING_UTF8 ).getStr() );
throw uno::RuntimeException(
- rtl::OUString( "Can't determine the currently selected document" ),
+ "Can't determine the currently selected document" ,
uno::Reference< uno::XInterface >() );
}
return xModel;
}
uno::Reference< frame::XModel >
-getCurrentDocCtx( const rtl::OUString& ctxName, const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
+getCurrentDocCtx( const OUString& ctxName, const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
{
uno::Reference< frame::XModel > xModel;
// try fallback to calling doc
@@ -268,19 +268,19 @@ getCurrentDocCtx( const rtl::OUString& ctxName, const uno::Reference< uno::XComp
uno::Reference< frame::XModel >
getThisExcelDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
{
- return getCurrentDocCtx( rtl::OUString( "ExcelDocumentContext" ), xContext );
+ return getCurrentDocCtx( "ExcelDocumentContext" , xContext );
}
uno::Reference< frame::XModel >
getThisWordDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
{
- return getCurrentDocCtx( rtl::OUString( "WordDocumentContext" ), xContext );
+ return getCurrentDocCtx( "WordDocumentContext" , xContext );
}
uno::Reference< frame::XModel >
getCurrentExcelDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
{
- static const rtl::OUString sThisExcelDoc( "ThisExcelDoc" );
+ static const OUString sThisExcelDoc( "ThisExcelDoc" );
uno::Reference< frame::XModel > xModel;
try
{
@@ -296,7 +296,7 @@ getCurrentExcelDoc( const uno::Reference< uno::XComponentContext >& xContext ) t
uno::Reference< frame::XModel >
getCurrentWordDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
{
- static const rtl::OUString sThisWordDoc( "ThisWordDoc" );
+ static const OUString sThisWordDoc( "ThisWordDoc" );
uno::Reference< frame::XModel > xModel;
try
{
@@ -374,15 +374,15 @@ void PrintOutHelper( SfxViewShell* pViewShell, const uno::Any& From, const uno::
if ( nCopies > 1 ) // Collate only useful when more that 1 copy
Collate >>= bCollate;
- rtl::OUString sRange( "-" );
- rtl::OUString sFileName;
+ OUString sRange( "-" );
+ OUString sFileName;
if (( nFrom || nTo ) )
{
if ( nFrom )
- sRange = ( ::rtl::OUString::valueOf( nFrom ) + sRange );
+ sRange = ( OUString::valueOf( nFrom ) + sRange );
if ( nTo )
- sRange += ::rtl::OUString::valueOf( nTo );
+ sRange += OUString::valueOf( nTo );
}
if ( PrToFileName.getValue() )
@@ -485,56 +485,56 @@ bool extractBoolFromAny( const uno::Any& rAny ) throw (uno::RuntimeException)
return rAny.get< sal_Int64 >() != 0;
default:;
}
- throw uno::RuntimeException( ::rtl::OUString( "Invalid type, cannot convert to boolean." ), 0 );
+ throw uno::RuntimeException( "Invalid type, cannot convert to boolean." , 0 );
}
-::rtl::OUString extractStringFromAny( const uno::Any& rAny, bool bUppercaseBool ) throw (uno::RuntimeException)
+OUString extractStringFromAny( const uno::Any& rAny, bool bUppercaseBool ) throw (uno::RuntimeException)
{
switch( rAny.getValueType().getTypeClass() )
{
case uno::TypeClass_STRING:
- return rAny.get< ::rtl::OUString >();
+ return rAny.get< OUString >();
case uno::TypeClass_BOOLEAN:
return bUppercaseBool ?
- (rAny.get< bool >() ? ::rtl::OUString( "TRUE" ) : ::rtl::OUString( "FALSE" )) :
- ::rtl::OUString::valueOf( (sal_Bool)rAny.get< bool >() );
+ (rAny.get< bool >() ? OUString( "TRUE" ) : OUString( "FALSE" )) :
+ OUString::valueOf( (sal_Bool)rAny.get< bool >() );
case uno::TypeClass_FLOAT:
- return ::rtl::OUString::valueOf( rAny.get< float >() );
+ return OUString::valueOf( rAny.get< float >() );
case uno::TypeClass_DOUBLE:
- return ::rtl::OUString::valueOf( rAny.get< double >() );
+ return OUString::valueOf( rAny.get< double >() );
case uno::TypeClass_BYTE:
case uno::TypeClass_SHORT:
case uno::TypeClass_LONG:
- return ::rtl::OUString::valueOf( rAny.get< sal_Int32 >() );
+ return OUString::valueOf( rAny.get< sal_Int32 >() );
case uno::TypeClass_HYPER:
- return ::rtl::OUString::valueOf( rAny.get< sal_Int64 >() );
+ return OUString::valueOf( rAny.get< sal_Int64 >() );
default:;
}
- throw uno::RuntimeException( ::rtl::OUString( "Invalid type, cannot convert to string." ), 0 );
+ throw uno::RuntimeException( "Invalid type, cannot convert to string." , 0 );
}
-::rtl::OUString extractStringFromAny( const uno::Any& rAny, const ::rtl::OUString& rDefault, bool bUppercaseBool ) throw (uno::RuntimeException)
+OUString extractStringFromAny( const uno::Any& rAny, const OUString& rDefault, bool bUppercaseBool ) throw (uno::RuntimeException)
{
return rAny.hasValue() ? extractStringFromAny( rAny, bUppercaseBool ) : rDefault;
}
-rtl::OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeException )
+OUString getAnyAsString( const uno::Any& pvargItem ) throw ( uno::RuntimeException )
{
return extractStringFromAny( pvargItem );
}
-rtl::OUString
-ContainerUtilities::getUniqueName( const uno::Sequence< ::rtl::OUString >& _slist, const rtl::OUString& _sElementName, const ::rtl::OUString& _sSuffixSeparator)
+OUString
+ContainerUtilities::getUniqueName( const uno::Sequence< OUString >& _slist, const OUString& _sElementName, const OUString& _sSuffixSeparator)
{
return getUniqueName(_slist, _sElementName, _sSuffixSeparator, sal_Int32(2));
}
-rtl::OUString
-ContainerUtilities::getUniqueName( const uno::Sequence< rtl::OUString >& _slist, const rtl::OUString _sElementName, const rtl::OUString& _sSuffixSeparator, sal_Int32 _nStartSuffix)
+OUString
+ContainerUtilities::getUniqueName( const uno::Sequence< OUString >& _slist, const OUString _sElementName, const OUString& _sSuffixSeparator, sal_Int32 _nStartSuffix)
{
sal_Int32 a = _nStartSuffix;
- rtl::OUString scompname = _sElementName;
+ OUString scompname = _sElementName;
bool bElementexists = true;
sal_Int32 nLen = _slist.getLength();
if ( nLen == 0 )
@@ -549,13 +549,13 @@ ContainerUtilities::getUniqueName( const uno::Sequence< rtl::OUString >& _slist,
return scompname;
}
}
- scompname = _sElementName + _sSuffixSeparator + rtl::OUString::valueOf( a++ );
+ scompname = _sElementName + _sSuffixSeparator + OUString::valueOf( a++ );
}
- return rtl::OUString();
+ return OUString();
}
sal_Int32
-ContainerUtilities::FieldInList( const uno::Sequence< rtl::OUString >& SearchList, const rtl::OUString& SearchString )
+ContainerUtilities::FieldInList( const uno::Sequence< OUString >& SearchList, const OUString& SearchString )
{
sal_Int32 FieldLen = SearchList.getLength();
sal_Int32 retvalue = -1;
@@ -579,9 +579,9 @@ bool NeedEsc(sal_Unicode cCode)
return (STRING_NOTFOUND != sEsc.Search(cCode));
}
-rtl::OUString VBAToRegexp(const rtl::OUString &rIn, bool bForLike )
+OUString VBAToRegexp(const OUString &rIn, bool bForLike )
{
- rtl::OUStringBuffer sResult;
+ OUStringBuffer sResult;
const sal_Unicode *start = rIn.getStr();
const sal_Unicode *end = start + rIn.getLength();
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list