Kaydet (Commit) 120786ae authored tarafından Olivier Hallot's avatar Olivier Hallot

Remove some A2S and C2U macros in sd

üst 092a9051
...@@ -44,7 +44,6 @@ using namespace ::com::sun::star::accessibility; ...@@ -44,7 +44,6 @@ using namespace ::com::sun::star::accessibility;
using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Reference;
using ::rtl::OUString; using ::rtl::OUString;
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
namespace accessibility { namespace accessibility {
...@@ -346,14 +345,14 @@ void AccessiblePageShape::dispose (void) ...@@ -346,14 +345,14 @@ void AccessiblePageShape::dispose (void)
{ {
if (xPageProperties.is()) if (xPageProperties.is())
{ {
xPageProperties->getPropertyValue(A2S("LinkDisplayName")) >>= sCurrentSlideName; xPageProperties->getPropertyValue( "LinkDisplayName" ) >>= sCurrentSlideName;
} }
} }
catch (const beans::UnknownPropertyException&) catch (const beans::UnknownPropertyException&)
{ {
} }
return CreateAccessibleBaseName()+A2S(": ")+sCurrentSlideName; return CreateAccessibleBaseName()+": "+sCurrentSlideName;
} }
......
...@@ -89,7 +89,6 @@ ...@@ -89,7 +89,6 @@
#include "textapi.hxx" #include "textapi.hxx"
#include "optsitem.hxx" #include "optsitem.hxx"
#define C2U(x) OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
using ::rtl::OUString; using ::rtl::OUString;
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
......
...@@ -46,7 +46,6 @@ using namespace ::com::sun::star::uno; ...@@ -46,7 +46,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework; using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString; using ::rtl::OUString;
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
namespace sd { namespace framework { namespace sd { namespace framework {
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
class SfxRequest; class SfxRequest;
#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::beans; using namespace ::com::sun::star::beans;
...@@ -256,9 +255,9 @@ void FuHangulHanjaConversion::StartChineseConversion() ...@@ -256,9 +255,9 @@ void FuHangulHanjaConversion::StartChineseConversion()
{ {
try try
{ {
xProp->getPropertyValue( C2U("IsDirectionToSimplified") ) >>= bToSimplified; xProp->getPropertyValue( "IsDirectionToSimplified" ) >>= bToSimplified;
xProp->getPropertyValue( C2U("IsUseCharacterVariants") ) >>= bUseVariants; xProp->getPropertyValue( "IsUseCharacterVariants" ) >>= bUseVariants;
xProp->getPropertyValue( C2U("IsTranslateCommonTerms") ) >>= bCommonTerms; xProp->getPropertyValue( "IsTranslateCommonTerms" ) >>= bCommonTerms;
} }
catch( Exception& ) catch( Exception& )
{ {
......
...@@ -42,7 +42,6 @@ using namespace ::com::sun::star::lang; ...@@ -42,7 +42,6 @@ using namespace ::com::sun::star::lang;
using ::rtl::OUString; using ::rtl::OUString;
using ::sd::framework::FrameworkHelper; using ::sd::framework::FrameworkHelper;
#define C2U(x) OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
namespace sd { namespace sd {
...@@ -97,7 +96,7 @@ sal_Int32 SlideShowRestarter::GetDisplayCount (void) ...@@ -97,7 +96,7 @@ sal_Int32 SlideShowRestarter::GetDisplayCount (void)
return 0; return 0;
Reference<com::sun::star::container::XIndexAccess> xIndexAccess ( Reference<com::sun::star::container::XIndexAccess> xIndexAccess (
xFactory->createInstanceWithContext(C2U("com.sun.star.awt.DisplayAccess"),xContext), xFactory->createInstanceWithContext("com.sun.star.awt.DisplayAccess",xContext),
UNO_QUERY); UNO_QUERY);
if ( ! xIndexAccess.is()) if ( ! xIndexAccess.is())
return 0; return 0;
...@@ -161,8 +160,8 @@ void SlideShowRestarter::StartPresentation (void) ...@@ -161,8 +160,8 @@ void SlideShowRestarter::StartPresentation (void)
if (mpSlideShow.is()) if (mpSlideShow.is())
{ {
Sequence<css::beans::PropertyValue> aProperties (1); Sequence<css::beans::PropertyValue> aProperties (1);
aProperties[0].Name = C2U("FirstPage"); aProperties[0].Name = "FirstPage";
aProperties[0].Value <<= C2U("page") + OUString::valueOf(mnCurrentSlideNumber+1); aProperties[0].Value <<= "page" + OUString::valueOf(mnCurrentSlideNumber+1);
mpSlideShow->startWithArguments(aProperties); mpSlideShow->startWithArguments(aProperties);
} }
mpSelf.reset(); mpSelf.reset();
......
...@@ -80,8 +80,6 @@ using namespace ::com::sun::star::drawing::framework; ...@@ -80,8 +80,6 @@ using namespace ::com::sun::star::drawing::framework;
extern String getUiNameFromPageApiNameImpl( const ::rtl::OUString& rApiName ); extern String getUiNameFromPageApiNameImpl( const ::rtl::OUString& rApiName );
#define C2U(x) OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
namespace { namespace {
/** This local version of the work window overloads DataChanged() so that it /** This local version of the work window overloads DataChanged() so that it
...@@ -277,7 +275,7 @@ void SlideShow::CreateController( ViewShell* pViewSh, ::sd::View* pView, ::Wind ...@@ -277,7 +275,7 @@ void SlideShow::CreateController( ViewShell* pViewSh, ::sd::View* pView, ::Wind
OUString SAL_CALL SlideShow::getImplementationName( ) throw(RuntimeException) OUString SAL_CALL SlideShow::getImplementationName( ) throw(RuntimeException)
{ {
return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sd.SlideShow") ); return OUString( "com.sun.star.comp.sd.SlideShow" );
} }
// -------------------------------------------------------------------- // --------------------------------------------------------------------
...@@ -291,7 +289,7 @@ sal_Bool SAL_CALL SlideShow::supportsService( const OUString& ServiceName ) thro ...@@ -291,7 +289,7 @@ sal_Bool SAL_CALL SlideShow::supportsService( const OUString& ServiceName ) thro
Sequence< OUString > SAL_CALL SlideShow::getSupportedServiceNames( ) throw(RuntimeException) Sequence< OUString > SAL_CALL SlideShow::getSupportedServiceNames( ) throw(RuntimeException)
{ {
OUString aService( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.Presentation") ); OUString aService( "com.sun.star.presentation.Presentation" );
Sequence< OUString > aSeq( &aService, 1 ); Sequence< OUString > aSeq( &aService, 1 );
return aSeq; return aSeq;
} }
...@@ -845,7 +843,7 @@ void SAL_CALL SlideShow::end() throw(RuntimeException) ...@@ -845,7 +843,7 @@ void SAL_CALL SlideShow::end() throw(RuntimeException)
void SAL_CALL SlideShow::rehearseTimings() throw(RuntimeException) void SAL_CALL SlideShow::rehearseTimings() throw(RuntimeException)
{ {
Sequence< PropertyValue > aArguments(1); Sequence< PropertyValue > aArguments(1);
aArguments[0].Name = C2U("RehearseTimings"); aArguments[0].Name = "RehearseTimings";
aArguments[0].Value <<= sal_True; aArguments[0].Value <<= sal_True;
startWithArguments( aArguments ); startWithArguments( aArguments );
} }
...@@ -963,20 +961,20 @@ bool SlideShow::startPreview( const Reference< XDrawPage >& xDrawPage, const Ref ...@@ -963,20 +961,20 @@ bool SlideShow::startPreview( const Reference< XDrawPage >& xDrawPage, const Ref
{ {
Sequence< PropertyValue > aArguments(4); Sequence< PropertyValue > aArguments(4);
aArguments[0].Name = C2U("Preview"); aArguments[0].Name = "Preview";
aArguments[0].Value <<= sal_True; aArguments[0].Value <<= sal_True;
aArguments[1].Name = C2U("FirstPage"); aArguments[1].Name = "FirstPage";
aArguments[1].Value <<= xDrawPage; aArguments[1].Value <<= xDrawPage;
aArguments[2].Name = C2U("AnimationNode"); aArguments[2].Name = "AnimationNode";
aArguments[2].Value <<= xAnimationNode; aArguments[2].Value <<= xAnimationNode;
Reference< XWindow > xParentWindow; Reference< XWindow > xParentWindow;
if( pParent ) if( pParent )
xParentWindow = VCLUnoHelper::GetInterface( pParent ); xParentWindow = VCLUnoHelper::GetInterface( pParent );
aArguments[3].Name = C2U("ParentWindow"); aArguments[3].Name = "ParentWindow";
aArguments[3].Value <<= xParentWindow; aArguments[3].Value <<= xParentWindow;
startWithArguments( aArguments ); startWithArguments( aArguments );
......
...@@ -493,7 +493,7 @@ void TableDesignPane::updateControls() ...@@ -493,7 +493,7 @@ void TableDesignPane::updateControls()
sal_uInt16 nSelection = 0; sal_uInt16 nSelection = 0;
if( mxSelectedTable.is() ) if( mxSelectedTable.is() )
{ {
Reference< XNamed > xNamed( mxSelectedTable->getPropertyValue( OUString( "TableTemplate" ) ), UNO_QUERY ); Reference< XNamed > xNamed( mxSelectedTable->getPropertyValue( "TableTemplate" ), UNO_QUERY );
if( xNamed.is() ) if( xNamed.is() )
{ {
const OUString sStyleName( xNamed->getName() ); const OUString sStyleName( xNamed->getName() );
......
...@@ -71,11 +71,6 @@ using ::rtl::OUString; ...@@ -71,11 +71,6 @@ using ::rtl::OUString;
namespace sd { namespace sd {
namespace { namespace {
OUString A2S (const char* pString)
{
return OUString::createFromAscii(pString);
}
/** Convenience class to extract values from the sequence of properties /** Convenience class to extract values from the sequence of properties
...@@ -1297,14 +1292,14 @@ public: ...@@ -1297,14 +1292,14 @@ public:
css::uno::Sequence<css::beans::PropertyValue> aProperties (3); css::uno::Sequence<css::beans::PropertyValue> aProperties (3);
aProperties[0].Name = A2S("ExtraPrintUIOptions"); aProperties[0].Name = "ExtraPrintUIOptions";
aProperties[0].Value <<= m_aUIProperties; aProperties[0].Value <<= m_aUIProperties;
aProperties[1].Name = A2S("PageSize"); aProperties[1].Name = "PageSize";
aProperties[1].Value <<= maPrintSize; aProperties[1].Value <<= maPrintSize;
// FIXME: is this always true ? // FIXME: is this always true ?
aProperties[2].Name = A2S("PageIncludesNonprintableArea"); aProperties[2].Name = "PageIncludesNonprintableArea";
aProperties[2].Value = makeAny( sal_True ); aProperties[2].Value = makeAny( sal_True );
return aProperties; return aProperties;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment