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

loplugin:salcall (clang-cl)

Change-Id: I31018af8d992c9496f01a72925e24d9b362e340d
Reviewed-on: https://gerrit.libreoffice.org/46204Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst e28ed8c0
......@@ -170,7 +170,7 @@ namespace dxcanvas
const css::uno::Reference<
css::geometry::XMapping2D >& xMapping );
css::uno::Reference< css::rendering::XCanvasFont > SAL_CALL
css::uno::Reference< css::rendering::XCanvasFont >
createFont( const css::rendering::XCanvas* pCanvas,
const css::rendering::FontRequest& fontRequest,
const css::uno::Sequence<
......
......@@ -76,7 +76,7 @@ CWinClipbImpl::~CWinClipbImpl( )
unregisterClipboardViewer( );
}
Reference< XTransferable > SAL_CALL CWinClipbImpl::getContents( )
Reference< XTransferable > CWinClipbImpl::getContents( )
{
// use the shortcut or create a transferable from
// system clipboard
......@@ -110,7 +110,7 @@ Reference< XTransferable > SAL_CALL CWinClipbImpl::getContents( )
return rClipContent;
}
void SAL_CALL CWinClipbImpl::setContents(
void CWinClipbImpl::setContents(
const Reference< XTransferable >& xTransferable,
const Reference< XClipboardOwner >& xClipboardOwner )
{
......@@ -134,17 +134,17 @@ void SAL_CALL CWinClipbImpl::setContents(
m_MtaOleClipboard.setClipboard(pIDataObj.get());
}
OUString SAL_CALL CWinClipbImpl::getName( )
OUString CWinClipbImpl::getName( )
{
return m_itsName;
}
sal_Int8 SAL_CALL CWinClipbImpl::getRenderingCapabilities( )
sal_Int8 CWinClipbImpl::getRenderingCapabilities( )
{
return ( Delayed | Persistant );
}
void SAL_CALL CWinClipbImpl::flushClipboard( )
void CWinClipbImpl::flushClipboard( )
{
// actually it should be ClearableMutexGuard aGuard( m_ClipContentMutex );
// but it does not work since FlushClipboard does a callback and frees DataObject
......@@ -160,17 +160,17 @@ void SAL_CALL CWinClipbImpl::flushClipboard( )
m_MtaOleClipboard.flushClipboard( );
}
void SAL_CALL CWinClipbImpl::registerClipboardViewer( )
void CWinClipbImpl::registerClipboardViewer( )
{
m_MtaOleClipboard.registerClipViewer( CWinClipbImpl::onClipboardContentChanged );
}
void SAL_CALL CWinClipbImpl::unregisterClipboardViewer( )
void CWinClipbImpl::unregisterClipboardViewer( )
{
m_MtaOleClipboard.registerClipViewer( nullptr );
}
void SAL_CALL CWinClipbImpl::dispose()
void CWinClipbImpl::dispose()
{
OSL_ENSURE( !m_pCurrentClipContent, "Clipboard was not flushed before shutdown!" );
}
......@@ -184,7 +184,7 @@ void WINAPI CWinClipbImpl::onClipboardContentChanged()
s_pCWinClipbImpl->m_pWinClipboard->notifyAllClipboardListener( );
}
void SAL_CALL CWinClipbImpl::onReleaseDataObject( CXNotifyingDataObject* theCaller )
void CWinClipbImpl::onReleaseDataObject( CXNotifyingDataObject* theCaller )
{
OSL_ASSERT( nullptr != theCaller );
......
......@@ -53,40 +53,40 @@ protected:
CWinClipbImpl( const OUString& aClipboardName, CWinClipboard* theWinClipboard );
/// @throws css::uno::RuntimeException
css::uno::Reference< css::datatransfer::XTransferable > SAL_CALL getContents( );
css::uno::Reference< css::datatransfer::XTransferable > getContents( );
/// @throws css::uno::RuntimeException
void SAL_CALL setContents(
void setContents(
const css::uno::Reference< css::datatransfer::XTransferable >& xTransferable,
const css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner );
/// @throws css::uno::RuntimeException
OUString SAL_CALL getName( );
OUString getName( );
// XClipboardEx
/// @throws css::uno::RuntimeException
static sal_Int8 SAL_CALL getRenderingCapabilities( );
static sal_Int8 getRenderingCapabilities( );
// XFlushableClipboard
/// @throws css::uno::RuntimeException
void SAL_CALL flushClipboard( );
void flushClipboard( );
// XComponent
/// @throws css::uno::RuntimeException
void SAL_CALL dispose( );
void dispose( );
// member functions
void SAL_CALL registerClipboardViewer( );
void SAL_CALL unregisterClipboardViewer( );
void registerClipboardViewer( );
void unregisterClipboardViewer( );
static void WINAPI onClipboardContentChanged();
private:
void SAL_CALL onReleaseDataObject( CXNotifyingDataObject* theCaller );
void onReleaseDataObject( CXNotifyingDataObject* theCaller );
private:
OUString m_itsName;
......
......@@ -160,7 +160,7 @@ void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboar
rBHelper.aLC.removeInterface( cppu::UnoType<decltype(listener)>::get(), listener );
}
void SAL_CALL CWinClipboard::notifyAllClipboardListener( )
void CWinClipboard::notifyAllClipboardListener( )
{
if ( !rBHelper.bDisposed )
{
......
......@@ -109,7 +109,7 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
private:
void SAL_CALL notifyAllClipboardListener( );
void notifyAllClipboardListener( );
private:
std::unique_ptr< CWinClipbImpl > m_pImpl;
......
......@@ -40,12 +40,12 @@ SourceContext::~SourceContext()
{
}
void SAL_CALL SourceContext::addDragSourceListener(
void SourceContext::addDragSourceListener(
const Reference<XDragSourceListener >& )
{
}
void SAL_CALL SourceContext::removeDragSourceListener(
void SourceContext::removeDragSourceListener(
const Reference<XDragSourceListener >& )
{
}
......
......@@ -51,9 +51,9 @@ public:
SourceContext &operator= (const SourceContext&) = delete;
/// @throws RuntimeException
virtual void SAL_CALL addDragSourceListener( const Reference<XDragSourceListener >& dsl );
virtual void addDragSourceListener( const Reference<XDragSourceListener >& dsl );
/// @throws RuntimeException
virtual void SAL_CALL removeDragSourceListener( const Reference<XDragSourceListener >& dsl );
virtual void removeDragSourceListener( const Reference<XDragSourceListener >& dsl );
virtual sal_Int32 SAL_CALL getCurrentCursor( ) override;
virtual void SAL_CALL setCursor( sal_Int32 cursorId ) override;
virtual void SAL_CALL setImage( sal_Int32 imageId ) override;
......
......@@ -171,7 +171,7 @@ bool SAL_CALL cmpAllContentTypeParameter(
} // end namespace
Reference< XTransferable > SAL_CALL CDOTransferable::create( const Reference< XComponentContext >& rxContext,
Reference< XTransferable > CDOTransferable::create( const Reference< XComponentContext >& rxContext,
IDataObjectPtr pIDataObject )
{
CDOTransferable* pTransf = new CDOTransferable(rxContext, pIDataObject);
......@@ -273,7 +273,7 @@ sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFla
// we save the first offered text format which we will later use for the
// conversion
void SAL_CALL CDOTransferable::initFlavorList( )
void CDOTransferable::initFlavorList( )
{
sal::systools::COMReference<IEnumFORMATETC> pEnumFormatEtc;
HRESULT hr = m_rDataObject->EnumFormatEtc( DATADIR_GET, &pEnumFormatEtc );
......@@ -321,7 +321,7 @@ void SAL_CALL CDOTransferable::initFlavorList( )
}
inline
void SAL_CALL CDOTransferable::addSupportedFlavor( const DataFlavor& aFlavor )
void CDOTransferable::addSupportedFlavor( const DataFlavor& aFlavor )
{
// we ignore all formats that couldn't be translated
if ( aFlavor.MimeType.getLength( ) )
......@@ -333,7 +333,7 @@ void SAL_CALL CDOTransferable::addSupportedFlavor( const DataFlavor& aFlavor )
}
}
DataFlavor SAL_CALL CDOTransferable::formatEtcToDataFlavor( const FORMATETC& aFormatEtc )
DataFlavor CDOTransferable::formatEtcToDataFlavor( const FORMATETC& aFormatEtc )
{
LCID lcid = 0;
......@@ -350,7 +350,7 @@ DataFlavor SAL_CALL CDOTransferable::formatEtcToDataFlavor( const FORMATETC& aFo
// returns the current locale on clipboard; if there is no locale on
// clipboard the function returns the current thread locale
LCID SAL_CALL CDOTransferable::getLocaleFromClipboard( )
LCID CDOTransferable::getLocaleFromClipboard( )
{
LCID lcid = GetThreadLocale( );
......@@ -378,7 +378,7 @@ LCID SAL_CALL CDOTransferable::getLocaleFromClipboard( )
// in case of failures because nothing should have been
// allocated etc.
CDOTransferable::ByteSequence_t SAL_CALL CDOTransferable::getClipboardData( CFormatEtc& aFormatEtc )
CDOTransferable::ByteSequence_t CDOTransferable::getClipboardData( CFormatEtc& aFormatEtc )
{
STGMEDIUM stgmedium;
HRESULT hr = m_rDataObject->GetData( aFormatEtc, &stgmedium );
......@@ -452,7 +452,7 @@ CDOTransferable::ByteSequence_t SAL_CALL CDOTransferable::getClipboardData( CFor
return byteStream;
}
OUString SAL_CALL CDOTransferable::synthesizeUnicodeText( )
OUString CDOTransferable::synthesizeUnicodeText( )
{
ByteSequence_t aTextSequence;
CFormatEtc fetc;
......@@ -493,7 +493,7 @@ OUString SAL_CALL CDOTransferable::synthesizeUnicodeText( )
return OUString(pWChar);
}
bool SAL_CALL CDOTransferable::compareDataFlavors(
bool CDOTransferable::compareDataFlavors(
const DataFlavor& lhs, const DataFlavor& rhs )
{
if ( !m_rXMimeCntFactory.is( ) )
......
......@@ -62,17 +62,17 @@ private:
// some helper functions
void SAL_CALL initFlavorList( );
void initFlavorList( );
void SAL_CALL addSupportedFlavor( const css::datatransfer::DataFlavor& aFlavor );
css::datatransfer::DataFlavor SAL_CALL formatEtcToDataFlavor( const FORMATETC& aFormatEtc );
void addSupportedFlavor( const css::datatransfer::DataFlavor& aFlavor );
css::datatransfer::DataFlavor formatEtcToDataFlavor( const FORMATETC& aFormatEtc );
ByteSequence_t SAL_CALL getClipboardData( CFormatEtc& aFormatEtc );
OUString SAL_CALL synthesizeUnicodeText( );
ByteSequence_t getClipboardData( CFormatEtc& aFormatEtc );
OUString synthesizeUnicodeText( );
LCID SAL_CALL getLocaleFromClipboard( );
LCID getLocaleFromClipboard( );
bool SAL_CALL compareDataFlavors( const css::datatransfer::DataFlavor& lhs,
bool compareDataFlavors( const css::datatransfer::DataFlavor& lhs,
const css::datatransfer::DataFlavor& rhs );
private:
......
......@@ -43,7 +43,7 @@ CStgTransferHelper::~CStgTransferHelper( )
// TransferData into the
void SAL_CALL CStgTransferHelper::write( const void* lpData, ULONG cb, ULONG* cbWritten )
void CStgTransferHelper::write( const void* lpData, ULONG cb, ULONG* cbWritten )
{
HRESULT hr = E_FAIL;
......@@ -66,7 +66,7 @@ void SAL_CALL CStgTransferHelper::write( const void* lpData, ULONG cb, ULONG* cb
// read
void SAL_CALL CStgTransferHelper::read( LPVOID pv, ULONG cb, ULONG* pcbRead )
void CStgTransferHelper::read( LPVOID pv, ULONG cb, ULONG* pcbRead )
{
HRESULT hr = E_FAIL;
......@@ -79,7 +79,7 @@ void SAL_CALL CStgTransferHelper::read( LPVOID pv, ULONG cb, ULONG* pcbRead )
// GetHGlobal
HGLOBAL SAL_CALL CStgTransferHelper::getHGlobal( ) const
HGLOBAL CStgTransferHelper::getHGlobal( ) const
{
OSL_ASSERT( m_lpStream );
......@@ -97,7 +97,7 @@ HGLOBAL SAL_CALL CStgTransferHelper::getHGlobal( ) const
// getIStream
void SAL_CALL CStgTransferHelper::getIStream( LPSTREAM* ppStream )
void CStgTransferHelper::getIStream( LPSTREAM* ppStream )
{
OSL_ASSERT( ppStream );
*ppStream = m_lpStream;
......@@ -107,7 +107,7 @@ void SAL_CALL CStgTransferHelper::getIStream( LPSTREAM* ppStream )
// Init
void SAL_CALL CStgTransferHelper::init( SIZE_T newSize,
void CStgTransferHelper::init( SIZE_T newSize,
sal_uInt32 uiFlags,
bool bDelStgOnRelease )
{
......@@ -136,7 +136,7 @@ void SAL_CALL CStgTransferHelper::init( SIZE_T newSize,
// Init
void SAL_CALL CStgTransferHelper::init( HGLOBAL hGlob,
void CStgTransferHelper::init( HGLOBAL hGlob,
bool bDelStgOnRelease )
{
cleanup( );
......@@ -150,7 +150,7 @@ void SAL_CALL CStgTransferHelper::init( HGLOBAL hGlob,
// free the global memory and invalidate the stream pointer
void SAL_CALL CStgTransferHelper::cleanup( )
void CStgTransferHelper::cleanup( )
{
if ( m_lpStream && !m_bDelStgOnRelease )
{
......@@ -168,7 +168,7 @@ void SAL_CALL CStgTransferHelper::cleanup( )
// return the size of memory we point to
sal_uInt32 SAL_CALL CStgTransferHelper::memSize( CLIPFORMAT cf ) const
sal_uInt32 CStgTransferHelper::memSize( CLIPFORMAT cf ) const
{
DWORD dwSize = 0;
......
......@@ -58,27 +58,27 @@ public:
~CStgTransferHelper( );
void SAL_CALL write( const void* lpData, ULONG cb, ULONG* cbWritten = nullptr );
void SAL_CALL read( LPVOID pv, ULONG cb, ULONG* pcbRead = nullptr );
void write( const void* lpData, ULONG cb, ULONG* cbWritten = nullptr );
void read( LPVOID pv, ULONG cb, ULONG* pcbRead = nullptr );
HGLOBAL SAL_CALL getHGlobal( ) const;
void SAL_CALL getIStream( LPSTREAM* ppStream );
HGLOBAL getHGlobal( ) const;
void getIStream( LPSTREAM* ppStream );
void SAL_CALL init(
void init(
SIZE_T newSize,
sal_uInt32 uiFlags = GHND,
bool bDelStgOnRelease = false );
void SAL_CALL init(
void init(
HGLOBAL hGlob,
bool bDelStgOnRelease = false );
// returns the size of the managed memory
sal_uInt32 SAL_CALL memSize( CLIPFORMAT cf = CF_INVALID ) const;
sal_uInt32 memSize( CLIPFORMAT cf = CF_INVALID ) const;
// free the global memory and necessary
// release the internal stream pointer
void SAL_CALL cleanup( );
void cleanup( );
private:
LPSTREAM m_lpStream;
......
......@@ -158,7 +158,7 @@ DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const FORMATETC& a
return aFlavor;
}
CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformatName( const OUString& aClipFmtName )
CFormatEtc CDataFormatTranslator::getFormatEtcForClipformatName( const OUString& aClipFmtName )
{
// check parameter
if ( !aClipFmtName.getLength( ) )
......@@ -178,7 +178,7 @@ OUString CDataFormatTranslator::getClipboardFormatName( CLIPFORMAT aClipformat )
return OUString( wBuff, nLen );
}
CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformat( CLIPFORMAT cf )
CFormatEtc CDataFormatTranslator::getFormatEtcForClipformat( CLIPFORMAT cf )
{
CFormatEtc fetc( cf, TYMED_NULL, nullptr, DVASPECT_CONTENT );
......@@ -211,34 +211,34 @@ CFormatEtc SAL_CALL CDataFormatTranslator::getFormatEtcForClipformat( CLIPFORMAT
return fetc;
}
bool SAL_CALL CDataFormatTranslator::isOemOrAnsiTextFormat( CLIPFORMAT cf )
bool CDataFormatTranslator::isOemOrAnsiTextFormat( CLIPFORMAT cf )
{
return ( (cf == CF_TEXT) || (cf == CF_OEMTEXT) );
}
bool SAL_CALL CDataFormatTranslator::isUnicodeTextFormat( CLIPFORMAT cf )
bool CDataFormatTranslator::isUnicodeTextFormat( CLIPFORMAT cf )
{
return ( cf == CF_UNICODETEXT );
}
bool SAL_CALL CDataFormatTranslator::isTextFormat( CLIPFORMAT cf )
bool CDataFormatTranslator::isTextFormat( CLIPFORMAT cf )
{
return ( isOemOrAnsiTextFormat( cf ) || isUnicodeTextFormat( cf ) );
}
bool SAL_CALL CDataFormatTranslator::isHTMLFormat( CLIPFORMAT cf )
bool CDataFormatTranslator::isHTMLFormat( CLIPFORMAT cf )
{
OUString clipFormatName = getClipboardFormatName( cf );
return ( clipFormatName == HTML_FORMAT_NAME_WINDOWS );
}
bool SAL_CALL CDataFormatTranslator::isTextHtmlFormat( CLIPFORMAT cf )
bool CDataFormatTranslator::isTextHtmlFormat( CLIPFORMAT cf )
{
OUString clipFormatName = getClipboardFormatName( cf );
return clipFormatName.equalsIgnoreAsciiCase( HTML_FORMAT_NAME_SOFFICE );
}
OUString SAL_CALL CDataFormatTranslator::getTextCharsetFromLCID( LCID lcid, CLIPFORMAT aClipformat )
OUString CDataFormatTranslator::getTextCharsetFromLCID( LCID lcid, CLIPFORMAT aClipformat )
{
OSL_ASSERT( isOemOrAnsiTextFormat( aClipformat ) );
......
......@@ -51,18 +51,18 @@ public:
css::datatransfer::DataFlavor getDataFlavorFromFormatEtc(
const FORMATETC& aFormatEtc, LCID lcid = GetThreadLocale( ) ) const;
static CFormatEtc SAL_CALL getFormatEtcForClipformat( CLIPFORMAT cf );
static CFormatEtc SAL_CALL getFormatEtcForClipformatName( const OUString& aClipFmtName );
static OUString SAL_CALL getClipboardFormatName( CLIPFORMAT aClipformat );
static CFormatEtc getFormatEtcForClipformat( CLIPFORMAT cf );
static CFormatEtc getFormatEtcForClipformatName( const OUString& aClipFmtName );
static OUString getClipboardFormatName( CLIPFORMAT aClipformat );
static bool SAL_CALL isHTMLFormat( CLIPFORMAT cf );
static bool SAL_CALL isTextHtmlFormat( CLIPFORMAT cf );
static bool SAL_CALL isOemOrAnsiTextFormat( CLIPFORMAT cf );
static bool SAL_CALL isUnicodeTextFormat( CLIPFORMAT cf );
static bool SAL_CALL isTextFormat( CLIPFORMAT cf );
static bool isHTMLFormat( CLIPFORMAT cf );
static bool isTextHtmlFormat( CLIPFORMAT cf );
static bool isOemOrAnsiTextFormat( CLIPFORMAT cf );
static bool isUnicodeTextFormat( CLIPFORMAT cf );
static bool isTextFormat( CLIPFORMAT cf );
private:
static OUString SAL_CALL getTextCharsetFromLCID( LCID lcid, CLIPFORMAT aClipformat );
static OUString getTextCharsetFromLCID( LCID lcid, CLIPFORMAT aClipformat );
private:
css::uno::Reference< css::datatransfer::XDataFormatTranslator > m_XDataFormatTranslator;
......
......@@ -25,7 +25,7 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::lang;
IDataObjectPtr SAL_CALL CDTransObjFactory::createDataObjFromTransferable(const Reference<XComponentContext>& rxContext,
IDataObjectPtr CDTransObjFactory::createDataObjFromTransferable(const Reference<XComponentContext>& rxContext,
const Reference< XTransferable >& refXTransferable)
{
return (IDataObjectPtr(new CXTDataObject(rxContext, refXTransferable)));
......
......@@ -51,7 +51,7 @@ void CFormatEtcContainer::addFormatEtc( const CFormatEtc& fetc )
m_FormatMap.push_back( CFormatEtc( fetc ) );
}
void SAL_CALL CFormatEtcContainer::removeFormatEtc( const CFormatEtc& fetc )
void CFormatEtcContainer::removeFormatEtc( const CFormatEtc& fetc )
{
FormatEtcMap_t::iterator iter =
find( m_FormatMap.begin(), m_FormatMap.end(), fetc );
......@@ -60,7 +60,7 @@ void SAL_CALL CFormatEtcContainer::removeFormatEtc( const CFormatEtc& fetc )
m_FormatMap.erase( iter );
}
void SAL_CALL CFormatEtcContainer::removeAllFormatEtc( )
void CFormatEtcContainer::removeAllFormatEtc( )
{
m_FormatMap.clear( );
}
......@@ -83,7 +83,7 @@ void CFormatEtcContainer::beginEnumFormatEtc( )
m_EnumIterator = m_FormatMap.begin( );
}
sal_uInt32 SAL_CALL CFormatEtcContainer::nextFormatEtc( LPFORMATETC lpFetc,
sal_uInt32 CFormatEtcContainer::nextFormatEtc( LPFORMATETC lpFetc,
sal_uInt32 aNum )
{
OSL_ASSERT( lpFetc );
......@@ -101,7 +101,7 @@ sal_uInt32 SAL_CALL CFormatEtcContainer::nextFormatEtc( LPFORMATETC lpFetc,
return nFetched;
}
bool SAL_CALL CFormatEtcContainer::skipFormatEtc( sal_uInt32 aNum )
bool CFormatEtcContainer::skipFormatEtc( sal_uInt32 aNum )
{
FormatEtcMap_t::const_iterator iter_end = m_FormatMap.end( );
for ( sal_uInt32 i = 0;
......@@ -140,7 +140,7 @@ CFormatRegistrar::CFormatRegistrar( const Reference< XComponentContext >& rxCont
// if some tries to register different text formats with different charsets the last
// registered wins and the others are ignored
void SAL_CALL CFormatRegistrar::RegisterFormats(
void CFormatRegistrar::RegisterFormats(
const Reference< XTransferable >& aXTransferable, CFormatEtcContainer& aFormatEtcContainer )
{
Sequence< DataFlavor > aFlavorList = aXTransferable->getTransferDataFlavors( );
......@@ -221,27 +221,27 @@ void SAL_CALL CFormatRegistrar::RegisterFormats(
}
}
bool SAL_CALL CFormatRegistrar::hasSynthesizedLocale( ) const
bool CFormatRegistrar::hasSynthesizedLocale( ) const
{
return m_bHasSynthesizedLocale;
}
LCID SAL_CALL CFormatRegistrar::getSynthesizedLocale( )
LCID CFormatRegistrar::getSynthesizedLocale( )
{
return m_TxtLocale;
}
sal_uInt32 SAL_CALL CFormatRegistrar::getRegisteredTextCodePage( )
sal_uInt32 CFormatRegistrar::getRegisteredTextCodePage( )
{
return m_TxtCodePage;
}
DataFlavor SAL_CALL CFormatRegistrar::getRegisteredTextFlavor( ) const
DataFlavor CFormatRegistrar::getRegisteredTextFlavor( ) const
{
return m_RegisteredTextFlavor;
}
bool SAL_CALL CFormatRegistrar::isSynthesizeableFormat( const CFormatEtc& aFormatEtc )
bool CFormatRegistrar::isSynthesizeableFormat( const CFormatEtc& aFormatEtc )
{
return ( CDataFormatTranslator::isOemOrAnsiTextFormat( aFormatEtc.getClipformat() ) ||
CDataFormatTranslator::isUnicodeTextFormat( aFormatEtc.getClipformat() ) ||
......@@ -249,14 +249,14 @@ bool SAL_CALL CFormatRegistrar::isSynthesizeableFormat( const CFormatEtc& aForma
}
inline
bool SAL_CALL CFormatRegistrar::needsToSynthesizeAccompanyFormats( const CFormatEtc& aFormatEtc )
bool CFormatRegistrar::needsToSynthesizeAccompanyFormats( const CFormatEtc& aFormatEtc )
{
return ( CDataFormatTranslator::isOemOrAnsiTextFormat( aFormatEtc.getClipformat() ) ||
CDataFormatTranslator::isUnicodeTextFormat( aFormatEtc.getClipformat() ) ||
CDataFormatTranslator::isTextHtmlFormat( aFormatEtc.getClipformat( ) ) );
}
OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor& aFlavor )
OUString CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor& aFlavor )
{
OUString charset;
......@@ -283,7 +283,7 @@ OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor&
return charset;
}
bool SAL_CALL CFormatRegistrar::hasUnicodeFlavor( const Reference< XTransferable >& aXTransferable ) const
bool CFormatRegistrar::hasUnicodeFlavor( const Reference< XTransferable >& aXTransferable ) const
{
CFormatEtc fetc( CF_UNICODETEXT );
......@@ -293,14 +293,14 @@ bool SAL_CALL CFormatRegistrar::hasUnicodeFlavor( const Reference< XTransferable
return aXTransferable->isDataFlavorSupported( aFlavor );
}
bool SAL_CALL CFormatRegistrar::findLocaleForTextCodePage( )
bool CFormatRegistrar::findLocaleForTextCodePage( )
{
m_TxtLocale = 0;
EnumSystemLocalesA( CFormatRegistrar::EnumLocalesProc, LCID_INSTALLED );
return IsValidLocale( m_TxtLocale, LCID_INSTALLED );
}
bool SAL_CALL CFormatRegistrar::isLocaleCodePage( LCID lcid, LCTYPE lctype, sal_uInt32 codepage )
bool CFormatRegistrar::isLocaleCodePage( LCID lcid, LCTYPE lctype, sal_uInt32 codepage )
{
char buff[6];
sal_uInt32 localeCodePage;
......@@ -315,13 +315,13 @@ bool SAL_CALL CFormatRegistrar::isLocaleCodePage( LCID lcid, LCTYPE lctype, sal_
}
inline
bool SAL_CALL CFormatRegistrar::isLocaleOemCodePage( LCID lcid, sal_uInt32 codepage )
bool CFormatRegistrar::isLocaleOemCodePage( LCID lcid, sal_uInt32 codepage )
{
return isLocaleCodePage( lcid, LOCALE_IDEFAULTCODEPAGE, codepage );
}
inline
bool SAL_CALL CFormatRegistrar::isLocaleAnsiCodePage( LCID lcid, sal_uInt32 codepage )
bool CFormatRegistrar::isLocaleAnsiCodePage( LCID lcid, sal_uInt32 codepage )
{
return isLocaleCodePage( lcid, LOCALE_IDEFAULTANSICODEPAGE, codepage );
}
......
......@@ -48,29 +48,29 @@ public:
CFormatEtcContainer( );
// duplicates not allowed
void SAL_CALL addFormatEtc( const CFormatEtc& fetc );
void addFormatEtc( const CFormatEtc& fetc );
// removes the specified formatetc
void SAL_CALL removeFormatEtc( const CFormatEtc& fetc );
void removeFormatEtc( const CFormatEtc& fetc );
// removes the formatetc at pos
void SAL_CALL removeAllFormatEtc( );
void removeAllFormatEtc( );
bool SAL_CALL hasFormatEtc( const CFormatEtc& fetc ) const;
bool hasFormatEtc( const CFormatEtc& fetc ) const;
bool SAL_CALL hasElements( ) const;
bool hasElements( ) const;
// begin enumeration
void SAL_CALL beginEnumFormatEtc( );
void beginEnumFormatEtc( );
// copies the specified number of formatetc structures starting
// at the current enum position
// the return value is the number of copied elements; if the
// current enum position is at the end the return value is 0
sal_uInt32 SAL_CALL nextFormatEtc( LPFORMATETC lpFetc, sal_uInt32 aNum = 1 );
sal_uInt32 nextFormatEtc( LPFORMATETC lpFetc, sal_uInt32 aNum = 1 );
// skips the specified number of elements in the container
bool SAL_CALL skipFormatEtc( sal_uInt32 aNum );
bool skipFormatEtc( sal_uInt32 aNum );
protected:
typedef std::vector< CFormatEtc > FormatEtcMap_t;
......@@ -102,28 +102,28 @@ public:
CFormatRegistrar( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const CDataFormatTranslator& aDataFormatTranslator );
void SAL_CALL RegisterFormats( const css::uno::Reference< css::datatransfer::XTransferable >& aXTransferable,
void RegisterFormats( const css::uno::Reference< css::datatransfer::XTransferable >& aXTransferable,
CFormatEtcContainer& aFormatEtcContainer );
bool SAL_CALL hasSynthesizedLocale( ) const;
static LCID SAL_CALL getSynthesizedLocale( );
static sal_uInt32 SAL_CALL getRegisteredTextCodePage( );
css::datatransfer::DataFlavor SAL_CALL getRegisteredTextFlavor( ) const;
bool hasSynthesizedLocale( ) const;
static LCID getSynthesizedLocale( );
static sal_uInt32 getRegisteredTextCodePage( );
css::datatransfer::DataFlavor getRegisteredTextFlavor( ) const;
static bool SAL_CALL isSynthesizeableFormat( const CFormatEtc& aFormatEtc );
static bool SAL_CALL needsToSynthesizeAccompanyFormats( const CFormatEtc& aFormatEtc );
static bool isSynthesizeableFormat( const CFormatEtc& aFormatEtc );
static bool needsToSynthesizeAccompanyFormats( const CFormatEtc& aFormatEtc );
private:
OUString SAL_CALL getCharsetFromDataFlavor( const css::datatransfer::DataFlavor& aFlavor );
OUString getCharsetFromDataFlavor( const css::datatransfer::DataFlavor& aFlavor );
bool SAL_CALL hasUnicodeFlavor(
bool hasUnicodeFlavor(
const css::uno::Reference< css::datatransfer::XTransferable >& aXTransferable ) const;
static bool SAL_CALL findLocaleForTextCodePage( );
static bool findLocaleForTextCodePage( );
static bool SAL_CALL isLocaleOemCodePage( LCID lcid, sal_uInt32 codepage );
static bool SAL_CALL isLocaleAnsiCodePage( LCID lcid, sal_uInt32 codepage );
static bool SAL_CALL isLocaleCodePage( LCID lcid, LCTYPE lctype, sal_uInt32 codepage );
static bool isLocaleOemCodePage( LCID lcid, sal_uInt32 codepage );
static bool isLocaleAnsiCodePage( LCID lcid, sal_uInt32 codepage );
static bool isLocaleCodePage( LCID lcid, LCTYPE lctype, sal_uInt32 codepage );
static BOOL CALLBACK EnumLocalesProc( LPSTR lpLocaleStr );
......
......@@ -132,7 +132,7 @@ CXNotifyingDataObject::operator IDataObject*( )
return static_cast< IDataObject* >( this );