summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-04-02 00:50:08 +0200
committerThomas Arnhold <thomas@arnhold.org>2013-04-02 01:15:34 +0200
commit7f8e721e0536e68fca4d7abdf9711427eb1c576e (patch)
tree21456eaa9b89d10de1581e2b4d9ec7a12c12d6b4 /sw/source/ui
parent17533a0f77fcaa1da63c3651075bd8d320583d4f (diff)
sw: remove macros
Change-Id: Iec447843f4f314bbd562f2e4821b4bcfadeeb565
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx31
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx10
-rw-r--r--sw/source/ui/inc/swdtflvr.hxx11
-rw-r--r--sw/source/ui/uno/swdetect.cxx85
-rw-r--r--sw/source/ui/uno/swdetect.hxx10
-rw-r--r--sw/source/ui/uno/unomodule.cxx36
-rw-r--r--sw/source/ui/uno/unomodule.hxx36
7 files changed, 98 insertions, 121 deletions
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index f8838fdcbeb0..efae40258d38 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -49,14 +49,9 @@
#include "drpcps.hrc"
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-//using namespace i18n; !using this namespace leads to mysterious conflicts with ScriptType::...!
-// so don't use this instead of the following defines!
-
-#define I18N ::com::sun::star::i18n
-#define I18N_SCRIPTTYPE ::com::sun::star::i18n::ScriptType
+using namespace css;
+using namespace css::uno;
+using namespace css::lang;
// Globals ******************************************************************
@@ -95,7 +90,7 @@ class SwDropCapsPict : public Control
SvxFont maCJKFont;
SvxFont maCTLFont;
Size maTextSize;
- Reference< I18N::XBreakIterator > xBreak;
+ Reference< css::i18n::XBreakIterator > xBreak;
virtual void Paint(const Rectangle &rRect);
void CheckScript( void );
@@ -200,7 +195,7 @@ void SwDropCapsPict::GetFirstScriptSegment(xub_StrLen &start, xub_StrLen &end, s
if( maScriptChanges.empty() )
{
end = maText.Len();
- scriptType = I18N_SCRIPTTYPE::LATIN;
+ scriptType = css::i18n::ScriptType::LATIN;
}
else
{
@@ -380,7 +375,7 @@ void SwDropCapsPict::DrawPrev( const Point& rPt )
GetFirstScriptSegment(nStart, nEnd, nScript);
do
{
- SvxFont& rFnt = (nScript==I18N_SCRIPTTYPE::ASIAN) ? maCJKFont : ((nScript==I18N_SCRIPTTYPE::COMPLEX) ? maCTLFont : maFont);
+ SvxFont& rFnt = (nScript==css::i18n::ScriptType::ASIAN) ? maCJKFont : ((nScript==css::i18n::ScriptType::COMPLEX) ? maCTLFont : maFont);
mpPrinter->SetFont( rFnt );
rFnt.DrawPrev( this, mpPrinter, aPt, maText, nStart, nEnd - nStart );
@@ -403,17 +398,17 @@ void SwDropCapsPict::CheckScript( void )
if( !xBreak.is() )
{
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- xBreak = I18N::BreakIterator::create(xContext);
+ xBreak = css::i18n::BreakIterator::create(xContext);
}
sal_uInt16 nScript = xBreak->getScriptType( maText, 0 );
sal_uInt16 nChg = 0;
- if( I18N_SCRIPTTYPE::WEAK == nScript )
+ if( css::i18n::ScriptType::WEAK == nScript )
{
nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript );
if( nChg < maText.Len() )
nScript = xBreak->getScriptType( maText, nChg );
else
- nScript = I18N_SCRIPTTYPE::LATIN;
+ nScript = css::i18n::ScriptType::LATIN;
}
do
@@ -446,8 +441,8 @@ Size SwDropCapsPict::CalcTextSize( void )
long nCTLAscent = 0;
do
{
- SvxFont& rFnt = ( nScript == I18N_SCRIPTTYPE::ASIAN )? maCJKFont :
- ( ( nScript == I18N_SCRIPTTYPE::COMPLEX )? maCTLFont : maFont );
+ SvxFont& rFnt = ( nScript == css::i18n::ScriptType::ASIAN )? maCJKFont :
+ ( ( nScript == css::i18n::ScriptType::COMPLEX )? maCTLFont : maFont );
sal_uLong nWidth = rFnt.GetTxtSize( mpPrinter, maText, nStart, nEnd-nStart ).Width();
if( nIdx < maScriptChanges.size() )
@@ -455,10 +450,10 @@ Size SwDropCapsPict::CalcTextSize( void )
nTxtWidth += nWidth;
switch(nScript)
{
- case I18N_SCRIPTTYPE::ASIAN:
+ case css::i18n::ScriptType::ASIAN:
calcFontHeightAnyAscent( this, maCJKFont, nCJKHeight, nCJKAscent );
break;
- case I18N_SCRIPTTYPE::COMPLEX:
+ case css::i18n::ScriptType::COMPLEX:
calcFontHeightAnyAscent( this, maCTLFont, nCTLHeight, nCTLAscent );
break;
default:
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 34d9ff4ee68d..ecc0928f2ddb 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -131,7 +131,6 @@ extern bool bExecuteDrag;
#define SWTRANSFER_GRAPHIC_INSERTED 0x00000040
using namespace ::svx;
-using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::datatransfer;
@@ -370,7 +369,7 @@ namespace
}
}
-sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
+sal_Bool SwTransferable::GetData( const DataFlavor& rFlavor )
{
sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor );
@@ -574,7 +573,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& rFlavor )
sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& xStream,
void* pObject, sal_uInt32 nObjectType,
- const DATA_FLAVOR& /*rFlavor*/ )
+ const DataFlavor& /*rFlavor*/ )
{
sal_Bool bRet = sal_False;
WriterRef xWrt;
@@ -1768,7 +1767,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
// insert replacement image ( if there is one ) into the object helper
if ( nGrFormat )
{
- datatransfer::DataFlavor aDataFlavor;
+ DataFlavor aDataFlavor;
SotExchange::GetFormatDataFlavor( nGrFormat, aDataFlavor );
xObjRef.SetGraphic( aGraphic, aDataFlavor.MimeType );
}
@@ -3383,8 +3382,7 @@ void SwTransferable::CreateSelection( SwWrtShell& rSh,
pNew->pCreatorView = _pCreatorView;
- uno::Reference<
- datatransfer::XTransferable > xRef( pNew );
+ uno::Reference< XTransferable > xRef( pNew );
pMod->pXSelection = pNew;
pNew->CopyToSelection( rSh.GetWin() );
}
diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx
index c4610263246b..e790297a7b1d 100644
--- a/sw/source/ui/inc/swdtflvr.hxx
+++ b/sw/source/ui/inc/swdtflvr.hxx
@@ -52,7 +52,6 @@ namespace nsTransferBufferType
const sal_uInt16 TRNSFR_DRAWING = 0x0081; // drawing is internal too!
}
-#define DATA_FLAVOR ::com::sun::star::datatransfer::DataFlavor
class SwTransferable : public TransferableHelper
{
@@ -78,7 +77,7 @@ class SwTransferable : public TransferableHelper
sal_Bool bCleanUp :1; //D&D cleanup after Drop (not by internal Drop)
// helper methods for the copy
- com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > FindOLEObj( sal_Int64& nAspect ) const;
+ css::uno::Reference < css::embed::XEmbeddedObject > FindOLEObj( sal_Int64& nAspect ) const;
const Graphic* FindOLEReplacementGraphic() const;
void DeleteSelection();
@@ -139,11 +138,11 @@ class SwTransferable : public TransferableHelper
protected:
virtual void AddSupportedFormats();
- virtual sal_Bool GetData( const DATA_FLAVOR& rFlavor );
+ virtual sal_Bool GetData( const css::datatransfer::DataFlavor& rFlavor );
virtual sal_Bool WriteObject( SotStorageStreamRef& rxOStm,
void* pUserObject,
sal_uInt32 nUserObjectId,
- const DATA_FLAVOR& rFlavor );
+ const css::datatransfer::DataFlavor& rFlavor );
virtual void DragFinished( sal_Int8 nDropAction );
virtual void ObjectReleased();
@@ -205,9 +204,9 @@ public:
// the related SwView is being closed and the SwTransferable is invalid now
void Invalidate() {pWrtShell = 0;}
- static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+ static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
- virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) throw( css::uno::RuntimeException );
};
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index 30bfba3ae889..fd23917d9944 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -67,9 +67,8 @@ using namespace ::com::sun::star::task;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::ucb;
-using ::rtl::OUString;
-SwFilterDetect::SwFilterDetect( const REFERENCE < lang::XMultiServiceFactory >& /*xFactory*/ )
+SwFilterDetect::SwFilterDetect( const Reference < XMultiServiceFactory >& /*xFactory*/ )
{
}
@@ -77,17 +76,17 @@ SwFilterDetect::~SwFilterDetect()
{
}
-::rtl::OUString SAL_CALL SwFilterDetect::detect( uno::Sequence< beans::PropertyValue >& lDescriptor ) throw( uno::RuntimeException )
+OUString SAL_CALL SwFilterDetect::detect( Sequence< PropertyValue >& lDescriptor ) throw( RuntimeException )
{
- REFERENCE< XInputStream > xStream;
- REFERENCE< XContent > xContent;
- REFERENCE< XInteractionHandler > xInteraction;
+ Reference< XInputStream > xStream;
+ Reference< XContent > xContent;
+ Reference< XInteractionHandler > xInteraction;
String aURL;
- ::rtl::OUString sTemp;
+ OUString sTemp;
String aTypeName; // a name describing the type (from MediaDescriptor, usually from flat detection)
String aPreselectedFilterName; // a name describing the filter to use (from MediaDescriptor, usually from UI action)
- ::rtl::OUString aDocumentTitle; // interesting only if set in this method
+ OUString aDocumentTitle; // interesting only if set in this method
// opening as template is done when a parameter tells to do so and a template filter can be detected
// (otherwise no valid filter would be found) or if the detected filter is a template filter and
@@ -166,13 +165,13 @@ SwFilterDetect::~SwFilterDetect()
bWasReadOnly = pItem && pItem->GetValue();
const SfxFilter* pFilter = 0;
- String aPrefix = rtl::OUString("private:factory/");
+ String aPrefix = OUString("private:factory/");
if( aURL.Match( aPrefix ) == aPrefix.Len() )
{
if( SvtModuleOptions().IsWriter() )
{
String aPattern( aPrefix );
- aPattern += rtl::OUString("swriter");
+ aPattern += OUString("swriter");
if ( aURL.Match( aPattern ) >= aPattern.Len() )
return aTypeName;
}
@@ -193,24 +192,24 @@ SwFilterDetect::~SwFilterDetect()
sal_Bool bIsStorage = aMedium.IsStorage();
if ( bIsStorage )
{
- uno::Reference< embed::XStorage > xStorage = aMedium.GetStorage( sal_False );
+ Reference< embed::XStorage > xStorage = aMedium.GetStorage( sal_False );
if ( aMedium.GetLastStorageCreationState() != ERRCODE_NONE )
{
// error during storage creation means _here_ that the medium
// is broken, but we can not handle it in medium since impossibility
// to create a storage does not _always_ means that the medium is broken
- aMedium.SetError( aMedium.GetLastStorageCreationState(), ::rtl::OUString( OSL_LOG_PREFIX ) );
+ aMedium.SetError( aMedium.GetLastStorageCreationState(), OUString( OSL_LOG_PREFIX ) );
if ( xInteraction.is() )
{
OUString empty;
try
{
InteractiveAppException xException( empty,
- REFERENCE< XInterface >(),
+ Reference< XInterface >(),
InteractionClassification_ERROR,
aMedium.GetError() );
- REFERENCE< XInteractionRequest > xRequest(
+ Reference< XInteractionRequest > xRequest(
new ucbhelper::SimpleInteractionRequest( makeAny( xException ),
ucbhelper::CONTINUATION_APPROVE ) );
xInteraction->handle( xRequest );
@@ -228,9 +227,9 @@ SwFilterDetect::~SwFilterDetect()
{
const SfxFilter* pPreFilter = aPreselectedFilterName.Len() ?
SfxFilterMatcher().GetFilter4FilterName( aPreselectedFilterName ) : aTypeName.Len() ?
- SfxFilterMatcher(rtl::OUString("swriter")).GetFilter4EA( aTypeName ) : 0;
+ SfxFilterMatcher(OUString("swriter")).GetFilter4EA( aTypeName ) : 0;
if (!pPreFilter)
- pPreFilter = SfxFilterMatcher(rtl::OUString("sweb")).GetFilter4EA( aTypeName );
+ pPreFilter = SfxFilterMatcher(OUString("sweb")).GetFilter4EA( aTypeName );
OUString aFilterName;
if ( pPreFilter )
{
@@ -240,7 +239,7 @@ SwFilterDetect::~SwFilterDetect()
aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pPreFilter ? pPreFilter->IsOwnTemplateFormat() : sal_False, &aFilterName );
}
- catch (const lang::WrappedTargetException& aWrap)
+ catch (const WrappedTargetException& aWrap)
{
if (!bDeepDetection)
// Bail out early unless it's a deep detection.
@@ -276,16 +275,16 @@ SwFilterDetect::~SwFilterDetect()
NotifyBrokenPackage aNotifyRequest( aDocumentTitle );
xInteraction->handle( aNotifyRequest.GetRequest() );
- rtl::Reference< ::comphelper::OIHWrapNoFilterDialog > xHandler = new ::comphelper::OIHWrapNoFilterDialog( xInteraction );
+ Reference< ::comphelper::OIHWrapNoFilterDialog > xHandler = new ::comphelper::OIHWrapNoFilterDialog( xInteraction );
if ( nIndexOfInteractionHandler != -1 )
- lDescriptor[nIndexOfInteractionHandler].Value <<= uno::Reference< XInteractionHandler >( static_cast< task::XInteractionHandler* >( xHandler.get() ) );
+ lDescriptor[nIndexOfInteractionHandler].Value <<= Reference< XInteractionHandler >( static_cast< XInteractionHandler* >( xHandler.get() ) );
- aMedium.SetError( ERRCODE_ABORT, ::rtl::OUString( OSL_LOG_PREFIX ) );
+ aMedium.SetError( ERRCODE_ABORT, OUString( OSL_LOG_PREFIX ) );
}
}
else
// no interaction, error handling as usual
- aMedium.SetError( ERRCODE_IO_BROKENPACKAGE, ::rtl::OUString( OSL_LOG_PREFIX ) );
+ aMedium.SetError( ERRCODE_IO_BROKENPACKAGE, OUString( OSL_LOG_PREFIX ) );
if ( !bRepairAllowed )
{
@@ -294,11 +293,11 @@ SwFilterDetect::~SwFilterDetect()
}
}
}
- catch (const uno::RuntimeException&)
+ catch (const RuntimeException&)
{
throw;
}
- catch (const uno::Exception&)
+ catch (const Exception&)
{
aTypeName.Erase();
aPreselectedFilterName.Erase();
@@ -352,7 +351,7 @@ SwFilterDetect::~SwFilterDetect()
{
// if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString("InputStream");
+ lDescriptor[nPropertyCount].Name = OUString("InputStream");
lDescriptor[nPropertyCount].Value <<= xStream;
nPropertyCount++;
}
@@ -361,7 +360,7 @@ SwFilterDetect::~SwFilterDetect()
{
// if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString("UCBContent");
+ lDescriptor[nPropertyCount].Name = OUString("UCBContent");
lDescriptor[nPropertyCount].Value <<= xContent;
nPropertyCount++;
}
@@ -371,7 +370,7 @@ SwFilterDetect::~SwFilterDetect()
if ( nIndexOfReadOnlyFlag == -1 )
{
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString("ReadOnly");
+ lDescriptor[nPropertyCount].Name = OUString("ReadOnly");
lDescriptor[nPropertyCount].Value <<= bReadOnly;
nPropertyCount++;
}
@@ -382,7 +381,7 @@ SwFilterDetect::~SwFilterDetect()
if ( !bRepairPackage && bRepairAllowed )
{
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString("RepairPackage");
+ lDescriptor[nPropertyCount].Name = OUString("RepairPackage");
lDescriptor[nPropertyCount].Value <<= bRepairAllowed;
nPropertyCount++;
bOpenAsTemplate = sal_True;
@@ -394,7 +393,7 @@ SwFilterDetect::~SwFilterDetect()
if ( nIndexOfTemplateFlag == -1 )
{
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString("AsTemplate");
+ lDescriptor[nPropertyCount].Name = OUString("AsTemplate");
lDescriptor[nPropertyCount].Value <<= bOpenAsTemplate;
nPropertyCount++;
}
@@ -408,7 +407,7 @@ SwFilterDetect::~SwFilterDetect()
if ( nIndexOfDocumentTitle == -1 )
{
lDescriptor.realloc( nPropertyCount + 1 );
- lDescriptor[nPropertyCount].Name = ::rtl::OUString("DocumentTitle");
+ lDescriptor[nPropertyCount].Name = OUString("DocumentTitle");
lDescriptor[nPropertyCount].Value <<= aDocumentTitle;
nPropertyCount++;
}
@@ -421,16 +420,16 @@ SwFilterDetect::~SwFilterDetect()
}
/* XServiceInfo */
-rtl::OUString SAL_CALL SwFilterDetect::getImplementationName() throw( UNORUNTIMEEXCEPTION )
+OUString SAL_CALL SwFilterDetect::getImplementationName() throw( RuntimeException )
{
return impl_getStaticImplementationName();
}
\
/* XServiceInfo */
-sal_Bool SAL_CALL SwFilterDetect::supportsService( const rtl::OUString& sServiceName ) throw( UNORUNTIMEEXCEPTION )
+sal_Bool SAL_CALL SwFilterDetect::supportsService( const OUString& sServiceName ) throw( RuntimeException )
{
- UNOSEQUENCE< rtl::OUString > seqServiceNames = getSupportedServiceNames();
- const rtl::OUString* pArray = seqServiceNames.getConstArray();
+ Sequence< OUString > seqServiceNames = getSupportedServiceNames();
+ const OUString* pArray = seqServiceNames.getConstArray();
for ( sal_Int32 nCounter=0; nCounter<seqServiceNames.getLength(); nCounter++ )
{
if ( pArray[nCounter] == sServiceName )
@@ -442,31 +441,31 @@ sal_Bool SAL_CALL SwFilterDetect::supportsService( const rtl::OUString& sService
}
/* XServiceInfo */
-UNOSEQUENCE< rtl::OUString > SAL_CALL SwFilterDetect::getSupportedServiceNames() throw( UNORUNTIMEEXCEPTION )
+Sequence< OUString > SAL_CALL SwFilterDetect::getSupportedServiceNames() throw( RuntimeException )
{
return impl_getStaticSupportedServiceNames();
}
/* Helper for XServiceInfo */
-UNOSEQUENCE< rtl::OUString > SwFilterDetect::impl_getStaticSupportedServiceNames()
+Sequence< OUString > SwFilterDetect::impl_getStaticSupportedServiceNames()
{
- UNOSEQUENCE< rtl::OUString > seqServiceNames( 3 );
- seqServiceNames.getArray() [0] = ::rtl::OUString("com.sun.star.frame.ExtendedTypeDetection" );
- seqServiceNames.getArray() [1] = ::rtl::OUString("com.sun.star.text.FormatDetector" );
- seqServiceNames.getArray() [2] = ::rtl::OUString("com.sun.star.text.W4WFormatDetector" );
+ Sequence< OUString > seqServiceNames( 3 );
+ seqServiceNames.getArray() [0] = OUString("com.sun.star.frame.ExtendedTypeDetection" );
+ seqServiceNames.getArray() [1] = OUString("com.sun.star.text.FormatDetector" );
+ seqServiceNames.getArray() [2] = OUString("com.sun.star.text.W4WFormatDetector" );
return seqServiceNames ;
}
/* Helper for XServiceInfo */
-rtl::OUString SwFilterDetect::impl_getStaticImplementationName()
+OUString SwFilterDetect::impl_getStaticImplementationName()
{
- return ::rtl::OUString("com.sun.star.comp.writer.FormatDetector" );
+ return OUString("com.sun.star.comp.writer.FormatDetector" );
}
/* Helper for registry */
-UNOREFERENCE< UNOXINTERFACE > SAL_CALL SwFilterDetect::impl_createInstance( const UNOREFERENCE< UNOXMULTISERVICEFACTORY >& xServiceManager ) throw( UNOEXCEPTION )
+Reference< XInterface > SAL_CALL SwFilterDetect::impl_createInstance( const Reference< XMultiServiceFactory >& xServiceManager ) throw( Exception )
{
- return UNOREFERENCE< UNOXINTERFACE >( *new SwFilterDetect( xServiceManager ) );
+ return Reference< XInterface >( *new SwFilterDetect( xServiceManager ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uno/swdetect.hxx b/sw/source/ui/uno/swdetect.hxx
index 2ea42dc55911..039bf0906d50 100644
--- a/sw/source/ui/uno/swdetect.hxx
+++ b/sw/source/ui/uno/swdetect.hxx
@@ -55,16 +55,12 @@ namespace com
class SfxMedium;
class SfxFilter;
-#define REFERENCE ::com::sun::star::uno::Reference
-#define SEQUENCE ::com::sun::star::uno::Sequence
-#define RUNTIME_EXCEPTION ::com::sun::star::uno::RuntimeException
-
-class SwFilterDetect : public ::cppu::WeakImplHelper2< ::com::sun::star::document::XExtendedFilterDetection, ::com::sun::star::lang::XServiceInfo >
+class SwFilterDetect : public ::cppu::WeakImplHelper2< css::document::XExtendedFilterDetection, css::lang::XServiceInfo >
{
static sal_uLong DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
static sal_uLong GlobDetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter );
public:
- SwFilterDetect( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
+ SwFilterDetect( const css::uno::Reference < css::lang::XMultiServiceFactory >& xFactory );
virtual ~SwFilterDetect();
SFX_DECL_XSERVICEINFO_NOFACTORY
@@ -72,7 +68,7 @@ public:
//----------------------------------------------------------------------------------
// XExtendedFilterDetect
//----------------------------------------------------------------------------------
- virtual ::rtl::OUString SAL_CALL detect( SEQUENCE< ::com::sun::star::beans::PropertyValue >& lDescriptor ) throw( RUNTIME_EXCEPTION );
+ virtual ::rtl::OUString SAL_CALL detect( css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ) throw( css::uno::RuntimeException );
};
#endif
diff --git a/sw/source/ui/uno/unomodule.cxx b/sw/source/ui/uno/unomodule.cxx
index 895cc5b115f5..815a2bb82cc2 100644
--- a/sw/source/ui/uno/unomodule.cxx
+++ b/sw/source/ui/uno/unomodule.cxx
@@ -29,17 +29,17 @@
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
-using namespace ::com::sun::star;
+using namespace css;
-::rtl::OUString SAL_CALL SwUnoModule_getImplementationName() throw( uno::RuntimeException )
+OUString SAL_CALL SwUnoModule_getImplementationName() throw( uno::RuntimeException )
{
- return rtl::OUString( "com.sun.star.comp.Writer.WriterModule" );
+ return OUString( "com.sun.star.comp.Writer.WriterModule" );
}
-uno::Sequence< rtl::OUString > SAL_CALL SwUnoModule_getSupportedServiceNames() throw( uno::RuntimeException )
+uno::Sequence< OUString > SAL_CALL SwUnoModule_getSupportedServiceNames() throw( uno::RuntimeException )
{
- uno::Sequence< rtl::OUString > aSeq( 1 );
- aSeq[0] = ::rtl::OUString("com.sun.star.text.ModuleDispatcher");
+ uno::Sequence< OUString > aSeq( 1 );
+ aSeq[0] = OUString("com.sun.star.text.ModuleDispatcher");
return aSeq;
}
@@ -102,11 +102,11 @@ void SAL_CALL SwUnoModule::removeStatusListener(
{
}
-SEQUENCE< REFERENCE< XDISPATCH > > SAL_CALL SwUnoModule::queryDispatches(
- const SEQUENCE< DISPATCHDESCRIPTOR >& seqDescripts ) throw( uno::RuntimeException )
+uno::Sequence< uno::Reference< frame::XDispatch > > SAL_CALL SwUnoModule::queryDispatches(
+ const uno::Sequence< frame::DispatchDescriptor >& seqDescripts ) throw( uno::RuntimeException )
{
sal_Int32 nCount = seqDescripts.getLength();
- SEQUENCE< REFERENCE< XDISPATCH > > lDispatcher( nCount );
+ uno::Sequence< uno::Reference< frame::XDispatch > > lDispatcher( nCount );
for( sal_Int32 i=0; i<nCount; ++i )
{
@@ -119,31 +119,31 @@ SEQUENCE< REFERENCE< XDISPATCH > > SAL_CALL SwUnoModule::queryDispatches(
}
// XDispatchProvider
-REFERENCE< XDISPATCH > SAL_CALL SwUnoModule::queryDispatch(
- const UNOURL& aURL, const rtl::OUString& /*sTargetFrameName*/,
+uno::Reference< frame::XDispatch > SAL_CALL SwUnoModule::queryDispatch(
+ const util::URL& aURL, const OUString& /*sTargetFrameName*/,
sal_Int32 /*eSearchFlags*/ ) throw( uno::RuntimeException )
{
- REFERENCE< XDISPATCH > xReturn;
+ uno::Reference< frame::XDispatch > xReturn;
SolarMutexGuard aGuard;
SwGlobals::ensure();
const SfxSlot* pSlot = SW_MOD()->GetInterface()->GetSlot( aURL.Complete );
if ( pSlot )
- xReturn = REFERENCE< XDISPATCH >(static_cast< XDISPATCH* >(this), uno::UNO_QUERY);
+ xReturn = uno::Reference< frame::XDispatch >(static_cast< frame::XDispatch* >(this), uno::UNO_QUERY);
return xReturn;
}
// XServiceInfo
-::rtl::OUString SAL_CALL SwUnoModule::getImplementationName( ) throw(uno::RuntimeException)
+OUString SAL_CALL SwUnoModule::getImplementationName( ) throw(uno::RuntimeException)
{
return SwUnoModule_getImplementationName();
}
-sal_Bool SAL_CALL SwUnoModule::supportsService( const ::rtl::OUString& sServiceName ) throw(uno::RuntimeException)
+sal_Bool SAL_CALL SwUnoModule::supportsService( const OUString& sServiceName ) throw(uno::RuntimeException)
{
- UNOSEQUENCE< rtl::OUString > seqServiceNames = getSupportedServiceNames();
- const rtl::OUString* pArray = seqServiceNames.getConstArray();
+ uno::Sequence< OUString > seqServiceNames = getSupportedServiceNames();
+ const OUString* pArray = seqServiceNames.getConstArray();
for ( sal_Int32 nCounter=0; nCounter<seqServiceNames.getLength(); nCounter++ )
{
if ( pArray[nCounter] == sServiceName )
@@ -154,7 +154,7 @@ sal_Bool SAL_CALL SwUnoModule::supportsService( const ::rtl::OUString& sServiceN
return sal_False ;
}
-uno::Sequence< ::rtl::OUString > SAL_CALL SwUnoModule::getSupportedServiceNames( ) throw(uno::RuntimeException)
+uno::Sequence< OUString > SAL_CALL SwUnoModule::getSupportedServiceNames( ) throw(uno::RuntimeException)
{
return SwUnoModule_getSupportedServiceNames();
}
diff --git a/sw/source/ui/uno/unomodule.hxx b/sw/source/ui/uno/unomodule.hxx
index c1757a4df72c..63f80f3b8eb1 100644
--- a/sw/source/ui/uno/unomodule.hxx
+++ b/sw/source/ui/uno/unomodule.hxx
@@ -48,42 +48,32 @@ namespace com
}
}
-#define REFERENCE ::com::sun::star::uno::Reference
-#define SEQUENCE ::com::sun::star::uno::Sequence
-#define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
-#define REFERENCE ::com::sun::star::uno::Reference
-#define SEQUENCE ::com::sun::star::uno::Sequence
-#define XDISPATCH ::com::sun::star::frame::XDispatch
-#define XNOTIFYINGDISPATCH ::com::sun::star::frame::XNotifyingDispatch
-#define UNOURL ::com::sun::star::util::URL
-#define DISPATCHDESCRIPTOR ::com::sun::star::frame::DispatchDescriptor
-
-class SwUnoModule : public ::cppu::WeakImplHelper3< ::com::sun::star::frame::XDispatchProvider, ::com::sun::star::frame::XNotifyingDispatch, ::com::sun::star::lang::XServiceInfo >
+class SwUnoModule : public ::cppu::WeakImplHelper3< css::frame::XDispatchProvider, css::frame::XNotifyingDispatch, css::lang::XServiceInfo >
{
- REFERENCE < ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
+ css::uno::Reference < css::lang::XMultiServiceFactory > m_xFactory;
public:
- SwUnoModule( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory )
+ SwUnoModule( const css::uno::Reference < css::lang::XMultiServiceFactory >& xFactory )
: m_xFactory( xFactory )
{}
// XNotifyingDispatch
- virtual void SAL_CALL dispatchWithNotification( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchResultListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL dispatchWithNotification( const css::util::URL& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs, const css::uno::Reference< css::frame::XDispatchResultListener >& xListener ) throw (css::uno::RuntimeException);
// XDispatch
- virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs ) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL dispatch( const css::util::URL& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs ) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener > & xControl, const css::util::URL& aURL) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener > & xControl, const css::util::URL& aURL) throw( css::uno::RuntimeException );
// XDispatchProvider
- virtual SEQUENCE< REFERENCE< XDISPATCH > > SAL_CALL queryDispatches( const SEQUENCE< DISPATCHDESCRIPTOR >& seqDescriptor ) throw( RUNTIMEEXCEPTION ) ;
- virtual REFERENCE< XDISPATCH > SAL_CALL queryDispatch( const UNOURL & aURL ,
+ virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& seqDescriptor ) throw( css::uno::RuntimeException ) ;
+ virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( const css::util::URL & aURL ,
const ::rtl::OUString & sTargetFrameName,
- sal_Int32 eSearchFlags ) throw( RUNTIMEEXCEPTION ) ;
+ sal_Int32 eSearchFlags ) throw( css::uno::RuntimeException ) ;
// XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(css::uno::RuntimeException);
+ virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(css::uno::RuntimeException);
};
#endif