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;
using ::com::sun::star::uno::Reference;
using ::rtl::OUString;
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
namespace accessibility {
......@@ -346,14 +345,14 @@ void AccessiblePageShape::dispose (void)
{
if (xPageProperties.is())
{
xPageProperties->getPropertyValue(A2S("LinkDisplayName")) >>= sCurrentSlideName;
xPageProperties->getPropertyValue( "LinkDisplayName" ) >>= sCurrentSlideName;
}
}
catch (const beans::UnknownPropertyException&)
{
}
return CreateAccessibleBaseName()+A2S(": ")+sCurrentSlideName;
return CreateAccessibleBaseName()+": "+sCurrentSlideName;
}
......
......@@ -89,7 +89,6 @@
#include "textapi.hxx"
#include "optsitem.hxx"
#define C2U(x) OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
......
......@@ -46,7 +46,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
namespace sd { namespace framework {
......
......@@ -52,7 +52,6 @@
class SfxRequest;
#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
......@@ -256,9 +255,9 @@ void FuHangulHanjaConversion::StartChineseConversion()
{
try
{
xProp->getPropertyValue( C2U("IsDirectionToSimplified") ) >>= bToSimplified;
xProp->getPropertyValue( C2U("IsUseCharacterVariants") ) >>= bUseVariants;
xProp->getPropertyValue( C2U("IsTranslateCommonTerms") ) >>= bCommonTerms;
xProp->getPropertyValue( "IsDirectionToSimplified" ) >>= bToSimplified;
xProp->getPropertyValue( "IsUseCharacterVariants" ) >>= bUseVariants;
xProp->getPropertyValue( "IsTranslateCommonTerms" ) >>= bCommonTerms;
}
catch( Exception& )
{
......
......@@ -42,7 +42,6 @@ using namespace ::com::sun::star::lang;
using ::rtl::OUString;
using ::sd::framework::FrameworkHelper;
#define C2U(x) OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
namespace sd {
......@@ -97,7 +96,7 @@ sal_Int32 SlideShowRestarter::GetDisplayCount (void)
return 0;
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);
if ( ! xIndexAccess.is())
return 0;
......@@ -161,8 +160,8 @@ void SlideShowRestarter::StartPresentation (void)
if (mpSlideShow.is())
{
Sequence<css::beans::PropertyValue> aProperties (1);
aProperties[0].Name = C2U("FirstPage");
aProperties[0].Value <<= C2U("page") + OUString::valueOf(mnCurrentSlideNumber+1);
aProperties[0].Name = "FirstPage";
aProperties[0].Value <<= "page" + OUString::valueOf(mnCurrentSlideNumber+1);
mpSlideShow->startWithArguments(aProperties);
}
mpSelf.reset();
......
......@@ -80,8 +80,6 @@ using namespace ::com::sun::star::drawing::framework;
extern String getUiNameFromPageApiNameImpl( const ::rtl::OUString& rApiName );
#define C2U(x) OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
namespace {
/** 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
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
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 );
return aSeq;
}
......@@ -845,7 +843,7 @@ void SAL_CALL SlideShow::end() throw(RuntimeException)
void SAL_CALL SlideShow::rehearseTimings() throw(RuntimeException)
{
Sequence< PropertyValue > aArguments(1);
aArguments[0].Name = C2U("RehearseTimings");
aArguments[0].Name = "RehearseTimings";
aArguments[0].Value <<= sal_True;
startWithArguments( aArguments );
}
......@@ -963,20 +961,20 @@ bool SlideShow::startPreview( const Reference< XDrawPage >& xDrawPage, const Ref
{
Sequence< PropertyValue > aArguments(4);
aArguments[0].Name = C2U("Preview");
aArguments[0].Name = "Preview";
aArguments[0].Value <<= sal_True;
aArguments[1].Name = C2U("FirstPage");
aArguments[1].Name = "FirstPage";
aArguments[1].Value <<= xDrawPage;
aArguments[2].Name = C2U("AnimationNode");
aArguments[2].Name = "AnimationNode";
aArguments[2].Value <<= xAnimationNode;
Reference< XWindow > xParentWindow;
if( pParent )
xParentWindow = VCLUnoHelper::GetInterface( pParent );
aArguments[3].Name = C2U("ParentWindow");
aArguments[3].Name = "ParentWindow";
aArguments[3].Value <<= xParentWindow;
startWithArguments( aArguments );
......
......@@ -493,7 +493,7 @@ void TableDesignPane::updateControls()
sal_uInt16 nSelection = 0;
if( mxSelectedTable.is() )
{
Reference< XNamed > xNamed( mxSelectedTable->getPropertyValue( OUString( "TableTemplate" ) ), UNO_QUERY );
Reference< XNamed > xNamed( mxSelectedTable->getPropertyValue( "TableTemplate" ), UNO_QUERY );
if( xNamed.is() )
{
const OUString sStyleName( xNamed->getName() );
......
......@@ -71,11 +71,6 @@ using ::rtl::OUString;
namespace sd {
namespace {
OUString A2S (const char* pString)
{
return OUString::createFromAscii(pString);
}
/** Convenience class to extract values from the sequence of properties
......@@ -1297,14 +1292,14 @@ public:
css::uno::Sequence<css::beans::PropertyValue> aProperties (3);
aProperties[0].Name = A2S("ExtraPrintUIOptions");
aProperties[0].Name = "ExtraPrintUIOptions";
aProperties[0].Value <<= m_aUIProperties;
aProperties[1].Name = A2S("PageSize");
aProperties[1].Name = "PageSize";
aProperties[1].Value <<= maPrintSize;
// FIXME: is this always true ?
aProperties[2].Name = A2S("PageIncludesNonprintableArea");
aProperties[2].Name = "PageIncludesNonprintableArea";
aProperties[2].Value = makeAny( sal_True );
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