[Libreoffice-commits] core.git: sd/source sw/source vcl/osx vcl/unx
Julien Nabet
serval2412 at yahoo.fr
Sat May 17 14:33:46 PDT 2014
sd/source/filter/eppt/pptx-text.cxx | 2
sd/source/filter/xml/sdxmlwrp.cxx | 2
sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx | 10 +-
sd/source/ui/unoidl/unomodel.cxx | 6 -
sd/source/ui/unoidl/unoobj.cxx | 8 +-
sd/source/ui/unoidl/unopage.cxx | 2
sd/source/ui/unoidl/unopback.cxx | 4 -
sw/source/core/access/acccell.cxx | 4 -
sw/source/core/access/accdoc.cxx | 8 +-
sw/source/core/access/accnotextframe.cxx | 2
sw/source/core/access/accpara.cxx | 22 ++---
sw/source/core/fields/docufld.cxx | 2
sw/source/core/fields/textapi.cxx | 6 -
sw/source/core/layout/atrfrm.cxx | 2
sw/source/core/uibase/uno/unoatxt.cxx | 4 -
sw/source/core/uibase/uno/unotxvw.cxx | 36 ++++-----
sw/source/core/uibase/utlui/uiitems.cxx | 2
sw/source/core/unocore/unocoll.cxx | 30 +++----
sw/source/core/unocore/unocrsrhelper.cxx | 12 +--
sw/source/core/unocore/unodraw.cxx | 56 +++++++-------
sw/source/core/unocore/unoredline.cxx | 8 +-
sw/source/core/unocore/unoredlines.cxx | 2
sw/source/core/unocore/unosett.cxx | 2
sw/source/core/unocore/unostyle.cxx | 26 +++---
sw/source/core/unocore/unotbl.cxx | 10 +-
sw/source/filter/html/htmlform.cxx | 14 +--
sw/source/filter/html/htmlforw.cxx | 32 ++++----
sw/source/filter/ww8/ww8par3.cxx | 3
sw/source/filter/xml/swxml.cxx | 6 -
sw/source/ui/index/cntex.cxx | 2
vcl/osx/DropTarget.cxx | 10 +-
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 4 -
vcl/unx/kde/UnxFilePicker.cxx | 2
vcl/unx/kde4/KDE4FilePicker.cxx | 4 -
34 files changed, 172 insertions(+), 173 deletions(-)
New commits:
commit 745a094a37e029afcf34ad1cf82b14f80062163f
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat May 17 23:32:29 2014 +0200
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part15
Change-Id: I38e855966598342eb2352e70e04f7a5e09e54f83
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index e2cd4b6..9980d84 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -853,7 +853,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
aGraphicURL = ( *(OUString*)pValue );
else if ( aPropName == "GraphicSize" )
{
- if ( pPropValue[ i ].Value.getValueType() == ::getCppuType( (::com::sun::star::awt::Size*)0) )
+ if ( pPropValue[ i ].Value.getValueType() == cppu::UnoType<com::sun::star::awt::Size>::get())
{
// don't cast awt::Size to Size as on 64-bits they are not the same.
::com::sun::star::awt::Size aSize;
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 3a92558..1befad1 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -445,7 +445,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
{ OUString("ProgressMax"), 0, ::cppu::UnoType<sal_Int32>::get(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
{ OUString("ProgressCurrent"), 0, ::cppu::UnoType<sal_Int32>::get(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
{ OUString("Preview"), 0, ::cppu::UnoType<sal_Bool>::get(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
- { OUString("PageLayouts"), 0, ::getCppuType((const uno::Reference< container::XNameAccess >*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
+ { OUString("PageLayouts"), 0, cppu::UnoType<container::XNameAccess>::get(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0},
{ OUString("PrivateData"), 0,
::getCppuType( (Reference<XInterface> *)0 ),
::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 },
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index ef184b8..1bede88 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -502,15 +502,15 @@ OUString SAL_CALL
// ...and add the additional type for the component, ...
const uno::Type aLangEventListenerType =
- ::getCppuType((const uno::Reference<lang::XEventListener>*)0);
+ cppu::UnoType<lang::XEventListener>::get();
const uno::Type aPropertyChangeListenerType =
- ::getCppuType((const uno::Reference<beans::XPropertyChangeListener>*)0);
+ cppu::UnoType<beans::XPropertyChangeListener>::get();
const uno::Type aWindowListenerType =
- ::getCppuType((const uno::Reference<awt::XWindowListener>*)0);
+ cppu::UnoType<awt::XWindowListener>::get();
const uno::Type aFocusListenerType =
- ::getCppuType((const uno::Reference<awt::XFocusListener>*)0);
+ cppu::UnoType<awt::XFocusListener>::get();
const uno::Type aEventBroadcaster =
- ::getCppuType((const uno::Reference<XAccessibleEventBroadcaster>*)0);
+ cppu::UnoType<XAccessibleEventBroadcaster>::get();
// ... and merge them all into one list.
sal_Int32 nTypeCount (aTypeList.getLength()),
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index a668869..e8d243f 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -187,11 +187,11 @@ const SvxItemPropertySet* ImplGetDrawModelPropertySet()
{ OUString(sUNO_Prop_TabStop), WID_MODEL_TABSTOP, ::cppu::UnoType<sal_Int32>::get(), 0, 0},
{ OUString(sUNO_Prop_VisibleArea), WID_MODEL_VISAREA, ::cppu::UnoType<awt::Rectangle>::get(), 0, 0},
{ OUString(sUNO_Prop_MapUnit), WID_MODEL_MAPUNIT, ::cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::READONLY, 0},
- { OUString(sUNO_Prop_ForbiddenCharacters), WID_MODEL_FORBCHARS, ::getCppuType((const uno::Reference< i18n::XForbiddenCharacters > *)0), beans::PropertyAttribute::READONLY, 0},
+ { OUString(sUNO_Prop_ForbiddenCharacters), WID_MODEL_FORBCHARS, cppu::UnoType<i18n::XForbiddenCharacters>::get(), beans::PropertyAttribute::READONLY, 0},
{ OUString(sUNO_Prop_AutomContFocus), WID_MODEL_CONTFOCUS, ::getBooleanCppuType(), 0, 0},
{ OUString(sUNO_Prop_ApplyFrmDsgnMode), WID_MODEL_DSGNMODE, ::getBooleanCppuType(), 0, 0},
- { OUString("BasicLibraries"), WID_MODEL_BASICLIBS, ::getCppuType((const uno::Reference< script::XLibraryContainer > *)0), beans::PropertyAttribute::READONLY, 0},
- { OUString("DialogLibraries"), WID_MODEL_DIALOGLIBS, ::getCppuType((const uno::Reference< script::XLibraryContainer > *)0), beans::PropertyAttribute::READONLY, 0},
+ { OUString("BasicLibraries"), WID_MODEL_BASICLIBS, cppu::UnoType<script::XLibraryContainer>::get(), beans::PropertyAttribute::READONLY, 0},
+ { OUString("DialogLibraries"), WID_MODEL_DIALOGLIBS, cppu::UnoType<script::XLibraryContainer>::get(), beans::PropertyAttribute::READONLY, 0},
{ OUString(sUNO_Prop_RuntimeUID), WID_MODEL_RUNTIMEUID, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0},
{ OUString(sUNO_Prop_HasValidSignatures), WID_MODEL_HASVALIDSIGNATURES, ::cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::READONLY, 0},
{ OUString("Fonts"), WID_MODEL_FONTS, ::getCppuType((uno::Sequence<uno::Any>*)0), beans::PropertyAttribute::READONLY, 0},
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 5de5206..a28043c 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -161,7 +161,7 @@ static SdTypesCache gImplTypesCache;
static const SfxItemPropertyMapEntry aImpress_SdXShapePropertyGraphicMap_Impl[] =
{
- { OUString("ImageMap"), WID_IMAGEMAP, ::getCppuType((const uno::Reference< container::XIndexContainer >*)0), 0, 0 },
+ { OUString("ImageMap"), WID_IMAGEMAP, cppu::UnoType<container::XIndexContainer>::get(), 0, 0 },
IMPRESS_MAP_ENTRIES
};
return aImpress_SdXShapePropertyGraphicMap_Impl;
@@ -196,7 +196,7 @@ static SdTypesCache gImplTypesCache;
{
static const SfxItemPropertyMapEntry aDraw_SdXShapePropertyGraphicMap_Impl[] =
{
- { OUString("ImageMap"), WID_IMAGEMAP, ::getCppuType((const uno::Reference< container::XIndexContainer >*)0), 0, 0 },
+ { OUString("ImageMap"), WID_IMAGEMAP, cppu::UnoType<container::XIndexContainer>::get(), 0, 0 },
DRAW_MAP_ENTRIES
};
return aDraw_SdXShapePropertyGraphicMap_Impl;
@@ -343,7 +343,7 @@ bool SdXShape::queryAggregation( const com::sun::star::uno::Type & rType, com::s
{
if( mpModel && mpModel ->IsImpressDocument() )
{
- if( rType == ::getCppuType(( const uno::Reference< document::XEventsSupplier >*)0) )
+ if( rType == cppu::UnoType<document::XEventsSupplier>::get())
{
aAny <<= uno::Reference< document::XEventsSupplier >(this);
return true;
@@ -370,7 +370,7 @@ uno::Sequence< uno::Type > SAL_CALL SdXShape::getTypes()
pTypes = new uno::Sequence< uno::Type >( mpShape->_getTypes() );
sal_uInt32 nCount = pTypes->getLength();
pTypes->realloc( nCount+1 );
- (*pTypes)[nCount] = ::getCppuType((const uno::Reference< lang::XTypeProvider>*)0);
+ (*pTypes)[nCount] = cppu::UnoType<lang::XTypeProvider>::get();
gImplTypesCache[ nObjId ] = pTypes;
}
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 35fcd9a..ebc9d65 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -160,7 +160,7 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( bool bImpress, PageKind eP
{ OUString(UNO_NAME_PAGE_NUMBER), WID_PAGE_NUMBER, ::cppu::UnoType<sal_Int16>::get(), beans::PropertyAttribute::READONLY, 0}, \
{ OUString(UNO_NAME_PAGE_ORIENTATION), WID_PAGE_ORIENT, ::cppu::UnoType<view::PaperOrientation>::get(),0, 0}, \
{ OUString(UNO_NAME_PAGE_WIDTH), WID_PAGE_WIDTH, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
- { OUString(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},\
+ { OUString(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},\
{ OUString("IsHeaderVisible"), WID_PAGE_HEADERVISIBLE, ::getBooleanCppuType(), 0, 0}, \
{ OUString("HeaderText"), WID_PAGE_HEADERTEXT, ::cppu::UnoType<OUString>::get(), 0, 0}, \
{ OUString("IsBackgroundDark"), WID_PAGE_ISDARK, ::getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0}, \
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index d870275..399d363 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -152,8 +152,8 @@ void SdUnoPageBackground::fillItemSet( SdDrawDocument* pDoc, SfxItemSet& rSet )
break;
case XATTR_FILLBITMAP :
{
- if ( ( ( pAny->getValueType() == ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0) ) ||
- ( pAny->getValueType() == ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >*)0) ) ) &&
+ if ( ( ( pAny->getValueType() == cppu::UnoType<com::sun::star::awt::XBitmap>::get()) ||
+ ( pAny->getValueType() == cppu::UnoType<com::sun::star::graphic::XGraphic>::get()) ) &&
( aIt->nMemberId == MID_BITMAP ) )
{
setPropertyValue( aPropertyName, *pAny );
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index 3c8188d..abad380 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -289,14 +289,14 @@ void SwAccessibleCell::InvalidatePosOrSize( const SwRect& rOldBox )
uno::Any SwAccessibleCell::queryInterface( const uno::Type& rType )
throw( uno::RuntimeException, std::exception )
{
- if (rType == ::getCppuType((const uno::Reference<XAccessibleExtendedAttributes>*)0))
+ if (rType == cppu::UnoType<XAccessibleExtendedAttributes>::get())
{
uno::Any aR;
aR <<= uno::Reference<XAccessibleExtendedAttributes>(this);
return aR;
}
- if (rType == ::getCppuType((const uno::Reference<XAccessibleSelection>*)0))
+ if (rType == cppu::UnoType<XAccessibleSelection>::get())
{
uno::Any aR;
aR <<= uno::Reference<XAccessibleSelection>(this);
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index f9eb93d..bb34b83 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -467,17 +467,17 @@ uno::Any SwAccessibleDocument::queryInterface(
aRet <<= aSelect;
}
//Add XEventListener interface support.
- else if ( (rType == ::getCppuType((uno::Reference<com::sun::star::document::XEventListener> *)NULL)) )
+ else if ( (rType == cppu::UnoType<com::sun::star::document::XEventListener>::get()) )
{
uno::Reference<com::sun::star::document::XEventListener> aSelect = this;
aRet <<= aSelect;
}
- else if ( rType == ::getCppuType((uno::Reference<XAccessibleExtendedAttributes> *)NULL) )
+ else if ( rType == cppu::UnoType<XAccessibleExtendedAttributes>::get())
{
uno::Reference<XAccessibleExtendedAttributes> aAttribute = this;
aRet <<= aAttribute;
}
- else if(rType == ::getCppuType((uno::Reference<XAccessibleGetAccFlowTo> *)NULL) )
+ else if(rType == cppu::UnoType<XAccessibleGetAccFlowTo>::get())
{
uno::Reference<XAccessibleGetAccFlowTo> AccFlowTo = this;
aRet <<= AccFlowTo;
@@ -501,7 +501,7 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleDocument::getTypes()
uno::Type* pTypes = aTypes.getArray();
pTypes[nIndex] = cppu::UnoType<XAccessibleSelection>::get();
//Add XEventListener interface support.
- pTypes[nIndex + 1 ] = ::getCppuType( static_cast< uno::Reference< com::sun::star::document::XEventListener > * >( 0 ) );
+ pTypes[nIndex + 1 ] = cppu::UnoType<com::sun::star::document::XEventListener>::get();
return aTypes;
}
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index 20035fd..c88eef7 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -209,7 +209,7 @@ uno::Any SAL_CALL SwAccessibleNoTextFrame::queryInterface( const uno::Type& aTyp
aAny <<= xImage;
return aAny;
}
- else if ( aType == ::getCppuType((uno::Reference<XAccessibleHypertext> *)0) )
+ else if ( aType == cppu::UnoType<XAccessibleHypertext>::get())
{
uno::Reference<XAccessibleHypertext> aAccHypertext = this;
uno::Any aAny;
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index a02e4a0..5b0ab76 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1194,52 +1194,52 @@ uno::Any SwAccessibleParagraph::queryInterface( const uno::Type& rType )
throw (uno::RuntimeException, std::exception)
{
uno::Any aRet;
- if ( rType == ::getCppuType((uno::Reference<XAccessibleText> *)0) )
+ if ( rType == cppu::UnoType<XAccessibleText>::get())
{
uno::Reference<XAccessibleText> aAccText = (XAccessibleText *) *this; // resolve ambiguity
aRet <<= aAccText;
}
- else if ( rType == ::getCppuType((uno::Reference<XAccessibleEditableText> *)0) )
+ else if ( rType == cppu::UnoType<XAccessibleEditableText>::get())
{
uno::Reference<XAccessibleEditableText> aAccEditText = this;
aRet <<= aAccEditText;
}
- else if ( rType == ::getCppuType((uno::Reference<XAccessibleSelection> *)0) )
+ else if ( rType == cppu::UnoType<XAccessibleSelection>::get())
{
uno::Reference<XAccessibleSelection> aAccSel = this;
aRet <<= aAccSel;
}
- else if ( rType == ::getCppuType((uno::Reference<XAccessibleHypertext> *)0) )
+ else if ( rType == cppu::UnoType<XAccessibleHypertext>::get())
{
uno::Reference<XAccessibleHypertext> aAccHyp = this;
aRet <<= aAccHyp;
}
// #i63870#
// add interface com::sun:star:accessibility::XAccessibleTextAttributes
- else if ( rType == ::getCppuType((uno::Reference<XAccessibleTextAttributes> *)0) )
+ else if ( rType == cppu::UnoType<XAccessibleTextAttributes>::get())
{
uno::Reference<XAccessibleTextAttributes> aAccTextAttr = this;
aRet <<= aAccTextAttr;
}
// #i89175#
// add interface com::sun:star:accessibility::XAccessibleTextMarkup
- else if ( rType == ::getCppuType((uno::Reference<XAccessibleTextMarkup> *)0) )
+ else if ( rType == cppu::UnoType<XAccessibleTextMarkup>::get())
{
uno::Reference<XAccessibleTextMarkup> aAccTextMarkup = this;
aRet <<= aAccTextMarkup;
}
// add interface com::sun:star:accessibility::XAccessibleMultiLineText
- else if ( rType == ::getCppuType((uno::Reference<XAccessibleMultiLineText> *)0) )
+ else if ( rType == cppu::UnoType<XAccessibleMultiLineText>::get())
{
uno::Reference<XAccessibleMultiLineText> aAccMultiLineText = this;
aRet <<= aAccMultiLineText;
}
- else if ( rType == ::getCppuType((uno::Reference<XAccessibleTextSelection> *)NULL) )
+ else if ( rType == cppu::UnoType<XAccessibleTextSelection>::get())
{
uno::Reference< com::sun::star::accessibility::XAccessibleTextSelection > aTextExtension = this;
aRet <<= aTextExtension;
}
- else if ( rType == ::getCppuType((uno::Reference<XAccessibleExtendedAttributes> *)NULL) )
+ else if ( rType == cppu::UnoType<XAccessibleExtendedAttributes>::get())
{
uno::Reference<XAccessibleExtendedAttributes> xAttr = this;
aRet <<= xAttr;
@@ -1269,7 +1269,7 @@ uno::Sequence< uno::Type > SAL_CALL SwAccessibleParagraph::getTypes() throw(uno:
pTypes[nIndex++] = ::cppu::UnoType<XAccessibleSelection>::get();
pTypes[nIndex++] = cppu::UnoType<XAccessibleTextMarkup>::get();
pTypes[nIndex++] = cppu::UnoType<XAccessibleMultiLineText>::get();
- pTypes[nIndex] = ::getCppuType( static_cast< uno::Reference< XAccessibleHypertext > * >( 0 ) );
+ pTypes[nIndex] = cppu::UnoType<XAccessibleHypertext>::get();
return aTypes;
}
@@ -2384,7 +2384,7 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex,
if (pNumRule)
{
uno::Reference< container::XIndexReplace > xNum = new SwXNumberingRules(*pNumRule);
- aVal.setValue(&xNum, ::getCppuType((const uno::Reference< container::XIndexReplace >*)0));
+ aVal.setValue(&xNum, cppu::UnoType<container::XIndexReplace>::get());
}
rValue.Value <<= aVal;
}
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index c3c47bc..2ba6e71 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -257,7 +257,7 @@ bool SwPageNumberField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
eType = text::PageNumberType_PREV;
else if(nSubType == PG_NEXT)
eType = text::PageNumberType_NEXT;
- rAny.setValue(&eType, ::getCppuType((const text::PageNumberType*)0));
+ rAny.setValue(&eType, cppu::UnoType<text::PageNumberType>::get());
}
break;
case FIELD_PROP_PAR1:
diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx
index 944b48e..719c341 100644
--- a/sw/source/core/fields/textapi.cxx
+++ b/sw/source/core/fields/textapi.cxx
@@ -38,13 +38,13 @@ static const SvxItemPropertySet* ImplGetSvxTextPortionPropertySet()
SVX_UNOEDIT_OUTLINER_PROPERTIES,
SVX_UNOEDIT_PARA_PROPERTIES,
{OUString("TextField"), EE_FEATURE_FIELD,
- ::getCppuType((const uno::Reference< text::XTextField >*)0), beans::PropertyAttribute::READONLY, 0 },
+ cppu::UnoType<text::XTextField>::get(), beans::PropertyAttribute::READONLY, 0 },
{OUString("TextPortionType"), WID_PORTIONTYPE,
::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 },
{OUString("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS,
- ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0), 0, 0},
+ cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
{OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS,
- ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0), 0, 0},
+ cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
static SvxItemPropertySet aSvxTextPortionPropertySet( aSvxTextPortionPropertyMap, EditEngine::GetGlobalItemPool() );
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 06e02ef..a829e74 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1025,7 +1025,7 @@ bool SwFmtCol::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
else
{
uno::Reference< text::XTextColumns > xCols = new SwXTextColumns(*this);
- rVal.setValue(&xCols, ::getCppuType((uno::Reference< text::XTextColumns>*)0));
+ rVal.setValue(&xCols, cppu::UnoType<text::XTextColumns>::get());
}
return true;
}
diff --git a/sw/source/core/uibase/uno/unoatxt.cxx b/sw/source/core/uibase/uno/unoatxt.cxx
index 4c31e13..fad89f4 100644
--- a/sw/source/core/uibase/uno/unoatxt.cxx
+++ b/sw/source/core/uibase/uno/unoatxt.cxx
@@ -106,7 +106,7 @@ uno::Any SwXAutoTextContainer::getByIndex(sal_Int32 nIndex)
uno::Type SwXAutoTextContainer::getElementType(void) throw( uno::RuntimeException, std::exception )
{
- return ::getCppuType((const uno::Reference<text::XAutoTextGroup>*)0);
+ return cppu::UnoType<text::XAutoTextGroup>::get();
}
@@ -536,7 +536,7 @@ uno::Any SwXAutoTextGroup::getByIndex(sal_Int32 nIndex)
uno::Type SwXAutoTextGroup::getElementType(void) throw( uno::RuntimeException, std::exception )
{
- return ::getCppuType((uno::Reference<text::XAutoTextEntry>*)0);
+ return cppu::UnoType<text::XAutoTextEntry>::get();
}
diff --git a/sw/source/core/uibase/uno/unotxvw.cxx b/sw/source/core/uibase/uno/unotxvw.cxx
index 62e0bc6..13c7df0 100644
--- a/sw/source/core/uibase/uno/unotxvw.cxx
+++ b/sw/source/core/uibase/uno/unotxvw.cxx
@@ -139,14 +139,14 @@ Sequence< uno::Type > SAL_CALL SwXTextView::getTypes( ) throw(uno::RuntimeExcep
aBaseTypes.getLength() + 8 );
uno::Type* pBaseTypes = aBaseTypes.getArray();
- pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XSelectionSupplier >*)0);
- pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XServiceInfo >*)0);
- pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XFormLayerAccess >*)0);
- pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XTextViewCursorSupplier>*)0);
- pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XViewSettingsSupplier >*)0);
- pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XRubySelection >*)0);
- pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<XPropertySet >*)0);
- pBaseTypes[nIndex++] = ::getCppuType((uno::Reference<datatransfer::XTransferableSupplier >*)0);
+ pBaseTypes[nIndex++] = cppu::UnoType<XSelectionSupplier>::get();
+ pBaseTypes[nIndex++] = cppu::UnoType<XServiceInfo>::get();
+ pBaseTypes[nIndex++] = cppu::UnoType<XFormLayerAccess>::get();
+ pBaseTypes[nIndex++] = cppu::UnoType<XTextViewCursorSupplier>::get();
+ pBaseTypes[nIndex++] = cppu::UnoType<XViewSettingsSupplier>::get();
+ pBaseTypes[nIndex++] = cppu::UnoType<XRubySelection>::get();
+ pBaseTypes[nIndex++] = cppu::UnoType<XPropertySet>::get();
+ pBaseTypes[nIndex++] = cppu::UnoType<datatransfer::XTransferableSupplier>::get();
return aBaseTypes;
}
@@ -169,47 +169,47 @@ uno::Any SAL_CALL SwXTextView::queryInterface( const uno::Type& aType )
throw (RuntimeException, std::exception)
{
uno::Any aRet;
- if(aType == ::getCppuType((uno::Reference<view::XSelectionSupplier >*)0))
+ if(aType == cppu::UnoType<view::XSelectionSupplier>::get())
{
uno::Reference<view::XSelectionSupplier> xRet = this;
aRet.setValue(&xRet, aType);
}
- else if(aType == ::getCppuType((uno::Reference<lang::XServiceInfo >*)0))
+ else if(aType == cppu::UnoType<lang::XServiceInfo>::get())
{
uno::Reference<lang::XServiceInfo> xRet = this;
aRet.setValue(&xRet, aType);
}
- else if(aType == ::getCppuType((uno::Reference<view::XControlAccess >*)0))
+ else if(aType == cppu::UnoType<view::XControlAccess>::get())
{
uno::Reference<view::XControlAccess> xRet = this;
aRet.setValue(&xRet, aType);
}
- else if(aType == ::getCppuType((uno::Reference<view::XFormLayerAccess >*)0))
+ else if(aType == cppu::UnoType<view::XFormLayerAccess>::get())
{
uno::Reference<view::XFormLayerAccess> xRet = this;
aRet.setValue(&xRet, aType);
}
- else if(aType == ::getCppuType((uno::Reference<text::XTextViewCursorSupplier>*)0))
+ else if(aType == cppu::UnoType<text::XTextViewCursorSupplier>::get())
{
uno::Reference<text::XTextViewCursorSupplier> xRet = this;
aRet.setValue(&xRet, aType);
}
- else if(aType == ::getCppuType((uno::Reference<view::XViewSettingsSupplier >*)0))
+ else if(aType == cppu::UnoType<view::XViewSettingsSupplier>::get())
{
uno::Reference<view::XViewSettingsSupplier> xRet = this;
aRet.setValue(&xRet, aType);
}
- else if(aType == ::getCppuType((uno::Reference<XRubySelection>*)0))
+ else if(aType == cppu::UnoType<XRubySelection>::get())
{
uno::Reference<XRubySelection> xRet = this;
aRet.setValue(&xRet, aType);
}
- else if(aType == ::getCppuType((uno::Reference<XPropertySet>*)0))
+ else if(aType == cppu::UnoType<XPropertySet>::get())
{
uno::Reference<XPropertySet> xRet = this;
aRet.setValue(&xRet, aType);
}
- else if(aType == ::getCppuType((uno::Reference<datatransfer::XTransferableSupplier >*)0))
+ else if(aType == cppu::UnoType<datatransfer::XTransferableSupplier>::get())
{
uno::Reference<datatransfer::XTransferableSupplier> xRet = this;
aRet.setValue(&xRet, aType);
@@ -419,7 +419,7 @@ uno::Any SwXTextView::getSelection()
default:;//prevent warning
}
}
- uno::Any aRet(&aRef, ::getCppuType((uno::Reference<uno::XInterface>*)0));
+ uno::Any aRet(&aRef, cppu::UnoType<uno::XInterface>::get());
return aRet;
}
diff --git a/sw/source/core/uibase/utlui/uiitems.cxx b/sw/source/core/uibase/utlui/uiitems.cxx
index de5d2c0..a819ffc 100644
--- a/sw/source/core/uibase/utlui/uiitems.cxx
+++ b/sw/source/core/uibase/utlui/uiitems.cxx
@@ -262,7 +262,7 @@ bool SwUINumRuleItem::operator==( const SfxPoolItem& rAttr ) const
bool SwUINumRuleItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
{
uno::Reference< container::XIndexReplace >xRules = new SwXNumberingRules(*pRule);
- rVal.setValue(&xRules, ::getCppuType((uno::Reference< container::XIndexReplace>*)0));
+ rVal.setValue(&xRules, cppu::UnoType<container::XIndexReplace>::get());
return true;
}
bool SwUINumRuleItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 7229102..42f0a1e 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -871,7 +871,7 @@ uno::Any SAL_CALL SwXTextTables::getByIndex(sal_Int32 nIndex)
SwFrmFmt& rFmt = GetDoc()->GetTblFrmFmt(nIndex, true);
uno::Reference< XTextTable > xTbl = SwXTextTables::GetObject(rFmt);
aRet.setValue( &xTbl,
- ::getCppuType((uno::Reference< XTextTable>*)0));
+ cppu::UnoType<XTextTable>::get());
}
else
throw IndexOutOfBoundsException();
@@ -897,7 +897,7 @@ uno::Any SwXTextTables::getByName(const OUString& rItemName)
{
xTbl = SwXTextTables::GetObject(rFmt);
aRet.setValue(&xTbl,
- ::getCppuType(( uno::Reference< XTextTable >*)0));
+ cppu::UnoType<XTextTable>::get());
break;
}
}
@@ -957,7 +957,7 @@ uno::Type SAL_CALL
SwXTextTables::getElementType( )
throw(uno::RuntimeException, std::exception)
{
- return ::getCppuType((uno::Reference<XTextTable>*)0);
+ return cppu::UnoType<XTextTable>::get();
}
sal_Bool SwXTextTables::hasElements(void) throw( uno::RuntimeException, std::exception )
@@ -1268,11 +1268,11 @@ uno::Type SAL_CALL SwXFrames::getElementType() throw(uno::RuntimeException, std:
switch(eType)
{
case FLYCNTTYPE_FRM:
- return ::getCppuType((uno::Reference<XTextFrame>*)0);
+ return cppu::UnoType<XTextFrame>::get();
case FLYCNTTYPE_GRF:
- return ::getCppuType((uno::Reference<XTextContent>*)0);
+ return cppu::UnoType<XTextContent>::get();
case FLYCNTTYPE_OLE:
- return ::getCppuType((uno::Reference<XEmbeddedObjectSupplier>*)0);
+ return cppu::UnoType<XEmbeddedObjectSupplier>::get();
default:
return uno::Type();
}
@@ -1476,7 +1476,7 @@ uno::Any SwXTextSections::getByName(const OUString& Name)
&& (aName == pFmt->GetSection()->GetSectionName()))
{
xSect = GetObject(*pFmt);
- aRet.setValue(&xSect, ::getCppuType((uno::Reference<XTextSection>*)0));
+ aRet.setValue(&xSect, cppu::UnoType<XTextSection>::get());
break;
}
}
@@ -1550,7 +1550,7 @@ sal_Bool SwXTextSections::hasByName(const OUString& rName)
uno::Type SAL_CALL SwXTextSections::getElementType() throw(uno::RuntimeException, std::exception)
{
- return ::getCppuType((uno::Reference<XTextSection>*)0);
+ return cppu::UnoType<XTextSection>::get();
}
sal_Bool SwXTextSections::hasElements(void) throw( uno::RuntimeException, std::exception )
@@ -1705,7 +1705,7 @@ sal_Bool SwXBookmarks::hasByName(const OUString& rName)
uno::Type SAL_CALL SwXBookmarks::getElementType()
throw(uno::RuntimeException, std::exception)
{
- return ::getCppuType((uno::Reference<XTextContent>*)0);
+ return cppu::UnoType<XTextContent>::get();
}
sal_Bool SwXBookmarks::hasElements(void)
@@ -1757,7 +1757,7 @@ uno::Any SwXNumberingRulesCollection::getByIndex(sal_Int32 nIndex)
if ( nIndex < (sal_Int32)GetDoc()->GetNumRuleTbl().size() )
{
xRef = new SwXNumberingRules( *GetDoc()->GetNumRuleTbl()[ static_cast< sal_uInt16 >(nIndex) ], GetDoc());
- aRet.setValue(&xRef, ::getCppuType((uno::Reference<XIndexReplace>*)0));
+ aRet.setValue(&xRef, cppu::UnoType<XIndexReplace>::get());
}
if(!xRef.is())
@@ -1770,7 +1770,7 @@ uno::Any SwXNumberingRulesCollection::getByIndex(sal_Int32 nIndex)
uno::Type SAL_CALL SwXNumberingRulesCollection::getElementType() throw(uno::RuntimeException, std::exception)
{
- return ::getCppuType((uno::Reference<XIndexReplace>*)0);
+ return cppu::UnoType<XIndexReplace>::get();
}
sal_Bool SwXNumberingRulesCollection::hasElements(void) throw( uno::RuntimeException, std::exception )
@@ -1864,7 +1864,7 @@ uno::Any SwXFootnotes::getByIndex(sal_Int32 nIndex)
uno::Type SAL_CALL SwXFootnotes::getElementType() throw(uno::RuntimeException, std::exception)
{
- return ::getCppuType((uno::Reference<XFootnote>*)0);
+ return cppu::UnoType<XFootnote>::get();
}
sal_Bool SwXFootnotes::hasElements(void) throw( uno::RuntimeException, std::exception )
@@ -1929,7 +1929,7 @@ uno::Any SwXReferenceMarks::getByIndex(sal_Int32 nIndex)
if(pMark)
{
xRef = SwXReferenceMarks::GetObject( GetDoc(), pMark );
- aRet.setValue(&xRef, ::getCppuType((uno::Reference<XTextContent>*)0));
+ aRet.setValue(&xRef, cppu::UnoType<XTextContent>::get());
}
}
if(!xRef.is())
@@ -1948,7 +1948,7 @@ uno::Any SwXReferenceMarks::getByName(const OUString& rName)
if(pMark)
{
uno::Reference< XTextContent > xRef = SwXReferenceMarks::GetObject( GetDoc(), pMark );
- aRet.setValue(&xRef, ::getCppuType((uno::Reference<XTextContent>*)0));
+ aRet.setValue(&xRef, cppu::UnoType<XTextContent>::get());
}
else
throw NoSuchElementException();
@@ -1986,7 +1986,7 @@ sal_Bool SwXReferenceMarks::hasByName(const OUString& rName) throw( uno::Runtime
uno::Type SAL_CALL SwXReferenceMarks::getElementType() throw(uno::RuntimeException, std::exception)
{
- return ::getCppuType((uno::Reference<XTextContent>*)0);
+ return cppu::UnoType<XTextContent>::get();
}
sal_Bool SwXReferenceMarks::hasElements(void) throw( uno::RuntimeException, std::exception )
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index c74bc9f..292f6d1 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -549,13 +549,13 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
if(FN_UNO_TEXT_TABLE == rEntry.nWID)
{
uno::Reference< XTextTable > xTable = SwXTextTables::GetObject(*pTableFmt);
- pAny->setValue(&xTable, ::getCppuType((uno::Reference<XTextTable>*)0));
+ pAny->setValue(&xTable, cppu::UnoType<XTextTable>::get());
}
else
{
SwTableBox* pBox = pSttNode->GetTblBox();
uno::Reference< XCell > xCell = SwXCell::CreateXCell(pTableFmt, pBox);
- pAny->setValue(&xCell, ::getCppuType((uno::Reference<XCell>*)0));
+ pAny->setValue(&xCell, cppu::UnoType<XCell>::get());
}
}
}
@@ -574,7 +574,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
if( pAny )
{
uno::Reference< XTextFrame > xFrm = (SwXTextFrame*) SwXFrames::GetObject(*pFmt, FLYCNTTYPE_FRM);
- pAny->setValue(&xFrm, ::getCppuType((uno::Reference<XTextFrame>*)0));
+ pAny->setValue(&xFrm, cppu::UnoType<XTextFrame>::get());
}
}
else
@@ -589,7 +589,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
if( pAny )
{
uno::Reference< XTextSection > xSect = SwXTextSections::GetObject( *pSect->GetFmt() );
- pAny->setValue(&xSect, ::getCppuType((uno::Reference<XTextSection>*)0) );
+ pAny->setValue(&xSect, cppu::UnoType<XTextSection>::get());
}
}
else
@@ -636,7 +636,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
{ // hmm... can only return 1 here
const SwFmtRefMark& rRef = (*marks.begin())->GetRefMark();
uno::Reference< XTextContent > xRef = SwXReferenceMarks::GetObject( rPam.GetDoc(), &rRef );
- pAny->setValue(&xRef, ::getCppuType((uno::Reference<XTextContent>*)0));
+ pAny->setValue(&xRef, cppu::UnoType<XTextContent>::get());
}
}
else
@@ -890,7 +890,7 @@ void getNumberingProperty(SwPaM& rPam, PropertyState& eState, Any * pAny )
{
uno::Reference< XIndexReplace > xNum = new SwXNumberingRules(*pNumRule);
if ( pAny )
- pAny->setValue(&xNum, ::getCppuType((const uno::Reference<XIndexReplace>*)0));
+ pAny->setValue(&xNum, cppu::UnoType<XIndexReplace>::get());
eState = PropertyState_DIRECT_VALUE;
}
else
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 229ae11..19b1c5a 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -501,7 +501,7 @@ uno::Sequence< uno::Type > SwXDrawPage::getTypes() throw( uno::RuntimeException,
{
pPageTypes[nIndex++] = pSvxTypes[nPos];
}
- pPageTypes[nIndex] = ::getCppuType((uno::Reference<form::XFormsSupplier2>*)0);
+ pPageTypes[nIndex] = cppu::UnoType<form::XFormsSupplier2>::get();
return aPageTypes;
}
@@ -535,7 +535,7 @@ uno::Any SwXDrawPage::getByIndex(sal_Int32 nIndex)
uno::Type SwXDrawPage::getElementType(void) throw( uno::RuntimeException, std::exception )
{
- return ::getCppuType((const uno::Reference<drawing::XShape>*)0);
+ return cppu::UnoType<drawing::XShape>::get();
}
sal_Bool SwXDrawPage::hasElements(void) throw( uno::RuntimeException, std::exception )
@@ -820,8 +820,8 @@ SwFmDrawPage* SwXDrawPage::GetSvxPage()
// Objekt, sonst wird es geloescht.
pDrawPage = new SwFmDrawPage(pPage);
uno::Reference< drawing::XDrawPage > xPage = pDrawPage;
- uno::Any aAgg = xPage->queryInterface(::getCppuType((uno::Reference< uno::XAggregation >*)0));
- if(aAgg.getValueType() == ::getCppuType((uno::Reference< uno::XAggregation >*)0))
+ uno::Any aAgg = xPage->queryInterface(cppu::UnoType<uno::XAggregation>::get());
+ if(aAgg.getValueType() == cppu::UnoType<uno::XAggregation>::get())
xPageAgg = *(uno::Reference< uno::XAggregation >*)aAgg.getValue();
}
if( xPageAgg.is() )
@@ -860,7 +860,7 @@ sal_Int64 SAL_CALL SwXShape::getSomething( const uno::Sequence< sal_Int8 >& rId
if( xShapeAgg.is() )
{
- const uno::Type& rTunnelType = ::getCppuType((uno::Reference<lang::XUnoTunnel>*)0 );
+ const uno::Type& rTunnelType = cppu::UnoType<lang::XUnoTunnel>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rTunnelType );
if(aAgg.getValueType() == rTunnelType)
{
@@ -889,7 +889,7 @@ SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
{
if(xShape.is()) // default Ctor
{
- const uno::Type& rAggType = ::getCppuType((const uno::Reference< uno::XAggregation >*)0);
+ const uno::Type& rAggType = cppu::UnoType<uno::XAggregation>::get();
//aAgg contains a reference of the SvxShape!
{
uno::Any aAgg = xShape->queryInterface(rAggType);
@@ -898,7 +898,7 @@ SwXShape::SwXShape(uno::Reference< uno::XInterface > & xShape) :
// #i31698#
if ( xShapeAgg.is() )
{
- xShapeAgg->queryAggregation( ::getCppuType((uno::Reference< drawing::XShape >*)0) ) >>= mxShape;
+ xShapeAgg->queryAggregation( cppu::UnoType<drawing::XShape>::get()) >>= mxShape;
OSL_ENSURE( mxShape.is(),
"<SwXShape::SwXShape(..)> - no XShape found at <xShapeAgg>" );
}
@@ -980,7 +980,7 @@ uno::Any SwXShape::queryInterface( const uno::Type& aType ) throw( uno::RuntimeE
// correct object instance.
if(!aRet.hasValue() && xShapeAgg.is())
{
- if(aType == ::getCppuType((uno::Reference<XShape>*)0))
+ if(aType == cppu::UnoType<XShape>::get())
aRet <<= uno::Reference<XShape>(this);
else
aRet = xShapeAgg->queryAggregation(aType);
@@ -993,7 +993,7 @@ uno::Sequence< uno::Type > SwXShape::getTypes( ) throw(uno::RuntimeException, s
uno::Sequence< uno::Type > aRet = SwXShapeBaseClass::getTypes();
if(xShapeAgg.is())
{
- uno::Any aProv = xShapeAgg->queryAggregation(::getCppuType((uno::Reference< XTypeProvider >*)0));
+ uno::Any aProv = xShapeAgg->queryAggregation(cppu::UnoType<XTypeProvider>::get());
if(aProv.hasValue())
{
uno::Reference< XTypeProvider > xAggProv;
@@ -1023,7 +1023,7 @@ uno::Reference< beans::XPropertySetInfo > SwXShape::getPropertySetInfo(void) th
uno::Reference< beans::XPropertySetInfo > aRet;
if(xShapeAgg.is())
{
- const uno::Type& rPropSetType = ::getCppuType((const uno::Reference< beans::XPropertySet >*)0);
+ const uno::Type& rPropSetType = cppu::UnoType<beans::XPropertySet>::get();
uno::Any aPSet = xShapeAgg->queryAggregation( rPropSetType );
if(aPSet.getValueType() == rPropSetType && aPSet.getValue())
{
@@ -1352,7 +1352,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
case FN_TEXT_RANGE:
{
const uno::Type rTextRangeType =
- ::getCppuType((uno::Reference< text::XTextRange>*)0);
+ cppu::UnoType<text::XTextRange>::get();
if(aValue.getValueType() == rTextRangeType)
{
uno::Reference< text::XTextRange > & rRange = pImpl->GetTextRange();
@@ -1392,7 +1392,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
{
uno::Reference< beans::XPropertySet > xPrSet;
const uno::Type& rPSetType =
- ::getCppuType((const uno::Reference< beans::XPropertySet >*)0);
+ cppu::UnoType<beans::XPropertySet>::get();
uno::Any aPSet = xShapeAgg->queryAggregation(rPSetType);
if(aPSet.getValueType() != rPSetType || !aPSet.getValue())
throw uno::RuntimeException();
@@ -1460,7 +1460,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
Point aPt = pObj->GetAnchorPos();
awt::Point aPoint( convertTwipToMm100( aPt.X() ),
convertTwipToMm100( aPt.Y() ) );
- aRet.setValue(&aPoint, ::getCppuType( (awt::Point*)0 ));
+ aRet.setValue(&aPoint, cppu::UnoType<awt::Point>::get());
}
}
// #i26791# - special handling for FN_TEXT_RANGE
@@ -1483,7 +1483,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
*pFmt->GetDoc(),
*aAnchor.GetCntntAnchor(),
0L );
- aRet.setValue(&xTextRange, ::getCppuType((uno::Reference<text::XTextRange>*)0));
+ aRet.setValue(&xTextRange, cppu::UnoType<text::XTextRange>::get());
}
else
{
@@ -1579,7 +1579,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
pItem = pImpl->GetSurround();
break;
case FN_TEXT_RANGE :
- aRet.setValue(&pImpl->GetTextRange(), ::getCppuType((uno::Reference<text::XTextRange>*)0));
+ aRet.setValue(&pImpl->GetTextRange(), cppu::UnoType<text::XTextRange>::get());
break;
case RES_OPAQUE :
aRet.setValue(&pImpl->GetOpaque(), ::getBooleanCppuType());
@@ -1587,7 +1587,7 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName)
case FN_ANCHOR_POSITION :
{
awt::Point aPoint;
- aRet.setValue(&aPoint, ::getCppuType( (awt::Point*)0 ));
+ aRet.setValue(&aPoint, cppu::UnoType<awt::Point>::get());
}
break;
// #i26791#
@@ -1682,7 +1682,7 @@ uno::Any SwXShape::_getPropAtAggrObj( const OUString& _rPropertyName )
uno::Reference< beans::XPropertySet > xPrSet;
const uno::Type& rPSetType =
- ::getCppuType((const uno::Reference< beans::XPropertySet >*)0);
+ cppu::UnoType<beans::XPropertySet>::get();
uno::Any aPSet = xShapeAgg->queryAggregation(rPSetType);
if ( aPSet.getValueType() != rPSetType || !aPSet.getValue() )
{
@@ -1796,7 +1796,7 @@ uno::Sequence< beans::PropertyState > SwXShape::getPropertyStates(
{
if(!xShapePrState.is())
{
- const uno::Type& rPStateType = ::getCppuType((uno::Reference< XPropertyState >*)0);
+ const uno::Type& rPStateType = cppu::UnoType<XPropertyState>::get();
uno::Any aPState = xShapeAgg->queryAggregation(rPStateType);
if(aPState.getValueType() != rPStateType || !aPState.getValue())
throw uno::RuntimeException();
@@ -1861,7 +1861,7 @@ void SwXShape::setPropertyToDefault( const OUString& rPropertyName )
}
else
{
- const uno::Type& rPStateType = ::getCppuType((uno::Reference< XPropertyState >*)0);
+ const uno::Type& rPStateType = cppu::UnoType<XPropertyState>::get();
uno::Any aPState = xShapeAgg->queryAggregation(rPStateType);
if(aPState.getValueType() != rPStateType || !aPState.getValue())
throw uno::RuntimeException();
@@ -1896,7 +1896,7 @@ uno::Any SwXShape::getPropertyDefault( const OUString& rPropertyName )
}
else
{
- const uno::Type& rPStateType = ::getCppuType((uno::Reference< XPropertyState >*)0);
+ const uno::Type& rPStateType = cppu::UnoType<XPropertyState>::get();
uno::Any aPState = xShapeAgg->queryAggregation(rPStateType);
if(aPState.getValueType() != rPStateType || !aPState.getValue())
throw uno::RuntimeException();
@@ -2092,7 +2092,7 @@ void SwXShape::dispose(void) throw( uno::RuntimeException, std::exception )
}
if(xShapeAgg.is())
{
- uno::Any aAgg(xShapeAgg->queryAggregation( ::getCppuType((uno::Reference<XComponent>*)0)));
+ uno::Any aAgg(xShapeAgg->queryAggregation( cppu::UnoType<XComponent>::get()));
uno::Reference<XComponent> xComp;
aAgg >>= xComp;
if(xComp.is())
@@ -2684,7 +2684,7 @@ SwXGroupShape::~SwXGroupShape()
uno::Any SwXGroupShape::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException, std::exception)
{
uno::Any aRet;
- if(rType == ::getCppuType((uno::Reference<XShapes>*)0))
+ if(rType == cppu::UnoType<XShapes>::get())
aRet <<= uno::Reference<XShapes>(this);
else
aRet = SwXShape::queryInterface(rType);
@@ -2711,7 +2711,7 @@ void SwXGroupShape::add( const uno::Reference< XShape >& xShape ) throw (uno::Ru
uno::Reference<XShapes> xShapes;
if( xShapeAgg.is() )
{
- const uno::Type& rType = ::getCppuType((uno::Reference<XShapes>*)0 );
+ const uno::Type& rType = cppu::UnoType<XShapes>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rType );
aAgg >>= xShapes;
}
@@ -2766,7 +2766,7 @@ void SwXGroupShape::remove( const uno::Reference< XShape >& xShape ) throw (uno:
uno::Reference<XShapes> xShapes;
if( xShapeAgg.is() )
{
- const uno::Type& rType = ::getCppuType((uno::Reference<XShapes>*)0 );
+ const uno::Type& rType = cppu::UnoType<XShapes>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rType );
aAgg >>= xShapes;
}
@@ -2781,7 +2781,7 @@ sal_Int32 SwXGroupShape::getCount(void) throw( uno::RuntimeException, std::excep
uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() )
{
- const uno::Type& rType = ::getCppuType((uno::Reference<XIndexAccess>*)0 );
+ const uno::Type& rType = cppu::UnoType<XIndexAccess>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rType );
aAgg >>= xAcc;
}
@@ -2798,7 +2798,7 @@ uno::Any SwXGroupShape::getByIndex(sal_Int32 nIndex)
uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() )
{
- const uno::Type& rType = ::getCppuType((uno::Reference<XIndexAccess>*)0 );
+ const uno::Type& rType = cppu::UnoType<XIndexAccess>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rType );
aAgg >>= xAcc;
}
@@ -2813,7 +2813,7 @@ uno::Type SwXGroupShape::getElementType( ) throw(uno::RuntimeException, std::ex
uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() )
{
- const uno::Type& rType = ::getCppuType((uno::Reference<XIndexAccess>*)0 );
+ const uno::Type& rType = cppu::UnoType<XIndexAccess>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rType );
aAgg >>= xAcc;
}
@@ -2828,7 +2828,7 @@ sal_Bool SwXGroupShape::hasElements( ) throw(uno::RuntimeException, std::except
uno::Reference<XIndexAccess> xAcc;
if( xShapeAgg.is() )
{
- const uno::Type& rType = ::getCppuType((uno::Reference<XIndexAccess>*)0 );
+ const uno::Type& rType = cppu::UnoType<XIndexAccess>::get();
uno::Any aAgg = xShapeAgg->queryAggregation( rType );
aAgg >>= xAcc;
}
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index f2d1948..314178d 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -60,7 +60,7 @@ uno::Any SwXRedlineText::queryInterface( const uno::Type& rType )
{
uno::Any aRet;
- if (::getCppuType((uno::Reference<container::XEnumerationAccess> *)0) == rType)
+ if (cppu::UnoType<container::XEnumerationAccess>::get()== rType)
{
uno::Reference<container::XEnumerationAccess> aAccess = this;
aRet <<= aAccess;
@@ -87,7 +87,7 @@ uno::Sequence<uno::Type> SwXRedlineText::getTypes()
// add container::XEnumerationAccess
sal_Int32 nLength = aTypes.getLength();
aTypes.realloc(nLength + 1);
- aTypes[nLength] = ::getCppuType((uno::Reference<container::XEnumerationAccess> *)0);
+ aTypes[nLength] = cppu::UnoType<container::XEnumerationAccess>::get();
return aTypes;
}
@@ -166,7 +166,7 @@ uno::Reference<container::XEnumeration> SwXRedlineText::createEnumeration(void)
uno::Type SwXRedlineText::getElementType( ) throw(uno::RuntimeException, std::exception)
{
- return ::getCppuType((uno::Reference<text::XTextRange>*)0);
+ return cppu::UnoType<text::XTextRange>::get();
}
sal_Bool SwXRedlineText::hasElements( ) throw(uno::RuntimeException, std::exception)
@@ -568,7 +568,7 @@ uno::Reference< container::XEnumeration > SwXRedline::createEnumeration(void) t
uno::Type SwXRedline::getElementType( ) throw(uno::RuntimeException, std::exception)
{
- return ::getCppuType((uno::Reference<text::XTextRange>*)0);
+ return cppu::UnoType<text::XTextRange>::get();
}
sal_Bool SwXRedline::hasElements( ) throw(uno::RuntimeException, std::exception)
diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx
index c6ae9ba..22da9bd 100644
--- a/sw/source/core/unocore/unoredlines.cxx
+++ b/sw/source/core/unocore/unoredlines.cxx
@@ -82,7 +82,7 @@ uno::Reference< container::XEnumeration > SwXRedlines::createEnumeration(void)
uno::Type SwXRedlines::getElementType( ) throw(uno::RuntimeException, std::exception)
{
- return ::getCppuType((uno::Reference<beans::XPropertySet>*)0);
+ return cppu::UnoType<beans::XPropertySet>::get();
}
sal_Bool SwXRedlines::hasElements( ) throw(uno::RuntimeException, std::exception)
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 96cc9b7..6978bdd 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1506,7 +1506,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex(
{
uno::Reference<awt::XBitmap> xBmp = VCLUnoHelper::CreateBitmap( pGraphic->GetBitmapEx() );
pData = new PropValData((void*)&xBmp, UNO_NAME_GRAPHIC_BITMAP,
- ::getCppuType((const uno::Reference<awt::XBitmap>*)0));
+ cppu::UnoType<awt::XBitmap>::get());
aPropertyValues.push_back(pData);
}
Size aSize = rFmt.GetGraphicSize();
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 264bb6c..5359ada 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -350,7 +350,7 @@ uno::Any SwXStyleFamilies::getByIndex(sal_Int32 nIndex)
}
break;
}
- aRet.setValue(&aRef, ::getCppuType((const uno::Reference<container::XNameContainer>*)0));
+ aRet.setValue(&aRef, cppu::UnoType<container::XNameContainer>::get());
}
else
throw uno::RuntimeException();
@@ -360,7 +360,7 @@ uno::Any SwXStyleFamilies::getByIndex(sal_Int32 nIndex)
uno::Type SwXStyleFamilies::getElementType(void)
throw( uno::RuntimeException, std::exception )
{
- return ::getCppuType((const uno::Reference<container::XNameContainer>*)0);
+ return cppu::UnoType<container::XNameContainer>::get();
}
@@ -734,7 +734,7 @@ uno::Any SwXStyleFamily::getByIndex(sal_Int32 nTempIndex)
new SwXFrameStyle(*pBasePool, pDocShell->GetDoc(), pBase->GetName()):
new SwXStyle(*pBasePool, eFamily, pDocShell->GetDoc(), sStyleName);
}
- aRet.setValue(&xStyle, ::getCppuType((uno::Reference<style::XStyle>*)0));
+ aRet.setValue(&xStyle, cppu::UnoType<style::XStyle>::get());
}
else
throw container::NoSuchElementException();
@@ -773,7 +773,7 @@ uno::Any SwXStyleFamily::getByName(const OUString& rName)
new SwXFrameStyle(*pBasePool, pDocShell->GetDoc(), pBase->GetName()):
new SwXStyle(*pBasePool, eFamily, pDocShell->GetDoc(), sStyleName);
}
- aRet.setValue(&xStyle, ::getCppuType((uno::Reference<style::XStyle>*)0));
+ aRet.setValue(&xStyle, cppu::UnoType<style::XStyle>::get());
}
else
throw container::NoSuchElementException();
@@ -826,7 +826,7 @@ sal_Bool SwXStyleFamily::hasByName(const OUString& rName) throw( uno::RuntimeExc
uno::Type SwXStyleFamily::getElementType(void) throw( uno::RuntimeException, std::exception )
{
- return ::getCppuType((const uno::Reference<style::XStyle>*)0);
+ return cppu::UnoType<style::XStyle>::get();
}
@@ -1822,7 +1822,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
}
case FN_UNO_NUM_RULES: //Sonderbehandlung fuer das SvxNumRuleItem:
{
- if(aValue.getValueType() == ::getCppuType((uno::Reference< container::XIndexReplace>*)0) )
+ if(aValue.getValueType() == cppu::UnoType<container::XIndexReplace>::get())
{
uno::Reference< container::XIndexReplace > * pxRulesRef =
(uno::Reference< container::XIndexReplace > *)aValue.getValue();
@@ -2362,7 +2362,7 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
OSL_ENSURE(pRule, "Wo ist die NumRule?");
uno::Reference< container::XIndexReplace > xRules = new SwXNumberingRules(*pRule, pDoc);
- aRet.setValue(&xRules, ::getCppuType((uno::Reference<container::XIndexReplace>*)0));
+ aRet.setValue(&xRules, cppu::UnoType<container::XIndexReplace>::get());
bDone = true;
break;
}
@@ -3769,14 +3769,14 @@ uno::Sequence< uno::Type > SwXFrameStyle::getTypes( ) throw(uno::RuntimeExcepti
uno::Sequence< uno::Type > aTypes = SwXStyle::getTypes();
sal_Int32 nLen = aTypes.getLength();
aTypes.realloc(nLen + 1);
- aTypes.getArray()[nLen] = ::getCppuType((uno::Reference<XEventsSupplier>*)0);
+ aTypes.getArray()[nLen] = cppu::UnoType<XEventsSupplier>::get();
return aTypes;
}
uno::Any SwXFrameStyle::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException, std::exception)
{
uno::Any aRet;
- if(rType == ::getCppuType((uno::Reference<XEventsSupplier>*)0))
+ if(rType == cppu::UnoType<XEventsSupplier>::get())
aRet <<= uno::Reference<XEventsSupplier>(this);
else
aRet = SwXStyle::queryInterface(rType);
@@ -3841,7 +3841,7 @@ uno::Any SwXAutoStyles::getByIndex(sal_Int32 nIndex)
default:
;
}
- aRet.setValue(&aRef, ::getCppuType((const uno::Reference<style::XAutoStyleFamily>*)0));
+ aRet.setValue(&aRef, cppu::UnoType<style::XAutoStyleFamily>::get());
}
else
throw uno::RuntimeException();
@@ -3850,7 +3850,7 @@ uno::Any SwXAutoStyles::getByIndex(sal_Int32 nIndex)
uno::Type SwXAutoStyles::getElementType( ) throw(uno::RuntimeException, std::exception)
{
- return ::getCppuType((const uno::Reference<style::XAutoStyleFamily>*)0);
+ return cppu::UnoType<style::XAutoStyleFamily>::get();
}
sal_Bool SwXAutoStyles::hasElements( ) throw(uno::RuntimeException, std::exception)
@@ -3984,7 +3984,7 @@ uno::Reference< container::XEnumeration > SwXAutoStyleFamily::createEnumeration(
uno::Type SwXAutoStyleFamily::getElementType( ) throw(uno::RuntimeException, std::exception)
{
- return ::getCppuType((const uno::Reference<style::XAutoStyle>*)0);
+ return cppu::UnoType<style::XAutoStyle>::get();
}
sal_Bool SwXAutoStyleFamily::hasElements( ) throw(uno::RuntimeException, std::exception)
@@ -4067,7 +4067,7 @@ uno::Any SwXAutoStylesEnumerator::nextElement( )
SfxItemSet_Pointer_t pNextSet = pImpl->nextElement();
uno::Reference< style::XAutoStyle > xAutoStyle = new SwXAutoStyle(pImpl->getDoc(),
pNextSet, pImpl->getFamily());
- aRet.setValue(&xAutoStyle, ::getCppuType((uno::Reference<style::XAutoStyle>*)0));
+ aRet.setValue(&xAutoStyle, cppu::UnoType<style::XAutoStyle>::get());
}
return aRet;
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 5560ecf..377e392 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1227,7 +1227,7 @@ uno::Reference< container::XEnumeration > SwXCell::createEnumeration(void) thro
uno::Type SAL_CALL SwXCell::getElementType(void) throw( uno::RuntimeException, std::exception )
{
- return ::getCppuType((const uno::Reference<text::XTextRange>*)0);
+ return cppu::UnoType<text::XTextRange>::get();
}
sal_Bool SwXCell::hasElements(void) throw( uno::RuntimeException, std::exception )
@@ -4768,7 +4768,7 @@ uno::Any SwXTableRows::getByIndex(sal_Int32 nIndex)
pXRow = new SwXTextTableRow(pFrmFmt, pLine);
uno::Reference< beans::XPropertySet > xRet =
(beans::XPropertySet*)pXRow;
- aRet.setValue(&xRet, ::getCppuType((const uno::Reference<beans::XPropertySet>*)0));
+ aRet.setValue(&xRet, cppu::UnoType<beans::XPropertySet>::get());
}
else
throw lang::IndexOutOfBoundsException();
@@ -4778,7 +4778,7 @@ uno::Any SwXTableRows::getByIndex(sal_Int32 nIndex)
uno::Type SAL_CALL SwXTableRows::getElementType(void) throw( uno::RuntimeException, std::exception )
{
- return ::getCppuType((const uno::Reference<beans::XPropertySet>*)0);
+ return cppu::UnoType<beans::XPropertySet>::get();
}
sal_Bool SwXTableRows::hasElements(void) throw( uno::RuntimeException, std::exception )
@@ -4985,12 +4985,12 @@ uno::Any SwXTableColumns::getByIndex(sal_Int32 nIndex)
throw lang::IndexOutOfBoundsException();
xRet = uno::Reference<uno::XInterface>(); //!! writer tables do not have columns !!
}
- return uno::Any(&xRet, ::getCppuType((const uno::Reference<uno::XInterface>*)0));
+ return uno::Any(&xRet, cppu::UnoType<uno::XInterface>::get());
}
uno::Type SAL_CALL SwXTableColumns::getElementType(void) throw( uno::RuntimeException, std::exception )
{
- return ::getCppuType((uno::Reference<uno::XInterface>*)0);
+ return cppu::UnoType<uno::XInterface>::get();
}
sal_Bool SwXTableColumns::hasElements(void) throw( uno::RuntimeException, std::exception )
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index b14def5..0849566 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -877,7 +877,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
const uno::Reference< container::XIndexContainer > & rFormComps =
pFormImpl->GetFormComps();
- Any aAny( &rFComp, ::getCppuType( (uno::Reference< XFormComponent>*)0 ) );
+ Any aAny( &rFComp, cppu::UnoType<XFormComponent>::get());
rFormComps->insertByIndex( rFormComps->getCount(), aAny );
if( !bHidden )
@@ -1185,7 +1185,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
}
aTmp.setValue( &xTxtRg,
- ::getCppuType((uno::Reference< text::XTextRange>*)0));
+ cppu::UnoType<text::XTextRange>::get());
xShapePropSet->setPropertyValue(
OUString("TextRange"), aTmp );
}
@@ -1369,12 +1369,12 @@ void SwHTMLParser::NewForm( bool bAppend )
aTmp );
FormSubmitMethod eMethod = (FormSubmitMethod)nMethod;
- aTmp.setValue( &eMethod, ::getCppuType((const FormSubmitMethod*)0) );
+ aTmp.setValue( &eMethod, cppu::UnoType<FormSubmitMethod>::get());
xFormPropSet->setPropertyValue("SubmitMethod",
aTmp );
FormSubmitEncoding eEncType = (FormSubmitEncoding)nEncType;
- aTmp.setValue( &eEncType, ::getCppuType((const FormSubmitEncoding*)0) );
+ aTmp.setValue( &eEncType, cppu::UnoType<FormSubmitEncoding>::get());
xFormPropSet->setPropertyValue(
OUString("SubmitEncoding"), aTmp );
@@ -1386,7 +1386,7 @@ void SwHTMLParser::NewForm( bool bAppend )
const uno::Reference< container::XIndexContainer > & rForms =
pFormImpl->GetForms();
- Any aAny( &xForm, ::getCppuType((uno::Reference< XForm>*)0) );
+ Any aAny( &xForm, cppu::UnoType<XForm>::get());
rForms->insertByIndex( rForms->getCount(), aAny );
if( !aMacroTbl.empty() )
lcl_html_setEvents( pFormImpl->GetFormEventManager(),
@@ -1719,7 +1719,7 @@ void SwHTMLParser::InsertInput()
}
FormButtonType eButtonType = FormButtonType_SUBMIT;
aTmp.setValue( &eButtonType,
- ::getCppuType((const FormButtonType*)0));
+ cppu::UnoType<FormButtonType>::get());
xPropSet->setPropertyValue(
OUString("ButtonType"), aTmp );
@@ -1757,7 +1757,7 @@ void SwHTMLParser::InsertInput()
aTmp );
aTmp.setValue( &eButtonType,
- ::getCppuType((const FormButtonType*)0));
+ cppu::UnoType<FormButtonType>::get());
xPropSet->setPropertyValue(
OUString("ButtonType"), aTmp );
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index fd90d1e..91eec2d 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -101,12 +101,12 @@ static void lcl_html_outEvents( SvStream& rStrm,
{
uno::Any aTmp = xIndexAcc->getByIndex(nPos);
OSL_ENSURE( aTmp.getValueType() ==
- ::getCppuType( (uno::Reference<form::XFormComponent>*)0 ) ||
+ cppu::UnoType<form::XFormComponent>::get()||
aTmp.getValueType() ==
- ::getCppuType( (uno::Reference<form::XForm>*)0 ),
+ cppu::UnoType<form::XForm>::get(),
"lcl_html_outEvents: falsche Reflection" );
if( aTmp.getValueType() ==
- ::getCppuType( (uno::Reference< form::XFormComponent >*)0) )
+ cppu::UnoType<form::XFormComponent>::get())
{
if( rFormComp ==
@@ -114,7 +114,7 @@ static void lcl_html_outEvents( SvStream& rStrm,
break;
}
else if( aTmp.getValueType() ==
- ::getCppuType( (uno::Reference< form::XForm>*)0) )
+ cppu::UnoType<form::XForm>::get())
{
uno::Reference< form::XFormComponent > xFC(
*(uno::Reference< form::XForm > *)aTmp.getValue(), uno::UNO_QUERY );
@@ -379,10 +379,10 @@ void SwHTMLWriter::OutHiddenForms()
{
uno::Any aTmp = xForms->getByIndex( i );
OSL_ENSURE( aTmp.getValueType() ==
- ::getCppuType((uno::Reference< form::XForm >*)0),
+ cppu::UnoType<form::XForm>::get(),
"OutHiddenForms: falsche Reflection" );
if( aTmp.getValueType() ==
- ::getCppuType((uno::Reference< form::XForm >*)0) )
+ cppu::UnoType<form::XForm>::get())
OutHiddenForm( *(uno::Reference< form::XForm > *)aTmp.getValue() );
}
}
@@ -399,10 +399,10 @@ void SwHTMLWriter::OutHiddenForm( const uno::Reference< form::XForm > & rForm )
{
uno::Any aTmp = xFormComps->getByIndex( i );
OSL_ENSURE( aTmp.getValueType() ==
- ::getCppuType((uno::Reference<form::XFormComponent>*)0),
+ cppu::UnoType<form::XFormComponent>::get(),
"OutHiddenForm: falsche Reflection" );
if( aTmp.getValueType() !=
- ::getCppuType((uno::Reference<form::XFormComponent>*)0) )
+ cppu::UnoType<form::XFormComponent>::get())
continue;
uno::Reference< form::XFormComponent > xFormComp =
@@ -490,7 +490,7 @@ void SwHTMLWriter::OutForm( bool bOn,
aTmp = xFormPropSet->getPropertyValue(
OUString("SubmitMethod") );
- if( aTmp.getValueType() == ::getCppuType((const form::FormSubmitMethod*)0) )
+ if( aTmp.getValueType() == cppu::UnoType<form::FormSubmitMethod>::get())
{
form::FormSubmitMethod eMethod =
*( form::FormSubmitMethod*)aTmp.getValue();
@@ -502,7 +502,7 @@ void SwHTMLWriter::OutForm( bool bOn,
}
aTmp = xFormPropSet->getPropertyValue(
OUString("SubmitEncoding") );
- if( aTmp.getValueType()==::getCppuType((const form::FormSubmitEncoding*)0) )
+ if( aTmp.getValueType()==cppu::UnoType<form::FormSubmitEncoding>::get())
{
form::FormSubmitEncoding eEncType =
*( form::FormSubmitEncoding*)aTmp.getValue();
@@ -561,10 +561,10 @@ void SwHTMLWriter::OutHiddenControls(
{
uno::Any aTmp = rFormComps->getByIndex( nPos );
OSL_ENSURE( aTmp.getValueType() ==
- ::getCppuType((uno::Reference< form::XFormComponent>*)0),
+ cppu::UnoType<form::XFormComponent>::get(),
"OutHiddenControls: falsche Reflection" );
bDone = aTmp.getValueType() ==
- ::getCppuType((uno::Reference< form::XFormComponent>*)0) &&
+ cppu::UnoType<form::XFormComponent>::get()&&
*(uno::Reference< form::XFormComponent > *)aTmp.getValue() ==
xFC;
}
@@ -574,10 +574,10 @@ void SwHTMLWriter::OutHiddenControls(
{
uno::Any aTmp = rFormComps->getByIndex( nPos );
OSL_ENSURE( aTmp.getValueType() ==
- ::getCppuType((uno::Reference< form::XFormComponent>*)0),
+ cppu::UnoType<form::XFormComponent>::get(),
"OutHiddenControls: falsche Reflection" );
if( aTmp.getValueType() !=
- ::getCppuType((uno::Reference< form::XFormComponent>*)0) )
+ cppu::UnoType<form::XFormComponent>::get())
continue;
uno::Reference< form::XFormComponent > xFC =
*(uno::Reference< form::XFormComponent > *)aTmp.getValue();
@@ -1094,7 +1094,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp = xPropSet->getPropertyValue( sPropName );
- if( aTmp.getValueType() == ::getCppuType((const float*)0) )
+ if( aTmp.getValueType() == cppu::UnoType<float>::get())
{
float nHeight = *(float*)aTmp.getValue();
@@ -1132,7 +1132,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
if( xPropSetInfo->hasPropertyByName( sPropName ) )
{
aTmp = xPropSet->getPropertyValue( sPropName );
- if( aTmp.getValueType() == ::getCppuType((const float*)0) )
+ if( aTmp.getValueType() == cppu::UnoType<float>::get())
{
FontWeight eWeight =
VCLUnoHelper::ConvertFontWeight( *(float*)aTmp.getValue() );
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index c213145..be3db68f 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2535,8 +2535,7 @@ bool SwMSConvertControls::InsertControl(
bool bFloatingCtrl)
{
const uno::Reference< container::XIndexContainer > &rComps = GetFormComps();
- uno::Any aTmp( &rFComp, ::getCppuType((const uno::Reference<
- form::XFormComponent >*)0) );
+ uno::Any aTmp( &rFComp, cppu::UnoType<form::XFormComponent>::get());
rComps->insertByIndex( rComps->getCount(), aTmp );
const uno::Reference< lang::XMultiServiceFactory > &rServiceFactory =
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 0a19a7f..c2f84be 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -546,7 +546,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
::cppu::UnoType<sal_Int32>::get(),
beans::PropertyAttribute::MAYBEVOID, 0},
{ OUString("NumberStyles"), 0,
- ::getCppuType( (uno::Reference<container::XNameContainer> *) 0),
+ cppu::UnoType<container::XNameContainer>::get(),
beans::PropertyAttribute::MAYBEVOID, 0},
{ OUString("RecordChanges"), 0,
::getBooleanCppuType(),
@@ -558,7 +558,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
::getCppuType((Sequence<sal_Int8>*)0),
beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("PrivateData"), 0,
- ::getCppuType( (uno::Reference<XInterface> *)0 ),
+ cppu::UnoType<XInterface>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("BaseURI"), 0,
::cppu::UnoType<OUString>::get(),
@@ -577,7 +577,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
::getBooleanCppuType(),
beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("TextInsertModeRange"), 0,
- ::getCppuType( (uno::Reference<text::XTextRange> *) 0),
+ cppu::UnoType<text::XTextRange>::get(),
beans::PropertyAttribute::MAYBEVOID, 0},
{ OUString("AutoTextMode"), 0,
::getBooleanCppuType(),
diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx
index adb42c3..f304acc 100644
--- a/sw/source/ui/index/cntex.cxx
+++ b/sw/source/ui/index/cntex.cxx
@@ -375,7 +375,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample(
aSequPropVals.realloc(nTokenIndex);
uno::Any aFormatAccess = xIdxProps->getPropertyValue(UNO_NAME_LEVEL_FORMAT);
- OSL_ENSURE(aFormatAccess.getValueType() == ::getCppuType((uno::Reference<container::XIndexReplace>*)0),
+ OSL_ENSURE(aFormatAccess.getValueType() == cppu::UnoType<container::XIndexReplace>::get(),
"wrong property type");
uno::Reference< container::XIndexReplace > xFormatAccess;
diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx
index 307181c..7ee0f5b 100644
--- a/vcl/osx/DropTarget.cxx
+++ b/vcl/osx/DropTarget.cxx
@@ -436,7 +436,7 @@ void SAL_CALL DropTarget::dropComplete(sal_Bool success) throw (RuntimeException
void DropTarget::fire_drop( const DropTargetDropEvent& dte)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType<XDropTargetListener>::get());
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer);
@@ -452,7 +452,7 @@ void DropTarget::fire_drop( const DropTargetDropEvent& dte)
void DropTarget::fire_dragEnter(const DropTargetDragEnterEvent& e)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType<XDropTargetListener>::get());
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer);
@@ -468,7 +468,7 @@ void DropTarget::fire_dragEnter(const DropTargetDragEnterEvent& e)
void DropTarget::fire_dragExit(const DropTargetEvent& dte)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType<XDropTargetListener>::get());
if( pContainer)
{
@@ -485,7 +485,7 @@ void DropTarget::fire_dragExit(const DropTargetEvent& dte)
void DropTarget::fire_dragOver(const DropTargetDragEvent& dtde)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType<XDropTargetListener>::get());
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer );
@@ -501,7 +501,7 @@ void DropTarget::fire_dragOver(const DropTargetDragEvent& dtde)
void DropTarget::fire_dropActionChanged(const DropTargetDragEvent& dtde)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType<XDropTargetListener>::get());
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer);
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 30dd88c..2792982 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -1614,8 +1614,8 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu
aAny = aArguments[0];
- if( ( aAny.getValueType() != ::getCppuType( ( sal_Int16* )0 ) ) &&
- (aAny.getValueType() != ::getCppuType( ( sal_Int8* )0 ) ) )
+ if( ( aAny.getValueType() != cppu::UnoType<sal_Int16>::get()) &&
+ (aAny.getValueType() != cppu::UnoType<sal_Int8>::get()) )
throw lang::IllegalArgumentException(
OUString( "invalid argument type" ),
static_cast<XFilePicker2*>( this ), 1 );
diff --git a/vcl/unx/kde/UnxFilePicker.cxx b/vcl/unx/kde/UnxFilePicker.cxx
index ff90278..fd92f13 100644
--- a/vcl/unx/kde/UnxFilePicker.cxx
+++ b/vcl/unx/kde/UnxFilePicker.cxx
@@ -532,7 +532,7 @@ void SAL_CALL UnxFilePicker::initialize( const uno::Sequence<uno::Any> &rArgumen
aAny = rArguments[0];
- if ( ( aAny.getValueType() != ::getCppuType( (sal_Int16*)0 ) ) && ( aAny.getValueType() != ::getCppuType( (sal_Int8*)0 ) ) )
+ if ( ( aAny.getValueType() != cppu::UnoType<sal_Int16>::get()) && ( aAny.getValueType() != cppu::UnoType<sal_Int8>::get()) )
throw lang::IllegalArgumentException(
OUString( "invalid argument type" ),
static_cast< XFilePicker2* >( this ), 1 );
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index 43bad65..8fa2bf0 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -641,8 +641,8 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
arg = args[0];
- if (( arg.getValueType() != ::getCppuType((sal_Int16*)0)) &&
- ( arg.getValueType() != ::getCppuType((sal_Int8*)0)))
+ if (( arg.getValueType() != cppu::UnoType<sal_Int16>::get()) &&
+ ( arg.getValueType() != cppu::UnoType<sal_Int8>::get()))
{
throw lang::IllegalArgumentException(
OUString( "invalid argument type" ),
More information about the Libreoffice-commits
mailing list