Kaydet (Commit) 6dbcb1a3 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Replace remaining getCppuType et al with cppu::UnoType

Change-Id: I3269d005634c66929e092d6a8fb33d71819b6971
üst 0ca607e0
...@@ -53,7 +53,7 @@ namespace // private ...@@ -53,7 +53,7 @@ namespace // private
{ {
size_t len = aFlavor.MimeType.getLength(); size_t len = aFlavor.MimeType.getLength();
Type dtype = aFlavor.DataType; Type dtype = aFlavor.DataType;
return ((len > 0) && ((dtype == getCppuType((Sequence<sal_Int8>*)0)) || (dtype == cppu::UnoType<OUString>::get()))); return ((len > 0) && ((dtype == cppu::UnoType<Sequence<sal_Int8>>::get()) || (dtype == cppu::UnoType<OUString>::get())));
} }
OUString NSStringToOUString( const NSString* cfString) OUString NSStringToOUString( const NSString* cfString)
...@@ -132,7 +132,7 @@ namespace // private ...@@ -132,7 +132,7 @@ namespace // private
inline bool isByteSequenceType(const Type& theType) inline bool isByteSequenceType(const Type& theType)
{ {
return (theType == getCppuType((Sequence<sal_Int8>*)0)); return (theType == cppu::UnoType<Sequence<sal_Int8>>::get());
} }
inline bool isOUStringType(const Type& theType) inline bool isOUStringType(const Type& theType)
...@@ -486,7 +486,7 @@ DataFlavor DataFlavorMapper::systemToOpenOfficeFlavor( const NSString* systemDat ...@@ -486,7 +486,7 @@ DataFlavor DataFlavorMapper::systemToOpenOfficeFlavor( const NSString* systemDat
{ {
oOOFlavor.MimeType = OUString::createFromAscii(flavorMap[i].OOoFlavor); oOOFlavor.MimeType = OUString::createFromAscii(flavorMap[i].OOoFlavor);
oOOFlavor.HumanPresentableName = OUString::createFromAscii(flavorMap[i].HumanPresentableName); oOOFlavor.HumanPresentableName = OUString::createFromAscii(flavorMap[i].HumanPresentableName);
oOOFlavor.DataType = flavorMap[i].DataTypeOUString ? cppu::UnoType<OUString>::get() : getCppuType((Sequence<sal_Int8>*)0); oOOFlavor.DataType = flavorMap[i].DataTypeOUString ? cppu::UnoType<OUString>::get() : cppu::UnoType<Sequence<sal_Int8>>::get();
return oOOFlavor; return oOOFlavor;
} }
} // for } // for
...@@ -498,7 +498,7 @@ DataFlavor DataFlavorMapper::systemToOpenOfficeFlavor( const NSString* systemDat ...@@ -498,7 +498,7 @@ DataFlavor DataFlavorMapper::systemToOpenOfficeFlavor( const NSString* systemDat
{ {
oOOFlavor.MimeType = aTryFlavor; oOOFlavor.MimeType = aTryFlavor;
oOOFlavor.HumanPresentableName.clear(); oOOFlavor.HumanPresentableName.clear();
oOOFlavor.DataType = getCppuType((Sequence<sal_Int8>*)0); oOOFlavor.DataType = cppu::UnoType<Sequence<sal_Int8>>::get();
} }
return oOOFlavor; return oOOFlavor;
......
...@@ -375,13 +375,13 @@ void SAL_CALL DropTarget::initialize(const Sequence< Any >& aArguments) ...@@ -375,13 +375,13 @@ void SAL_CALL DropTarget::initialize(const Sequence< Any >& aArguments)
void SAL_CALL DropTarget::addDropTargetListener(const uno::Reference<XDropTargetListener>& dtl) void SAL_CALL DropTarget::addDropTargetListener(const uno::Reference<XDropTargetListener>& dtl)
throw(RuntimeException, std::exception) throw(RuntimeException, std::exception)
{ {
rBHelper.addListener(::getCppuType(&dtl), dtl); rBHelper.addListener(cppu::UnoType<decltype(dtl)>::get(), dtl);
} }
void SAL_CALL DropTarget::removeDropTargetListener(const uno::Reference<XDropTargetListener>& dtl) void SAL_CALL DropTarget::removeDropTargetListener(const uno::Reference<XDropTargetListener>& dtl)
throw(RuntimeException, std::exception) throw(RuntimeException, std::exception)
{ {
rBHelper.removeListener(::getCppuType(&dtl), dtl); rBHelper.removeListener(cppu::UnoType<decltype(dtl)>::get(), dtl);
} }
sal_Bool SAL_CALL DropTarget::isActive( ) throw(RuntimeException, std::exception) sal_Bool SAL_CALL DropTarget::isActive( ) throw(RuntimeException, std::exception)
......
...@@ -39,7 +39,7 @@ namespace // private ...@@ -39,7 +39,7 @@ namespace // private
{ {
size_t len = aFlavor.MimeType.getLength(); size_t len = aFlavor.MimeType.getLength();
Type dtype = aFlavor.DataType; Type dtype = aFlavor.DataType;
return ((len > 0) && ((dtype == getCppuType((Sequence<sal_Int8>*)0)) || (dtype == cppu::UnoType<OUString>::get()))); return ((len > 0) && ((dtype == cppu::UnoType<Sequence<sal_Int8>>::get()) || (dtype == cppu::UnoType<OUString>::get())));
} }
} // namespace private } // namespace private
......
...@@ -618,10 +618,10 @@ bool SelectionManager::convertData( ...@@ -618,10 +618,10 @@ bool SelectionManager::convertData(
if( aFlavor.MimeType.getToken( 0, ';', nIndex ) == "charset=utf-16" ) if( aFlavor.MimeType.getToken( 0, ';', nIndex ) == "charset=utf-16" )
aFlavor.DataType = cppu::UnoType<OUString>::get(); aFlavor.DataType = cppu::UnoType<OUString>::get();
else else
aFlavor.DataType = getCppuType( (Sequence< sal_Int8 >*)0 ); aFlavor.DataType = cppu::UnoType<Sequence< sal_Int8 >>::get();
} }
else else
aFlavor.DataType = getCppuType( (Sequence< sal_Int8 >*)0 ); aFlavor.DataType = cppu::UnoType<Sequence< sal_Int8 >>::get();
if( xTransferable->isDataFlavorSupported( aFlavor ) ) if( xTransferable->isDataFlavorSupported( aFlavor ) )
{ {
...@@ -633,7 +633,7 @@ bool SelectionManager::convertData( ...@@ -633,7 +633,7 @@ bool SelectionManager::convertData(
rData = Sequence< sal_Int8 >( reinterpret_cast<sal_Int8 const *>(aString.getStr()), aString.getLength() * sizeof( sal_Unicode ) ); rData = Sequence< sal_Int8 >( reinterpret_cast<sal_Int8 const *>(aString.getStr()), aString.getLength() * sizeof( sal_Unicode ) );
bSuccess = true; bSuccess = true;
} }
else if( aValue.getValueType() == getCppuType( (Sequence< sal_Int8 >*)0 ) ) else if( aValue.getValueType() == cppu::UnoType<Sequence< sal_Int8 >>::get() )
{ {
aValue >>= rData; aValue >>= rData;
bSuccess = true; bSuccess = true;
...@@ -1317,7 +1317,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor > ...@@ -1317,7 +1317,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
{ {
int nFormat; int nFormat;
pFlavors->MimeType = convertTypeFromNative( *pAtoms, selection, nFormat ); pFlavors->MimeType = convertTypeFromNative( *pAtoms, selection, nFormat );
pFlavors->DataType = getCppuType( (Sequence< sal_Int8 >*)0 ); pFlavors->DataType = cppu::UnoType<Sequence< sal_Int8 >>::get();
sal_Int32 nIndex = 0; sal_Int32 nIndex = 0;
if( pFlavors->MimeType.getToken( 0, ';', nIndex ) == "text/plain" ) if( pFlavors->MimeType.getToken( 0, ';', nIndex ) == "text/plain" )
{ {
......
...@@ -92,7 +92,7 @@ Sequence< DataFlavor > SAL_CALL X11Transferable::getTransferDataFlavors() ...@@ -92,7 +92,7 @@ Sequence< DataFlavor > SAL_CALL X11Transferable::getTransferDataFlavors()
sal_Bool SAL_CALL X11Transferable::isDataFlavorSupported( const DataFlavor& aFlavor ) sal_Bool SAL_CALL X11Transferable::isDataFlavorSupported( const DataFlavor& aFlavor )
throw(RuntimeException, std::exception) throw(RuntimeException, std::exception)
{ {
if( aFlavor.DataType != getCppuType( (Sequence< sal_Int8 >*)0 ) ) if( aFlavor.DataType != cppu::UnoType<Sequence< sal_Int8 >>::get() )
{ {
if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( "text/plain;charset=utf-16" ) && if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( "text/plain;charset=utf-16" ) &&
aFlavor.DataType == cppu::UnoType<OUString>::get() ) aFlavor.DataType == cppu::UnoType<OUString>::get() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment