diff options
241 files changed, 3471 insertions, 3433 deletions
diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx index b52bf85eec16..1cce87481de9 100644 --- a/accessibility/source/standard/vclxaccessibleedit.cxx +++ b/accessibility/source/standard/vclxaccessibleedit.cxx @@ -519,7 +519,7 @@ sal_Bool VCLXAccessibleEdit::pasteText( sal_Int32 nIndex ) throw (IndexOutOfBoun if ( xDataObj.is() ) { datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor ); if ( xDataObj->isDataFlavorSupported( aFlavor ) ) { Any aData = xDataObj->getTransferData( aFlavor ); diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx index d11bf03d9129..bb58c0943230 100644 --- a/basctl/source/basicide/basdoc.cxx +++ b/basctl/source/basicide/basdoc.cxx @@ -69,7 +69,7 @@ void DocShell::SetPrinter( SfxPrinter* pPr ) pPrinter.reset(pPr); } -void DocShell::FillClass( SvGlobalName*, sal_uInt32*, OUString*, OUString*, OUString*, sal_Int32, bool bTemplate) const +void DocShell::FillClass( SvGlobalName*, SotClipboardFormatId*, OUString*, OUString*, OUString*, sal_Int32, bool bTemplate) const { (void)bTemplate; DBG_ASSERT( !bTemplate, "No template for Basic" ); diff --git a/basctl/source/basicide/basdoc.hxx b/basctl/source/basicide/basdoc.hxx index f86bff421e75..bb7393b15ef6 100644 --- a/basctl/source/basicide/basdoc.hxx +++ b/basctl/source/basicide/basdoc.hxx @@ -39,7 +39,7 @@ protected: virtual void Draw( OutputDevice *, const JobSetup & rSetup, sal_uInt16 nAspect = ASPECT_CONTENT ) SAL_OVERRIDE; virtual void FillClass( SvGlobalName * pClassName, - sal_uInt32 * pFormat, + SotClipboardFormatId * pFormat, OUString * pAppName, OUString * pFullTypeName, OUString * pShortTypeName, diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 35ddb67cf5df..eb9ef96c4326 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1412,7 +1412,7 @@ bool ModulWindow::IsPasteAllowed() if ( xTransf.is() ) { datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor ); if ( xTransf->isDataFlavorSupported( aFlavor ) ) bPaste = true; } diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index d7544c8a9681..259cb389abe1 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -260,10 +260,10 @@ void ChartController::executeDispatch_Paste() TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( m_pChartWindow )); if( aDataHelper.GetTransferable().is()) { - if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) ) + if ( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) ) { SotStorageStreamRef xStm; - if ( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_DRAWING, xStm ) ) + if ( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStm ) ) { xStm->Seek( 0 ); Reference< io::XInputStream > xInputStream( new utl::OInputStreamWrapper( *xStm ) ); @@ -274,31 +274,31 @@ void ChartController::executeDispatch_Paste() } } } - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) ) + else if ( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) ) { // graphic exchange format (graphic manager bitmap format?) SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_SVXB, xStm )) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm )) ReadGraphic( *xStm, aGraphic ); } - else if( aDataHelper.HasFormat( FORMAT_GDIMETAFILE )) + else if( aDataHelper.HasFormat( SotClipboardFormatId::GDIMETAFILE )) { // meta file GDIMetaFile aMetafile; - if( aDataHelper.GetGDIMetaFile( FORMAT_GDIMETAFILE, aMetafile )) + if( aDataHelper.GetGDIMetaFile( SotClipboardFormatId::GDIMETAFILE, aMetafile )) aGraphic = Graphic( aMetafile ); } - else if( aDataHelper.HasFormat( FORMAT_BITMAP )) + else if( aDataHelper.HasFormat( SotClipboardFormatId::BITMAP )) { // bitmap (non-graphic-manager) BitmapEx aBmpEx; - if( aDataHelper.GetBitmapEx( FORMAT_BITMAP, aBmpEx )) + if( aDataHelper.GetBitmapEx( SotClipboardFormatId::BITMAP, aBmpEx )) aGraphic = Graphic( aBmpEx ); } - else if( aDataHelper.HasFormat( FORMAT_STRING )) + else if( aDataHelper.HasFormat( SotClipboardFormatId::STRING )) { OUString aString; - if( aDataHelper.GetString( FORMAT_STRING, aString ) && m_pDrawModelWrapper ) + if( aDataHelper.GetString( SotClipboardFormatId::STRING, aString ) && m_pDrawModelWrapper ) { if( m_pDrawViewWrapper ) { diff --git a/chart2/source/controller/main/ChartDropTargetHelper.cxx b/chart2/source/controller/main/ChartDropTargetHelper.cxx index 0857de3f1612..d9722c17ace5 100644 --- a/chart2/source/controller/main/ChartDropTargetHelper.cxx +++ b/chart2/source/controller/main/ChartDropTargetHelper.cxx @@ -82,7 +82,7 @@ sal_Int8 ChartDropTargetHelper::AcceptDrop( const AcceptDropEvent& rEvt ) if( ( rEvt.mnAction == DND_ACTION_COPY || rEvt.mnAction == DND_ACTION_MOVE ) && satisfiesPrerequisites() && - IsDropFormatSupported( SOT_FORMATSTR_ID_LINK ) ) + IsDropFormatSupported( SotClipboardFormatId::LINK ) ) { // @todo: check if the data is suitable. Is this possible without XTransferable? nResult = rEvt.mnAction; @@ -101,9 +101,9 @@ sal_Int8 ChartDropTargetHelper::ExecuteDrop( const ExecuteDropEvent& rEvt ) satisfiesPrerequisites()) { TransferableDataHelper aDataHelper( rEvt.maDropEvent.Transferable ); - if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK )) + if( aDataHelper.HasFormat( SotClipboardFormatId::LINK )) { - Sequence<sal_Int8> aBytes = aDataHelper.GetSequence(SOT_FORMATSTR_ID_LINK, OUString()); + Sequence<sal_Int8> aBytes = aDataHelper.GetSequence(SotClipboardFormatId::LINK, OUString()); if (aBytes.getLength()) { ::std::vector< OUString > aStrings( lcl_getStringsFromByteSequence( aBytes )); diff --git a/chart2/source/controller/main/ChartTransferable.cxx b/chart2/source/controller/main/ChartTransferable.cxx index e46796e65053..d5584d78ad84 100644 --- a/chart2/source/controller/main/ChartTransferable.cxx +++ b/chart2/source/controller/main/ChartTransferable.cxx @@ -30,7 +30,7 @@ #include <svx/unomodel.hxx> #include <svx/svdview.hxx> -#define CHARTTRANSFER_OBJECTTYPE_DRAWMODEL 1 +#define CHARTTRANSFER_OBJECTTYPE_DRAWMODEL SotClipboardFormatId::STRING using namespace ::com::sun::star; @@ -66,30 +66,30 @@ void ChartTransferable::AddSupportedFormats() { if ( m_bDrawing ) { - AddFormat( SOT_FORMATSTR_ID_DRAWING ); + AddFormat( SotClipboardFormatId::DRAWING ); } - AddFormat( SOT_FORMAT_GDIMETAFILE ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); } bool ChartTransferable::GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& /*rDestDoc*/ ) { - sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor ); + SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor ); bool bResult = false; if( HasFormat( nFormat )) { - if ( nFormat == SOT_FORMATSTR_ID_DRAWING ) + if ( nFormat == SotClipboardFormatId::DRAWING ) { bResult = SetObject( m_pMarkedObjModel, CHARTTRANSFER_OBJECTTYPE_DRAWMODEL, rFlavor ); } - else if ( nFormat == FORMAT_GDIMETAFILE ) + else if ( nFormat == SotClipboardFormatId::GDIMETAFILE ) { Graphic aGraphic( m_xMetaFileGraphic ); bResult = SetGDIMetaFile( aGraphic.GetGDIMetaFile(), rFlavor ); } - else if( nFormat == FORMAT_BITMAP ) + else if( nFormat == SotClipboardFormatId::BITMAP ) { Graphic aGraphic( m_xMetaFileGraphic ); bResult = SetBitmapEx( aGraphic.GetBitmapEx(), rFlavor ); @@ -99,7 +99,7 @@ bool ChartTransferable::GetData( const css::datatransfer::DataFlavor& rFlavor, c return bResult; } -bool ChartTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, +bool ChartTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const datatransfer::DataFlavor& /* rFlavor */ ) { // called from SetObject, put data into stream diff --git a/chart2/source/controller/main/ChartTransferable.hxx b/chart2/source/controller/main/ChartTransferable.hxx index 3c54689a07db..5ebf31902825 100644 --- a/chart2/source/controller/main/ChartTransferable.hxx +++ b/chart2/source/controller/main/ChartTransferable.hxx @@ -44,7 +44,7 @@ protected: // implementation of TransferableHelper methods virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; - virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, + virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; private: diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 843347b95c05..13fe8351ece6 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -219,7 +219,7 @@ void HexColorControl::Paste() if ( xDataObj.is() ) { ::com::sun::star::datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor ); try { ::com::sun::star::uno::Any aData = xDataObj->getTransferData( aFlavor ); diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index ec4a270b9e2a..c8e4683b2fa5 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -48,7 +48,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxHyperURLBox(vcl::Wi sal_Int8 SvxHyperURLBox::AcceptDrop( const AcceptDropEvent& /* rEvt */ ) { - return IsDropFormatSupported( FORMAT_STRING ) ? DND_ACTION_COPY : DND_ACTION_NONE; + return IsDropFormatSupported( SotClipboardFormatId::STRING ) ? DND_ACTION_COPY : DND_ACTION_NONE; } sal_Int8 SvxHyperURLBox::ExecuteDrop( const ExecuteDropEvent& rEvt ) @@ -57,7 +57,7 @@ sal_Int8 SvxHyperURLBox::ExecuteDrop( const ExecuteDropEvent& rEvt ) OUString aString; sal_Int8 nRet = DND_ACTION_NONE; - if( aDataHelper.GetString( FORMAT_STRING, aString ) ) + if( aDataHelper.GetString( SotClipboardFormatId::STRING, aString ) ) { SetText( aString ); nRet = DND_ACTION_COPY; diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 0ce111ffdce0..a7478f5c23df 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -86,28 +86,28 @@ SvPasteObjectDialog::~SvPasteObjectDialog() /************************************************************************* |* SvPasteObjectDialog::Insert() *************************************************************************/ -void SvPasteObjectDialog::Insert( SotFormatStringId nFormat, const OUString& rFormatName ) +void SvPasteObjectDialog::Insert( SotClipboardFormatId nFormat, const OUString& rFormatName ) { aSupplementMap.insert( ::std::make_pair( nFormat, rFormatName ) ); } -sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, +SotClipboardFormatId SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, const DataFlavorExVector* pFormats, const TransferableObjectDescriptor* ) { //TODO/LATER: why is the Descriptor never used?! TransferableObjectDescriptor aDesc; - if (rHelper.HasFormat(SOT_FORMATSTR_ID_OBJECTDESCRIPTOR)) + if (rHelper.HasFormat(SotClipboardFormatId::OBJECTDESCRIPTOR)) { (void)const_cast<TransferableDataHelper&>(rHelper).GetTransferableObjectDescriptor( - SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aDesc); + SotClipboardFormatId::OBJECTDESCRIPTOR, aDesc); } if ( !pFormats ) pFormats = &rHelper.GetDataFlavorExVector(); // create and fill dialog box OUString aSourceName, aTypeName; - sal_uLong nSelFormat = 0; + SotClipboardFormatId nSelFormat = SotClipboardFormatId::NONE; SvGlobalName aEmptyNm; ObjectLB().SetUpdateMode( false ); @@ -117,9 +117,9 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, while( aIter != aEnd ) { ::com::sun::star::datatransfer::DataFlavor aFlavor( *aIter ); - SotFormatStringId nFormat = (*aIter++).mnSotId; + SotClipboardFormatId nFormat = (*aIter++).mnSotId; - ::std::map< SotFormatStringId, OUString >::iterator itName = + ::std::map< SotClipboardFormatId, OUString >::iterator itName = aSupplementMap.find( nFormat ); // if there is an "Embed Source" or and "Embedded Object" on the @@ -143,7 +143,7 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, { aName = *pName; - if( SOT_FORMATSTR_ID_EMBED_SOURCE == nFormat ) + if( SotClipboardFormatId::EMBED_SOURCE == nFormat ) { if( aDesc.maClassName != aEmptyNm ) { @@ -155,7 +155,7 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, aName = aTypeName = aDesc.maTypeName; } } - else if( SOT_FORMATSTR_ID_LINK_SOURCE == nFormat ) + else if( SotClipboardFormatId::LINK_SOURCE == nFormat ) { continue; } @@ -201,7 +201,7 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, if( Dialog::Execute() == RET_OK ) { - nSelFormat = reinterpret_cast<sal_uLong>(ObjectLB().GetSelectEntryData()); + nSelFormat = static_cast<SotClipboardFormatId>(reinterpret_cast<sal_uLong>(ObjectLB().GetSelectEntryData())); } return nSelFormat; diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 062d67e9c2bf..f2f368ad4dc1 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -391,7 +391,7 @@ bool AbstractInsertObjectDialog_Impl::IsCreateNew() return pDlg->GetIconIfIconified( pGraphicMediaType ); } -void AbstractPasteDialog_Impl::Insert( SotFormatStringId nFormat, const OUString & rFormatName ) +void AbstractPasteDialog_Impl::Insert( SotClipboardFormatId nFormat, const OUString & rFormatName ) { pDlg->Insert( nFormat, rFormatName ); } @@ -401,7 +401,7 @@ void AbstractPasteDialog_Impl::SetObjName( const SvGlobalName & rClass, const OU pDlg->SetObjName( rClass, rObjName ); } -sal_uLong AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper& aHelper, +SotClipboardFormatId AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper& aHelper, const DataFlavorExVector* pFormats, const TransferableObjectDescriptor* pDesc ) { diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index da68f13ea245..ffb15778c5e1 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -458,9 +458,9 @@ class AbstractPasteDialog_Impl : public SfxAbstractPasteDialog { public: DECL_ABSTDLG_BASE(AbstractPasteDialog_Impl, SvPasteObjectDialog ) - virtual void Insert( SotFormatStringId nFormat, const OUString & rFormatName ) SAL_OVERRIDE; + virtual void Insert( SotClipboardFormatId nFormat, const OUString & rFormatName ) SAL_OVERRIDE; virtual void SetObjName( const SvGlobalName & rClass, const OUString & rObjName ) SAL_OVERRIDE; - virtual sal_uLong GetFormat( const TransferableDataHelper& aHelper, + virtual SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper, const DataFlavorExVector* pFormats=0, const TransferableObjectDescriptor* pDesc=0 ) SAL_OVERRIDE; }; diff --git a/cui/source/inc/pastedlg.hxx b/cui/source/inc/pastedlg.hxx index c7b815f764cb..52332ac398ed 100644 --- a/cui/source/inc/pastedlg.hxx +++ b/cui/source/inc/pastedlg.hxx @@ -42,7 +42,7 @@ class SvPasteObjectDialog : public ModalDialog FixedText* m_pFtObjectSource; ListBox* m_pLbInsertList; OKButton* m_pOKButton; - ::std::map< SotFormatStringId, OUString > aSupplementMap; + ::std::map< SotClipboardFormatId, OUString > aSupplementMap; SvGlobalName aObjClassName; OUString aObjName; @@ -57,9 +57,9 @@ public: SvPasteObjectDialog( vcl::Window* pParent ); virtual ~SvPasteObjectDialog(); - void Insert( SotFormatStringId nFormat, const OUString & rFormatName ); + void Insert( SotClipboardFormatId nFormat, const OUString & rFormatName ); void SetObjName( const SvGlobalName & rClass, const OUString & rObjName ); - sal_uLong GetFormat( const TransferableDataHelper& aHelper, + SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper, const DataFlavorExVector* pFormats=0, const TransferableObjectDescriptor* pDesc=0 ); }; diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 849faa8b8006..95ecf0505770 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -2313,7 +2313,7 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const nEncode)); sData.append(aLineEnd); } - pCntnr->CopyByteString( SOT_FORMAT_STRING, sData.makeStringAndClear() ); + pCntnr->CopyByteString( SotClipboardFormatId::STRING, sData.makeStringAndClear() ); pCntnr->CopyToClipboard( (vcl::Window*)this ); } } diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index cfbb3a9f069c..618237e17f7e 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -598,7 +598,7 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const aReturn.bEnabled = !isDataSourceReadOnly() && !isConnectionReadOnly() && isTableFormat(); break; case E_QUERY: - aReturn.bEnabled = !isDataSourceReadOnly() && getViewClipboard().HasFormat(SOT_FORMATSTR_ID_DBACCESS_QUERY); + aReturn.bEnabled = !isDataSourceReadOnly() && getViewClipboard().HasFormat(SotClipboardFormatId::DBACCESS_QUERY); break; default: aReturn.bEnabled = !isDataSourceReadOnly() && OComponentTransferable::canExtractComponentDescriptor(getViewClipboard().GetDataFlavorExVector(),getContainer()->getElementType() == E_FORM); @@ -1033,7 +1033,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa break; case E_QUERY: - if ( rTransferData.HasFormat(SOT_FORMATSTR_ID_DBACCESS_QUERY) ) + if ( rTransferData.HasFormat(SotClipboardFormatId::DBACCESS_QUERY) ) paste( E_QUERY, ODataAccessObjectTransferable::extractObjectDescriptor( rTransferData ) ); break; default: @@ -1064,11 +1064,11 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); ::std::unique_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( getView() )); - ::std::vector<SotFormatStringId> aFormatIds; + ::std::vector<SotClipboardFormatId> aFormatIds; getSupportedFormats(getContainer()->getElementType(),aFormatIds); - const ::std::vector<SotFormatStringId>::iterator aEnd = aFormatIds.end(); + const ::std::vector<SotClipboardFormatId>::iterator aEnd = aFormatIds.end(); OUString sEmpty; - for (::std::vector<SotFormatStringId>::iterator aIter = aFormatIds.begin();aIter != aEnd; ++aIter) + for (::std::vector<SotClipboardFormatId>::iterator aIter = aFormatIds.begin();aIter != aEnd; ++aIter) pDlg->Insert(*aIter,sEmpty); const TransferableDataHelper& rClipboard = getViewClipboard(); @@ -1082,9 +1082,9 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa { if ( pIter->Name == "FormatStringId" ) { - SotFormatStringId nFormatId = 0; - if ( pIter->Value >>= nFormatId ) - pasteFormat(nFormatId); + sal_uLong nTmp; + if ( pIter->Value >>= nTmp ) + pasteFormat(static_cast<SotClipboardFormatId>(nTmp)); break; } } diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx index 42237ce3d154..17ac7e840dbb 100644 --- a/dbaccess/source/ui/app/AppController.hxx +++ b/dbaccess/source/ui/app/AppController.hxx @@ -259,7 +259,7 @@ namespace dbaui @param _nFormatId The format to be copied. */ - void pasteFormat(sal_uInt32 _nFormatId); + void pasteFormat(SotClipboardFormatId _nFormatId); /** pastes a query, form or report into the data source @param _eType @@ -287,7 +287,7 @@ namespace dbaui @param _rFormatIds The vector to be filled up. */ - void getSupportedFormats(ElementType _eType,::std::vector<SotFormatStringId>& _rFormatIds) const; + void getSupportedFormats(ElementType _eType,::std::vector<SotClipboardFormatId>& _rFormatIds) const; /** adds a listener to the current name access. @param _xCollection diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index 4736dc244d6a..39e4ecf1d85b 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -773,17 +773,17 @@ Reference<XNameContainer> OApplicationController::getQueryDefinitions() const return xNames; } -void OApplicationController::getSupportedFormats(ElementType _eType,::std::vector<SotFormatStringId>& _rFormatIds) const +void OApplicationController::getSupportedFormats(ElementType _eType,::std::vector<SotClipboardFormatId>& _rFormatIds) const { switch( _eType ) { case E_TABLE: - _rFormatIds.push_back(SOT_FORMATSTR_ID_DBACCESS_TABLE); - _rFormatIds.push_back(SOT_FORMAT_RTF); - _rFormatIds.push_back(SOT_FORMATSTR_ID_HTML); + _rFormatIds.push_back(SotClipboardFormatId::DBACCESS_TABLE); + _rFormatIds.push_back(SotClipboardFormatId::RTF); + _rFormatIds.push_back(SotClipboardFormatId::HTML); // run through case E_QUERY: - _rFormatIds.push_back(SOT_FORMATSTR_ID_DBACCESS_QUERY); + _rFormatIds.push_back(SotClipboardFormatId::DBACCESS_QUERY); break; default: break; diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index 45185eda5691..3eda31592a78 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -135,9 +135,9 @@ void OApplicationController::convertToView(const OUString& _sName) } } -void OApplicationController::pasteFormat(sal_uInt32 _nFormatId) +void OApplicationController::pasteFormat(SotClipboardFormatId _nFormatId) { - if ( _nFormatId ) + if ( _nFormatId != SotClipboardFormatId::NONE ) { try { diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 6f0532958e43..8a001974e4eb 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1491,7 +1491,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const aReturn.bEnabled = m_aCurrentFrame.isActive() && !bIsReadOnly; if(aReturn.bEnabled) { - aReturn.bEnabled = aReturn.bEnabled && IsFormatSupported( m_aSystemClipboard.GetDataFlavorExVector(), FORMAT_STRING ); + aReturn.bEnabled = aReturn.bEnabled && IsFormatSupported( m_aSystemClipboard.GetDataFlavorExVector(), SotClipboardFormatId::STRING ); } break; } diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx index 616f504f6538..5df1f04e30c9 100644 --- a/dbaccess/source/ui/browser/dbexchange.cxx +++ b/dbaccess/source/ui/browser/dbexchange.cxx @@ -134,9 +134,9 @@ namespace dbaui osl_atomic_decrement( &m_refCount ); } - bool ODataClipboard::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /*rFlavor*/ ) + bool ODataClipboard::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /*rFlavor*/ ) { - if (nUserObjectId == SOT_FORMAT_RTF || nUserObjectId == SOT_FORMATSTR_ID_HTML ) + if (nUserObjectId == SotClipboardFormatId::RTF || nUserObjectId == SotClipboardFormatId::HTML ) { ODatabaseImportExport* pExport = reinterpret_cast<ODatabaseImportExport*>(pUserObject); if ( pExport && rxOStm.Is() ) @@ -151,28 +151,30 @@ namespace dbaui void ODataClipboard::AddSupportedFormats() { if ( m_pRtf.is() ) - AddFormat( SOT_FORMAT_RTF ); + AddFormat( SotClipboardFormatId::RTF ); if ( m_pHtml.is() ) - AddFormat( SOT_FORMATSTR_ID_HTML ); + AddFormat( SotClipboardFormatId::HTML ); ODataAccessObjectTransferable::AddSupportedFormats(); } bool ODataClipboard::GetData( const DataFlavor& rFlavor, const OUString& rDestDoc ) { - const sal_uLong nFormat = SotExchange::GetFormat(rFlavor); + const SotClipboardFormatId nFormat = SotExchange::GetFormat(rFlavor); switch (nFormat) { - case SOT_FORMAT_RTF: + case SotClipboardFormatId::RTF: if ( m_pRtf.is() ) m_pRtf->initialize(getDescriptor()); - return m_pRtf.is() && SetObject( m_pRtf.get(), SOT_FORMAT_RTF, rFlavor ); + return m_pRtf.is() && SetObject( m_pRtf.get(), SotClipboardFormatId::RTF, rFlavor ); - case SOT_FORMATSTR_ID_HTML: + case SotClipboardFormatId::HTML: if ( m_pHtml.is() ) m_pHtml->initialize(getDescriptor()); - return m_pHtml.is() && SetObject( m_pHtml.get(), SOT_FORMATSTR_ID_HTML, rFlavor ); + return m_pHtml.is() && SetObject( m_pHtml.get(), SotClipboardFormatId::HTML, rFlavor ); + + default: break; } return ODataAccessObjectTransferable::GetData(rFlavor, rDestDoc); diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 632e7fd8e13c..71e7b14bb783 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -1251,10 +1251,11 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) { switch (_aType.mnSotId) { - case SOT_FORMATSTR_ID_DBACCESS_TABLE: // table descriptor - case SOT_FORMATSTR_ID_DBACCESS_QUERY: // query descriptor - case SOT_FORMATSTR_ID_DBACCESS_COMMAND: // SQL command + case SotClipboardFormatId::DBACCESS_TABLE: // table descriptor + case SotClipboardFormatId::DBACCESS_QUERY: // query descriptor + case SotClipboardFormatId::DBACCESS_COMMAND: // SQL command return true; + default: break; } return false; } @@ -1267,7 +1268,7 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) if (!::dbtools::getConnection(Reference< XRowSet > (getDataSource(),UNO_QUERY)).is()) return nAction; - if ( IsDropFormatSupported( FORMAT_STRING ) ) do + if ( IsDropFormatSupported( SotClipboardFormatId::STRING ) ) do { // odd construction, but spares us a lot of (explicit ;) goto's if (!GetEmptyRow().Is()) @@ -1366,7 +1367,7 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) if (!::dbtools::getConnection(Reference< XRowSet > (xDataSource,UNO_QUERY)).is()) return DND_ACTION_NONE; - if ( IsDropFormatSupported( FORMAT_STRING ) ) + if ( IsDropFormatSupported( SotClipboardFormatId::STRING ) ) { long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false); sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), false); @@ -1395,7 +1396,7 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) // get the dropped string TransferableDataHelper aDropped( rEvt.maDropEvent.Transferable ); OUString sDropped; - if ( !aDropped.GetString( FORMAT_STRING, sDropped ) ) + if ( !aDropped.GetString( SotClipboardFormatId::STRING, sDropped ) ) return DND_ACTION_NONE; rEdit.SetText( sDropped ); diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index 2566839d1b52..7643cfeb50e0 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1610,7 +1610,7 @@ bool OFieldDescControl::isPasteAllowed() if ( bAllowed ) { TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent())); - bAllowed = aTransferData.HasFormat(SOT_FORMAT_STRING); + bAllowed = aTransferData.HasFormat(SotClipboardFormatId::STRING); } return bAllowed; } diff --git a/dbaccess/source/ui/inc/JoinExchange.hxx b/dbaccess/source/ui/inc/JoinExchange.hxx index 18ab49a2c4fd..34e0d83166bc 100644 --- a/dbaccess/source/ui/inc/JoinExchange.hxx +++ b/dbaccess/source/ui/inc/JoinExchange.hxx @@ -57,7 +57,7 @@ namespace dbaui void StartDrag( vcl::Window* pWindow, sal_Int8 nDragSourceActions, IDragTransferableListener* _pListener ); static OJoinExchangeData GetSourceDescription(const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& _rxObject); - static bool isFormatAvailable( const DataFlavorExVector& _rFormats ,SotFormatStringId _nSlotID=SOT_FORMATSTR_ID_SBA_JOIN); + static bool isFormatAvailable( const DataFlavorExVector& _rFormats ,SotClipboardFormatId _nSlotID=SotClipboardFormatId::SBA_JOIN); protected: virtual void AddSupportedFormats() SAL_OVERRIDE; diff --git a/dbaccess/source/ui/inc/TableCopyHelper.hxx b/dbaccess/source/ui/inc/TableCopyHelper.hxx index 3ffefd87de26..d7795d12f26d 100644 --- a/dbaccess/source/ui/inc/TableCopyHelper.hxx +++ b/dbaccess/source/ui/inc/TableCopyHelper.hxx @@ -47,13 +47,14 @@ namespace dbaui { switch (_aType.mnSotId) { - case SOT_FORMAT_RTF: // RTF data descriptions - case SOT_FORMATSTR_ID_HTML: // HTML data descriptions - case SOT_FORMATSTR_ID_DBACCESS_TABLE: // table descriptor + case SotClipboardFormatId::RTF: // RTF data descriptions + case SotClipboardFormatId::HTML: // HTML data descriptions + case SotClipboardFormatId::DBACCESS_TABLE: // table descriptor return (E_TABLE == eEntryType); - case SOT_FORMATSTR_ID_DBACCESS_QUERY: // query descriptor - case SOT_FORMATSTR_ID_DBACCESS_COMMAND: // SQL command + case SotClipboardFormatId::DBACCESS_QUERY: // query descriptor + case SotClipboardFormatId::DBACCESS_COMMAND: // SQL command return ((E_QUERY == eEntryType) || ( !bQueryDrop && E_TABLE == eEntryType)); + default: break; } return false; } @@ -111,7 +112,7 @@ namespace dbaui @param _sDestDataSourceName The name of the dest data source. */ - void pasteTable( SotFormatStringId _nFormatId + void pasteTable( SotClipboardFormatId _nFormatId ,const TransferableDataHelper& _rTransData ,const OUString& _sDestDataSourceName ,const SharedConnection& _xConnection); diff --git a/dbaccess/source/ui/inc/TableRowExchange.hxx b/dbaccess/source/ui/inc/TableRowExchange.hxx index 0f49ee4515db..84cc98404c0b 100644 --- a/dbaccess/source/ui/inc/TableRowExchange.hxx +++ b/dbaccess/source/ui/inc/TableRowExchange.hxx @@ -35,7 +35,7 @@ namespace dbaui protected: virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; - virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; + virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; virtual void ObjectReleased() SAL_OVERRIDE; }; } diff --git a/dbaccess/source/ui/inc/dbexchange.hxx b/dbaccess/source/ui/inc/dbexchange.hxx index fa2d9be451c6..47dfd7a35c14 100644 --- a/dbaccess/source/ui/inc/dbexchange.hxx +++ b/dbaccess/source/ui/inc/dbexchange.hxx @@ -79,7 +79,7 @@ namespace dbaui virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; virtual void ObjectReleased() SAL_OVERRIDE; - virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; + virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; }; } diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx index 9906ff559bee..b9ad29c123d8 100644 --- a/dbaccess/source/ui/misc/TableCopyHelper.cxx +++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx @@ -177,12 +177,12 @@ void OTableCopyHelper::pasteTable( const ::svx::ODataAccessDescriptor& _rPasteDa i_rDestDataSourceName, i_rDestConnection ); } -void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId +void OTableCopyHelper::pasteTable( SotClipboardFormatId _nFormatId ,const TransferableDataHelper& _rTransData ,const OUString& i_rDestDataSource ,const SharedConnection& _xConnection) { - if ( _nFormatId == SOT_FORMATSTR_ID_DBACCESS_TABLE || _nFormatId == SOT_FORMATSTR_ID_DBACCESS_QUERY ) + if ( _nFormatId == SotClipboardFormatId::DBACCESS_TABLE || _nFormatId == SotClipboardFormatId::DBACCESS_QUERY ) { if ( ODataAccessObjectTransferable::canExtractObjectDescriptor(_rTransData.GetDataFlavorExVector()) ) { @@ -196,13 +196,13 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId { DropDescriptor aTrans; bool bOk; - if ( _nFormatId != SOT_FORMAT_RTF ) - bOk = const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SOT_FORMATSTR_ID_HTML ,aTrans.aHtmlRtfStorage); + if ( _nFormatId != SotClipboardFormatId::RTF ) + bOk = const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SotClipboardFormatId::HTML ,aTrans.aHtmlRtfStorage); else - bOk = const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SOT_FORMAT_RTF,aTrans.aHtmlRtfStorage); + bOk = const_cast<TransferableDataHelper&>(_rTransData).GetSotStorageStream(SotClipboardFormatId::RTF,aTrans.aHtmlRtfStorage); aTrans.nType = E_TABLE; - aTrans.bHtml = SOT_FORMATSTR_ID_HTML == _nFormatId; + aTrans.bHtml = SotClipboardFormatId::HTML == _nFormatId; aTrans.sDefaultTableName = GetTableNameForAppend(); if ( !bOk || !copyTagTable(aTrans,false,_xConnection) ) m_pController->showError(SQLException(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE), *m_pController, OUString("S1000"), 0, Any())); @@ -224,12 +224,12 @@ void OTableCopyHelper::pasteTable( const TransferableDataHelper& _rTransData ,const OUString& i_rDestDataSource ,const SharedConnection& _xConnection) { - if ( _rTransData.HasFormat(SOT_FORMATSTR_ID_DBACCESS_TABLE) || _rTransData.HasFormat(SOT_FORMATSTR_ID_DBACCESS_QUERY) ) - pasteTable( SOT_FORMATSTR_ID_DBACCESS_TABLE,_rTransData,i_rDestDataSource,_xConnection); - else if ( _rTransData.HasFormat(SOT_FORMATSTR_ID_HTML) ) - pasteTable( SOT_FORMATSTR_ID_HTML,_rTransData,i_rDestDataSource,_xConnection); - else if ( _rTransData.HasFormat(SOT_FORMAT_RTF) ) - pasteTable( SOT_FORMAT_RTF,_rTransData,i_rDestDataSource,_xConnection); + if ( _rTransData.HasFormat(SotClipboardFormatId::DBACCESS_TABLE) || _rTransData.HasFormat(SotClipboardFormatId::DBACCESS_QUERY) ) + pasteTable( SotClipboardFormatId::DBACCESS_TABLE,_rTransData,i_rDestDataSource,_xConnection); + else if ( _rTransData.HasFormat(SotClipboardFormatId::HTML) ) + pasteTable( SotClipboardFormatId::HTML,_rTransData,i_rDestDataSource,_xConnection); + else if ( _rTransData.HasFormat(SotClipboardFormatId::RTF) ) + pasteTable( SotClipboardFormatId::RTF,_rTransData,i_rDestDataSource,_xConnection); } bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc, bool _bCheck, const SharedConnection& _xConnection) @@ -255,10 +255,10 @@ bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc, bo bool OTableCopyHelper::isTableFormat(const TransferableDataHelper& _rClipboard) const { - bool bTableFormat = _rClipboard.HasFormat(SOT_FORMATSTR_ID_DBACCESS_TABLE) - || _rClipboard.HasFormat(SOT_FORMATSTR_ID_DBACCESS_QUERY) - || _rClipboard.HasFormat(SOT_FORMAT_RTF) - || _rClipboard.HasFormat(SOT_FORMATSTR_ID_HTML); + bool bTableFormat = _rClipboard.HasFormat(SotClipboardFormatId::DBACCESS_TABLE) + || _rClipboard.HasFormat(SotClipboardFormatId::DBACCESS_QUERY) + || _rClipboard.HasFormat(SotClipboardFormatId::RTF) + || _rClipboard.HasFormat(SotClipboardFormatId::HTML); return bTableFormat; } @@ -268,14 +268,14 @@ bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedData ,const SharedConnection& _xConnection) { bool bRet = false; - bool bHtml = _aDroppedData.HasFormat(SOT_FORMATSTR_ID_HTML); - if ( bHtml || _aDroppedData.HasFormat(SOT_FORMAT_RTF) ) + bool bHtml = _aDroppedData.HasFormat(SotClipboardFormatId::HTML); + if ( bHtml || _aDroppedData.HasFormat(SotClipboardFormatId::RTF) ) { bool bOk; if ( bHtml ) - bOk = const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SOT_FORMATSTR_ID_HTML ,_rAsyncDrop.aHtmlRtfStorage); + bOk = const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SotClipboardFormatId::HTML ,_rAsyncDrop.aHtmlRtfStorage); else - bOk = const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SOT_FORMAT_RTF,_rAsyncDrop.aHtmlRtfStorage); + bOk = const_cast<TransferableDataHelper&>(_aDroppedData).GetSotStorageStream(SotClipboardFormatId::RTF,_rAsyncDrop.aHtmlRtfStorage); _rAsyncDrop.bHtml = bHtml; _rAsyncDrop.bError = !copyTagTable(_rAsyncDrop,true,_xConnection); diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx index eb05f2009faa..0cc4c779c3c4 100644 --- a/dbaccess/source/ui/querydesign/JoinExchange.cxx +++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx @@ -56,7 +56,7 @@ namespace dbaui m_pDragListener = NULL; } - bool OJoinExchObj::isFormatAvailable( const DataFlavorExVector& _rFormats ,SotFormatStringId _nSlotID) + bool OJoinExchObj::isFormatAvailable( const DataFlavorExVector& _rFormats ,SotClipboardFormatId _nSlotID) { DataFlavorExVector::const_iterator aCheckEnd = _rFormats.end(); for ( DataFlavorExVector::const_iterator aCheck = _rFormats.begin(); @@ -108,15 +108,15 @@ namespace dbaui void OJoinExchObj::AddSupportedFormats() { - AddFormat( SOT_FORMATSTR_ID_SBA_JOIN ); + AddFormat( SotClipboardFormatId::SBA_JOIN ); if ( m_bFirstEntry ) - AddFormat( SOT_FORMATSTR_ID_SBA_TABID ); + AddFormat( SotClipboardFormatId::SBA_TABID ); } bool OJoinExchObj::GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& /*rDestDoc*/ ) { - sal_uInt32 nFormat = SotExchange::GetFormat(rFlavor); - if ( SOT_FORMATSTR_ID_SBA_JOIN == nFormat ) + SotClipboardFormatId nFormat = SotExchange::GetFormat(rFlavor); + if ( SotClipboardFormatId::SBA_JOIN == nFormat ) // this is a HACK // we don't really copy our data, the instances using us have to call GetSourceDescription .... // if, one day, we have a _lot_ of time, this hack should be removed .... diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index f11a7b8e155d..1796dcf8e574 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -214,8 +214,8 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) { sal_Int8 nDND_Action = DND_ACTION_NONE; // check the format - if ( !OJoinExchObj::isFormatAvailable(GetDataFlavorExVector(),SOT_FORMATSTR_ID_SBA_TABID) // this means that the first entry is to be draged - && OJoinExchObj::isFormatAvailable(GetDataFlavorExVector(),SOT_FORMATSTR_ID_SBA_JOIN) ) + if ( !OJoinExchObj::isFormatAvailable(GetDataFlavorExVector(),SotClipboardFormatId::SBA_TABID) // this means that the first entry is to be draged + && OJoinExchObj::isFormatAvailable(GetDataFlavorExVector(),SotClipboardFormatId::SBA_JOIN) ) { // don't drop into the window if it's the drag source itself // remove the selection if the dragging operation is leaving the window diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index ad3e5287a3f1..d8b907d4183e 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -769,10 +769,10 @@ void OTableEditorCtrl::InsertRows( long nRow ) ::std::vector< ::boost::shared_ptr<OTableRow> > vInsertedUndoRedoRows; // need for undo/redo handling // get rows from clipboard TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent())); - if(aTransferData.HasFormat(SOT_FORMATSTR_ID_SBA_TABED)) + if(aTransferData.HasFormat(SotClipboardFormatId::SBA_TABED)) { SotStorageStreamRef aStreamRef; - bool bOk = aTransferData.GetSotStorageStream(SOT_FORMATSTR_ID_SBA_TABED,aStreamRef); + bool bOk = aTransferData.GetSotStorageStream(SotClipboardFormatId::SBA_TABED,aStreamRef); if (bOk && aStreamRef.Is()) { aStreamRef->Seek(STREAM_SEEK_TO_BEGIN); @@ -1173,11 +1173,11 @@ bool OTableEditorCtrl::IsPasteAllowed( long /*nRow*/ ) if ( bAllowed ) { TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent())); - bool bRowFormat = aTransferData.HasFormat(SOT_FORMATSTR_ID_SBA_TABED); + bool bRowFormat = aTransferData.HasFormat(SotClipboardFormatId::SBA_TABED); if ( m_eChildFocus == ROW ) bAllowed = bRowFormat; else - bAllowed = !bRowFormat && aTransferData.HasFormat(SOT_FORMAT_STRING); + bAllowed = !bRowFormat && aTransferData.HasFormat(SotClipboardFormatId::STRING); } return bAllowed; @@ -1235,7 +1235,7 @@ void OTableEditorCtrl::copy() void OTableEditorCtrl::paste() { TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent())); - if(aTransferData.HasFormat(SOT_FORMATSTR_ID_SBA_TABED)) + if(aTransferData.HasFormat(SotClipboardFormatId::SBA_TABED)) { if( nPasteEvent ) Application::RemoveUserEvent( nPasteEvent ); diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx index 37e68dd35e6e..b6d036b13889 100644 --- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx +++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx @@ -30,9 +30,9 @@ namespace dbaui : m_vTableRow(_rvTableRow) { } - bool OTableRowExchange::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /*rFlavor*/ ) + bool OTableRowExchange::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /*rFlavor*/ ) { - if(nUserObjectId == SOT_FORMATSTR_ID_SBA_TABED) + if(nUserObjectId == SotClipboardFormatId::SBA_TABED) { ::std::vector< ::boost::shared_ptr<OTableRow> >* pRows = reinterpret_cast< ::std::vector< ::boost::shared_ptr<OTableRow> >* >(pUserObject); if(pRows) @@ -50,13 +50,13 @@ namespace dbaui void OTableRowExchange::AddSupportedFormats() { if ( !m_vTableRow.empty() ) - AddFormat(SOT_FORMATSTR_ID_SBA_TABED); + AddFormat(SotClipboardFormatId::SBA_TABED); } bool OTableRowExchange::GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& /*rDestDoc*/ ) { - sal_uLong nFormat = SotExchange::GetFormat(rFlavor); - if(nFormat == SOT_FORMATSTR_ID_SBA_TABED) - return SetObject(&m_vTableRow,SOT_FORMATSTR_ID_SBA_TABED,rFlavor); + SotClipboardFormatId nFormat = SotExchange::GetFormat(rFlavor); + if(nFormat == SotClipboardFormatId::SBA_TABED) + return SetObject(&m_vTableRow,SotClipboardFormatId::SBA_TABED,rFlavor); return false; } void OTableRowExchange::ObjectReleased() diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 156f4fac96f4..888ab99fb81c 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -215,9 +215,9 @@ Sequence< OUString > SAL_CALL CDataFormatTranslator::getSupportedServiceNames( ) void SAL_CALL CDataFormatTranslator::initTranslationTable() { - //SOT_FORMATSTR_ID_DIF + //SotClipboardFormatId::DIF m_TranslTable.push_back(FormatEntry("application/x-openoffice-dif;windows_formatname=\"DIF\"", "DIF", "DIF", CF_DIF, CPPUTYPE_DEFAULT)); - // SOT_FORMAT_BITMAP + // SotClipboardFormatId::BITMAP // #i124085# CF_DIBV5 disabled, leads to problems at export. To fully support, using // an own mime-type may be necessary. I have tried that, but saw no real advantages @@ -227,7 +227,7 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable() m_TranslTable.push_back(FormatEntry("application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", "Bitmap", CF_DIB, CPPUTYPE_DEFAULT)); m_TranslTable.push_back(FormatEntry("application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", "Bitmap", CF_BITMAP, CPPUTYPE_DEFAULT)); - // SOT_FORMAT_STRING + // SotClipboardFormatId::STRING m_TranslTable.push_back(FormatEntry("text/plain;charset=utf-16", "Unicode-Text", "", CF_UNICODETEXT, CppuType_String)); // Format Locale - for internal use m_TranslTable.push_back(FormatEntry("application/x-openoffice-locale;windows_formatname=\"Locale\"", "Locale", "Locale", CF_LOCALE, CPPUTYPE_DEFAULT)); @@ -235,232 +235,232 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable() m_TranslTable.push_back(FormatEntry("application/x-openoffice-wmf;windows_formatname=\"Image WMF\"", "Windows MetaFile", "Image WMF", CF_METAFILEPICT, CPPUTYPE_DEFAULT)); // SOT_FORMAT_EMF m_TranslTable.push_back(FormatEntry("application/x-openoffice-emf;windows_formatname=\"Image EMF\"", "Windows Enhanced MetaFile", "Image EMF", CF_ENHMETAFILE, CPPUTYPE_DEFAULT)); - // SOT_FORMAT_FILE_LIST + // SotClipboardFormatId::FILE_LIST m_TranslTable.push_back(FormatEntry("application/x-openoffice-filelist;windows_formatname=\"FileList\"", "FileList", "FileList", CF_HDROP, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SYLK + //SotClipboardFormatId::SYLK m_TranslTable.push_back(FormatEntry("application/x-openoffice-sylk;windows_formatname=\"Sylk\"", "Sylk", "Sylk", CF_SYLK, CPPUTYPE_DEFAULT ) ); - // SOT_FORMAT_GDIMETAFILE + // SotClipboardFormatId::GDIMETAFILE m_TranslTable.push_back(FormatEntry("application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"", "GDIMetaFile", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMAT_PRIVATE + // SotClipboardFormatId::PRIVATE m_TranslTable.push_back(FormatEntry("application/x-openoffice-private;windows_formatname=\"Private\"", "Private", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMAT_FILE + // SotClipboardFormatId::FILE m_TranslTable.push_back(FormatEntry("application/x-openoffice-file;windows_formatname=\"FileName\"", "FileName", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMAT_RTF + // SotClipboardFormatId::RTF m_TranslTable.push_back(FormatEntry("text/richtext", "Rich Text Format", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_DRAWING + // SotClipboardFormatId::DRAWING m_TranslTable.push_back(FormatEntry("application/x-openoffice-drawing;windows_formatname=\"Drawing Format\"", "Drawing Format", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_SVXB + // SotClipboardFormatId::SVXB m_TranslTable.push_back(FormatEntry("application/x-openoffice-svbx;windows_formatname=\"SVXB (StarView Bitmap/Animation)\"", "SVXB (StarView Bitmap/Animation)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_SVIM + // SotClipboardFormatId::SVIM m_TranslTable.push_back(FormatEntry("application/x-openoffice-svim;windows_formatname=\"SVIM (StarView ImageMap)\"", "SVIM (StarView ImageMap)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_XFA + // SotClipboardFormatId::XFA m_TranslTable.push_back(FormatEntry("application/x-openoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr)\"", "XFA (XOutDev FillAttr)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_EDITENGINE + // SotClipboardFormatId::EDITENGINE m_TranslTable.push_back(FormatEntry("application/x-openoffice-editengine;windows_formatname=\"EditEngineFormat\"", "EditEngineFormat", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_INTERNALLINK_STATE + // SotClipboardFormatId::INTERNALLINK_STATE m_TranslTable.push_back(FormatEntry("application/x-openoffice-internallink-state;windows_formatname=\"StatusInfo vom SvxInternalLink\"", "StatusInfo vom SvxInternalLink", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_SOLK + // SotClipboardFormatId::SOLK m_TranslTable.push_back(FormatEntry("application/x-openoffice-solk;windows_formatname=\"SOLK (StarOffice Link)\"", "SOLK (StarOffice Link)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK + // SotClipboardFormatId::NETSCAPE_BOOKMARK m_TranslTable.push_back(FormatEntry("application/x-openoffice-netscape-bookmark;windows_formatname=\"Netscape Bookmark\"", "Netscape Bookmark", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_TREELISTBOX + // SotClipboardFormatId::TREELISTBOX m_TranslTable.push_back(FormatEntry("application/x-openoffice-treelistbox;windows_formatname=\"SV_LBOX_DD_FORMAT\"", "SV_LBOX_DD_FORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_NATIVE + // SotClipboardFormatId::NATIVE m_TranslTable.push_back(FormatEntry("application/x-openoffice-native;windows_formatname=\"Native\"", "Native", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_OWNERLINK + // SotClipboardFormatId::OWNERLINK m_TranslTable.push_back(FormatEntry("application/x-openoffice-ownerlink;windows_formatname=\"OwnerLink\"", "OwnerLink", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_STARSERVER + // SotClipboardFormatId::STARSERVER m_TranslTable.push_back(FormatEntry("application/x-openoffice-starserver;windows_formatname=\"StarServerFormat\"", "StarServerFormat", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_STAROBJECT + // SotClipboardFormatId::STAROBJECT m_TranslTable.push_back(FormatEntry("application/x-openoffice-starobject;windows_formatname=\"StarObjectFormat\"", "StarObjectFormat", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_APPLETOBJECT + // SotClipboardFormatId::APPLETOBJECT m_TranslTable.push_back(FormatEntry("application/x-openoffice-appletobject;windows_formatname=\"Applet Object\"", "Applet Object", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_PLUGIN_OBJECT + // SotClipboardFormatId::PLUGIN_OBJECT m_TranslTable.push_back(FormatEntry("application/x-openoffice-plugin-object;windows_formatname=\"PlugIn Object\"", "PlugIn Object", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_STARWRITER_30 + // SotClipboardFormatId::STARWRITER_30 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starwriter-30;windows_formatname=\"StarWriter 3.0\"", "StarWriter 3.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARWRITER_40 + //SotClipboardFormatId::STARWRITER_40 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starwriter-40;windows_formatname=\"StarWriter 4.0\"", "StarWriter 4.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARWRITER_50 + //SotClipboardFormatId::STARWRITER_50 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starwriter-50;windows_formatname=\"StarWriter 5.0\"", "StarWriter 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARWRITERWEB_40 + //SotClipboardFormatId::STARWRITERWEB_40 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starwriterweb-40;windows_formatname=\"StarWriter/Web 4.0\"", "StarWriter/Web 4.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARWRITERWEB_50 + //SotClipboardFormatId::STARWRITERWEB_50 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starwriterweb-50;windows_formatname=\"StarWriter/Web 5.0\"", "StarWriter/Web 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARWRITERGLOB_40 + //SotClipboardFormatId::STARWRITERGLOB_40 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starwriterglob-40;windows_formatname=\"StarWriter/Global 4.0\"", "StarWriter/Global 4.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_STARWRITERGLOB_50 + // SotClipboardFormatId::STARWRITERGLOB_50 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starwriterglob-50;windows_formatname=\"StarWriter/Global 5.0\"", "StarWriter/Global 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARDRAW + //SotClipboardFormatId::STARDRAW m_TranslTable.push_back(FormatEntry("application/x-openoffice-stardraw;windows_formatname=\"StarDrawDocument\"", "StarDrawDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARDRAW_40 + //SotClipboardFormatId::STARDRAW_40 m_TranslTable.push_back(FormatEntry("application/x-openoffice-stardraw-40;windows_formatname=\"StarDrawDocument 4.0\"", "StarDrawDocument 4.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARIMPRESS_50 + //SotClipboardFormatId::STARIMPRESS_50 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starimpress-50;windows_formatname=\"StarImpress 5.0\"", "StarImpress 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_STARDRAW_50 + // SotClipboardFormatId::STARDRAW_50 m_TranslTable.push_back(FormatEntry("application/x-openoffice-stardraw-50;windows_formatname=\"StarDraw 5.0\"", "StarDraw 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARCALC + //SotClipboardFormatId::STARCALC m_TranslTable.push_back(FormatEntry("application/x-openoffice-starcalc;windows_formatname=\"StarCalcDocument\"", "StarCalcDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARCALC_40 + //SotClipboardFormatId::STARCALC_40 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starcalc-40;windows_formatname=\"StarCalc 4.0\"", "StarCalc 4.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_STARCALC_50 + // SotClipboardFormatId::STARCALC_50 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starcalc-50;windows_formatname=\"StarCalc 5.0\"", "StarCalc 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_STARCHART + // SotClipboardFormatId::STARCHART m_TranslTable.push_back(FormatEntry("application/x-openoffice-starchart;windows_formatname=\"StarChartDocument\"", "StarChartDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_STARCHART_40 + // SotClipboardFormatId::STARCHART_40 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starchart-40;windows_formatname=\"StarChartDocument 4.0\"", "StarChartDocument 4.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - // SOT_FORMATSTR_ID_STARCHART_50 + // SotClipboardFormatId::STARCHART_50 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starchart-50;windows_formatname=\"StarChart 5.0\"", "StarChart 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARIMAGE + //SotClipboardFormatId::STARIMAGE m_TranslTable.push_back(FormatEntry("application/x-openoffice-starimage;windows_formatname=\"StarImageDocument\"", "StarImageDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARIMAGE_40 + //SotClipboardFormatId::STARIMAGE_40 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starimage-40;windows_formatname=\"StarImageDocument 4.0\"", "StarImageDocument 4.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARIMAGE_50 + //SotClipboardFormatId::STARIMAGE_50 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starimage-50;windows_formatname=\"StarImage 5.0\"", "StarImage 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARMATH + //SotClipboardFormatId::STARMATH m_TranslTable.push_back(FormatEntry("application/x-openoffice-starmath;windows_formatname=\"StarMath\"", "StarMath", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARMATH_40 + //SotClipboardFormatId::STARMATH_40 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starmath-40;windows_formatname=\"StarMathDocument 4.0\"", "StarMathDocument 4.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARMATH_50 + //SotClipboardFormatId::STARMATH_50 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starmath-50;windows_formatname=\"StarMath 5.0\"", "StarMath 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STAROBJECT_PAINTDOC + //SotClipboardFormatId::STAROBJECT_PAINTDOC m_TranslTable.push_back(FormatEntry("application/x-openoffice-starobject-paintdoc;windows_formatname=\"StarObjectPaintDocument\"", "StarObjectPaintDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_FILLED_AREA + //SotClipboardFormatId::FILLED_AREA m_TranslTable.push_back(FormatEntry("application/x-openoffice-filled-area;windows_formatname=\"FilledArea\"", "FilledArea", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_HTML + //SotClipboardFormatId::HTML m_TranslTable.push_back(FormatEntry("text/html", "HTML (HyperText Markup Language)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_HTML_SIMPLE + //SotClipboardFormatId::HTML_SIMPLE m_TranslTable.push_back(FormatEntry("application/x-openoffice-html-simple;windows_formatname=\"HTML Format\"", "HTML Format", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_CHAOS + //SotClipboardFormatId::CHAOS m_TranslTable.push_back(FormatEntry("application/x-openoffice-chaos;windows_formatname=\"FORMAT_CHAOS\"", "FORMAT_CHAOS", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_CNT_MSGATTACHFILE + //SotClipboardFormatId::CNT_MSGATTACHFILE m_TranslTable.push_back(FormatEntry("application/x-openoffice-msgattachfile;windows_formatname=\"CNT_MSGATTACHFILE_FORMAT\"", "CNT_MSGATTACHFILE_FORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_BIFF_5 + //SotClipboardFormatId::BIFF_5 m_TranslTable.push_back(FormatEntry("application/x-openoffice-biff5;windows_formatname=\"Biff5\"", "Biff5", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_BIFF__5 + //SotClipboardFormatId::BIFF__5 m_TranslTable.push_back(FormatEntry("application/x-openoffice-biff-5;windows_formatname=\"Biff 5\"", "Biff 5", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_BIFF_8 + //SotClipboardFormatId::BIFF_8 m_TranslTable.push_back(FormatEntry("application/x-openoffice-biff-8;windows_formatname=\"Biff8\"", "Biff8", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SYLK_BIGCAPS + //SotClipboardFormatId::SYLK_BIGCAPS m_TranslTable.push_back(FormatEntry("application/x-openoffice-sylk-bigcaps;windows_formatname=\"SYLK\"", "SYLK", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_LINK + //SotClipboardFormatId::LINK m_TranslTable.push_back(FormatEntry("application/x-openoffice-link;windows_formatname=\"Link\"", "Link", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARDRAW_TABBAR + //SotClipboardFormatId::STARDRAW_TABBAR m_TranslTable.push_back(FormatEntry("application/x-openoffice-stardraw-tabbar;windows_formatname=\"StarDraw TabBar\"", "StarDraw TabBar", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SONLK + //SotClipboardFormatId::SONLK m_TranslTable.push_back(FormatEntry("application/x-openoffice-sonlk;windows_formatname=\"SONLK (StarOffice Navi Link)\"", "SONLK (StarOffice Navi Link)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_MSWORD_DOC + //SotClipboardFormatId::MSWORD_DOC m_TranslTable.push_back(FormatEntry("application/msword", "MSWordDoc", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STAR_FRAMESET_DOC + //SotClipboardFormatId::STAR_FRAMESET_DOC m_TranslTable.push_back(FormatEntry("application/x-openoffice-star-frameset-doc;windows_formatname=\"StarFrameSetDocument\"", "StarFrameSetDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_OFFICE_DOC + //SotClipboardFormatId::OFFICE_DOC m_TranslTable.push_back(FormatEntry("application/x-openoffice-office-doc;windows_formatname=\"OfficeDocument\"", "OfficeDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_NOTES_DOCINFO + //SotClipboardFormatId::NOTES_DOCINFO m_TranslTable.push_back(FormatEntry("application/x-openoffice-notes-docinfo;windows_formatname=\"NotesDocInfo\"", "NotesDocInfo", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_NOTES_HNOTE + //SotClipboardFormatId::NOTES_HNOTE m_TranslTable.push_back(FormatEntry("application/x-openoffice-notes-hnote;windows_formatname=\"NoteshNote\"", "NoteshNote", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_NOTES_NATIVE + //SotClipboardFormatId::NOTES_NATIVE m_TranslTable.push_back(FormatEntry("application/x-openoffice-notes-native;windows_formatname=\"Native\"", "Native", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SFX_DOC + //SotClipboardFormatId::SFX_DOC m_TranslTable.push_back(FormatEntry("application/x-openoffice-sfx-doc;windows_formatname=\"SfxDocument\"", "SfxDocument", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_EVDF + //SotClipboardFormatId::EVDF m_TranslTable.push_back(FormatEntry("application/x-openoffice-evdf;windows_formatname=\"EVDF (Explorer View Dummy Format)\"", "EVDF (Explorer View Dummy Format)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_ESDF + //SotClipboardFormatId::ESDF m_TranslTable.push_back(FormatEntry("application/x-openoffice-esdf;windows_formatname=\"ESDF (Explorer Search Dummy Format)\"", "ESDF (Explorer Search Dummy Format)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_IDF + //SotClipboardFormatId::IDF m_TranslTable.push_back(FormatEntry("application/x-openoffice-idf;windows_formatname=\"IDF (Iconview Dummy Format)\"", "IDF (Iconview Dummy Format)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_EFTP + //SotClipboardFormatId::EFTP m_TranslTable.push_back(FormatEntry("application/x-openoffice-eftp;windows_formatname=\"EFTP (Explorer Ftp File)\"", "EFTP (Explorer Ftp File)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_EFD + //SotClipboardFormatId::EFD m_TranslTable.push_back(FormatEntry("application/x-openoffice-efd;windows_formatname=\"EFD (Explorer Ftp Dir)\"", "EFD (Explorer Ftp Dir)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SVX_FORMFIELDEXCH + //SotClipboardFormatId::SVX_FORMFIELDEXCH m_TranslTable.push_back(FormatEntry("application/x-openoffice-svx-formfieldexch;windows_formatname=\"SvxFormFieldExch\"", "SvxFormFieldExch", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_EXTENDED_TABBAR + //SotClipboardFormatId::EXTENDED_TABBAR m_TranslTable.push_back(FormatEntry("application/x-openoffice-extended-tabbar;windows_formatname=\"ExtendedTabBar\"", "ExtendedTabBar", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SBA_DATAEXCHANGE + //SotClipboardFormatId::SBA_DATAEXCHANGE m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-dataexchange;windows_formatname=\"SBA-DATAFORMAT\"", "SBA-DATAFORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE + //SotClipboardFormatId::SBA_FIELDDATAEXCHANGE m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-fielddataexchange;windows_formatname=\"SBA-FIELDFORMAT\"", "SBA-FIELDFORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SBA_PRIVATE_URL + //SotClipboardFormatId::SBA_PRIVATE_URL m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-private-url;windows_formatname=\"SBA-PRIVATEURLFORMAT\"", "SBA-PRIVATEURLFORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SBA_TABED + //SotClipboardFormatId::SBA_TABED m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-tabed;windows_formatname=\"Tabed\"", "Tabed", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SBA_TABID + //SotClipboardFormatId::SBA_TABID m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-tabid;windows_formatname=\"Tabid\"", "Tabid", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SBA_JOIN + //SotClipboardFormatId::SBA_JOIN m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-join;windows_formatname=\"SBA-JOINFORMAT\"", "SBA-JOINFORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_OBJECTDESCRIPTOR + //SotClipboardFormatId::OBJECTDESCRIPTOR m_TranslTable.push_back(FormatEntry("application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\"", "Star Object Descriptor (XML)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR + //SotClipboardFormatId::LINKSRCDESCRIPTOR m_TranslTable.push_back(FormatEntry("application/x-openoffice-linksrcdescriptor-xml;windows_formatname=\"Star Link Source Descriptor (XML)\"", "Star Link Source Descriptor (XML)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_EMBED_SOURCE + //SotClipboardFormatId::EMBED_SOURCE m_TranslTable.push_back(FormatEntry("application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source (XML)\"", "Star Embed Source (XML)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_LINK_SOURCE + //SotClipboardFormatId::LINK_SOURCE m_TranslTable.push_back(FormatEntry("application/x-openoffice-link-source-xml;windows_formatname=\"Star Link Source (XML)\"", "Star Link Source (XML)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_EMBEDDED_OBJ + //SotClipboardFormatId::EMBEDDED_OBJ m_TranslTable.push_back(FormatEntry("application/x-openoffice-embedded-obj-xml;windows_formatname=\"Star Embedded Object (XML)\"", "Star Embedded Object (XML)", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_FILECONTENT + //SotClipboardFormatId::FILECONTENT m_TranslTable.push_back(FormatEntry("application/x-openoffice-filecontent;windows_formatname=\"" CFSTR_FILECONTENTS "\"", CFSTR_FILECONTENTS, NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR + //SotClipboardFormatId::FILEGRPDESCRIPTOR m_TranslTable.push_back(FormatEntry("application/x-openoffice-filegrpdescriptor;windows_formatname=\"" CFSTR_FILEDESCRIPTOR "\"", CFSTR_FILEDESCRIPTOR, NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_FILENAME + //SotClipboardFormatId::FILENAME m_TranslTable.push_back(FormatEntry("application/x-openoffice-filename;windows_formatname=\"" CFSTR_FILENAME "\"", CFSTR_FILENAME, NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SD_OLE + //SotClipboardFormatId::SD_OLE m_TranslTable.push_back(FormatEntry("application/x-openoffice-sd-ole;windows_formatname=\"SD-OLE\"", "SD-OLE", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE + //SotClipboardFormatId::EMBEDDED_OBJ_OLE m_TranslTable.push_back(FormatEntry("application/x-openoffice-embedded-obj-ole;windows_formatname=\"Embedded Object\"", "Embedded Object", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_EMBED_SOURCE_OLE + //SotClipboardFormatId::EMBED_SOURCE_OLE m_TranslTable.push_back(FormatEntry("application/x-openoffice-embed-source-ole;windows_formatname=\"Embed Source\"", "Embed Source", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE + //SotClipboardFormatId::OBJECTDESCRIPTOR_OLE m_TranslTable.push_back(FormatEntry("application/x-openoffice-objectdescriptor-ole;windows_formatname=\"Object Descriptor\"", "Object Descriptor", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR_OLE + //SotClipboardFormatId::LINKSRCDESCRIPTOR_OLE m_TranslTable.push_back(FormatEntry("application/x-openoffice-linkdescriptor-ole;windows_formatname=\"Link Source Descriptor\"", "Link Source Descriptor", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_LINK_SOURCE_OLE + //SotClipboardFormatId::LINK_SOURCE_OLE m_TranslTable.push_back(FormatEntry("application/x-openoffice-link-source-ole;windows_formatname=\"Link Source\"", "Link Source", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE + //SotClipboardFormatId::SBA_CTRLDATAEXCHANGE m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-ctrldataexchange;windows_formatname=\"SBA-CTRLFORMAT\"", "SBA-CTRLFORMAT", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_OUTPLACE_OBJ + //SotClipboardFormatId::OUTPLACE_OBJ m_TranslTable.push_back(FormatEntry("application/x-openoffice-outplace-obj;windows_formatname=\"OutPlace Object\"", "OutPlace Object", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_CNT_OWN_CLIP + //SotClipboardFormatId::CNT_OWN_CLIP m_TranslTable.push_back(FormatEntry("application/x-openoffice-cnt-own-clip;windows_formatname=\"CntOwnClipboard\"", "CntOwnClipboard", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_INET_IMAGE + //SotClipboardFormatId::INET_IMAGE m_TranslTable.push_back(FormatEntry("application/x-openoffice-inet-image;windows_formatname=\"SO-INet-Image\"", "SO-INet-Image", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_NETSCAPE_IMAGE + //SotClipboardFormatId::NETSCAPE_IMAGE m_TranslTable.push_back(FormatEntry("application/x-openoffice-netscape-image;windows_formatname=\"Netscape Image Format\"", "Netscape Image Format", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_SBA_FORMEXCHANGE - m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-formexchange;windows_formatname=\"SBA_FORMEXCHANGE\"", "SBA_FORMEXCHANGE", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); //SOT_FORMATSTR_ID_SBA_REPORTEXCHANGE + //SotClipboardFormatId::SBA_FORMEXCHANGE + m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-formexchange;windows_formatname=\"SBA_FORMEXCHANGE\"", "SBA_FORMEXCHANGE", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); //SotClipboardFormatId::SBA_REPORTEXCHANGE m_TranslTable.push_back(FormatEntry("application/x-openoffice-sba-reportexchange;windows_formatname=\"SBA_REPORTEXCHANGE\"", "SBA_REPORTEXCHANGE", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR + //SotClipboardFormatId::UNIFORMRESOURCELOCATOR m_TranslTable.push_back(FormatEntry("application/x-openoffice-uniformresourcelocator;windows_formatname=\"UniformResourceLocator\"", "UniformResourceLocator", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50 + //SotClipboardFormatId::STARCHARTDOCUMENT_50 m_TranslTable.push_back(FormatEntry("application/x-openoffice-starchartdocument-50;windows_formatname=\"StarChartDocument 5.0\"", "StarChartDocument 5.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_GRAPHOBJ + //SotClipboardFormatId::GRAPHOBJ m_TranslTable.push_back(FormatEntry("application/x-openoffice-graphobj;windows_formatname=\"Graphic Object\"", "Graphic Object", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARWRITER_60 + //SotClipboardFormatId::STARWRITER_60 m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.writer", "Writer 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARWRITERWEB_60 + //SotClipboardFormatId::STARWRITERWEB_60 m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.writer.web", "Writer/Web 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARWRITERGLOB_60 + //SotClipboardFormatId::STARWRITERGLOB_60 m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.writer.global", "Writer/Global 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARWDRAW_60 + //SotClipboardFormatId::STARWDRAW_60 m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.draw", "Draw 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARIMPRESS_60 + //SotClipboardFormatId::STARIMPRESS_60 m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.impress", "Impress 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARCALC_60 + //SotClipboardFormatId::STARCALC_60 m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.calc", "Calc 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARCHART_60 + //SotClipboardFormatId::STARCHART_60 m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.chart", "Chart 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_STARMATH_60 + //SotClipboardFormatId::STARMATH_60 m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.math", "Math 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_DIALOG_60 + //SotClipboardFormatId::DIALOG_60 m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.dialog", "Dialog 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_BMP + //SotClipboardFormatId::BMP m_TranslTable.push_back(FormatEntry("image/bmp", "Windows Bitmap", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_PNG + //SotClipboardFormatId::PNG m_TranslTable.push_back(FormatEntry("image/png", "PNG", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_DUMMY3 + //SotClipboardFormatId::DUMMY3 m_TranslTable.push_back(FormatEntry("application/x-openoffice-dummy3;windows_formatname=\"SO_DUMMYFORMAT_3\"", "SO_DUMMYFORMAT_3", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); - //SOT_FORMATSTR_ID_DUMMY4 + //SotClipboardFormatId::DUMMY4 m_TranslTable.push_back(FormatEntry("application/x-openoffice-dummy4;windows_formatname=\"SO_DUMMYFORMAT_4\"", "SO_DUMMYFORMAT_4", NULL, CF_INVALID, CPPUTYPE_DEFAULT)); } diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 1889439a7654..2093382f414a 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2702,7 +2702,7 @@ bool EditEngine::HasValidData( const ::com::sun::star::uno::Reference< ::com::su { // Every application that copies rtf or any other text format also copies plain text into the clipboard.... datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor ); bValidData = rTransferable->isDataFlavorSupported( aFlavor ); } diff --git a/editeng/source/editeng/eeobj.cxx b/editeng/source/editeng/eeobj.cxx index 2bf54c5e74bd..40839aa17b09 100644 --- a/editeng/source/editeng/eeobj.cxx +++ b/editeng/source/editeng/eeobj.cxx @@ -52,18 +52,18 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo { uno::Any aAny; - sal_uLong nT = SotExchange::GetFormat( rFlavor ); - if ( nT == SOT_FORMAT_STRING ) + SotClipboardFormatId nT = SotExchange::GetFormat( rFlavor ); + if ( nT == SotClipboardFormatId::STRING ) { aAny <<= GetString(); } - else if ( ( nT == SOT_FORMATSTR_ID_EDITENGINE ) || ( nT == SOT_FORMAT_RTF ) ) + else if ( ( nT == SotClipboardFormatId::EDITENGINE ) || ( nT == SotClipboardFormatId::RTF ) ) { // No RTF on demand any more: // 1) Was not working, because I had to flush() the clipboard immediately anyway // 2) Don't have the old pool defaults and the StyleSheetPool here. - SvMemoryStream* pStream = ( nT == SOT_FORMATSTR_ID_EDITENGINE ) ? &GetStream() : &GetRTFStream(); + SvMemoryStream* pStream = ( nT == SotClipboardFormatId::EDITENGINE ) ? &GetStream() : &GetRTFStream(); pStream->Seek( STREAM_SEEK_TO_END ); sal_Size nLen = pStream->Tell(); pStream->Seek(0); @@ -84,9 +84,9 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo uno::Sequence< datatransfer::DataFlavor > EditDataObject::getTransferDataFlavors( ) throw(uno::RuntimeException, std::exception) { uno::Sequence< datatransfer::DataFlavor > aDataFlavors(3); - SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_EDITENGINE, aDataFlavors.getArray()[0] ); - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aDataFlavors.getArray()[1] ); - SotExchange::GetFormatDataFlavor( SOT_FORMAT_RTF, aDataFlavors.getArray()[2] ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::EDITENGINE, aDataFlavors.getArray()[0] ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aDataFlavors.getArray()[1] ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::RTF, aDataFlavors.getArray()[2] ); return aDataFlavors; } @@ -95,8 +95,8 @@ sal_Bool EditDataObject::isDataFlavorSupported( const datatransfer::DataFlavor& { bool bSupported = false; - sal_uLong nT = SotExchange::GetFormat( rFlavor ); - if ( ( nT == SOT_FORMAT_STRING ) || ( nT == SOT_FORMAT_RTF ) || ( nT == SOT_FORMATSTR_ID_EDITENGINE ) ) + SotClipboardFormatId nT = SotExchange::GetFormat( rFlavor ); + if ( ( nT == SotClipboardFormatId::STRING ) || ( nT == SotClipboardFormatId::RTF ) || ( nT == SotClipboardFormatId::EDITENGINE ) ) bSupported = true; return bSupported; diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index ed456a19cccd..f0af59472a0a 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1377,7 +1377,7 @@ void ImpEditView::Paste( ::com::sun::star::uno::Reference< ::com::sun::star::dat if ( DoSingleLinePaste() ) { datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor ); if ( xDataObj->isDataFlavorSupported( aFlavor ) ) { try @@ -1860,7 +1860,7 @@ void ImpEditView::dragEnter( const ::com::sun::star::datatransfer::dnd::DropTarg // Check for supported format... // Only check for text, will also be there if bin or rtf datatransfer::DataFlavor aTextFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aTextFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aTextFlavor ); const ::com::sun::star::datatransfer::DataFlavor* pFlavors = rDTDEE.SupportedDataFlavors.getConstArray(); int nFlavors = rDTDEE.SupportedDataFlavors.getLength(); for ( int n = 0; n < nFlavors; n++ ) diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 74f89cce5b37..fb3003ed71a0 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -3471,7 +3471,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer if ( bUseSpecial ) { // BIN - SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_EDITENGINE, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::EDITENGINE, aFlavor ); if ( rxDataObj->isDataFlavorSupported( aFlavor ) ) { try @@ -3493,7 +3493,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer if ( !bDone ) { // RTF - SotExchange::GetFormatDataFlavor( SOT_FORMAT_RTF, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::RTF, aFlavor ); if ( rxDataObj->isDataFlavorSupported( aFlavor ) ) { try @@ -3520,7 +3520,7 @@ EditSelection ImpEditEngine::InsertText( uno::Reference< datatransfer::XTransfer } if ( !bDone ) { - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor ); if ( rxDataObj->isDataFlavorSupported( aFlavor ) ) { try diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index 43029992e7eb..81617fadd9f6 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -743,7 +743,7 @@ void BibFrameController_Impl::addStatusListener( if ( xDataObj.is() ) { datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor ); try { uno::Any aData = xDataObj->getTransferData( aFlavor ); diff --git a/filter/qa/cppunit/filters-dxf-test.cxx b/filter/qa/cppunit/filters-dxf-test.cxx index 1d78a6188954..8d5be38adfe0 100644 --- a/filter/qa/cppunit/filters-dxf-test.cxx +++ b/filter/qa/cppunit/filters-dxf-test.cxx @@ -36,7 +36,7 @@ public: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; /** * Ensure CVEs remain unbroken @@ -50,7 +50,7 @@ public: bool DxfFilterTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; diff --git a/filter/qa/cppunit/filters-eps-test.cxx b/filter/qa/cppunit/filters-eps-test.cxx index 2167281352b6..2cab8cdbc6bf 100644 --- a/filter/qa/cppunit/filters-eps-test.cxx +++ b/filter/qa/cppunit/filters-eps-test.cxx @@ -36,7 +36,7 @@ public: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; /** * Ensure CVEs remain unbroken @@ -50,7 +50,7 @@ public: bool EpsFilterTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; diff --git a/filter/qa/cppunit/filters-met-test.cxx b/filter/qa/cppunit/filters-met-test.cxx index 4e551d24e06a..69ced464d739 100644 --- a/filter/qa/cppunit/filters-met-test.cxx +++ b/filter/qa/cppunit/filters-met-test.cxx @@ -36,7 +36,7 @@ public: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; /** * Ensure CVEs remain unbroken @@ -50,7 +50,7 @@ public: bool MetFilterTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; diff --git a/filter/qa/cppunit/filters-pcd-test.cxx b/filter/qa/cppunit/filters-pcd-test.cxx index 1658f4cf0c05..16fbefbbad7b 100644 --- a/filter/qa/cppunit/filters-pcd-test.cxx +++ b/filter/qa/cppunit/filters-pcd-test.cxx @@ -36,7 +36,7 @@ public: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; /** * Ensure CVEs remain unbroken @@ -50,7 +50,7 @@ public: bool PcdFilterTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; diff --git a/filter/qa/cppunit/filters-pcx-test.cxx b/filter/qa/cppunit/filters-pcx-test.cxx index 92139b1ad664..b478af5bd7e5 100644 --- a/filter/qa/cppunit/filters-pcx-test.cxx +++ b/filter/qa/cppunit/filters-pcx-test.cxx @@ -36,7 +36,7 @@ public: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; /** * Ensure CVEs remain unbroken @@ -50,7 +50,7 @@ public: bool PcxFilterTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; diff --git a/filter/qa/cppunit/filters-pict-test.cxx b/filter/qa/cppunit/filters-pict-test.cxx index 35fed6162eec..0ea1301ae174 100644 --- a/filter/qa/cppunit/filters-pict-test.cxx +++ b/filter/qa/cppunit/filters-pict-test.cxx @@ -42,7 +42,7 @@ public: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; OUString pictURL() { @@ -64,7 +64,7 @@ public: bool PictFilterTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; diff --git a/filter/qa/cppunit/filters-ppm-test.cxx b/filter/qa/cppunit/filters-ppm-test.cxx index 9cdafcd9dbf1..31b4941d5b2a 100644 --- a/filter/qa/cppunit/filters-ppm-test.cxx +++ b/filter/qa/cppunit/filters-ppm-test.cxx @@ -36,7 +36,7 @@ public: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; /** * Ensure CVEs remain unbroken @@ -50,7 +50,7 @@ public: bool PpmFilterTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; diff --git a/filter/qa/cppunit/filters-psd-test.cxx b/filter/qa/cppunit/filters-psd-test.cxx index 0da3a9fa4dc5..a453443872e1 100644 --- a/filter/qa/cppunit/filters-psd-test.cxx +++ b/filter/qa/cppunit/filters-psd-test.cxx @@ -36,7 +36,7 @@ public: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; /** * Ensure CVEs remain unbroken @@ -50,7 +50,7 @@ public: bool PsdFilterTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; diff --git a/filter/qa/cppunit/filters-ras-test.cxx b/filter/qa/cppunit/filters-ras-test.cxx index cbc7bdf1b288..66f23c914956 100644 --- a/filter/qa/cppunit/filters-ras-test.cxx +++ b/filter/qa/cppunit/filters-ras-test.cxx @@ -36,7 +36,7 @@ public: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; /** * Ensure CVEs remain unbroken @@ -50,7 +50,7 @@ public: bool RasFilterTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; diff --git a/filter/qa/cppunit/filters-tga-test.cxx b/filter/qa/cppunit/filters-tga-test.cxx index 207e9ce2fef8..f723c35884b2 100644 --- a/filter/qa/cppunit/filters-tga-test.cxx +++ b/filter/qa/cppunit/filters-tga-test.cxx @@ -36,7 +36,7 @@ public: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; /** * Ensure CVEs remain unbroken @@ -50,7 +50,7 @@ public: bool TgaFilterTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; diff --git a/filter/qa/cppunit/filters-tiff-test.cxx b/filter/qa/cppunit/filters-tiff-test.cxx index 2de6c8f7874d..bb73d8fe1919 100644 --- a/filter/qa/cppunit/filters-tiff-test.cxx +++ b/filter/qa/cppunit/filters-tiff-test.cxx @@ -36,7 +36,7 @@ public: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; /** * Ensure CVEs remain unbroken @@ -50,7 +50,7 @@ public: bool TiffFilterTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 328fe2f9306e..a3e880d8ed53 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -153,7 +153,7 @@ static sal_uInt32 nMSOleObjCntr = 0; /************************************************************************/ void Impl_OlePres::Write( SvStream & rStm ) { - WriteClipboardFormat( rStm, FORMAT_GDIMETAFILE ); + WriteClipboardFormat( rStm, SotClipboardFormatId::GDIMETAFILE ); rStm.WriteInt32( nJobLen + 4 ); // a TargetDevice that's always empty if( nJobLen ) rStm.Write( pJob, nJobLen ); @@ -166,7 +166,7 @@ void Impl_OlePres::Write( SvStream & rStm ) sal_uLong nPos = rStm.Tell(); rStm.WriteInt32( 0 ); - if( GetFormat() == FORMAT_GDIMETAFILE && pMtf ) + if( GetFormat() == SotClipboardFormatId::GDIMETAFILE && pMtf ) { // Always to 1/100 mm, until Mtf-Solution found // Assumption (no scaling, no origin translation) @@ -6534,7 +6534,7 @@ bool SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile & sal_uInt16 nAspect = ASPECT_CONTENT; sal_uLong nAdviseModes = 2; - Impl_OlePres aEle( FORMAT_GDIMETAFILE ); + Impl_OlePres aEle( SotClipboardFormatId::GDIMETAFILE ); // Convert the size in 1/100 mm // If a not applicable MapUnit (device dependent) is used, // SV tries to guess a best match for the right value @@ -6729,13 +6729,13 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen, if( pIds->nId ) { // found! - sal_uLong nCbFmt = SotExchange::RegisterFormatName( aSvrName ); + SotClipboardFormatId nCbFmt = SotExchange::RegisterFormatName( aSvrName ); rDest->SetClass( SvGlobalName( pIds->nId, 0, 0, 0xc0,0,0,0,0,0,0,0x46 ), nCbFmt, OUString::createFromAscii( pIds->pDspName ) ); } else { - sal_uLong nCbFmt = SotExchange::RegisterFormatName( aSvrName ); + SotClipboardFormatId nCbFmt = SotExchange::RegisterFormatName( aSvrName ); rDest->SetClass( SvGlobalName(), nCbFmt, aSvrName ); } } diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx index 374707cd4057..c647141d40ec 100644 --- a/filter/source/msfilter/msoleexp.cxx +++ b/filter/source/msfilter/msoleexp.cxx @@ -222,7 +222,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto // this is a SO6 embedded object, save in old binary format rDestStg.SetVersion( SOFFICE_FILEFORMAT_31 ); rDestStg.SetClass( aEmbName, - SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, + SotClipboardFormatId::EMBEDDED_OBJ_OLE, GetStorageType( aEmbName ) ); SotStorageStreamRef xExtStm = rDestStg.OpenSotStream( OUString( "properties_stream" ), diff --git a/filter/source/msfilter/viscache.hxx b/filter/source/msfilter/viscache.hxx index a52ca4a0b2de..84e7c978f3b5 100644 --- a/filter/source/msfilter/viscache.hxx +++ b/filter/source/msfilter/viscache.hxx @@ -26,17 +26,17 @@ class Impl_OlePres { - sal_uLong nFormat; - sal_uInt16 nAspect; + SotClipboardFormatId nFormat; + sal_uInt16 nAspect; Bitmap * pBmp; GDIMetaFile * pMtf; - sal_uInt32 nAdvFlags; - sal_Int32 nJobLen; - sal_uInt8* pJob; - Size aSize; // Groesse in 100TH_MM + sal_uInt32 nAdvFlags; + sal_Int32 nJobLen; + sal_uInt8* pJob; + Size aSize; // Groesse in 100TH_MM public: - Impl_OlePres( sal_uLong nF ) + Impl_OlePres( SotClipboardFormatId nF ) : nFormat( nF ) , nAspect( ASPECT_CONTENT ) , pBmp( NULL ) @@ -57,14 +57,14 @@ public: delete pMtf; pMtf = new GDIMetaFile( rMtf ); } - Bitmap *GetBitmap() const { return pBmp; } - GDIMetaFile *GetMetaFile() const { return pMtf; } - sal_uLong GetFormat() const { return nFormat; } - void SetAspect( sal_uInt16 nAsp ) { nAspect = nAsp; } - sal_uLong GetAdviseFlags() const { return nAdvFlags; } - void SetAdviseFlags( sal_uLong nAdv ) { nAdvFlags = nAdv; } - void SetSize( const Size & rSize ) { aSize = rSize; } - void Write( SvStream & rStm ); + Bitmap *GetBitmap() const { return pBmp; } + GDIMetaFile *GetMetaFile() const { return pMtf; } + SotClipboardFormatId GetFormat() const { return nFormat; } + void SetAspect( sal_uInt16 nAsp ) { nAspect = nAsp; } + sal_uLong GetAdviseFlags() const { return nAdvFlags; } + void SetAdviseFlags( sal_uLong nAdv ) { nAdvFlags = nAdv; } + void SetSize( const Size & rSize ) { aSize = rSize; } + void Write( SvStream & rStm ); }; #endif // INCLUDED_FILTER_SOURCE_MSFILTER_VISCACHE_HXX diff --git a/forms/source/richtext/clipboarddispatcher.cxx b/forms/source/richtext/clipboarddispatcher.cxx index 05a28cc962b9..2905690809b9 100644 --- a/forms/source/richtext/clipboarddispatcher.cxx +++ b/forms/source/richtext/clipboarddispatcher.cxx @@ -139,7 +139,7 @@ namespace frm // initial state TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( _rView.GetWindow() ) ); - m_bPastePossible = ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) || aDataHelper.HasFormat( SOT_FORMAT_RTF ) ); + m_bPastePossible = ( aDataHelper.HasFormat( SotClipboardFormatId::STRING ) || aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ); } @@ -156,8 +156,8 @@ namespace frm IMPL_LINK( OPasteClipboardDispatcher, OnClipboardChanged, TransferableDataHelper*, _pDataHelper ) { OSL_ENSURE( _pDataHelper, "OPasteClipboardDispatcher::OnClipboardChanged: ooops!" ); - m_bPastePossible = _pDataHelper->HasFormat( SOT_FORMAT_STRING ) - || _pDataHelper->HasFormat( SOT_FORMAT_RTF ); + m_bPastePossible = _pDataHelper->HasFormat( SotClipboardFormatId::STRING ) + || _pDataHelper->HasFormat( SotClipboardFormatId::RTF ); invalidate(); diff --git a/hwpfilter/qa/cppunit/test_hwpfilter.cxx b/hwpfilter/qa/cppunit/test_hwpfilter.cxx index 70b2079b7bc3..6d6a697d6ed2 100644 --- a/hwpfilter/qa/cppunit/test_hwpfilter.cxx +++ b/hwpfilter/qa/cppunit/test_hwpfilter.cxx @@ -28,7 +28,7 @@ namespace virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; void test(); @@ -51,7 +51,7 @@ namespace bool HwpFilterTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { uno::Sequence< beans::PropertyValue > aDescriptor(1); aDescriptor[0].Name = "URL"; diff --git a/include/sfx2/docfilt.hxx b/include/sfx2/docfilt.hxx index 34d7130d5981..5506f44cb9c3 100644 --- a/include/sfx2/docfilt.hxx +++ b/include/sfx2/docfilt.hxx @@ -28,6 +28,7 @@ #include <rtl/ustring.hxx> #include <sal/config.h> #include <sal/types.h> +#include <sot/formats.hxx> #include <sfx2/dllapi.h> #include <sfx2/sfxdefs.hxx> #include <tools/wldcrd.hxx> @@ -60,7 +61,7 @@ class SFX2_DLLPUBLIC SfxFilter SfxFilterFlags nFormatType; sal_uIntPtr nVersion; - sal_uIntPtr lFormat; + SotClipboardFormatId lFormat; sal_uInt16 nDocIcon; public: @@ -69,7 +70,7 @@ public: SfxFilter( const OUString &rName, const OUString &rWildCard, SfxFilterFlags nFormatType, - sal_uInt32 lFormat, + SotClipboardFormatId lFormat, const OUString &rTypeName, sal_uInt16 nDocIcon, const OUString &rMimeType, @@ -90,14 +91,14 @@ public: const OUString& GetName() const { return maFilterName; } const WildCard& GetWildcard() const { return aWildCard; } const OUString& GetRealTypeName() const { return aTypeName; } - sal_uIntPtr GetFormat() const { return lFormat; } + SotClipboardFormatId GetFormat() const { return lFormat; } const OUString& GetTypeName() const { return aTypeName; } const OUString& GetUIName() const { return aUIName; } sal_uInt16 GetDocIconId() const { return nDocIcon; } const OUString& GetUserData() const { return aUserData; } const OUString& GetDefaultTemplate() const { return aDefaultTemplate; } void SetDefaultTemplate( const OUString& rStr ) { aDefaultTemplate = rStr; } - bool UsesStorage() const { return GetFormat() != 0; } + bool UsesStorage() const { return GetFormat() != SotClipboardFormatId::NONE; } void SetURLPattern( const OUString& rStr ); OUString GetURLPattern() const { return aPattern; } void SetUIName( const OUString& rName ) { aUIName = rName; } diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx index 758a73e80b4d..7a71a130f99a 100644 --- a/include/sfx2/fcontnr.hxx +++ b/include/sfx2/fcontnr.hxx @@ -118,7 +118,7 @@ public: sal_uInt32 DetectFilter( SfxMedium& rMedium, const SfxFilter **, bool bPlugIn, bool bAPI = false ) const; const SfxFilter* GetFilter4Mime( const OUString& rMime, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED) const; - const SfxFilter* GetFilter4ClipBoardId( sal_uInt32 nId, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; + const SfxFilter* GetFilter4ClipBoardId( SotClipboardFormatId nId, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; const SfxFilter* GetFilter4EA( const OUString& rEA, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; const SfxFilter* GetFilter4Extension( const OUString& rExt, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; const SfxFilter* GetFilter4FilterName( const OUString& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx index 33aafb90a26d..12bf4378a613 100644 --- a/include/sfx2/linkmgr.hxx +++ b/include/sfx2/linkmgr.hxx @@ -151,7 +151,7 @@ public: // got the appropriate information as a string. // Is now required for FileObject in conjunction with JavaScript // this needs information about Load/Abort/Error - static sal_uIntPtr RegisterStatusInfoId(); + static SotClipboardFormatId RegisterStatusInfoId(); // if the mimetype says graphic/bitmap/gdimetafile then get the // graphic from the Any. Return says no errors diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx index d88e53da59d7..0613a297246d 100644 --- a/include/sfx2/lnkbase.hxx +++ b/include/sfx2/lnkbase.hxx @@ -96,7 +96,7 @@ protected: m_xInputStreamToLoadFrom; SvBaseLink(); - SvBaseLink( sal_uInt16 nLinkType, sal_uIntPtr nContentType = FORMAT_STRING ); + SvBaseLink( sal_uInt16 nLinkType, SotClipboardFormatId nContentType = SotClipboardFormatId::STRING ); virtual ~SvBaseLink(); void _GetRealObject( bool bConnect = true ); @@ -136,8 +136,8 @@ public: void SetUpdateMode( sal_uInt16 ); sal_uInt16 GetUpdateMode() const; - sal_uIntPtr GetContentType() const; - bool SetContentType( sal_uIntPtr nType ); + SotClipboardFormatId GetContentType() const; + bool SetContentType( SotClipboardFormatId nType ); LinkManager* GetLinkManager(); const LinkManager* GetLinkManager() const; diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 289a2dac73bb..1eda88cbf7ad 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -581,7 +581,7 @@ public: virtual void FillClass( SvGlobalName * pClassName, - sal_uInt32 * pFormat, + SotClipboardFormatId * pFormat, OUString * pAppName, OUString * pFullTypeName, OUString * pShortTypeName, diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx index 31aa37ae12a7..799f7b40662e 100644 --- a/include/sfx2/sfxdlg.hxx +++ b/include/sfx2/sfxdlg.hxx @@ -93,9 +93,9 @@ public: class SfxAbstractPasteDialog : virtual public VclAbstractDialog { public: - virtual void Insert( SotFormatStringId nFormat, const rtl::OUString & rFormatName ) = 0; + virtual void Insert( SotClipboardFormatId nFormat, const rtl::OUString & rFormatName ) = 0; virtual void SetObjName( const SvGlobalName & rClass, const rtl::OUString & rObjName ) = 0; - virtual sal_uIntPtr GetFormat( const TransferableDataHelper& aHelper, + virtual SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper, const DataFlavorExVector* pFormats=0, const TransferableObjectDescriptor* pDesc=0 ) = 0; }; diff --git a/include/sot/exchange.hxx b/include/sot/exchange.hxx index d2f0adc5144c..be53ba12ddd5 100644 --- a/include/sot/exchange.hxx +++ b/include/sot/exchange.hxx @@ -26,6 +26,7 @@ #include <com/sun/star/datatransfer/DataFlavor.hpp> #include <com/sun/star/datatransfer/dnd/DNDConstants.hpp> #include <sot/sotdllapi.h> +#include <sot/formats.hxx> #include <tools/solar.h> class SotDataObject; @@ -34,11 +35,10 @@ namespace com { namespace sun { namespace star { namespace datatransfer { class XTransferable; } } } } -typedef sal_uLong SotFormatStringId; struct DataFlavorEx : public ::com::sun::star::datatransfer::DataFlavor { - SotFormatStringId mnSotId; + SotClipboardFormatId mnSotId; }; typedef ::std::vector< DataFlavorEx > _DataFlavorExVector; @@ -52,21 +52,7 @@ struct DataFlavorExVector : public _DataFlavorExVector SOT_DLLPUBLIC bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, - sal_uLong nId ); - -// - predefined formats - -// Do NOT change the order of these values as the implementation depends on them! - -// stardard formats for that Copy/Paste methods exist -#define FORMAT_STRING 1 -#define FORMAT_BITMAP 2 -#define FORMAT_GDIMETAFILE 3 -#define FORMAT_PRIVATE 4 -#define FORMAT_FILE 5 -#define FORMAT_FILE_LIST 6 - -// further formats (only via CopyData/PasteData) -#define FORMAT_RTF 10 + SotClipboardFormatId nId ); // actions #define EXCHG_ACTION_MASK ((sal_uInt16)0x00FF) @@ -138,16 +124,16 @@ class SvGlobalName; class SOT_DLLPUBLIC SotExchange { public: - static sal_uLong RegisterFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); - static sal_uLong RegisterFormatName( const OUString& rName ); - static sal_uLong RegisterFormatMimeType( const OUString& rMimeType ); - - static sal_uLong GetFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); - static OUString GetFormatName( sal_uLong nFormat ); - static bool GetFormatDataFlavor( sal_uLong nFormat, ::com::sun::star::datatransfer::DataFlavor& rFlavor ); - static OUString GetFormatMimeType( sal_uLong nFormat ); + static SotClipboardFormatId RegisterFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + static SotClipboardFormatId RegisterFormatName( const OUString& rName ); + static SotClipboardFormatId RegisterFormatMimeType( const OUString& rMimeType ); + + static SotClipboardFormatId GetFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + static OUString GetFormatName( SotClipboardFormatId nFormat ); + static bool GetFormatDataFlavor( SotClipboardFormatId nFormat, ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + static OUString GetFormatMimeType( SotClipboardFormatId nFormat ); static bool IsInternal( const SvGlobalName& ); - static sal_uLong GetFormatIdFromMimeType( const OUString& rMimeType ); + static SotClipboardFormatId GetFormatIdFromMimeType( const OUString& rMimeType ); // same for XTransferable interface static sal_uInt16 GetExchangeAction( @@ -160,11 +146,11 @@ public: // user action (EXCHG_IN_*, EXCHG_INOUT_*) sal_uInt16 nUserAction, // In:- Out: format to use - sal_uLong& rFormat, + SotClipboardFormatId& rFormat, // In:- Out: default action (EXCHG_IN_*, EXCHG_INOUT_*) sal_uInt16& rDefaultAction, // In:- optional - check only for this specific format - sal_uLong nOnlyTestFormat = 0, + SotClipboardFormatId nOnlyTestFormat = SotClipboardFormatId::NONE, // In:- optional - check the contents of Xtransferable const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >* pxTransferable = NULL ); diff --git a/include/sot/formats.hxx b/include/sot/formats.hxx index 4cfb94bb66e1..b33eb1bdc97b 100644 --- a/include/sot/formats.hxx +++ b/include/sot/formats.hxx @@ -34,150 +34,169 @@ #endif #endif -#include <sot/exchange.hxx> -#define SOT_FORMAT_SYSTEM_START ((sal_uLong)0) -#define SOT_FORMAT_STRING ((sal_uLong)FORMAT_STRING) -#define SOT_FORMAT_BITMAP ((sal_uLong)FORMAT_BITMAP) -#define SOT_FORMAT_GDIMETAFILE ((sal_uLong)FORMAT_GDIMETAFILE) -#define SOT_FORMAT_PRIVATE ((sal_uLong)FORMAT_PRIVATE) -#define SOT_FORMAT_FILE ((sal_uLong)FORMAT_FILE) -#define SOT_FORMAT_FILE_LIST ((sal_uLong)FORMAT_FILE_LIST) -#define SOT_FORMAT_RTF ((sal_uLong)FORMAT_RTF) +#include <tools/solar.h> -#define SOT_FORMATSTR_ID_DRAWING ((sal_uLong)11) -#define SOT_FORMATSTR_ID_SVXB ((sal_uLong)12) -#define SOT_FORMATSTR_ID_SVIM ((sal_uLong)13) -#define SOT_FORMATSTR_ID_XFA ((sal_uLong)14) -#define SOT_FORMATSTR_ID_EDITENGINE ((sal_uLong)15) -#define SOT_FORMATSTR_ID_INTERNALLINK_STATE ((sal_uLong)16) -#define SOT_FORMATSTR_ID_SOLK ((sal_uLong)17) -#define SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ((sal_uLong)18) -#define SOT_FORMATSTR_ID_TREELISTBOX ((sal_uLong)19) -#define SOT_FORMATSTR_ID_NATIVE ((sal_uLong)20) -#define SOT_FORMATSTR_ID_OWNERLINK ((sal_uLong)21) -#define SOT_FORMATSTR_ID_STARSERVER ((sal_uLong)22) -#define SOT_FORMATSTR_ID_STAROBJECT ((sal_uLong)23) -#define SOT_FORMATSTR_ID_APPLETOBJECT ((sal_uLong)24) -#define SOT_FORMATSTR_ID_PLUGIN_OBJECT ((sal_uLong)25) -#define SOT_FORMATSTR_ID_STARWRITER_30 ((sal_uLong)26) -#define SOT_FORMATSTR_ID_STARWRITER_40 ((sal_uLong)27) -#define SOT_FORMATSTR_ID_STARWRITER_50 ((sal_uLong)28) -#define SOT_FORMATSTR_ID_STARWRITERWEB_40 ((sal_uLong)29) -#define SOT_FORMATSTR_ID_STARWRITERWEB_50 ((sal_uLong)30) -#define SOT_FORMATSTR_ID_STARWRITERGLOB_40 ((sal_uLong)31) -#define SOT_FORMATSTR_ID_STARWRITERGLOB_50 ((sal_uLong)32) -#define SOT_FORMATSTR_ID_STARDRAW ((sal_uLong)33) -#define SOT_FORMATSTR_ID_STARDRAW_40 ((sal_uLong)34) -#define SOT_FORMATSTR_ID_STARIMPRESS_50 ((sal_uLong)35) -#define SOT_FORMATSTR_ID_STARDRAW_50 ((sal_uLong)36) -#define SOT_FORMATSTR_ID_STARCALC ((sal_uLong)37) -#define SOT_FORMATSTR_ID_STARCALC_40 ((sal_uLong)38) -#define SOT_FORMATSTR_ID_STARCALC_50 ((sal_uLong)39) -#define SOT_FORMATSTR_ID_STARCHART ((sal_uLong)40) -#define SOT_FORMATSTR_ID_STARCHART_40 ((sal_uLong)41) -#define SOT_FORMATSTR_ID_STARCHART_50 ((sal_uLong)42) -#define SOT_FORMATSTR_ID_STARIMAGE ((sal_uLong)43) -#define SOT_FORMATSTR_ID_STARIMAGE_40 ((sal_uLong)44) -#define SOT_FORMATSTR_ID_STARIMAGE_50 ((sal_uLong)45) -#define SOT_FORMATSTR_ID_STARMATH ((sal_uLong)46) -#define SOT_FORMATSTR_ID_STARMATH_40 ((sal_uLong)47) -#define SOT_FORMATSTR_ID_STARMATH_50 ((sal_uLong)48) -#define SOT_FORMATSTR_ID_STAROBJECT_PAINTDOC ((sal_uLong)49) -#define SOT_FORMATSTR_ID_FILLED_AREA ((sal_uLong)50) -#define SOT_FORMATSTR_ID_HTML ((sal_uLong)51) -#define SOT_FORMATSTR_ID_HTML_SIMPLE ((sal_uLong)52) -#define SOT_FORMATSTR_ID_CHAOS ((sal_uLong)53) -#define SOT_FORMATSTR_ID_CNT_MSGATTACHFILE ((sal_uLong)54) -#define SOT_FORMATSTR_ID_BIFF_5 ((sal_uLong)55) -#define SOT_FORMATSTR_ID_BIFF__5 ((sal_uLong)56) -#define SOT_FORMATSTR_ID_SYLK ((sal_uLong)57) -#define SOT_FORMATSTR_ID_SYLK_BIGCAPS ((sal_uLong)58) -#define SOT_FORMATSTR_ID_LINK ((sal_uLong)59) -#define SOT_FORMATSTR_ID_DIF ((sal_uLong)60) -#define SOT_FORMATSTR_ID_STARDRAW_TABBAR ((sal_uLong)61) -#define SOT_FORMATSTR_ID_SONLK ((sal_uLong)62) -#define SOT_FORMATSTR_ID_MSWORD_DOC ((sal_uLong)63) -#define SOT_FORMATSTR_ID_STAR_FRAMESET_DOC ((sal_uLong)64) -#define SOT_FORMATSTR_ID_OFFICE_DOC ((sal_uLong)65) -#define SOT_FORMATSTR_ID_NOTES_DOCINFO ((sal_uLong)66) -#define SOT_FORMATSTR_ID_NOTES_HNOTE ((sal_uLong)67) -#define SOT_FORMATSTR_ID_NOTES_NATIVE ((sal_uLong)68) -#define SOT_FORMATSTR_ID_SFX_DOC ((sal_uLong)69) -#define SOT_FORMATSTR_ID_EVDF ((sal_uLong)70) -#define SOT_FORMATSTR_ID_ESDF ((sal_uLong)71) -#define SOT_FORMATSTR_ID_IDF ((sal_uLong)72) -#define SOT_FORMATSTR_ID_EFTP ((sal_uLong)73) -#define SOT_FORMATSTR_ID_EFD ((sal_uLong)74) -#define SOT_FORMATSTR_ID_SVX_FORMFIELDEXCH ((sal_uLong)75) -#define SOT_FORMATSTR_ID_EXTENDED_TABBAR ((sal_uLong)76) -#define SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ((sal_uLong)77) -#define SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE ((sal_uLong)78) -#define SOT_FORMATSTR_ID_SBA_PRIVATE_URL ((sal_uLong)79) -#define SOT_FORMATSTR_ID_SBA_TABED ((sal_uLong)80) -#define SOT_FORMATSTR_ID_SBA_TABID ((sal_uLong)81) -#define SOT_FORMATSTR_ID_SBA_JOIN ((sal_uLong)82) -#define SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ((sal_uLong)83) -#define SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR ((sal_uLong)84) -#define SOT_FORMATSTR_ID_EMBED_SOURCE ((sal_uLong)85) -#define SOT_FORMATSTR_ID_LINK_SOURCE ((sal_uLong)86) -#define SOT_FORMATSTR_ID_EMBEDDED_OBJ ((sal_uLong)87) -#define SOT_FORMATSTR_ID_FILECONTENT ((sal_uLong)88) -#define SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ((sal_uLong)89) -#define SOT_FORMATSTR_ID_FILENAME ((sal_uLong)90) -#define SOT_FORMATSTR_ID_SD_OLE ((sal_uLong)91) -#define SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ((sal_uLong)92) -#define SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ((sal_uLong)93) -#define SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE ((sal_uLong)94) -#define SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR_OLE ((sal_uLong)95) -#define SOT_FORMATSTR_ID_LINK_SOURCE_OLE ((sal_uLong)96) -#define SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE ((sal_uLong)97) -#define SOT_FORMATSTR_ID_OUTPLACE_OBJ ((sal_uLong)98) -#define SOT_FORMATSTR_ID_CNT_OWN_CLIP ((sal_uLong)99) -#define SOT_FORMATSTR_ID_INET_IMAGE ((sal_uLong)100) -#define SOT_FORMATSTR_ID_NETSCAPE_IMAGE ((sal_uLong)101) -#define SOT_FORMATSTR_ID_SBA_FORMEXCHANGE ((sal_uLong)102) -#define SOT_FORMATSTR_ID_SBA_REPORTEXCHANGE ((sal_uLong)103) -#define SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ((sal_uLong)104) -#define SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50 ((sal_uLong)105) -#define SOT_FORMATSTR_ID_GRAPHOBJ ((sal_uLong)106) -#define SOT_FORMATSTR_ID_STARWRITER_60 ((sal_uLong)107) -#define SOT_FORMATSTR_ID_STARWRITERWEB_60 ((sal_uLong)108) -#define SOT_FORMATSTR_ID_STARWRITERGLOB_60 ((sal_uLong)109) -#define SOT_FORMATSTR_ID_STARDRAW_60 ((sal_uLong)110) -#define SOT_FORMATSTR_ID_STARIMPRESS_60 ((sal_uLong)111) -#define SOT_FORMATSTR_ID_STARCALC_60 ((sal_uLong)112) -#define SOT_FORMATSTR_ID_STARCHART_60 ((sal_uLong)113) -#define SOT_FORMATSTR_ID_STARMATH_60 ((sal_uLong)114) -#define SOT_FORMATSTR_ID_WMF ((sal_uLong)115) -#define SOT_FORMATSTR_ID_DBACCESS_QUERY ((sal_uLong)116) -#define SOT_FORMATSTR_ID_DBACCESS_TABLE ((sal_uLong)117) -#define SOT_FORMATSTR_ID_DBACCESS_COMMAND ((sal_uLong)118) -#define SOT_FORMATSTR_ID_DIALOG_60 ((sal_uLong)119) -#define SOT_FORMATSTR_ID_EMF ((sal_uLong)120) -#define SOT_FORMATSTR_ID_BIFF_8 ((sal_uLong)121) -#define SOT_FORMATSTR_ID_BMP ((sal_uLong)122) -#define SOT_FORMATSTR_ID_HTML_NO_COMMENT ((sal_uLong)123) -#define SOT_FORMATSTR_ID_STARWRITER_8 ((sal_uLong)124) -#define SOT_FORMATSTR_ID_STARWRITERWEB_8 ((sal_uLong)125) -#define SOT_FORMATSTR_ID_STARWRITERGLOB_8 ((sal_uLong)126) -#define SOT_FORMATSTR_ID_STARDRAW_8 ((sal_uLong)127) -#define SOT_FORMATSTR_ID_STARIMPRESS_8 ((sal_uLong)128) -#define SOT_FORMATSTR_ID_STARCALC_8 ((sal_uLong)129) -#define SOT_FORMATSTR_ID_STARCHART_8 ((sal_uLong)130) -#define SOT_FORMATSTR_ID_STARMATH_8 ((sal_uLong)131) -#define SOT_FORMATSTR_ID_XFORMS ((sal_uLong)132) -#define SOT_FORMATSTR_ID_STARWRITER_8_TEMPLATE ((sal_uLong)133) -#define SOT_FORMATSTR_ID_STARDRAW_8_TEMPLATE ((sal_uLong)134) -#define SOT_FORMATSTR_ID_STARIMPRESS_8_TEMPLATE ((sal_uLong)135) -#define SOT_FORMATSTR_ID_STARCALC_8_TEMPLATE ((sal_uLong)136) -#define SOT_FORMATSTR_ID_STARCHART_8_TEMPLATE ((sal_uLong)137) -#define SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE ((sal_uLong)138) -#define SOT_FORMATSTR_ID_STARBASE_8 ((sal_uLong)139) -#define SOT_FORMATSTR_ID_HC_GDIMETAFILE ((sal_uLong)140) -#define SOT_FORMATSTR_ID_PNG ((sal_uLong)141) -#define SOT_FORMATSTR_ID_STARWRITERGLOB_8_TEMPLATE ((sal_uLong)142) -#define SOT_FORMATSTR_ID_USER_END SOT_FORMATSTR_ID_STARWRITERGLOB_8_TEMPLATE +// - predefined formats - +// Do NOT change the order of these values as the implementation depends on them! +enum class SotClipboardFormatId : sal_uLong +{ +// standard formats for that Copy/Paste methods exist + STRING = 1, + BITMAP = 2, + GDIMETAFILE = 3, + PRIVATE = 4, + FILE = 5, + FILE_LIST = 6, +// further formats (only via CopyData/PasteData) + RTF = 10, + + NONE = 0, + ONLY_USED_IN_SW = 8, // the SW module essentially creates its own ID's and this is one of them + DRAWING = 11, + SVXB = 12, + SVIM = 13, + XFA = 14, + EDITENGINE = 15, + INTERNALLINK_STATE = 16, + SOLK = 17, + NETSCAPE_BOOKMARK = 18, + TREELISTBOX = 19, + NATIVE = 20, + OWNERLINK = 21, + STARSERVER = 22, + STAROBJECT = 23, + APPLETOBJECT = 24, + PLUGIN_OBJECT = 25, + STARWRITER_30 = 26, + STARWRITER_40 = 27, + STARWRITER_50 = 28, + STARWRITERWEB_40 = 29, + STARWRITERWEB_50 = 30, + STARWRITERGLOB_40 = 31, + STARWRITERGLOB_50 = 32, + STARDRAW = 33, + STARDRAW_40 = 34, + STARIMPRESS_50 = 35, + STARDRAW_50 = 36, + STARCALC = 37, + STARCALC_40 = 38, + STARCALC_50 = 39, + STARCHART = 40, + STARCHART_40 = 41, + STARCHART_50 = 42, + STARIMAGE = 43, + STARIMAGE_40 = 44, + STARIMAGE_50 = 45, + STARMATH = 46, + STARMATH_40 = 47, + STARMATH_50 = 48, + STAROBJECT_PAINTDOC = 49, + FILLED_AREA = 50, + HTML = 51, + HTML_SIMPLE = 52, + CHAOS = 53, + CNT_MSGATTACHFILE = 54, + BIFF_5 = 55, + BIFF__5 = 56, + SYLK = 57, + SYLK_BIGCAPS = 58, + LINK = 59, + DIF = 60, + STARDRAW_TABBAR = 61, + SONLK = 62, + MSWORD_DOC = 63, + STAR_FRAMESET_DOC = 64, + OFFICE_DOC = 65, + NOTES_DOCINFO = 66, + NOTES_HNOTE = 67, + NOTES_NATIVE = 68, + SFX_DOC = 69, + EVDF = 70, + ESDF = 71, + IDF = 72, + EFTP = 73, + EFD = 74, + SVX_FORMFIELDEXCH = 75, + EXTENDED_TABBAR = 76, + SBA_DATAEXCHANGE = 77, + SBA_FIELDDATAEXCHANGE = 78, + SBA_PRIVATE_URL = 79, + SBA_TABED = 80, + SBA_TABID = 81, + SBA_JOIN = 82, + OBJECTDESCRIPTOR = 83, + LINKSRCDESCRIPTOR = 84, + EMBED_SOURCE = 85, + LINK_SOURCE = 86, + EMBEDDED_OBJ = 87, + FILECONTENT = 88, + FILEGRPDESCRIPTOR = 89, + FILENAME = 90, + SD_OLE = 91, + EMBEDDED_OBJ_OLE = 92, + EMBED_SOURCE_OLE = 93, + OBJECTDESCRIPTOR_OLE = 94, + LINKSRCDESCRIPTOR_OLE = 95, + LINK_SOURCE_OLE = 96, + SBA_CTRLDATAEXCHANGE = 97, + OUTPLACE_OBJ = 98, + CNT_OWN_CLIP = 99, + INET_IMAGE = 100, + NETSCAPE_IMAGE = 101, + SBA_FORMEXCHANGE = 102, + SBA_REPORTEXCHANGE = 103, + UNIFORMRESOURCELOCATOR = 104, + STARCHARTDOCUMENT_50 = 105, + GRAPHOBJ = 106, + STARWRITER_60 = 107, + STARWRITERWEB_60 = 108, + STARWRITERGLOB_60 = 109, + STARDRAW_60 = 110, + STARIMPRESS_60 = 111, + STARCALC_60 = 112, + STARCHART_60 = 113, + STARMATH_60 = 114, + WMF = 115, + DBACCESS_QUERY = 116, + DBACCESS_TABLE = 117, + DBACCESS_COMMAND = 118, + DIALOG_60 = 119, + EMF = 120, + BIFF_8 = 121, + BMP = 122, + HTML_NO_COMMENT = 123, + STARWRITER_8 = 124, + STARWRITERWEB_8 = 125, + STARWRITERGLOB_8 = 126, + STARDRAW_8 = 127, + STARIMPRESS_8 = 128, + STARCALC_8 = 129, + STARCHART_8 = 130, + STARMATH_8 = 131, + XFORMS = 132, + STARWRITER_8_TEMPLATE = 133, + STARDRAW_8_TEMPLATE = 134, + STARIMPRESS_8_TEMPLATE = 135, + STARCALC_8_TEMPLATE = 136, + STARCHART_8_TEMPLATE = 137, + STARMATH_8_TEMPLATE = 138, + STARBASE_8 = 139, + HC_GDIMETAFILE = 140, + PNG = 141, + STARWRITERGLOB_8_TEMPLATE = 142, + // the point at which we start allocating "runtime" format IDs + USER_END = STARWRITERGLOB_8_TEMPLATE +}; + +/** Make it easier to iterate over format IDs */ +inline SotClipboardFormatId& operator++(SotClipboardFormatId& v) +{ + v = static_cast<SotClipboardFormatId>(static_cast<sal_uLong>(v) + 1); + return v; +} + +#define SOT_FORMAT_SYSTEM_START SotClipboardFormatId::NONE #endif // INCLUDED_SOT_FORMATS_HXX diff --git a/include/sot/stg.hxx b/include/sot/stg.hxx index 2d8b1d1d1186..27bb26a40f70 100644 --- a/include/sot/stg.hxx +++ b/include/sot/stg.hxx @@ -84,6 +84,8 @@ public: virtual bool Equals( const BaseStorageStream& rStream ) const = 0; }; +enum class SotClipboardFormatId : sal_uLong; + class BaseStorage : public StorageBase { public: @@ -94,13 +96,13 @@ public: virtual const ClsId& GetClassId() const = 0; virtual void SetDirty() = 0; virtual void SetClass( const SvGlobalName & rClass, - sal_uLong nOriginalClipFormat, + SotClipboardFormatId nOriginalClipFormat, const OUString & rUserTypeName ) = 0; virtual void SetConvertClass( const SvGlobalName & rConvertClass, - sal_uLong nOriginalClipFormat, + SotClipboardFormatId nOriginalClipFormat, const OUString & rUserTypeName ) = 0; virtual SvGlobalName GetClassName() = 0; - virtual sal_uLong GetFormat() = 0; + virtual SotClipboardFormatId GetFormat() = 0; virtual OUString GetUserName() = 0; virtual bool ShouldConvert() = 0; virtual void FillInfoList( SvStorageInfoList* ) const = 0; @@ -194,13 +196,13 @@ public: virtual const ClsId& GetClassId() const SAL_OVERRIDE; virtual void SetDirty() SAL_OVERRIDE; virtual void SetClass( const SvGlobalName & rClass, - sal_uLong nOriginalClipFormat, + SotClipboardFormatId nOriginalClipFormat, const OUString & rUserTypeName ) SAL_OVERRIDE; virtual void SetConvertClass( const SvGlobalName & rConvertClass, - sal_uLong nOriginalClipFormat, + SotClipboardFormatId nOriginalClipFormat, const OUString & rUserTypeName ) SAL_OVERRIDE; virtual SvGlobalName GetClassName() SAL_OVERRIDE; - virtual sal_uLong GetFormat() SAL_OVERRIDE; + virtual SotClipboardFormatId GetFormat() SAL_OVERRIDE; virtual OUString GetUserName() SAL_OVERRIDE; virtual bool ShouldConvert() SAL_OVERRIDE; virtual void FillInfoList( SvStorageInfoList* ) const SAL_OVERRIDE; @@ -310,13 +312,13 @@ public: virtual const ClsId& GetClassId() const SAL_OVERRIDE; virtual void SetDirty() SAL_OVERRIDE; virtual void SetClass( const SvGlobalName & rClass, - sal_uLong nOriginalClipFormat, + SotClipboardFormatId nOriginalClipFormat, const OUString & rUserTypeName ) SAL_OVERRIDE; virtual void SetConvertClass( const SvGlobalName & rConvertClass, - sal_uLong nOriginalClipFormat, + SotClipboardFormatId nOriginalClipFormat, const OUString & rUserTypeName ) SAL_OVERRIDE; virtual SvGlobalName GetClassName() SAL_OVERRIDE; - virtual sal_uLong GetFormat() SAL_OVERRIDE; + virtual SotClipboardFormatId GetFormat() SAL_OVERRIDE; virtual OUString GetUserName() SAL_OVERRIDE; virtual bool ShouldConvert() SAL_OVERRIDE; virtual void FillInfoList( SvStorageInfoList* ) const SAL_OVERRIDE; diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx index b25345f61050..3376609632e3 100644 --- a/include/sot/storage.hxx +++ b/include/sot/storage.hxx @@ -39,6 +39,7 @@ typedef short StorageMode; class SvStorage; +enum class SotClipboardFormatId : sal_uLong; /************************************************************************* *************************************************************************/ @@ -165,10 +166,10 @@ public: // own data sector void SetClass( const SvGlobalName & rClass, - sal_uLong bOriginalClipFormat, + SotClipboardFormatId bOriginalClipFormat, const OUString & rUserTypeName ); SvGlobalName GetClassName(); // type of data in the storage - sal_uLong GetFormat(); + SotClipboardFormatId GetFormat(); OUString GetUserName(); // list of all elements @@ -199,7 +200,7 @@ public: static SotStorage* OpenOLEStorage( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage, const OUString& rEleName, StreamMode = STREAM_STD_READWRITE ); - static sal_Int32 GetFormatID( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage ); + static SotClipboardFormatId GetFormatID( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage ); static sal_Int32 GetVersion( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage ); }; diff --git a/include/sot/storinfo.hxx b/include/sot/storinfo.hxx index d2bf31221322..4820bfcb2635 100644 --- a/include/sot/storinfo.hxx +++ b/include/sot/storinfo.hxx @@ -24,6 +24,7 @@ #include <tools/solar.h> #include <vector> #include <sot/sotdllapi.h> +#include <sot/exchange.hxx> class StgDirEntry; class SvStorageInfo @@ -54,8 +55,8 @@ public: typedef ::std::vector< SvStorageInfo > SvStorageInfoList; -SOT_DLLPUBLIC sal_uLong ReadClipboardFormat( SvStream & rStm ); -SOT_DLLPUBLIC void WriteClipboardFormat( SvStream & rStm, sal_uLong nFormat ); +SOT_DLLPUBLIC SotClipboardFormatId ReadClipboardFormat( SvStream & rStm ); +SOT_DLLPUBLIC void WriteClipboardFormat( SvStream & rStm, SotClipboardFormatId nFormat ); #endif // _STORINFO_HXX diff --git a/include/svl/svdde.hxx b/include/svl/svdde.hxx index 74e1c9637377..b3b5c50ed3c4 100644 --- a/include/svl/svdde.hxx +++ b/include/svl/svdde.hxx @@ -62,11 +62,11 @@ class SVL_DLLPUBLIC DdeData SVL_DLLPRIVATE void Lock(); - void SetFormat( sal_uLong nFmt ); + void SetFormat( SotClipboardFormatId nFmt ); public: DdeData(); - DdeData( SAL_UNUSED_PARAMETER const void*, SAL_UNUSED_PARAMETER long, SAL_UNUSED_PARAMETER sal_uLong = FORMAT_STRING ); + DdeData( SAL_UNUSED_PARAMETER const void*, SAL_UNUSED_PARAMETER long, SAL_UNUSED_PARAMETER SotClipboardFormatId = SotClipboardFormatId::STRING ); DdeData( SAL_UNUSED_PARAMETER const OUString& ); DdeData( const DdeData& ); ~DdeData(); @@ -74,7 +74,7 @@ public: operator const void*() const; operator long() const; - sal_uLong GetFormat() const; + SotClipboardFormatId GetFormat() const; DdeData& operator = ( const DdeData& ); @@ -118,8 +118,8 @@ public: void SetDoneHdl( const Link& rLink ) { aDone = rLink; } const Link& GetDoneHdl() const { return aDone; } - void SetFormat( sal_uLong nFmt ) { aDdeData.SetFormat( nFmt ); } - sal_uLong GetFormat() const { return aDdeData.GetFormat(); } + void SetFormat( SotClipboardFormatId nFmt ) { aDdeData.SetFormat( nFmt ); } + SotClipboardFormatId GetFormat() const { return aDdeData.GetFormat(); } long GetError(); @@ -187,7 +187,7 @@ class SVL_DLLPUBLIC DdePoke : public DdeTransaction { public: DdePoke( DdeConnection&, const OUString&, const char*, long, - sal_uLong = FORMAT_STRING, long = 0 ); + SotClipboardFormatId = SotClipboardFormatId::STRING, long = 0 ); DdePoke( DdeConnection&, const OUString&, SAL_UNUSED_PARAMETER const DdeData&, long = 0 ); DdePoke( DdeConnection&, const OUString&, const OUString&, long = 0 ); }; @@ -274,7 +274,7 @@ public: DdeGetPutItem( const OUString& rStr ); DdeGetPutItem( const DdeItem& rItem ); - virtual DdeData* Get( sal_uLong ); + virtual DdeData* Get( SotClipboardFormatId ); virtual bool Put( const DdeData* ); virtual void AdviseLoop( bool ); // Start / Stop AdviseLoop }; diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 3be7495c6d44..545ed60c0252 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -404,8 +404,8 @@ protected: inline const DataFlavorExVector& GetDataFlavors() const; - bool IsDropFormatSupported( SotFormatStringId nFormat ); // need this because the base class' IsDropFormatSupported is not const ... - bool IsDropFormatSupported( SotFormatStringId nFormat ) const; + bool IsDropFormatSupported( SotClipboardFormatId nFormat ); // need this because the base class' IsDropFormatSupported is not const ... + bool IsDropFormatSupported( SotClipboardFormatId nFormat ) const; bool IsDropFormatSupported( const css::datatransfer::DataFlavor& _rFlavor ); // need this because the base class' IsDropFormatSupported is not const ... bool IsDropFormatSupported( const css::datatransfer::DataFlavor& _rFlavor ) const; diff --git a/include/svtools/inetimg.hxx b/include/svtools/inetimg.hxx index 1f5274e8050f..22a4f5628165 100644 --- a/include/svtools/inetimg.hxx +++ b/include/svtools/inetimg.hxx @@ -20,6 +20,7 @@ #define INCLUDED_SVTOOLS_INETIMG_HXX #include <tools/gen.hxx> +#include <sot/formats.hxx> class SvData; class SotDataObject; @@ -67,8 +68,8 @@ public: const Size& GetSizePixel() const { return aSizePixel; } // Im-/Export - bool Write( SvStream& rOStm, sal_uLong nFormat ) const; - bool Read( SvStream& rIStm, sal_uLong nFormat ); + bool Write( SvStream& rOStm, SotClipboardFormatId nFormat ) const; + bool Read( SvStream& rIStm, SotClipboardFormatId nFormat ); }; #endif // INCLUDED_SVTOOLS_INETIMG_HXX diff --git a/include/svtools/insdlg.hxx b/include/svtools/insdlg.hxx index 7bdfe48c1b68..70fcf9ec7861 100644 --- a/include/svtools/insdlg.hxx +++ b/include/svtools/insdlg.hxx @@ -70,8 +70,8 @@ public: class SVT_DLLPUBLIC SvPasteObjectHelper { public: - static OUString GetSotFormatUIName( SotFormatStringId nId ); - static bool GetEmbeddedName(const TransferableDataHelper& rData, OUString& _rName, OUString& _rSource, SotFormatStringId& _nFormat); + static OUString GetSotFormatUIName( SotClipboardFormatId nId ); + static bool GetEmbeddedName(const TransferableDataHelper& rData, OUString& _rName, OUString& _rSource, SotClipboardFormatId& _nFormat); }; #endif // INCLUDED_SVTOOLS_INSDLG_HXX diff --git a/include/svtools/openfiledroptargetlistener.hxx b/include/svtools/openfiledroptargetlistener.hxx index 2d708f7aa253..9924a3437134 100644 --- a/include/svtools/openfiledroptargetlistener.hxx +++ b/include/svtools/openfiledroptargetlistener.hxx @@ -66,7 +66,7 @@ class SVT_DLLPUBLIC OpenFileDropTargetListener : public ::cppu::WeakImplHelper1< private: void implts_BeginDrag( const css::uno::Sequence< css::datatransfer::DataFlavor >& rSupportedDataFlavors ); void implts_EndDrag(); - bool implts_IsDropFormatSupported( SotFormatStringId nFormat ); + bool implts_IsDropFormatSupported( SotClipboardFormatId nFormat ); void implts_OpenFile( const OUString& rFilePath ); }; diff --git a/include/svtools/transfer.hxx b/include/svtools/transfer.hxx index 9cf81c8de868..de0d85c1c1c3 100644 --- a/include/svtools/transfer.hxx +++ b/include/svtools/transfer.hxx @@ -218,11 +218,11 @@ protected: virtual ~TransferableHelper(); - void AddFormat( SotFormatStringId nFormat ); + void AddFormat( SotClipboardFormatId nFormat ); void AddFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); - void RemoveFormat( SotFormatStringId nFormat ); + void RemoveFormat( SotClipboardFormatId nFormat ); void RemoveFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); - bool HasFormat( SotFormatStringId nFormat ); + bool HasFormat( SotClipboardFormatId nFormat ); inline bool HasFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) { return isDataFlavorSupported( rFlavor ); } void ClearFormats(); @@ -235,13 +235,13 @@ protected: bool SetTransferableObjectDescriptor( const TransferableObjectDescriptor& rDesc, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); bool SetINetBookmark( const INetBookmark& rBmk, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); bool SetINetImage( const INetImage& rINtImg, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); - bool SetObject( void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + bool SetObject( void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); protected: virtual void AddSupportedFormats() = 0; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) = 0; - virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); + virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); virtual void DragFinished( sal_Int8 nDropAction ); virtual void ObjectReleased(); @@ -299,12 +299,12 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& GetTransferable() const { return mxTransfer; } ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > GetXTransferable() const; - bool HasFormat( SotFormatStringId nFormat ) const; + bool HasFormat( SotClipboardFormatId nFormat ) const; bool HasFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) const; sal_uInt32 GetFormatCount() const; - SotFormatStringId GetFormat( sal_uInt32 nFormat ) const; + SotClipboardFormatId GetFormat( sal_uInt32 nFormat ) const; ::com::sun::star::datatransfer::DataFlavor GetFormatDataFlavor( sal_uInt32 nFormat ) const; DataFlavorExVector& GetDataFlavorExVector() const {return *mpFormats; } @@ -316,13 +316,13 @@ public: public: - css::uno::Any GetAny( SotFormatStringId nFormat, const OUString& rDestDoc ) const; + css::uno::Any GetAny( SotClipboardFormatId nFormat, const OUString& rDestDoc ) const; css::uno::Any GetAny( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) const; - bool GetString( SotFormatStringId nFormat, OUString& rStr ); + bool GetString( SotClipboardFormatId nFormat, OUString& rStr ); bool GetString( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, OUString& rStr ); - bool GetBitmapEx( SotFormatStringId nFormat, BitmapEx& rBmp ); + bool GetBitmapEx( SotClipboardFormatId nFormat, BitmapEx& rBmp ); bool GetBitmapEx( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, BitmapEx& rBmp ); /** Return as GDI metafile. @@ -333,34 +333,34 @@ public: metafile, with over 3 million (!) actions; which is just too large for any reasonable handling - and you need to set a limit. */ - bool GetGDIMetaFile( SotFormatStringId nFormat, GDIMetaFile& rMtf, size_t nMaxActions = 0 ); + bool GetGDIMetaFile( SotClipboardFormatId nFormat, GDIMetaFile& rMtf, size_t nMaxActions = 0 ); bool GetGDIMetaFile( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, GDIMetaFile& rMtf ); - bool GetGraphic( SotFormatStringId nFormat, Graphic& rGraphic ); + bool GetGraphic( SotClipboardFormatId nFormat, Graphic& rGraphic ); bool GetGraphic( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, Graphic& rGraphic ); - bool GetImageMap( SotFormatStringId nFormat, ImageMap& rIMap ); + bool GetImageMap( SotClipboardFormatId nFormat, ImageMap& rIMap ); bool GetImageMap( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, ImageMap& rImap ); - bool GetTransferableObjectDescriptor( SotFormatStringId nFormat, TransferableObjectDescriptor& rDesc ); + bool GetTransferableObjectDescriptor( SotClipboardFormatId nFormat, TransferableObjectDescriptor& rDesc ); bool GetTransferableObjectDescriptor( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, TransferableObjectDescriptor& rDesc ); - bool GetINetBookmark( SotFormatStringId nFormat, INetBookmark& rBmk ); + bool GetINetBookmark( SotClipboardFormatId nFormat, INetBookmark& rBmk ); bool GetINetBookmark( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, INetBookmark& rBmk ); - bool GetINetImage( SotFormatStringId nFormat, INetImage& rINtImg ); + bool GetINetImage( SotClipboardFormatId nFormat, INetImage& rINtImg ); bool GetINetImage( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, INetImage& rINtImg ); - bool GetFileList( SotFormatStringId nFormat, FileList& rFileList ); + bool GetFileList( SotClipboardFormatId nFormat, FileList& rFileList ); bool GetFileList( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, FileList& rFileList ); - css::uno::Sequence<sal_Int8> GetSequence( SotFormatStringId nFormat, const OUString& rDestDoc ); + css::uno::Sequence<sal_Int8> GetSequence( SotClipboardFormatId nFormat, const OUString& rDestDoc ); css::uno::Sequence<sal_Int8> GetSequence( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ); - bool GetSotStorageStream( SotFormatStringId nFormat, SotStorageStreamRef& rStreamRef ); + bool GetSotStorageStream( SotClipboardFormatId nFormat, SotStorageStreamRef& rStreamRef ); bool GetSotStorageStream( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, SotStorageStreamRef& rStreamRef ); - css::uno::Reference<css::io::XInputStream> GetInputStream( SotFormatStringId nFormat, const OUString& rDestDoc ); + css::uno::Reference<css::io::XInputStream> GetInputStream( SotClipboardFormatId nFormat, const OUString& rDestDoc ); css::uno::Reference<css::io::XInputStream> GetInputStream( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ); bool GetInterface( const ::com::sun::star::datatransfer::DataFlavor& rFlavor, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rIf ); @@ -478,7 +478,7 @@ public: virtual ~DropTargetHelper(); // typically called by the application in ::AcceptDrop and ::ExecuteDrop and (see above) - bool IsDropFormatSupported( SotFormatStringId nFormat ); + bool IsDropFormatSupported( SotClipboardFormatId nFormat ); bool IsDropFormatSupported( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ); DataFlavorExVector& GetDataFlavorExVector() const {return *mpFormats; } @@ -507,11 +507,11 @@ public: void CopyImageMap( const ImageMap& rImgMap ); void CopyGraphic( const Graphic& rGrf ); void CopyString( const OUString& rStr ); - void CopyString( sal_uInt16 nFmt, const OUString& rStr ); - void CopyAny( sal_uInt16 nFmt, const ::com::sun::star::uno::Any& rAny ); + void CopyString( SotClipboardFormatId nFmt, const OUString& rStr ); + void CopyAny( SotClipboardFormatId nFmt, const ::com::sun::star::uno::Any& rAny ); - void CopyByteString( sal_uLong nFormatId, const OString& rStr ); - void CopyAnyData( sal_uLong nFormatId, const sal_Char* pData, sal_uLong nLen ); + void CopyByteString( SotClipboardFormatId nFormatId, const OString& rStr ); + void CopyAnyData( SotClipboardFormatId nFormatId, const sal_Char* pData, sal_uLong nLen ); bool HasAnyData() const; diff --git a/include/svx/clipfmtitem.hxx b/include/svx/clipfmtitem.hxx index 63daf82b7bb3..8119650ca8ab 100644 --- a/include/svx/clipfmtitem.hxx +++ b/include/svx/clipfmtitem.hxx @@ -20,6 +20,7 @@ #define INCLUDED_SVX_CLIPFMTITEM_HXX #include <rtl/ustring.hxx> +#include <sot/formats.hxx> #include <svl/poolitem.hxx> #include <svx/svxdllapi.h> @@ -42,12 +43,12 @@ public: virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const SAL_OVERRIDE; virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) SAL_OVERRIDE; - void AddClipbrdFormat( sal_uIntPtr nId, sal_uInt16 nPos = USHRT_MAX ); - void AddClipbrdFormat( sal_uIntPtr nId, const OUString& rName, + void AddClipbrdFormat( SotClipboardFormatId nId, sal_uInt16 nPos = USHRT_MAX ); + void AddClipbrdFormat( SotClipboardFormatId nId, const OUString& rName, sal_uInt16 nPos = USHRT_MAX ); sal_uInt16 Count() const; - sal_uIntPtr GetClipbrdFormatId( sal_uInt16 nPos ) const; + SotClipboardFormatId GetClipbrdFormatId( sal_uInt16 nPos ) const; const OUString GetClipbrdFormatName( sal_uInt16 nPos ) const; }; diff --git a/include/svx/dbaexchange.hxx b/include/svx/dbaexchange.hxx index 5c5cba8bb8e4..eed5b2c46c8c 100644 --- a/include/svx/dbaexchange.hxx +++ b/include/svx/dbaexchange.hxx @@ -149,7 +149,7 @@ namespace svx virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; - static sal_uInt32 getDescriptorFormatId(); + static SotClipboardFormatId getDescriptorFormatId(); private: SVX_DLLPRIVATE void implConstruct( @@ -170,7 +170,7 @@ namespace svx { ODataAccessDescriptor m_aDescriptor; OUString m_sCompatibleObjectDescription; - // needed to provide a SOT_FORMATSTR_ID_SBA_DATAEXCHANGE format + // needed to provide a SotClipboardFormatId::SBA_DATAEXCHANGE format public: /** should be used copying and the connection is needed. @@ -277,7 +277,7 @@ namespace svx virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; virtual void ObjectReleased() SAL_OVERRIDE; - static sal_uInt32 getDescriptorFormatId(); + static SotClipboardFormatId getDescriptorFormatId(); }; diff --git a/include/svx/dbaobjectex.hxx b/include/svx/dbaobjectex.hxx index a7676209770a..2592d63444cf 100644 --- a/include/svx/dbaobjectex.hxx +++ b/include/svx/dbaobjectex.hxx @@ -65,7 +65,7 @@ namespace svx virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; - static sal_uInt32 getDescriptorFormatId(bool _bExtractForm); + static SotClipboardFormatId getDescriptorFormatId(bool _bExtractForm); }; diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx index 8d58cd4ef5fa..74878809a638 100644 --- a/include/svx/galmisc.hxx +++ b/include/svx/galmisc.hxx @@ -177,7 +177,7 @@ protected: // TransferableHelper virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; - virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; + virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; virtual void DragFinished( sal_Int8 nDropAction ) SAL_OVERRIDE; virtual void ObjectReleased() SAL_OVERRIDE; diff --git a/include/unotest/filters-test.hxx b/include/unotest/filters-test.hxx index 476588aff013..5bbc6463545a 100644 --- a/include/unotest/filters-test.hxx +++ b/include/unotest/filters-test.hxx @@ -13,6 +13,7 @@ #include <comphelper/documentconstants.hxx> #include <rtl/ustring.hxx> #include <unotest/detail/unotestdllapi.hxx> +#include <sot/formats.hxx> namespace test { @@ -44,7 +45,7 @@ public: //SfxFilterFlags for SfxFilter unsigned int nFilterFlags = SFX_FILTER_IMPORT, //Clipboard id for SfxFilter - unsigned int nClipboardID = 0, + SotClipboardFormatId nClipboardID = SotClipboardFormatId::NONE, //additional filter version for SfxFilter unsigned int nFilterVersion = 0, //export or import? @@ -55,7 +56,7 @@ public: const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) = 0; virtual bool save( @@ -63,7 +64,7 @@ public: const OUString &/*rURL*/, const OUString &/*rUserData*/, unsigned int /*nFilterFlags*/, - unsigned int /*nClipboardID*/, + SotClipboardFormatId /*nClipboardID*/, unsigned int /*nFilterVersion*/) { return true; @@ -78,7 +79,7 @@ protected: const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion, bool bExport); }; diff --git a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx index 72db87913af9..14a554edd980 100644 --- a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx +++ b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx @@ -29,7 +29,7 @@ namespace virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; void test(); @@ -51,7 +51,7 @@ namespace bool LotusWordProTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { uno::Sequence< beans::PropertyValue > aDescriptor(1); aDescriptor[0].Name = "URL"; diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx index f8610a17fce4..6e246ca8c160 100644 --- a/oox/source/ole/olehelper.cxx +++ b/oox/source/ole/olehelper.cxx @@ -586,7 +586,7 @@ bool MSConvertOCXControls::WriteOCXStream( const Reference< XModel >& rxModel, S OUString sFullName = exportHelper.getFullName(); rName = exportHelper.getTypeName(); - xOleStg->SetClass( aName,0x5C,sFullName); + xOleStg->SetClass( aName, SotClipboardFormatId::EMBEDDED_OBJ_OLE, sFullName); { SvStorageStreamRef pNameStream = xOleStg->OpenSotStream(OUString("\3OCXNAME")); Reference< XOutputStream > xOut = new utl::OSeekableOutputStreamWrapper( *pNameStream ); diff --git a/package/qa/cppunit/test_package.cxx b/package/qa/cppunit/test_package.cxx index c9e37b3b7ac9..35e4009d72bb 100644 --- a/package/qa/cppunit/test_package.cxx +++ b/package/qa/cppunit/test_package.cxx @@ -25,7 +25,7 @@ namespace virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; void test(); @@ -36,7 +36,7 @@ namespace bool PackageTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { try { diff --git a/reportdesign/source/ui/dlg/GroupExchange.cxx b/reportdesign/source/ui/dlg/GroupExchange.cxx index 75ab80ea094d..8bfdc708c448 100644 --- a/reportdesign/source/ui/dlg/GroupExchange.cxx +++ b/reportdesign/source/ui/dlg/GroupExchange.cxx @@ -26,13 +26,13 @@ namespace rptui using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; - sal_uInt32 OGroupExchange::getReportGroupId() + SotClipboardFormatId OGroupExchange::getReportGroupId() { - static sal_uInt32 s_nReportFormat = (sal_uInt32)-1; - if ( (sal_uInt32)-1 == s_nReportFormat ) + static SotClipboardFormatId s_nReportFormat = static_cast<SotClipboardFormatId>(-1); + if ( static_cast<SotClipboardFormatId>(-1) == s_nReportFormat ) { s_nReportFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"reportdesign.GroupFormat\"" )); - OSL_ENSURE((sal_uInt32)-1 != s_nReportFormat, "Bad exchange id!"); + OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nReportFormat, "Bad exchange id!"); } return s_nReportFormat; } @@ -51,7 +51,7 @@ namespace rptui bool OGroupExchange::GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& /*rDestDoc*/ ) { - sal_uLong nFormat = SotExchange::GetFormat(rFlavor); + SotClipboardFormatId nFormat = SotExchange::GetFormat(rFlavor); if(nFormat == OGroupExchange::getReportGroupId() ) { return SetAny(uno::makeAny(m_aGroupRow),rFlavor); diff --git a/reportdesign/source/ui/dlg/GroupExchange.hxx b/reportdesign/source/ui/dlg/GroupExchange.hxx index 39c206be49c6..a057067459ab 100644 --- a/reportdesign/source/ui/dlg/GroupExchange.hxx +++ b/reportdesign/source/ui/dlg/GroupExchange.hxx @@ -34,7 +34,7 @@ namespace rptui public: OGroupExchange(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& _aGroupRow); - static sal_uInt32 getReportGroupId(); + static SotClipboardFormatId getReportGroupId(); protected: virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; diff --git a/reportdesign/source/ui/inc/dlgedclip.hxx b/reportdesign/source/ui/inc/dlgedclip.hxx index 39609c053fc1..5b376569c061 100644 --- a/reportdesign/source/ui/inc/dlgedclip.hxx +++ b/reportdesign/source/ui/inc/dlgedclip.hxx @@ -65,7 +65,7 @@ public: * * \return the registered format id */ - static sal_uInt32 getDescriptorFormatId(); + static SotClipboardFormatId getDescriptorFormatId(); protected: // TransferableHelper overridables diff --git a/reportdesign/source/ui/report/dlgedclip.cxx b/reportdesign/source/ui/report/dlgedclip.cxx index 3099489752f0..f85e21fc77cb 100644 --- a/reportdesign/source/ui/report/dlgedclip.cxx +++ b/reportdesign/source/ui/report/dlgedclip.cxx @@ -37,13 +37,13 @@ OReportExchange::OReportExchange(const TSectionElements& _rCopyElements ) { } -sal_uInt32 OReportExchange::getDescriptorFormatId() +SotClipboardFormatId OReportExchange::getDescriptorFormatId() { - static sal_uInt32 s_nFormat = (sal_uInt32)-1; - if ((sal_uInt32)-1 == s_nFormat) + static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1); + if (static_cast<SotClipboardFormatId>(-1) == s_nFormat) { s_nFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"report.ReportObjectsTransfer\"")); - OSL_ENSURE((sal_uInt32)-1 != s_nFormat, "OReportExchange::getDescriptorFormatId: bad exchange id!"); + OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OReportExchange::getDescriptorFormatId: bad exchange id!"); } return s_nFormat; } @@ -55,7 +55,7 @@ void OReportExchange::AddSupportedFormats() bool OReportExchange::GetData( const datatransfer::DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ ) { - const sal_uInt32 nFormatId = SotExchange::GetFormat(_rFlavor); + const SotClipboardFormatId nFormatId = SotExchange::GetFormat(_rFlavor); return (nFormatId == getDescriptorFormatId()) && SetAny( uno::Any(m_aCopyElements), _rFlavor ); } @@ -66,7 +66,7 @@ bool OReportExchange::canExtract(const DataFlavorExVector& _rFlavor) OReportExchange::TSectionElements OReportExchange::extractCopies(const TransferableDataHelper& _rData) { - sal_Int32 nKnownFormatId = getDescriptorFormatId(); + SotClipboardFormatId nKnownFormatId = getDescriptorFormatId(); if ( _rData.HasFormat( nKnownFormatId ) ) { // extract the any from the transferable diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index 4beeb54a315f..54eabf36842a 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -58,7 +58,7 @@ public: virtual bool load( const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion) SAL_OVERRIDE; + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) SAL_OVERRIDE; /** * Ensure CVEs remain unbroken */ @@ -114,7 +114,7 @@ private: bool ScFiltersTest::load(const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion) + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) { ScDocShellRef xDocShRef = ScBootstrapFixture::load(rURL, rFilter, rUserData, OUString(), nFilterFlags, nClipboardID, nFilterVersion ); diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index c64cac111b9f..11a22a8397cd 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -533,7 +533,7 @@ OUString toString( ScDocShellRef ScBootstrapFixture::load( bool bReadWrite, const OUString& rURL, const OUString& rFilter, const OUString &rUserData, - const OUString& rTypeName, unsigned int nFilterFlags, unsigned int nClipboardID, + const OUString& rTypeName, unsigned int nFilterFlags, SotClipboardFormatId nClipboardID, sal_uIntPtr nFilterVersion, const OUString* pPassword ) { SfxFilter* pFilter = new SfxFilter( @@ -566,7 +566,7 @@ ScDocShellRef ScBootstrapFixture::load( bool bReadWrite, ScDocShellRef ScBootstrapFixture::load( const OUString& rURL, const OUString& rFilter, const OUString &rUserData, - const OUString& rTypeName, unsigned int nFilterFlags, unsigned int nClipboardID, + const OUString& rTypeName, unsigned int nFilterFlags, SotClipboardFormatId nClipboardID, sal_uIntPtr nFilterVersion, const OUString* pPassword ) { return load( false, rURL, rFilter, rUserData, rTypeName, nFilterFlags, nClipboardID, nFilterVersion, pPassword ); @@ -581,7 +581,9 @@ ScDocShellRef ScBootstrapFixture::loadDoc( createFileURL( rFileName, aFileExtension, aFileName ); OUString aFilterType(aFileFormats[nFormat].pTypeName, strlen(aFileFormats[nFormat].pTypeName), RTL_TEXTENCODING_UTF8); unsigned int nFormatType = aFileFormats[nFormat].nFormatType; - unsigned int nClipboardId = nFormatType ? SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS : 0; + SotClipboardFormatId nClipboardId = SotClipboardFormatId::NONE; + if (nFormatType) + nClipboardId = SotClipboardFormatId::STARCALC_8; return load(bReadWrite, aFileName, aFilterName, OUString(), aFilterType, nFormatType, nClipboardId, nFormatType); } @@ -619,9 +621,9 @@ ScDocShellRef ScBootstrapFixture::saveAndReload( utl::TempFile aTempFile; SfxMedium aStoreMedium( aTempFile.GetURL(), STREAM_STD_WRITE ); - sal_uInt32 nExportFormat = 0; + SotClipboardFormatId nExportFormat = SotClipboardFormatId::NONE; if (nFormatType == ODS_FORMAT_TYPE) - nExportFormat = SFX_FILTER_EXPORT | SFX_FILTER_USESOPTIONS; + nExportFormat = SotClipboardFormatId::STARCHART_8; SfxFilter* pExportFilter = new SfxFilter( rFilter, OUString(), nFormatType, nExportFormat, rTypeName, 0, OUString(), @@ -633,9 +635,9 @@ ScDocShellRef ScBootstrapFixture::saveAndReload( //std::cout << "File: " << aTempFile.GetURL() << std::endl; - sal_uInt32 nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; if (nFormatType == ODS_FORMAT_TYPE) - nFormat = SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS; + nFormat = SotClipboardFormatId::STARCALC_8; ScDocShellRef xDocSh = load(aTempFile.GetURL(), rFilter, rUserData, rTypeName, nFormatType, nFormat ); if(nFormatType == XLSX_FORMAT_TYPE) @@ -664,10 +666,10 @@ boost::shared_ptr<utl::TempFile> ScBootstrapFixture::exportTo( ScDocShell* pShel boost::shared_ptr<utl::TempFile> pTempFile(new utl::TempFile()); pTempFile->EnableKillingFile(); SfxMedium aStoreMedium( pTempFile->GetURL(), STREAM_STD_WRITE ); - sal_uInt32 nExportFormat = 0; + SotClipboardFormatId nExportFormat = SotClipboardFormatId::NONE; sal_Int32 nFormatType = aFileFormats[nFormat].nFormatType; if (nFormatType == ODS_FORMAT_TYPE) - nExportFormat = SFX_FILTER_EXPORT | SFX_FILTER_USESOPTIONS; + nExportFormat = SotClipboardFormatId::STARCHART_8; SfxFilter* pExportFilter = new SfxFilter( aFilterName, OUString(), nFormatType, nExportFormat, aFilterType, 0, OUString(), diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx index 8fbc156c8097..20ab92c9f797 100644 --- a/sc/qa/unit/helper/qahelper.hxx +++ b/sc/qa/unit/helper/qahelper.hxx @@ -225,12 +225,12 @@ protected: ScDocShellRef load( bool bReadWrite, const OUString& rURL, const OUString& rFilter, const OUString &rUserData, - const OUString& rTypeName, unsigned int nFilterFlags, unsigned int nClipboardID, + const OUString& rTypeName, unsigned int nFilterFlags, SotClipboardFormatId nClipboardID, sal_uIntPtr nFilterVersion = SOFFICE_FILEFORMAT_CURRENT, const OUString* pPassword = NULL ); ScDocShellRef load( const OUString& rURL, const OUString& rFilter, const OUString &rUserData, - const OUString& rTypeName, unsigned int nFilterFlags, unsigned int nClipboardID, + const OUString& rTypeName, unsigned int nFilterFlags, SotClipboardFormatId nClipboardID, sal_uIntPtr nFilterVersion = SOFFICE_FILEFORMAT_CURRENT, const OUString* pPassword = NULL ); ScDocShellRef loadDoc(const OUString& rFileName, sal_Int32 nFormat, bool bReadWrite = false ); diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx index 5c72a3dcdb92..44bb074c4954 100644 --- a/sc/qa/unit/opencl-test.cxx +++ b/sc/qa/unit/opencl-test.cxx @@ -65,7 +65,7 @@ public: virtual bool load( const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion) SAL_OVERRIDE; + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) SAL_OVERRIDE; void testSharedFormulaXLS(); #if 0 void testSharedFormulaXLSGroundWater(); @@ -557,7 +557,7 @@ bool ScOpenCLTest::initTestEnv(const OUString& fileName, sal_Int32 nFormat, bool ScOpenCLTest::load(const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion) + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) { ScDocShellRef xDocShRef = ScBootstrapFixture::load(rURL, rFilter, rUserData, OUString(), nFilterFlags, nClipboardID, nFilterVersion ); diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 4a1b599f71ad..0084145438ae 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -224,9 +224,9 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt utl::TempFile aTempFile; aTempFile.EnableKillingFile(); SfxMedium aStoreMedium( aTempFile.GetURL(), STREAM_STD_WRITE ); - sal_uInt32 nExportFormat = 0; + SotClipboardFormatId nExportFormat = SotClipboardFormatId::NONE; if (nFormatType == ODS_FORMAT_TYPE) - nExportFormat = SFX_FILTER_EXPORT | SFX_FILTER_USESOPTIONS; + nExportFormat = SotClipboardFormatId::STARCHART_8; SfxFilter* pExportFilter = new SfxFilter( rFilter, OUString(), nFormatType, nExportFormat, rTypeName, 0, OUString(), @@ -247,9 +247,9 @@ ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt //std::cout << "File: " << aTempFile.GetURL() << std::endl; - sal_uInt32 nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; if (nFormatType == ODS_FORMAT_TYPE) - nFormat = SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS; + nFormat = SotClipboardFormatId::STARCALC_8; OUString aPass("test"); return load(aTempFile.GetURL(), rFilter, rUserData, rTypeName, nFormatType, nFormat, SOFFICE_FILEFORMAT_CURRENT, &aPass); diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 7de72c1bb296..01dae642939f 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -84,7 +84,7 @@ public: virtual bool load( const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion) SAL_OVERRIDE; + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) SAL_OVERRIDE; virtual void setUp() SAL_OVERRIDE; virtual void tearDown() SAL_OVERRIDE; @@ -287,7 +287,7 @@ private: bool ScFiltersTest::load(const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion) + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) { ScDocShellRef xDocShRef = ScBootstrapFixture::load( rURL, rFilter, rUserData, OUString(), nFilterFlags, nClipboardID, nFilterVersion); @@ -1389,7 +1389,7 @@ void ScFiltersTest::testBrokenQuotesCSV() std::cout << getFileFormats()[CSV].pName << " Test" << std::endl; unsigned int nFormatType = getFileFormats()[CSV].nFormatType; - unsigned int nClipboardId = nFormatType ? SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS : 0; + SotClipboardFormatId nClipboardId = nFormatType ? SotClipboardFormatId::STARCALC_8 : SotClipboardFormatId::NONE; ScDocShellRef xDocSh = ScBootstrapFixture::load(aFileName, aFilterName, OUString(), aFilterType, nFormatType, nClipboardId, SOFFICE_FILEFORMAT_CURRENT); @@ -1416,7 +1416,7 @@ void ScFiltersTest::testCellValueXLSX() std::cout << getFileFormats()[XLSX].pName << " Test" << std::endl; unsigned int nFormatType = getFileFormats()[XLSX].nFormatType; - unsigned int nClipboardId = nFormatType ? SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS : 0; + SotClipboardFormatId nClipboardId = nFormatType ? SotClipboardFormatId::STARCALC_8 : SotClipboardFormatId::NONE; ScDocShellRef xDocSh = ScBootstrapFixture::load( aFileName, aFilterName, OUString(), aFilterType, nFormatType, nClipboardId, SOFFICE_FILEFORMAT_CURRENT); @@ -1471,7 +1471,7 @@ void ScFiltersTest::testPassword_Impl(const OUString& aFileNameBase) createFileURL(aFileNameBase, aFileExtension, aFileName); OUString aFilterType(getFileFormats()[0].pTypeName, strlen(getFileFormats()[0].pTypeName), RTL_TEXTENCODING_UTF8); - sal_uInt32 nFormat = SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS; + SotClipboardFormatId nFormat = SotClipboardFormatId::STARCALC_8; SfxFilter* aFilter = new SfxFilter( aFilterName, OUString(), getFileFormats()[0].nFormatType, nFormat, aFilterType, 0, OUString(), diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 2f11f48ef24f..195be8f09c09 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -5894,7 +5894,7 @@ void Test::testImportStream() ScImportExport aObj(m_pDoc, ScAddress(0,0,0)); aObj.SetImportBroadcast(true); aObj.SetExtOptions(aOpt); - aObj.ImportString("1,2,3", FORMAT_STRING); + aObj.ImportString("1,2,3", SotClipboardFormatId::STRING); CPPUNIT_ASSERT_EQUAL(1.0, m_pDoc->GetValue(ScAddress(0,0,0))); CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(1,0,0))); diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index 24bc847591f4..5a0a3f36503b 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -42,7 +42,7 @@ bool ScDdeLink::bIsInUpdate = false; ScDdeLink::ScDdeLink( ScDocument* pD, const OUString& rA, const OUString& rT, const OUString& rI, sal_uInt8 nM ) : - ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ALWAYS,FORMAT_STRING), + ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ALWAYS,SotClipboardFormatId::STRING), pDoc( pD ), aAppl( rA ), aTopic( rT ), @@ -61,7 +61,7 @@ ScDdeLink::~ScDdeLink() } ScDdeLink::ScDdeLink( ScDocument* pD, const ScDdeLink& rOther ) : - ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ALWAYS,FORMAT_STRING), + ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ALWAYS,SotClipboardFormatId::STRING), pDoc ( pD ), aAppl ( rOther.aAppl ), aTopic ( rOther.aTopic ), @@ -75,7 +75,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, const ScDdeLink& rOther ) : } ScDdeLink::ScDdeLink( ScDocument* pD, SvStream& rStream, ScMultipleReadHeader& rHdr ) : - ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ALWAYS,FORMAT_STRING), + ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ALWAYS,SotClipboardFormatId::STRING), pDoc( pD ), bNeedUpdate( false ), pResult( NULL ) @@ -125,7 +125,7 @@ sfx2::SvBaseLink::UpdateResult ScDdeLink::DataChanged( const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ) { // wir koennen nur Strings... - if ( FORMAT_STRING != SotExchange::GetFormatIdFromMimeType( rMimeType )) + if ( SotClipboardFormatId::STRING != SotExchange::GetFormatIdFromMimeType( rMimeType )) return SUCCESS; OUString aLinkStr; diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx index 88d1d6e07e44..831e0cf33c97 100644 --- a/sc/source/filter/excel/excel.cxx +++ b/sc/source/filter/excel/excel.cxx @@ -186,7 +186,7 @@ static FltError lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument, eRet = SCWARN_EXPORT_MAXROW; SvGlobalName aGlobName( 0x00020810, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ); - sal_uInt32 nClip = SotExchange::RegisterFormatName( aClipName ); + SotClipboardFormatId nClip = SotExchange::RegisterFormatName( aClipName ); xRootStrg->SetClass( aGlobName, nClip, aClassName ); xStrgStrm->Commit(); diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index 745e23863025..0910bd124ba6 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -73,9 +73,9 @@ using namespace com::sun::star; -#define SCDRAWTRANS_TYPE_EMBOBJ 1 -#define SCDRAWTRANS_TYPE_DRAWMODEL 2 -#define SCDRAWTRANS_TYPE_DOCUMENT 3 +#define SCDRAWTRANS_TYPE_EMBOBJ SotClipboardFormatId::STRING +#define SCDRAWTRANS_TYPE_DRAWMODEL SotClipboardFormatId::BITMAP +#define SCDRAWTRANS_TYPE_DOCUMENT SotClipboardFormatId::GDIMETAFILE ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContainerShell, const TransferableObjectDescriptor& rDesc ) : @@ -288,38 +288,38 @@ void ScDrawTransferObj::AddSupportedFormats() { if ( bGrIsBit ) // single bitmap graphic { - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_SVXB ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); - AddFormat( SOT_FORMAT_GDIMETAFILE ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::SVXB ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); } else if ( bGraphic ) // other graphic { // #i25616# - AddFormat( SOT_FORMATSTR_ID_DRAWING ); + AddFormat( SotClipboardFormatId::DRAWING ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_SVXB ); - AddFormat( SOT_FORMAT_GDIMETAFILE ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::SVXB ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); } else if ( pBookmark ) // url button { -// AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_SOLK ); - AddFormat( SOT_FORMAT_STRING ); - AddFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ); - AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ); - AddFormat( SOT_FORMATSTR_ID_DRAWING ); +// AddFormat( SotClipboardFormatId::EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::SOLK ); + AddFormat( SotClipboardFormatId::STRING ); + AddFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ); + AddFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ); + AddFormat( SotClipboardFormatId::DRAWING ); } else if ( bOleObj ) // single OLE object { - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( SOT_FORMAT_GDIMETAFILE ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); CreateOLEData(); @@ -337,29 +337,29 @@ void ScDrawTransferObj::AddSupportedFormats() } else // any drawing objects { - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_DRAWING ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::DRAWING ); // leave out bitmap and metafile if there are only controls if ( !lcl_HasOnlyControls( pModel ) ) { - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); - AddFormat( SOT_FORMAT_GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); } } // if( pImageMap ) -// AddFormat( SOT_FORMATSTR_ID_SVIM ); +// AddFormat( SotClipboardFormatId::SVIM ); } bool ScDrawTransferObj::GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) { bool bOK = false; - sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor ); + SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor ); - if ( bOleObj && nFormat != SOT_FORMAT_GDIMETAFILE ) + if ( bOleObj && nFormat != SotClipboardFormatId::GDIMETAFILE ) { CreateOLEData(); @@ -384,17 +384,17 @@ bool ScDrawTransferObj::GetData( const css::datatransfer::DataFlavor& rFlavor, c if( HasFormat( nFormat ) ) { - if ( nFormat == SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR || nFormat == SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) + if ( nFormat == SotClipboardFormatId::LINKSRCDESCRIPTOR || nFormat == SotClipboardFormatId::OBJECTDESCRIPTOR ) { bOK = SetTransferableObjectDescriptor( aObjDesc, rFlavor ); } - else if ( nFormat == SOT_FORMATSTR_ID_DRAWING ) + else if ( nFormat == SotClipboardFormatId::DRAWING ) { bOK = SetObject( pModel, SCDRAWTRANS_TYPE_DRAWMODEL, rFlavor ); } - else if ( nFormat == SOT_FORMAT_BITMAP - || nFormat == SOT_FORMATSTR_ID_PNG - || nFormat == SOT_FORMAT_GDIMETAFILE ) + else if ( nFormat == SotClipboardFormatId::BITMAP + || nFormat == SotClipboardFormatId::PNG + || nFormat == SotClipboardFormatId::GDIMETAFILE ) { // #i71538# use complete SdrViews // SdrExchangeView aView( pModel ); @@ -402,12 +402,12 @@ bool ScDrawTransferObj::GetData( const css::datatransfer::DataFlavor& rFlavor, c SdrPageView* pPv = aView.ShowSdrPage(aView.GetModel()->GetPage(0)); OSL_ENSURE( pPv, "pPv not there..." ); aView.MarkAllObj( pPv ); - if ( nFormat == SOT_FORMAT_GDIMETAFILE ) + if ( nFormat == SotClipboardFormatId::GDIMETAFILE ) bOK = SetGDIMetaFile( aView.GetMarkedObjMetaFile(true), rFlavor ); else bOK = SetBitmapEx( aView.GetMarkedObjBitmapEx(true), rFlavor ); } - else if ( nFormat == SOT_FORMATSTR_ID_SVXB ) + else if ( nFormat == SotClipboardFormatId::SVXB ) { // only enabled for single graphics object @@ -423,7 +423,7 @@ bool ScDrawTransferObj::GetData( const css::datatransfer::DataFlavor& rFlavor, c } } } - else if ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ) + else if ( nFormat == SotClipboardFormatId::EMBED_SOURCE ) { if ( bOleObj ) // single OLE object { @@ -450,7 +450,7 @@ bool ScDrawTransferObj::GetData( const css::datatransfer::DataFlavor& rFlavor, c return bOK; } -bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, +bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /* rFlavor */ ) { // called from SetObject, put data into stream @@ -741,7 +741,7 @@ void ScDrawTransferObj::InitDocShell() Point(aSrcSize.Width()/2, aSrcSize.Height()/2), NULL, 0, OUString(), OUString()); - // put objects to right layer (see ScViewFunc::PasteDataFormat for SOT_FORMATSTR_ID_DRAWING) + // put objects to right layer (see ScViewFunc::PasteDataFormat for SotClipboardFormatId::DRAWING) SdrPage* pPage = pDestModel->GetPage(0); if (pPage) diff --git a/sc/source/ui/app/lnktrans.cxx b/sc/source/ui/app/lnktrans.cxx index a386cd0bd886..213ec96db35d 100644 --- a/sc/source/ui/app/lnktrans.cxx +++ b/sc/source/ui/app/lnktrans.cxx @@ -44,12 +44,12 @@ void ScLinkTransferObj::AddSupportedFormats() { // TransferableHelper::SetINetBookmark formats - AddFormat( SOT_FORMATSTR_ID_SOLK ); - AddFormat( SOT_FORMAT_STRING ); - AddFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ); - AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ); - AddFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_FILECONTENT ); + AddFormat( SotClipboardFormatId::SOLK ); + AddFormat( SotClipboardFormatId::STRING ); + AddFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ); + AddFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ); + AddFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ); + AddFormat( SotClipboardFormatId::FILECONTENT ); } } diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index c965c1d26b2b..6acc11e70234 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -197,62 +197,62 @@ void ScSelectionTransferObj::AddSupportedFormats() case SC_SELTRANS_CELL: case SC_SELTRANS_CELLS: // same formats as in ScTransferObj::AddSupportedFormats - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( SOT_FORMAT_GDIMETAFILE ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); - AddFormat( SOT_FORMATSTR_ID_HTML ); - AddFormat( SOT_FORMATSTR_ID_SYLK ); - AddFormat( SOT_FORMATSTR_ID_LINK ); - AddFormat( SOT_FORMATSTR_ID_DIF ); - AddFormat( SOT_FORMAT_STRING ); - AddFormat( SOT_FORMAT_RTF ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); + AddFormat( SotClipboardFormatId::HTML ); + AddFormat( SotClipboardFormatId::SYLK ); + AddFormat( SotClipboardFormatId::LINK ); + AddFormat( SotClipboardFormatId::DIF ); + AddFormat( SotClipboardFormatId::STRING ); + AddFormat( SotClipboardFormatId::RTF ); if ( eMode == SC_SELTRANS_CELL ) - AddFormat( SOT_FORMATSTR_ID_EDITENGINE ); + AddFormat( SotClipboardFormatId::EDITENGINE ); break; // different graphic formats as in ScDrawTransferObj::AddSupportedFormats: case SC_SELTRANS_DRAW_BITMAP: - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_SVXB ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); - AddFormat( SOT_FORMAT_GDIMETAFILE ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::SVXB ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); break; case SC_SELTRANS_DRAW_GRAPHIC: - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_SVXB ); - AddFormat( SOT_FORMAT_GDIMETAFILE ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::SVXB ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); break; case SC_SELTRANS_DRAW_BOOKMARK: - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_SOLK ); - AddFormat( SOT_FORMAT_STRING ); - AddFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ); - AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ); - AddFormat( SOT_FORMATSTR_ID_DRAWING ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::SOLK ); + AddFormat( SotClipboardFormatId::STRING ); + AddFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ); + AddFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ); + AddFormat( SotClipboardFormatId::DRAWING ); break; case SC_SELTRANS_DRAW_OLE: - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( SOT_FORMAT_GDIMETAFILE ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); break; case SC_SELTRANS_DRAW_OTHER: // other drawing objects - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_DRAWING ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); - AddFormat( SOT_FORMAT_GDIMETAFILE ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::DRAWING ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); break; default: diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index f76f3b9bf0d1..4b452c8ff89f 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -65,10 +65,10 @@ using namespace com::sun::star; -#define SCTRANS_TYPE_IMPEX 1 -#define SCTRANS_TYPE_EDIT_RTF 2 -#define SCTRANS_TYPE_EDIT_BIN 3 -#define SCTRANS_TYPE_EMBOBJ 4 +#define SCTRANS_TYPE_IMPEX SotClipboardFormatId::STRING +#define SCTRANS_TYPE_EDIT_RTF SotClipboardFormatId::BITMAP +#define SCTRANS_TYPE_EDIT_BIN SotClipboardFormatId::GDIMETAFILE +#define SCTRANS_TYPE_EMBOBJ SotClipboardFormatId::PRIVATE void ScTransferObj::GetAreaSize( ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCROW& nRow, SCCOL& nCol ) { @@ -209,7 +209,7 @@ ScTransferObj* ScTransferObj::GetOwnClipboard( vcl::Window* pUIWin ) // may be from other clipboard operations (like flushing, #86059#) TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pUIWin ) ); - if ( !aDataHelper.HasFormat( SOT_FORMATSTR_ID_DIF ) ) + if ( !aDataHelper.HasFormat( SotClipboardFormatId::DIF ) ) { // OSL_FAIL("ScTransferObj wasn't released"); pObj = NULL; @@ -220,36 +220,36 @@ ScTransferObj* ScTransferObj::GetOwnClipboard( vcl::Window* pUIWin ) void ScTransferObj::AddSupportedFormats() { - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( SOT_FORMAT_GDIMETAFILE ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); // ScImportExport formats - AddFormat( SOT_FORMATSTR_ID_HTML ); - AddFormat( SOT_FORMATSTR_ID_SYLK ); - AddFormat( SOT_FORMATSTR_ID_LINK ); - AddFormat( SOT_FORMATSTR_ID_DIF ); - AddFormat( SOT_FORMAT_STRING ); + AddFormat( SotClipboardFormatId::HTML ); + AddFormat( SotClipboardFormatId::SYLK ); + AddFormat( SotClipboardFormatId::LINK ); + AddFormat( SotClipboardFormatId::DIF ); + AddFormat( SotClipboardFormatId::STRING ); - AddFormat( SOT_FORMAT_RTF ); + AddFormat( SotClipboardFormatId::RTF ); if ( aBlock.aStart == aBlock.aEnd ) - AddFormat( SOT_FORMATSTR_ID_EDITENGINE ); + AddFormat( SotClipboardFormatId::EDITENGINE ); } bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUString& /*rDestDoc*/ ) { - sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor ); + SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor ); bool bOK = false; if( HasFormat( nFormat ) ) { - if ( nFormat == SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR || nFormat == SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) + if ( nFormat == SotClipboardFormatId::LINKSRCDESCRIPTOR || nFormat == SotClipboardFormatId::OBJECTDESCRIPTOR ) { bOK = SetTransferableObjectDescriptor( aObjDesc, rFlavor ); } - else if ( ( nFormat == SOT_FORMAT_RTF || nFormat == SOT_FORMATSTR_ID_EDITENGINE ) && + else if ( ( nFormat == SotClipboardFormatId::RTF || nFormat == SotClipboardFormatId::EDITENGINE ) && aBlock.aStart == aBlock.aEnd ) { // RTF from a single cell is handled by EditEngine @@ -275,19 +275,19 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt } bOK = SetObject( &aEngine, - (nFormat == FORMAT_RTF) ? SCTRANS_TYPE_EDIT_RTF : SCTRANS_TYPE_EDIT_BIN, + (nFormat == SotClipboardFormatId::RTF) ? SCTRANS_TYPE_EDIT_RTF : SCTRANS_TYPE_EDIT_BIN, rFlavor ); } - else if ( ScImportExport::IsFormatSupported( nFormat ) || nFormat == SOT_FORMAT_RTF ) + else if ( ScImportExport::IsFormatSupported( nFormat ) || nFormat == SotClipboardFormatId::RTF ) { // if this transfer object was used to create a DDE link, filtered rows // have to be included for subsequent calls (to be consistent with link data) - if ( nFormat == SOT_FORMATSTR_ID_LINK ) + if ( nFormat == SotClipboardFormatId::LINK ) bUsedForLink = true; bool bIncludeFiltered = pDoc->IsCutMode() || bUsedForLink; - bool bReduceBlockFormat = nFormat == SOT_FORMATSTR_ID_HTML || nFormat == SOT_FORMAT_RTF; + bool bReduceBlockFormat = nFormat == SotClipboardFormatId::HTML || nFormat == SotClipboardFormatId::RTF; ScRange aReducedBlock = aBlock; if (bReduceBlockFormat && (aBlock.aEnd.Col() == MAXCOL || aBlock.aEnd.Row() == MAXROW) && aBlock.aStart.Tab() == aBlock.aEnd.Tab()) { @@ -332,7 +332,7 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt OSL_FAIL("unknown DataType"); } } - else if ( nFormat == SOT_FORMAT_BITMAP || nFormat == SOT_FORMATSTR_ID_PNG ) + else if ( nFormat == SotClipboardFormatId::BITMAP || nFormat == SotClipboardFormatId::PNG ) { Rectangle aMMRect = pDoc->GetMMRect( aBlock.aStart.Col(), aBlock.aStart.Row(), aBlock.aEnd.Col(), aBlock.aEnd.Row(), @@ -346,7 +346,7 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt Bitmap aBmp = aVirtDev.GetBitmap( Point(), aVirtDev.GetOutputSize() ); bOK = SetBitmapEx( aBmp, rFlavor ); } - else if ( nFormat == SOT_FORMAT_GDIMETAFILE ) + else if ( nFormat == SotClipboardFormatId::GDIMETAFILE ) { // #i123405# Do not limit visual size calculation for metafile creation. // It seems unlikely that removing the limitation causes problems since @@ -375,7 +375,7 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt bOK = SetGDIMetaFile( aMtf, rFlavor ); } - else if ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ) + else if ( nFormat == SotClipboardFormatId::EMBED_SOURCE ) { //TODO/LATER: differentiate between formats?! // #i123405# Do limit visual size calculation to PageSize @@ -388,7 +388,7 @@ bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor, const OUSt return bOK; } -bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, +bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const datatransfer::DataFlavor& rFlavor ) { // called from SetObject, put data into stream @@ -400,7 +400,7 @@ bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, { ScImportExport* pImpEx = (ScImportExport*)pUserObject; - sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor ); + SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor ); // mba: no BaseURL for data exchange if ( pImpEx->ExportStream( *rxOStm, OUString(), nFormat ) ) bRet = ( rxOStm->GetError() == ERRCODE_NONE ); diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index 134ebb040359..cf79f30ca94d 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -60,7 +60,7 @@ ScAreaLink::ScAreaLink( SfxObjectShell* pShell, const OUString& rFile, const OUString& rFilter, const OUString& rOpt, const OUString& rArea, const ScRange& rDest, sal_uLong nRefresh ) : - ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE), + ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,SotClipboardFormatId::FILE), ScRefreshTimer ( nRefresh ), pImpl ( new AreaLink_Impl() ), aFileName (rFile), diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index e7cb71a76164..536c8c5b6369 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -178,7 +178,7 @@ SFX_IMPL_OBJECTFACTORY( ScDocShell, SvGlobalName(SO3_SC_CLASSID), SFXOBJECTSHELL TYPEINIT1( ScDocShell, SfxObjectShell ); // SfxInPlaceObject: No TypeInfo? void ScDocShell::FillClass( SvGlobalName* pClassName, - sal_uInt32* pFormat, + SotClipboardFormatId* pFormat, OUString* /* pAppName */, OUString* pFullTypeName, OUString* pShortTypeName, @@ -188,14 +188,14 @@ void ScDocShell::FillClass( SvGlobalName* pClassName, if ( nFileFormat == SOFFICE_FILEFORMAT_60 ) { *pClassName = SvGlobalName( SO3_SC_CLASSID_60 ); - *pFormat = SOT_FORMATSTR_ID_STARCALC_60; + *pFormat = SotClipboardFormatId::STARCALC_60; *pFullTypeName = OUString( ScResId( SCSTR_LONG_SCDOC_NAME ) ); *pShortTypeName = OUString( ScResId( SCSTR_SHORT_SCDOC_NAME ) ); } else if ( nFileFormat == SOFFICE_FILEFORMAT_8 ) { *pClassName = SvGlobalName( SO3_SC_CLASSID_60 ); - *pFormat = bTemplate ? SOT_FORMATSTR_ID_STARCALC_8_TEMPLATE : SOT_FORMATSTR_ID_STARCALC_8; + *pFormat = bTemplate ? SotClipboardFormatId::STARCALC_8_TEMPLATE : SotClipboardFormatId::STARCALC_8; *pFullTypeName = "calc8"; *pShortTypeName = ScResId(SCSTR_SHORT_SCDOC_NAME).toString(); } @@ -1313,7 +1313,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium ) if (pInStream) { pInStream->Seek( 0 ); - bRet = aImpEx.ImportStream( *pInStream, rMedium.GetBaseURL(), SOT_FORMATSTR_ID_SYLK ); + bRet = aImpEx.ImportStream( *pInStream, rMedium.GetBaseURL(), SotClipboardFormatId::SYLK ); eError = bRet ? eERR_OK : SCERR_IMPORT_UNKNOWN; aDocument.StartAllListeners(); sc::SetFormulaDirtyContext aCxt; @@ -2405,7 +2405,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) ScImportExport aImExport( &aDocument, aRange ); aImExport.SetFormulas( true ); - bRet = aImExport.ExportStream( *pStream, rMed.GetBaseURL( true ), SOT_FORMATSTR_ID_SYLK ); + bRet = aImExport.ExportStream( *pStream, rMed.GetBaseURL( true ), SotClipboardFormatId::SYLK ); } } else if (aFltName == pFilterHtml) @@ -2424,7 +2424,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) ScImportExport aImExport(&aDocument); aImExport.SetStreamPath(rMed.GetName()); aImExport.SetFilterOptions(sFilterOptions); - bRet = aImExport.ExportStream(*pStream, rMed.GetBaseURL(true), SOT_FORMATSTR_ID_HTML); + bRet = aImExport.ExportStream(*pStream, rMed.GetBaseURL(true), SotClipboardFormatId::HTML); if (bRet && !aImExport.GetNonConvertibleChars().isEmpty()) { SetError(*new StringErrorInfo( diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 9d9ef86e9980..4f9f8f109032 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2059,7 +2059,7 @@ bool ScDocShell::DdeGetData( const OUString& rItem, const OUString& rMimeType, ::com::sun::star::uno::Any & rValue ) { - if( FORMAT_STRING == SotExchange::GetFormatIdFromMimeType( rMimeType ) ) + if( SotClipboardFormatId::STRING == SotExchange::GetFormatIdFromMimeType( rMimeType ) ) { if( rItem.equalsIgnoreAsciiCase( "Format" ) ) { @@ -2081,7 +2081,7 @@ bool ScDocShell::DdeGetData( const OUString& rItem, { OString aData; if( aObj.ExportByteString( aData, osl_getThreadTextEncoding(), - SOT_FORMATSTR_ID_SYLK ) ) + SotClipboardFormatId::SYLK ) ) { rValue <<= ::com::sun::star::uno::Sequence< sal_Int8 >( reinterpret_cast<const sal_Int8*>(aData.getStr()), @@ -2107,7 +2107,7 @@ bool ScDocShell::DdeSetData( const OUString& rItem, const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ) { - if( FORMAT_STRING == SotExchange::GetFormatIdFromMimeType( rMimeType )) + if( SotClipboardFormatId::STRING == SotExchange::GetFormatIdFromMimeType( rMimeType )) { if( rItem.equalsIgnoreAsciiCase( "Format" ) ) { @@ -2127,7 +2127,7 @@ bool ScDocShell::DdeSetData( const OUString& rItem, OUString aData; if ( ScByteSequenceToString::GetString( aData, rValue, osl_getThreadTextEncoding() ) ) { - return aObj.ImportString( aData, SOT_FORMATSTR_ID_SYLK ); + return aObj.ImportString( aData, SotClipboardFormatId::SYLK ); } return false; } diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 3ab529a85051..5bde93bc1945 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1274,7 +1274,7 @@ ScExternalRefCache::DocItem* ScExternalRefCache::getDocItem(sal_uInt16 nFileId) } ScExternalRefLink::ScExternalRefLink(ScDocument* pDoc, sal_uInt16 nFileId, const OUString& rFilter) : - ::sfx2::SvBaseLink(::sfx2::LINKUPDATE_ONCALL, FORMAT_FILE), + ::sfx2::SvBaseLink(::sfx2::LINKUPDATE_ONCALL, SotClipboardFormatId::FILE), mnFileId(nFileId), maFilterName(rFilter), mpDoc(pDoc), diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index ec70334d183a..b64ee4c52b7e 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -192,14 +192,14 @@ void ScImportExport::SetFilterOptions(const OUString& rFilterOptions) maFilterOptions = rFilterOptions; } -bool ScImportExport::IsFormatSupported( sal_uLong nFormat ) +bool ScImportExport::IsFormatSupported( SotClipboardFormatId nFormat ) { - return nFormat == FORMAT_STRING - || nFormat == SOT_FORMATSTR_ID_SYLK - || nFormat == SOT_FORMATSTR_ID_LINK - || nFormat == SOT_FORMATSTR_ID_HTML - || nFormat == SOT_FORMATSTR_ID_HTML_SIMPLE - || nFormat == SOT_FORMATSTR_ID_DIF; + return nFormat == SotClipboardFormatId::STRING + || nFormat == SotClipboardFormatId::SYLK + || nFormat == SotClipboardFormatId::LINK + || nFormat == SotClipboardFormatId::HTML + || nFormat == SotClipboardFormatId::HTML_SIMPLE + || nFormat == SotClipboardFormatId::DIF; } // Prepare for Undo @@ -278,12 +278,12 @@ bool ScImportExport::ExportData( const OUString& rMimeType, return false; } -bool ScImportExport::ImportString( const OUString& rText, sal_uLong nFmt ) +bool ScImportExport::ImportString( const OUString& rText, SotClipboardFormatId nFmt ) { switch ( nFmt ) { // formats supporting unicode - case FORMAT_STRING : + case SotClipboardFormatId::STRING : { ScImportStringStream aStrm( rText); return ImportStream( aStrm, OUString(), nFmt ); @@ -301,10 +301,10 @@ bool ScImportExport::ImportString( const OUString& rText, sal_uLong nFmt ) } } -bool ScImportExport::ExportString( OUString& rText, sal_uLong nFmt ) +bool ScImportExport::ExportString( OUString& rText, SotClipboardFormatId nFmt ) { - OSL_ENSURE( nFmt == FORMAT_STRING, "ScImportExport::ExportString: Unicode not supported for other formats than FORMAT_STRING" ); - if ( nFmt != FORMAT_STRING ) + OSL_ENSURE( nFmt == SotClipboardFormatId::STRING, "ScImportExport::ExportString: Unicode not supported for other formats than SotClipboardFormatId::STRING" ); + if ( nFmt != SotClipboardFormatId::STRING ) { rtl_TextEncoding eEnc = osl_getThreadTextEncoding(); OString aTmp; @@ -332,7 +332,7 @@ bool ScImportExport::ExportString( OUString& rText, sal_uLong nFmt ) // ExportStream must handle RTL_TEXTENCODING_UNICODE } -bool ScImportExport::ExportByteString( OString& rText, rtl_TextEncoding eEnc, sal_uLong nFmt ) +bool ScImportExport::ExportByteString( OString& rText, rtl_TextEncoding eEnc, SotClipboardFormatId nFmt ) { OSL_ENSURE( eEnc != RTL_TEXTENCODING_UNICODE, "ScImportExport::ExportByteString: Unicode not supported" ); if ( eEnc == RTL_TEXTENCODING_UNICODE ) @@ -359,36 +359,36 @@ bool ScImportExport::ExportByteString( OString& rText, rtl_TextEncoding eEnc, sa return false; } -bool ScImportExport::ImportStream( SvStream& rStrm, const OUString& rBaseURL, sal_uLong nFmt ) +bool ScImportExport::ImportStream( SvStream& rStrm, const OUString& rBaseURL, SotClipboardFormatId nFmt ) { - if( nFmt == FORMAT_STRING ) + if( nFmt == SotClipboardFormatId::STRING ) { if( ExtText2Doc( rStrm ) ) // evaluate pExtOptions return true; } - if( nFmt == SOT_FORMATSTR_ID_SYLK ) + if( nFmt == SotClipboardFormatId::SYLK ) { if( Sylk2Doc( rStrm ) ) return true; } - if( nFmt == SOT_FORMATSTR_ID_DIF ) + if( nFmt == SotClipboardFormatId::DIF ) { if( Dif2Doc( rStrm ) ) return true; } - if( nFmt == FORMAT_RTF ) + if( nFmt == SotClipboardFormatId::RTF ) { if( RTF2Doc( rStrm, rBaseURL ) ) return true; } - if( nFmt == SOT_FORMATSTR_ID_LINK ) + if( nFmt == SotClipboardFormatId::LINK ) return true; // Link-Import? - if ( nFmt == SOT_FORMATSTR_ID_HTML ) + if ( nFmt == SotClipboardFormatId::HTML ) { if( HTML2Doc( rStrm, rBaseURL ) ) return true; } - if ( nFmt == SOT_FORMATSTR_ID_HTML_SIMPLE ) + if ( nFmt == SotClipboardFormatId::HTML_SIMPLE ) { MSE40HTMLClipFormatObj aMSE40ClpObj; // needed to skip the header data SvStream* pHTML = aMSE40ClpObj.IsValid( rStrm ); @@ -399,24 +399,24 @@ bool ScImportExport::ImportStream( SvStream& rStrm, const OUString& rBaseURL, sa return false; } -bool ScImportExport::ExportStream( SvStream& rStrm, const OUString& rBaseURL, sal_uLong nFmt ) +bool ScImportExport::ExportStream( SvStream& rStrm, const OUString& rBaseURL, SotClipboardFormatId nFmt ) { - if( nFmt == FORMAT_STRING ) + if( nFmt == SotClipboardFormatId::STRING ) { if( Doc2Text( rStrm ) ) return true; } - if( nFmt == SOT_FORMATSTR_ID_SYLK ) + if( nFmt == SotClipboardFormatId::SYLK ) { if( Doc2Sylk( rStrm ) ) return true; } - if( nFmt == SOT_FORMATSTR_ID_DIF ) + if( nFmt == SotClipboardFormatId::DIF ) { if( Doc2Dif( rStrm ) ) return true; } - if( nFmt == SOT_FORMATSTR_ID_LINK && !bAll ) + if( nFmt == SotClipboardFormatId::LINK && !bAll ) { OUString aDocName; if ( pDoc->IsClipboard() ) @@ -459,12 +459,12 @@ bool ScImportExport::ExportStream( SvStream& rStrm, const OUString& rBaseURL, sa return rStrm.GetError() == SVSTREAM_OK; } } - if( nFmt == SOT_FORMATSTR_ID_HTML ) + if( nFmt == SotClipboardFormatId::HTML ) { if( Doc2HTML( rStrm, rBaseURL ) ) return true; } - if( nFmt == FORMAT_RTF ) + if( nFmt == SotClipboardFormatId::RTF ) { if( Doc2RTF( rStrm ) ) return true; diff --git a/sc/source/ui/docshell/servobj.cxx b/sc/source/ui/docshell/servobj.cxx index 58f0cac8faf5..8fddc9b74427 100644 --- a/sc/source/ui/docshell/servobj.cxx +++ b/sc/source/ui/docshell/servobj.cxx @@ -163,7 +163,7 @@ bool ScServerObject::GetData( OUString aDdeTextFmt = pDocSh->GetDdeTextFmt(); ScDocument& rDoc = pDocSh->GetDocument(); - if( FORMAT_STRING == SotExchange::GetFormatIdFromMimeType( rMimeType )) + if( SotClipboardFormatId::STRING == SotExchange::GetFormatIdFromMimeType( rMimeType )) { ScImportExport aObj( &rDoc, aRange ); if( aDdeTextFmt[0] == 'F' ) @@ -171,7 +171,7 @@ bool ScServerObject::GetData( if( aDdeTextFmt == "SYLK" || aDdeTextFmt == "FSYLK" ) { OString aByteData; - if( aObj.ExportByteString( aByteData, osl_getThreadTextEncoding(), SOT_FORMATSTR_ID_SYLK ) ) + if( aObj.ExportByteString( aByteData, osl_getThreadTextEncoding(), SotClipboardFormatId::SYLK ) ) { rData <<= ::com::sun::star::uno::Sequence< sal_Int8 >( reinterpret_cast<const sal_Int8*>(aByteData.getStr()), diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 765a232b3922..cca5968910a9 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -59,7 +59,7 @@ TYPEINIT1(ScTableLink, ::sfx2::SvBaseLink); ScTableLink::ScTableLink(ScDocShell* pDocSh, const OUString& rFile, const OUString& rFilter, const OUString& rOpt, sal_uLong nRefresh ): - ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE), + ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,SotClipboardFormatId::FILE), ScRefreshTimer( nRefresh ), pImpl( new TableLink_Impl ), aFileName(rFile), @@ -76,7 +76,7 @@ ScTableLink::ScTableLink(ScDocShell* pDocSh, const OUString& rFile, ScTableLink::ScTableLink(SfxObjectShell* pShell, const OUString& rFile, const OUString& rFilter, const OUString& rOpt, sal_uLong nRefresh ): - ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,FORMAT_FILE), + ::sfx2::SvBaseLink(sfx2::LINKUPDATE_ONCALL,SotClipboardFormatId::FILE), ScRefreshTimer( nRefresh ), pImpl( new TableLink_Impl ), aFileName(rFile), diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 4f7637baef5b..aa17857dbdc5 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -176,18 +176,18 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) case SID_CLIPBOARD_FORMAT_ITEMS: { - sal_uLong nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; const SfxPoolItem* pItem; if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET && pItem->ISA(SfxUInt32Item) ) { - nFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue(); + nFormat = static_cast<SotClipboardFormatId>(static_cast<const SfxUInt32Item*>(pItem)->GetValue()); } - if ( nFormat ) + if ( nFormat != SotClipboardFormatId::NONE ) { - if (nFormat == SOT_FORMAT_STRING) + if (nFormat == SotClipboardFormatId::STRING) pOutView->Paste(); else pOutView->PasteSpecial(); @@ -478,7 +478,7 @@ IMPL_LINK( ScDrawTextObjectBar, ClipboardChanged, TransferableDataHelper*, pData { if ( pDataHelper ) { - bPastePossible = ( pDataHelper->HasFormat( SOT_FORMAT_STRING ) || pDataHelper->HasFormat( SOT_FORMAT_RTF ) ); + bPastePossible = ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || pDataHelper->HasFormat( SotClipboardFormatId::RTF ) ); SfxBindings& rBindings = pViewData->GetBindings(); rBindings.Invalidate( SID_PASTE ); @@ -507,7 +507,7 @@ void ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet ) // get initial state TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) ); - bPastePossible = ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) || aDataHelper.HasFormat( SOT_FORMAT_RTF ) ); + bPastePossible = ( aDataHelper.HasFormat( SotClipboardFormatId::STRING ) || aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ); } SfxWhichIter aIter( rSet ); @@ -528,10 +528,10 @@ void ScDrawTextObjectBar::GetClipState( SfxItemSet& rSet ) TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) ); - if ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) ) - aFormats.AddClipbrdFormat( SOT_FORMAT_STRING ); - if ( aDataHelper.HasFormat( SOT_FORMAT_RTF ) ) - aFormats.AddClipbrdFormat( SOT_FORMAT_RTF ); + if ( aDataHelper.HasFormat( SotClipboardFormatId::STRING ) ) + aFormats.AddClipbrdFormat( SotClipboardFormatId::STRING ); + if ( aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ) + aFormats.AddClipbrdFormat( SotClipboardFormatId::RTF ); rSet.Put( aFormats ); } diff --git a/sc/source/ui/drawfunc/drtxtob1.cxx b/sc/source/ui/drawfunc/drtxtob1.cxx index 6c12b0d6c646..a2e6a82ebde9 100644 --- a/sc/source/ui/drawfunc/drtxtob1.cxx +++ b/sc/source/ui/drawfunc/drtxtob1.cxx @@ -116,18 +116,18 @@ void ScDrawTextObjectBar::ExecutePasteContents( SfxRequest & /* rReq */ ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); boost::scoped_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( pViewData->GetDialogParent() )); - pDlg->Insert( SOT_FORMAT_STRING, EMPTY_OUSTRING ); - pDlg->Insert( SOT_FORMAT_RTF, EMPTY_OUSTRING ); + pDlg->Insert( SotClipboardFormatId::STRING, EMPTY_OUSTRING ); + pDlg->Insert( SotClipboardFormatId::RTF, EMPTY_OUSTRING ); TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) ); - sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() ); + SotClipboardFormatId nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() ); //! test if outliner view is still valid - if (nFormat > 0) + if (nFormat != SotClipboardFormatId::NONE) { - if (nFormat == SOT_FORMAT_STRING) + if (nFormat == SotClipboardFormatId::STRING) pOutView->Paste(); else pOutView->PasteSpecial(); diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 03e867c2eca4..0a0c09d23059 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -186,7 +186,7 @@ public: GetUndoManager() SAL_OVERRIDE; virtual void FillClass( SvGlobalName * pClassName, - sal_uInt32 * pFormat, + SotClipboardFormatId * pFormat, OUString * pAppName, OUString * pFullTypeName, OUString * pShortTypeName, diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx index f56bd95c2252..8f5642b2a59c 100644 --- a/sc/source/ui/inc/drwtrans.hxx +++ b/sc/source/ui/inc/drwtrans.hxx @@ -76,7 +76,7 @@ public: virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; - virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, + virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; virtual void ObjectReleased() SAL_OVERRIDE; virtual void DragFinished( sal_Int8 nDropAction ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx index f5b7b8c1bc11..e311e15f8141 100644 --- a/sc/source/ui/inc/impex.hxx +++ b/sc/source/ui/inc/impex.hxx @@ -110,7 +110,7 @@ public: SC_DLLPUBLIC static void EmbeddedNullTreatment( OUString & rStr ); - static bool IsFormatSupported( sal_uLong nFormat ); + static bool IsFormatSupported( SotClipboardFormatId nFormat ); static const sal_Unicode* ScanNextFieldFromString( const sal_Unicode* p, OUString& rField, sal_Unicode cStr, const sal_Unicode* pSeps, bool bMergeSeps, bool& rbIsQuoted, bool& rbOverflowCell ); @@ -135,12 +135,12 @@ public: void SetStreamPath( const OUString& rPath ) { aStreamPath = rPath; } const OUString& GetStreamPath() const { return aStreamPath; } - bool ImportString( const OUString&, sal_uLong=FORMAT_STRING ); - bool ExportString( OUString&, sal_uLong=FORMAT_STRING ); - bool ExportByteString( OString&, rtl_TextEncoding, sal_uLong=FORMAT_STRING ); + bool ImportString( const OUString&, SotClipboardFormatId=SotClipboardFormatId::STRING ); + bool ExportString( OUString&, SotClipboardFormatId=SotClipboardFormatId::STRING ); + bool ExportByteString( OString&, rtl_TextEncoding, SotClipboardFormatId=SotClipboardFormatId::STRING ); - bool ImportStream( SvStream&, const OUString& rBaseURL, sal_uLong=FORMAT_STRING ); - bool ExportStream( SvStream&, const OUString& rBaseURL, sal_uLong=FORMAT_STRING ); + bool ImportStream( SvStream&, const OUString& rBaseURL, SotClipboardFormatId=SotClipboardFormatId::STRING ); + bool ExportStream( SvStream&, const OUString& rBaseURL, SotClipboardFormatId=SotClipboardFormatId::STRING ); bool ImportData( const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ); diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx index bd11836bcf97..57d8ea6f8954 100644 --- a/sc/source/ui/inc/transobj.hxx +++ b/sc/source/ui/inc/transobj.hxx @@ -73,7 +73,7 @@ public: virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; - virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, + virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; virtual void ObjectReleased() SAL_OVERRIDE; virtual void DragFinished( sal_Int8 nDropAction ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index 70c7e0f8df4b..a032722ff9a5 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -111,10 +111,10 @@ public: InsertDeleteFlags nUndoExtraFlags = IDF_NONE, bool bAllowDialogs = false ); - void FillTab( InsertDeleteFlags nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bAsLink ); + void FillTab( InsertDeleteFlags nFlags, sal_uInt16 nFunction, bool bSkipEmpty, bool bAsLink ); SC_DLLPUBLIC void PasteFromSystem(); - SC_DLLPUBLIC bool PasteFromSystem( sal_uLong nFormatId, bool bApi = false ); + SC_DLLPUBLIC bool PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi = false ); void PasteFromTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable ); @@ -126,7 +126,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, SdrObject& rHitObj); - bool PasteDataFormat( sal_uLong nFormatId, + bool PasteDataFormat( SotClipboardFormatId nFormatId, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, SCCOL nPosX, SCROW nPosY, Point* pLogicPos = NULL, @@ -138,7 +138,7 @@ public: bool PasteMetaFile( const Point&, const GDIMetaFile& ); bool PasteGraphic( const Point& rPos, const Graphic& rGraphic, const OUString& rFile, const OUString& rFilter ); - bool PasteBookmark( sal_uLong nFormatId, + bool PasteBookmark( SotClipboardFormatId nFormatId, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, SCCOL nPosX, SCROW nPosY ); diff --git a/sc/source/ui/vba/vbahelper.cxx b/sc/source/ui/vba/vbahelper.cxx index dffde94c6985..cbb4fff51eff 100644 --- a/sc/source/ui/vba/vbahelper.cxx +++ b/sc/source/ui/vba/vbahelper.cxx @@ -211,7 +211,7 @@ void implnPasteSpecial(sal_uInt16 nFlags,sal_uInt16 nFunction,sal_Bool bSkipEmpt if ( pView && pWin ) { if ( bAsLink && bOtherDoc ) - pTabViewShell->PasteFromSystem(0);//SOT_FORMATSTR_ID_LINK + pTabViewShell->PasteFromSystem(0);//SotClipboardFormatId::LINK else { ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 8c4ba99eaffb..6078b6cf0f60 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -344,7 +344,7 @@ void ScCellShell::GetCellState( SfxItemSet& rSet ) } static bool lcl_TestFormat( SvxClipboardFmtItem& rFormats, const TransferableDataHelper& rDataHelper, - SotFormatStringId nFormatId ) + SotClipboardFormatId nFormatId ) { if ( rDataHelper.HasFormat( nFormatId ) ) { @@ -352,15 +352,15 @@ static bool lcl_TestFormat( SvxClipboardFmtItem& rFormats, const TransferableDat // handled by "paste special" dialog / toolbox controller instead. // Only the object type name has to be set here: OUString aStrVal; - if ( nFormatId == SOT_FORMATSTR_ID_EMBED_SOURCE ) + if ( nFormatId == SotClipboardFormatId::EMBED_SOURCE ) { TransferableObjectDescriptor aDesc; if ( ((TransferableDataHelper&)rDataHelper).GetTransferableObjectDescriptor( - SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aDesc ) ) + SotClipboardFormatId::OBJECTDESCRIPTOR, aDesc ) ) aStrVal = aDesc.maTypeName; } - else if ( nFormatId == SOT_FORMATSTR_ID_EMBED_SOURCE_OLE - || nFormatId == SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ) + else if ( nFormatId == SotClipboardFormatId::EMBED_SOURCE_OLE + || nFormatId == SotClipboardFormatId::EMBEDDED_OBJ_OLE ) { OUString aSource; SvPasteObjectHelper::GetEmbeddedName( rDataHelper, aStrVal, aSource, nFormatId ); @@ -384,27 +384,27 @@ void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats ) TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_DRAWING ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_SVXB ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMAT_GDIMETAFILE ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_PNG ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMAT_BITMAP ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_EMBED_SOURCE ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::DRAWING ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::SVXB ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::GDIMETAFILE ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::PNG ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::BITMAP ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::EMBED_SOURCE ); if ( !bDraw ) { - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_LINK ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMAT_STRING ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_DIF ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMAT_RTF ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_HTML ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_HTML_SIMPLE ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_BIFF_8 ); - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_BIFF_5 ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::LINK ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::STRING ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::DIF ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::RTF ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::HTML ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::HTML_SIMPLE ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::BIFF_8 ); + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::BIFF_5 ); } - if ( !lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ) ) - lcl_TestFormat( rFormats, aDataHelper, SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ); + if ( !lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::EMBED_SOURCE_OLE ) ) + lcl_TestFormat( rFormats, aDataHelper, SotClipboardFormatId::EMBEDDED_OBJ_OLE ); } // insert, insert contents @@ -416,23 +416,23 @@ static bool lcl_IsCellPastePossible( const TransferableDataHelper& rData ) bPossible = true; else { - if ( rData.HasFormat( SOT_FORMATSTR_ID_PNG ) || - rData.HasFormat( SOT_FORMAT_BITMAP ) || - rData.HasFormat( SOT_FORMAT_GDIMETAFILE ) || - rData.HasFormat( SOT_FORMATSTR_ID_SVXB ) || - rData.HasFormat( FORMAT_PRIVATE ) || - rData.HasFormat( SOT_FORMAT_RTF ) || - rData.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ) || - rData.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE ) || - rData.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ) || - rData.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ) || - rData.HasFormat( SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ) || - rData.HasFormat( SOT_FORMAT_STRING ) || - rData.HasFormat( SOT_FORMATSTR_ID_SYLK ) || - rData.HasFormat( SOT_FORMATSTR_ID_LINK ) || - rData.HasFormat( SOT_FORMATSTR_ID_HTML ) || - rData.HasFormat( SOT_FORMATSTR_ID_HTML_SIMPLE ) || - rData.HasFormat( SOT_FORMATSTR_ID_DIF ) ) + if ( rData.HasFormat( SotClipboardFormatId::PNG ) || + rData.HasFormat( SotClipboardFormatId::BITMAP ) || + rData.HasFormat( SotClipboardFormatId::GDIMETAFILE ) || + rData.HasFormat( SotClipboardFormatId::SVXB ) || + rData.HasFormat( SotClipboardFormatId::PRIVATE ) || + rData.HasFormat( SotClipboardFormatId::RTF ) || + rData.HasFormat( SotClipboardFormatId::EMBED_SOURCE ) || + rData.HasFormat( SotClipboardFormatId::LINK_SOURCE ) || + rData.HasFormat( SotClipboardFormatId::EMBED_SOURCE_OLE ) || + rData.HasFormat( SotClipboardFormatId::LINK_SOURCE_OLE ) || + rData.HasFormat( SotClipboardFormatId::EMBEDDED_OBJ_OLE ) || + rData.HasFormat( SotClipboardFormatId::STRING ) || + rData.HasFormat( SotClipboardFormatId::SYLK ) || + rData.HasFormat( SotClipboardFormatId::LINK ) || + rData.HasFormat( SotClipboardFormatId::HTML ) || + rData.HasFormat( SotClipboardFormatId::HTML_SIMPLE ) || + rData.HasFormat( SotClipboardFormatId::DIF ) ) { bPossible = true; } diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index c2968bdd10d6..2fb91e4df0d8 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1269,21 +1269,21 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { WaitObject aWait( GetViewData()->GetDialogParent() ); - sal_uLong nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; const SfxPoolItem* pItem; if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET && pItem->ISA(SfxUInt32Item) ) { - nFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue(); + nFormat = static_cast<SotClipboardFormatId>(static_cast<const SfxUInt32Item*>(pItem)->GetValue()); } - if ( nFormat ) + if ( nFormat != SotClipboardFormatId::NONE ) { vcl::Window* pWin = GetViewData()->GetActiveWin(); bool bCells = ( ScTransferObj::GetOwnClipboard( pWin ) != NULL ); bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); - bool bOle = ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ); + bool bOle = ( nFormat == SotClipboardFormatId::EMBED_SOURCE ); if ( bCells && bOle ) pTabViewShell->PasteFromSystem(); @@ -1454,7 +1454,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { WaitObject aWait( GetViewData()->GetDialogParent() ); if ( bAsLink && bOtherDoc ) - pTabViewShell->PasteFromSystem(SOT_FORMATSTR_ID_LINK); // DDE insert + pTabViewShell->PasteFromSystem(SotClipboardFormatId::LINK); // DDE insert else { pTabViewShell->PasteFromClip( nFlags, pOwnClip->GetDocument(), @@ -1530,12 +1530,12 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET && pItem->ISA(SfxUInt32Item) ) { - sal_uLong nFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue(); + SotClipboardFormatId nFormat = static_cast<SotClipboardFormatId>(static_cast<const SfxUInt32Item*>(pItem)->GetValue()); bool bRet=true; { WaitObject aWait( GetViewData()->GetDialogParent() ); bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL ); - if ( bDraw && nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ) + if ( bDraw && nFormat == SotClipboardFormatId::EMBED_SOURCE ) pTabViewShell->PasteDraw(); else bRet = pTabViewShell->PasteFromSystem(nFormat, true); // TRUE: no error messages @@ -1575,28 +1575,28 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) { for (sal_uInt16 i=0; i<nFormatCount; i++) { - sal_uLong nFormatId = aFormats.GetClipbrdFormatId( i ); + SotClipboardFormatId nFormatId = aFormats.GetClipbrdFormatId( i ); OUString aName = aFormats.GetClipbrdFormatName( i ); // special case for paste dialog: '*' is replaced by object type - if ( nFormatId == SOT_FORMATSTR_ID_EMBED_SOURCE ) + if ( nFormatId == SotClipboardFormatId::EMBED_SOURCE ) aName = "*"; pDlg->Insert( nFormatId, aName ); } TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) ); - sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() ); - if (nFormat > 0) + SotClipboardFormatId nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() ); + if (nFormat != SotClipboardFormatId::NONE) { { WaitObject aWait( GetViewData()->GetDialogParent() ); - if ( bDraw && nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ) + if ( bDraw && nFormat == SotClipboardFormatId::EMBED_SOURCE ) pTabViewShell->PasteDraw(); else pTabViewShell->PasteFromSystem(nFormat); } rReq.SetReturnValue(SfxInt16Item(nSlot, 1)); // 1 = success - rReq.AppendItem( SfxUInt32Item( nSlot, nFormat ) ); + rReq.AppendItem( SfxUInt32Item( nSlot, static_cast<sal_uInt32>(nFormat) ) ); rReq.Done(); } else diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 187e5291d59e..e4fb7cce893d 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -956,7 +956,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) SvMemoryStream aStream; aStream.SetStreamCharSet( RTL_TEXTENCODING_UNICODE ); ScImportExport::SetNoEndianSwap( aStream ); - aExport.ExportStream( aStream, OUString(), FORMAT_STRING ); + aExport.ExportStream( aStream, OUString(), SotClipboardFormatId::STRING ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE( pFact, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pFact is null!" ); @@ -980,7 +980,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) aImport.SetApi( false ); aImport.SetImportBroadcast( true ); aStream.Seek( 0 ); - aImport.ImportStream( aStream, OUString(), FORMAT_STRING ); + aImport.ImportStream( aStream, OUString(), SotClipboardFormatId::STRING ); pDocSh->GetUndoManager()->LeaveListAction(); } diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index cb4c17a14fe1..bceac51de6a2 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -247,18 +247,18 @@ void ScEditShell::Execute( SfxRequest& rReq ) case SID_CLIPBOARD_FORMAT_ITEMS: { - sal_uLong nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; const SfxPoolItem* pItem; if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET && pItem->ISA(SfxUInt32Item) ) { - nFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue(); + nFormat = static_cast<SotClipboardFormatId>(static_cast<const SfxUInt32Item*>(pItem)->GetValue()); } - if ( nFormat ) + if ( nFormat != SotClipboardFormatId::NONE ) { - if (SOT_FORMAT_STRING == nFormat) + if (SotClipboardFormatId::STRING == nFormat) pTableView->Paste(); else pTableView->PasteSpecial(); @@ -273,11 +273,11 @@ void ScEditShell::Execute( SfxRequest& rReq ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); boost::scoped_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( pViewData->GetDialogParent() )); - sal_uLong nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; if ( pDlg ) { - pDlg->Insert( SOT_FORMAT_STRING, EMPTY_OUSTRING ); - pDlg->Insert( SOT_FORMAT_RTF, EMPTY_OUSTRING ); + pDlg->Insert( SotClipboardFormatId::STRING, EMPTY_OUSTRING ); + pDlg->Insert( SotClipboardFormatId::RTF, EMPTY_OUSTRING ); TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) ); @@ -290,9 +290,9 @@ void ScEditShell::Execute( SfxRequest& rReq ) if (!SC_MOD()->IsInputMode()) return; - if (nFormat > 0) + if (nFormat != SotClipboardFormatId::NONE) { - if (SOT_FORMAT_STRING == nFormat) + if (SotClipboardFormatId::STRING == nFormat) pTableView->Paste(); else pTableView->PasteSpecial(); @@ -762,7 +762,7 @@ IMPL_LINK( ScEditShell, ClipboardChanged, TransferableDataHelper*, pDataHelper ) { if ( pDataHelper ) { - bPastePossible = ( pDataHelper->HasFormat( SOT_FORMAT_STRING ) || pDataHelper->HasFormat( SOT_FORMAT_RTF ) ); + bPastePossible = ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || pDataHelper->HasFormat( SotClipboardFormatId::RTF ) ); SfxBindings& rBindings = pViewData->GetBindings(); rBindings.Invalidate( SID_PASTE ); @@ -784,7 +784,7 @@ void ScEditShell::GetClipState( SfxItemSet& rSet ) // get initial state TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) ); - bPastePossible = ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) || aDataHelper.HasFormat( SOT_FORMAT_RTF ) ); + bPastePossible = ( aDataHelper.HasFormat( SotClipboardFormatId::STRING ) || aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ); } SfxWhichIter aIter( rSet ); @@ -805,10 +805,10 @@ void ScEditShell::GetClipState( SfxItemSet& rSet ) TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pViewData->GetActiveWin() ) ); - if ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) ) - aFormats.AddClipbrdFormat( SOT_FORMAT_STRING ); - if ( aDataHelper.HasFormat( SOT_FORMAT_RTF ) ) - aFormats.AddClipbrdFormat( SOT_FORMAT_RTF ); + if ( aDataHelper.HasFormat( SotClipboardFormatId::STRING ) ) + aFormats.AddClipbrdFormat( SotClipboardFormatId::STRING ); + if ( aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ) + aFormats.AddClipbrdFormat( SotClipboardFormatId::RTF ); rSet.Put( aFormats ); } diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index d48120d8c294..0e6afcdf1b94 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -3775,10 +3775,10 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt ) pViewData->GetTabNo(), PixelToLogic(rEvt.maPosPixel) ); if ( pHitObj && nMyAction == DND_ACTION_LINK ) // && !rData.pDrawTransfer ) { - if ( IsDropFormatSupported(SOT_FORMATSTR_ID_SVXB) - || IsDropFormatSupported(SOT_FORMAT_GDIMETAFILE) - || IsDropFormatSupported(SOT_FORMATSTR_ID_PNG) - || IsDropFormatSupported(SOT_FORMAT_BITMAP) ) + if ( IsDropFormatSupported(SotClipboardFormatId::SVXB) + || IsDropFormatSupported(SotClipboardFormatId::GDIMETAFILE) + || IsDropFormatSupported(SotClipboardFormatId::PNG) + || IsDropFormatSupported(SotClipboardFormatId::BITMAP) ) { // graphic dragged onto drawing object DrawMarkDropObj( pHitObj ); @@ -3797,47 +3797,47 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt ) case DND_ACTION_COPYMOVE: { bool bMove = ( nMyAction == DND_ACTION_MOVE ); - if ( IsDropFormatSupported( SOT_FORMATSTR_ID_EMBED_SOURCE ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_LINK_SOURCE ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ) || - IsDropFormatSupported( SOT_FORMAT_STRING ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_SYLK ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_LINK ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_HTML ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_HTML_SIMPLE ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_DIF ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_DRAWING ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_SVXB ) || - IsDropFormatSupported( SOT_FORMAT_RTF ) || - IsDropFormatSupported( SOT_FORMAT_GDIMETAFILE ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_PNG ) || - IsDropFormatSupported( SOT_FORMAT_BITMAP ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE ) || + if ( IsDropFormatSupported( SotClipboardFormatId::EMBED_SOURCE ) || + IsDropFormatSupported( SotClipboardFormatId::LINK_SOURCE ) || + IsDropFormatSupported( SotClipboardFormatId::EMBED_SOURCE_OLE ) || + IsDropFormatSupported( SotClipboardFormatId::LINK_SOURCE_OLE ) || + IsDropFormatSupported( SotClipboardFormatId::EMBEDDED_OBJ_OLE ) || + IsDropFormatSupported( SotClipboardFormatId::STRING ) || + IsDropFormatSupported( SotClipboardFormatId::SYLK ) || + IsDropFormatSupported( SotClipboardFormatId::LINK ) || + IsDropFormatSupported( SotClipboardFormatId::HTML ) || + IsDropFormatSupported( SotClipboardFormatId::HTML_SIMPLE ) || + IsDropFormatSupported( SotClipboardFormatId::DIF ) || + IsDropFormatSupported( SotClipboardFormatId::DRAWING ) || + IsDropFormatSupported( SotClipboardFormatId::SVXB ) || + IsDropFormatSupported( SotClipboardFormatId::RTF ) || + IsDropFormatSupported( SotClipboardFormatId::GDIMETAFILE ) || + IsDropFormatSupported( SotClipboardFormatId::PNG ) || + IsDropFormatSupported( SotClipboardFormatId::BITMAP ) || + IsDropFormatSupported( SotClipboardFormatId::SBA_DATAEXCHANGE ) || + IsDropFormatSupported( SotClipboardFormatId::SBA_FIELDDATAEXCHANGE ) || ( !bMove && ( - IsDropFormatSupported( SOT_FORMAT_FILE_LIST ) || - IsDropFormatSupported( SOT_FORMAT_FILE ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_SOLK ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ) ) ) ) + IsDropFormatSupported( SotClipboardFormatId::FILE_LIST ) || + IsDropFormatSupported( SotClipboardFormatId::FILE ) || + IsDropFormatSupported( SotClipboardFormatId::SOLK ) || + IsDropFormatSupported( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) || + IsDropFormatSupported( SotClipboardFormatId::NETSCAPE_BOOKMARK ) || + IsDropFormatSupported( SotClipboardFormatId::FILEGRPDESCRIPTOR ) ) ) ) { nRet = nMyAction; } } break; case DND_ACTION_LINK: - if ( IsDropFormatSupported( SOT_FORMATSTR_ID_LINK_SOURCE ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_LINK ) || - IsDropFormatSupported( SOT_FORMAT_FILE_LIST ) || - IsDropFormatSupported( SOT_FORMAT_FILE ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_SOLK ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ) ) + if ( IsDropFormatSupported( SotClipboardFormatId::LINK_SOURCE ) || + IsDropFormatSupported( SotClipboardFormatId::LINK_SOURCE_OLE ) || + IsDropFormatSupported( SotClipboardFormatId::LINK ) || + IsDropFormatSupported( SotClipboardFormatId::FILE_LIST ) || + IsDropFormatSupported( SotClipboardFormatId::FILE ) || + IsDropFormatSupported( SotClipboardFormatId::SOLK ) || + IsDropFormatSupported( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) || + IsDropFormatSupported( SotClipboardFormatId::NETSCAPE_BOOKMARK ) || + IsDropFormatSupported( SotClipboardFormatId::FILEGRPDESCRIPTOR ) ) { nRet = nMyAction; } @@ -3874,116 +3874,116 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt ) return nRet; } -static sal_uLong lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xTransfer, bool bPreferText = false ) +static SotClipboardFormatId lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xTransfer, bool bPreferText = false ) { TransferableDataHelper aDataHelper( xTransfer ); - if ( !aDataHelper.HasFormat( SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) ) + if ( !aDataHelper.HasFormat( SotClipboardFormatId::SBA_DATAEXCHANGE ) ) { // use bookmark formats if no sba is present - if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SOLK ) ) - return SOT_FORMATSTR_ID_SOLK; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ) ) - return SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) ) - return SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ) ) - return SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR; + if ( aDataHelper.HasFormat( SotClipboardFormatId::SOLK ) ) + return SotClipboardFormatId::SOLK; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) ) + return SotClipboardFormatId::UNIFORMRESOURCELOCATOR; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) ) + return SotClipboardFormatId::NETSCAPE_BOOKMARK; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ) ) + return SotClipboardFormatId::FILEGRPDESCRIPTOR; } - sal_uLong nFormatId = 0; - if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) ) - nFormatId = SOT_FORMATSTR_ID_DRAWING; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) ) - nFormatId = SOT_FORMATSTR_ID_SVXB; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ) ) + SotClipboardFormatId nFormatId = SotClipboardFormatId::NONE; + if ( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) ) + nFormatId = SotClipboardFormatId::DRAWING; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) ) + nFormatId = SotClipboardFormatId::SVXB; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::EMBED_SOURCE ) ) { // If it's a Writer object, insert RTF instead of OLE bool bDoRtf = false; SotStorageStreamRef xStm; TransferableObjectDescriptor aObjDesc; - if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) && - aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_EMBED_SOURCE, xStm ) ) + if( aDataHelper.GetTransferableObjectDescriptor( SotClipboardFormatId::OBJECTDESCRIPTOR, aObjDesc ) && + aDataHelper.GetSotStorageStream( SotClipboardFormatId::EMBED_SOURCE, xStm ) ) { SotStorageRef xStore( new SotStorage( *xStm ) ); bDoRtf = ( ( aObjDesc.maClassName == SvGlobalName( SO3_SW_CLASSID ) || aObjDesc.maClassName == SvGlobalName( SO3_SWWEB_CLASSID ) ) - && aDataHelper.HasFormat( SOT_FORMAT_RTF ) ); + && aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ); } if ( bDoRtf ) - nFormatId = FORMAT_RTF; + nFormatId = SotClipboardFormatId::RTF; else - nFormatId = SOT_FORMATSTR_ID_EMBED_SOURCE; - } - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE ) ) - nFormatId = SOT_FORMATSTR_ID_LINK_SOURCE; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) ) - nFormatId = SOT_FORMATSTR_ID_SBA_DATAEXCHANGE; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE ) ) - nFormatId = SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_BIFF_8 ) ) - nFormatId = SOT_FORMATSTR_ID_BIFF_8; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_BIFF_5 ) ) - nFormatId = SOT_FORMATSTR_ID_BIFF_5; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ) ) - nFormatId = SOT_FORMATSTR_ID_EMBED_SOURCE_OLE; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ) ) - nFormatId = SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ) ) - nFormatId = SOT_FORMATSTR_ID_LINK_SOURCE_OLE; - else if ( aDataHelper.HasFormat( SOT_FORMAT_RTF ) ) - nFormatId = SOT_FORMAT_RTF; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_HTML ) ) - nFormatId = SOT_FORMATSTR_ID_HTML; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_HTML_SIMPLE ) ) - nFormatId = SOT_FORMATSTR_ID_HTML_SIMPLE; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SYLK ) ) - nFormatId = SOT_FORMATSTR_ID_SYLK; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK ) ) - nFormatId = SOT_FORMATSTR_ID_LINK; - else if ( bPreferText && aDataHelper.HasFormat( SOT_FORMAT_STRING ) ) // #i86734# the behaviour introduced in #i62773# is wrong when pasting - nFormatId = SOT_FORMAT_STRING; - else if ( aDataHelper.HasFormat( SOT_FORMAT_FILE_LIST ) ) - nFormatId = SOT_FORMAT_FILE_LIST; - else if ( aDataHelper.HasFormat( SOT_FORMAT_FILE ) ) // #i62773# FILE_LIST/FILE before STRING (Unix file managers) - nFormatId = SOT_FORMAT_FILE; - else if ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) ) - nFormatId = SOT_FORMAT_STRING; - else if ( aDataHelper.HasFormat( SOT_FORMAT_GDIMETAFILE ) ) - nFormatId = SOT_FORMAT_GDIMETAFILE; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_PNG ) ) - nFormatId = SOT_FORMATSTR_ID_PNG; - else if ( aDataHelper.HasFormat( SOT_FORMAT_BITMAP ) ) - nFormatId = SOT_FORMAT_BITMAP; + nFormatId = SotClipboardFormatId::EMBED_SOURCE; + } + else if ( aDataHelper.HasFormat( SotClipboardFormatId::LINK_SOURCE ) ) + nFormatId = SotClipboardFormatId::LINK_SOURCE; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::SBA_DATAEXCHANGE ) ) + nFormatId = SotClipboardFormatId::SBA_DATAEXCHANGE; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::SBA_FIELDDATAEXCHANGE ) ) + nFormatId = SotClipboardFormatId::SBA_FIELDDATAEXCHANGE; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::BIFF_8 ) ) + nFormatId = SotClipboardFormatId::BIFF_8; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::BIFF_5 ) ) + nFormatId = SotClipboardFormatId::BIFF_5; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::EMBED_SOURCE_OLE ) ) + nFormatId = SotClipboardFormatId::EMBED_SOURCE_OLE; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::EMBEDDED_OBJ_OLE ) ) + nFormatId = SotClipboardFormatId::EMBEDDED_OBJ_OLE; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::LINK_SOURCE_OLE ) ) + nFormatId = SotClipboardFormatId::LINK_SOURCE_OLE; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ) + nFormatId = SotClipboardFormatId::RTF; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::HTML ) ) + nFormatId = SotClipboardFormatId::HTML; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::HTML_SIMPLE ) ) + nFormatId = SotClipboardFormatId::HTML_SIMPLE; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::SYLK ) ) + nFormatId = SotClipboardFormatId::SYLK; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::LINK ) ) + nFormatId = SotClipboardFormatId::LINK; + else if ( bPreferText && aDataHelper.HasFormat( SotClipboardFormatId::STRING ) ) // #i86734# the behaviour introduced in #i62773# is wrong when pasting + nFormatId = SotClipboardFormatId::STRING; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::FILE_LIST ) ) + nFormatId = SotClipboardFormatId::FILE_LIST; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::FILE ) ) // #i62773# FILE_LIST/FILE before STRING (Unix file managers) + nFormatId = SotClipboardFormatId::FILE; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::STRING ) ) + nFormatId = SotClipboardFormatId::STRING; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::GDIMETAFILE ) ) + nFormatId = SotClipboardFormatId::GDIMETAFILE; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::PNG ) ) + nFormatId = SotClipboardFormatId::PNG; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::BITMAP ) ) + nFormatId = SotClipboardFormatId::BITMAP; return nFormatId; } -static sal_uLong lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTransfer ) +static SotClipboardFormatId lcl_GetDropLinkId( const uno::Reference<datatransfer::XTransferable>& xTransfer ) { TransferableDataHelper aDataHelper( xTransfer ); - sal_uLong nFormatId = 0; - if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE ) ) - nFormatId = SOT_FORMATSTR_ID_LINK_SOURCE; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ) ) - nFormatId = SOT_FORMATSTR_ID_LINK_SOURCE_OLE; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK ) ) - nFormatId = SOT_FORMATSTR_ID_LINK; - else if ( aDataHelper.HasFormat( SOT_FORMAT_FILE_LIST ) ) - nFormatId = SOT_FORMAT_FILE_LIST; - else if ( aDataHelper.HasFormat( SOT_FORMAT_FILE ) ) - nFormatId = SOT_FORMAT_FILE; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SOLK ) ) - nFormatId = SOT_FORMATSTR_ID_SOLK; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ) ) - nFormatId = SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) ) - nFormatId = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK; - else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ) ) - nFormatId = SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR; + SotClipboardFormatId nFormatId = SotClipboardFormatId::NONE; + if ( aDataHelper.HasFormat( SotClipboardFormatId::LINK_SOURCE ) ) + nFormatId = SotClipboardFormatId::LINK_SOURCE; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::LINK_SOURCE_OLE ) ) + nFormatId = SotClipboardFormatId::LINK_SOURCE_OLE; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::LINK ) ) + nFormatId = SotClipboardFormatId::LINK; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::FILE_LIST ) ) + nFormatId = SotClipboardFormatId::FILE_LIST; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::FILE ) ) + nFormatId = SotClipboardFormatId::FILE; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::SOLK ) ) + nFormatId = SotClipboardFormatId::SOLK; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) ) + nFormatId = SotClipboardFormatId::UNIFORMRESOURCELOCATOR; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) ) + nFormatId = SotClipboardFormatId::NETSCAPE_BOOKMARK; + else if ( aDataHelper.HasFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ) ) + nFormatId = SotClipboardFormatId::FILEGRPDESCRIPTOR; return nFormatId; } @@ -4445,10 +4445,10 @@ sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) bool bDone = false; - sal_uLong nFormatId = bIsLink ? + SotClipboardFormatId nFormatId = bIsLink ? lcl_GetDropLinkId( rEvt.maDropEvent.Transferable ) : lcl_GetDropFormatId( rEvt.maDropEvent.Transferable ); - if ( nFormatId ) + if ( nFormatId != SotClipboardFormatId::NONE ) { pScMod->SetInExecuteDrop( true ); // #i28468# prevent error messages from PasteDataFormat bPasteIsDrop = true; @@ -4523,8 +4523,8 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel ) uno::Reference<datatransfer::XTransferable> xTransferable = aDataHelper.GetTransferable(); if ( xTransferable.is() ) { - sal_uLong nFormatId = lcl_GetDropFormatId( xTransferable, true ); - if ( nFormatId ) + SotClipboardFormatId nFormatId = lcl_GetDropFormatId( xTransferable, true ); + if ( nFormatId != SotClipboardFormatId::NONE ) { bPasteIsDrop = true; pViewData->GetView()->PasteDataFormat( nFormatId, xTransferable, nPosX, nPosY, &aLogicPos ); diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 7e6fd4d5b3fd..edf6eed9103b 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -381,7 +381,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) if(pDescriptorItem) { - //! merge with ScViewFunc::PasteDataFormat (SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE)? + //! merge with ScViewFunc::PasteDataFormat (SotClipboardFormatId::SBA_FIELDDATAEXCHANGE)? ScDrawView* pDrView = GetScDrawView(); SdrPageView* pPageView = pDrView ? pDrView->GetSdrPageView() : NULL; diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 79182b4f5d2f..992e480dd22e 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -472,13 +472,13 @@ void ScViewFunc::PasteFromSystem() TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) ); { - sal_uLong nBiff8 = SotExchange::RegisterFormatName(OUString("Biff8")); - sal_uLong nBiff5 = SotExchange::RegisterFormatName(OUString("Biff5")); + SotClipboardFormatId nBiff8 = SotExchange::RegisterFormatName(OUString("Biff8")); + SotClipboardFormatId nBiff5 = SotExchange::RegisterFormatName(OUString("Biff5")); SotExchangeDest nDestination = SotExchangeDest::SCDOC_FREE_AREA; sal_uInt16 nSourceOptions = EXCHG_IN_ACTION_COPY; - sal_uLong nFormat; // output param for GetExchangeAction - sal_uInt16 nEventAction; // output param for GetExchangeAction + SotClipboardFormatId nFormat; // output param for GetExchangeAction + sal_uInt16 nEventAction; // output param for GetExchangeAction uno::Reference<com::sun::star::datatransfer::XTransferable> xTransferable( aDataHelper.GetXTransferable() ); sal_uInt16 nAction = SotExchange::GetExchangeAction( @@ -486,7 +486,7 @@ void ScViewFunc::PasteFromSystem() nDestination, nSourceOptions, EXCHG_IN_ACTION_DEFAULT, - nFormat, nEventAction, 0, + nFormat, nEventAction, SotClipboardFormatId::NONE, &xTransferable ); if ( nAction != EXCHG_INOUT_ACTION_NONE ) @@ -499,10 +499,10 @@ void ScViewFunc::PasteFromSystem() case EXCHG_OUT_ACTION_INSERT_GDIMETAFILE: case EXCHG_OUT_ACTION_INSERT_BITMAP: case EXCHG_OUT_ACTION_INSERT_GRAPH: - // FORMAT_BITMAP - // SOT_FORMATSTR_ID_PNG - // FORMAT_GDIMETAFILE - // SOT_FORMATSTR_ID_SVXB + // SotClipboardFormatId::BITMAP + // SotClipboardFormatId::PNG + // SotClipboardFormatId::GDIMETAFILE + // SotClipboardFormatId::SVXB PasteFromSystem(nFormat); break; default: @@ -515,19 +515,19 @@ void ScViewFunc::PasteFromSystem() // first SvDraw-model, then drawing // (only one drawing is allowed) - if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING )) + if (aDataHelper.HasFormat( SotClipboardFormatId::DRAWING )) { // special case for tables from drawing - if( aDataHelper.HasFormat( SOT_FORMAT_RTF ) ) + if( aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ) { - PasteFromSystem( FORMAT_RTF ); + PasteFromSystem( SotClipboardFormatId::RTF ); } else { - PasteFromSystem( SOT_FORMATSTR_ID_DRAWING ); + PasteFromSystem( SotClipboardFormatId::DRAWING ); } } - else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE )) + else if (aDataHelper.HasFormat( SotClipboardFormatId::EMBED_SOURCE )) { // If it's a Writer object, insert RTF instead of OLE @@ -537,45 +537,45 @@ void ScViewFunc::PasteFromSystem() bool bDoRtf = false; TransferableObjectDescriptor aObjDesc; - if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) ) + if( aDataHelper.GetTransferableObjectDescriptor( SotClipboardFormatId::OBJECTDESCRIPTOR, aObjDesc ) ) { bDoRtf = ( ( aObjDesc.maClassName == SvGlobalName( SO3_SW_CLASSID ) || aObjDesc.maClassName == SvGlobalName( SO3_SWWEB_CLASSID ) ) - && aDataHelper.HasFormat( SOT_FORMAT_RTF ) ); + && aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ); } if ( bDoRtf ) - PasteFromSystem( FORMAT_RTF ); + PasteFromSystem( SotClipboardFormatId::RTF ); else if ( aObjDesc.maClassName == SvGlobalName( 0,0,0,0,0,0,0,0,0,0,0 ) - && aDataHelper.HasFormat( SOT_FORMATSTR_ID_SYLK )) - PasteFromSystem( SOT_FORMATSTR_ID_SYLK ); + && aDataHelper.HasFormat( SotClipboardFormatId::SYLK )) + PasteFromSystem( SotClipboardFormatId::SYLK ); else - PasteFromSystem( SOT_FORMATSTR_ID_EMBED_SOURCE ); + PasteFromSystem( SotClipboardFormatId::EMBED_SOURCE ); } - else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE )) - PasteFromSystem( SOT_FORMATSTR_ID_LINK_SOURCE ); + else if (aDataHelper.HasFormat( SotClipboardFormatId::LINK_SOURCE )) + PasteFromSystem( SotClipboardFormatId::LINK_SOURCE ); // the following format can not affect scenario from #89579# - else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE )) - PasteFromSystem( SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ); - // FORMAT_PRIVATE no longer here (can't work if pOwnClip is NULL) + else if (aDataHelper.HasFormat( SotClipboardFormatId::EMBEDDED_OBJ_OLE )) + PasteFromSystem( SotClipboardFormatId::EMBEDDED_OBJ_OLE ); + // SotClipboardFormatId::PRIVATE no longer here (can't work if pOwnClip is NULL) else if (aDataHelper.HasFormat(nBiff8)) // before xxx_OLE formats PasteFromSystem(nBiff8); else if (aDataHelper.HasFormat(nBiff5)) PasteFromSystem(nBiff5); - else if (aDataHelper.HasFormat(FORMAT_RTF)) - PasteFromSystem(FORMAT_RTF); - else if (aDataHelper.HasFormat(SOT_FORMATSTR_ID_HTML)) - PasteFromSystem(SOT_FORMATSTR_ID_HTML); - else if (aDataHelper.HasFormat(SOT_FORMATSTR_ID_HTML_SIMPLE)) - PasteFromSystem(SOT_FORMATSTR_ID_HTML_SIMPLE); - else if (aDataHelper.HasFormat(SOT_FORMATSTR_ID_SYLK)) - PasteFromSystem(SOT_FORMATSTR_ID_SYLK); - else if (aDataHelper.HasFormat(FORMAT_STRING)) - PasteFromSystem(FORMAT_STRING); + else if (aDataHelper.HasFormat(SotClipboardFormatId::RTF)) + PasteFromSystem(SotClipboardFormatId::RTF); + else if (aDataHelper.HasFormat(SotClipboardFormatId::HTML)) + PasteFromSystem(SotClipboardFormatId::HTML); + else if (aDataHelper.HasFormat(SotClipboardFormatId::HTML_SIMPLE)) + PasteFromSystem(SotClipboardFormatId::HTML_SIMPLE); + else if (aDataHelper.HasFormat(SotClipboardFormatId::SYLK)) + PasteFromSystem(SotClipboardFormatId::SYLK); + else if (aDataHelper.HasFormat(SotClipboardFormatId::STRING)) + PasteFromSystem(SotClipboardFormatId::STRING); // xxx_OLE formats come last, like in SotExchange tables - else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE )) - PasteFromSystem( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ); - else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE_OLE )) - PasteFromSystem( SOT_FORMATSTR_ID_LINK_SOURCE_OLE ); + else if (aDataHelper.HasFormat( SotClipboardFormatId::EMBED_SOURCE_OLE )) + PasteFromSystem( SotClipboardFormatId::EMBED_SOURCE_OLE ); + else if (aDataHelper.HasFormat( SotClipboardFormatId::LINK_SOURCE_OLE )) + PasteFromSystem( SotClipboardFormatId::LINK_SOURCE_OLE ); } } } @@ -622,61 +622,61 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran { TransferableDataHelper aDataHelper( rxTransferable ); { - sal_uLong nBiff8 = SotExchange::RegisterFormatName(OUString("Biff8")); - sal_uLong nBiff5 = SotExchange::RegisterFormatName(OUString("Biff5")); - sal_uLong nFormatId = 0; + SotClipboardFormatId nBiff8 = SotExchange::RegisterFormatName(OUString("Biff8")); + SotClipboardFormatId nBiff5 = SotExchange::RegisterFormatName(OUString("Biff5")); + SotClipboardFormatId nFormatId = SotClipboardFormatId::NONE; // first SvDraw-model, then drawing // (only one drawing is allowed) - if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING )) - nFormatId = SOT_FORMATSTR_ID_DRAWING; - else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB )) - nFormatId = SOT_FORMATSTR_ID_SVXB; - else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE )) + if (aDataHelper.HasFormat( SotClipboardFormatId::DRAWING )) + nFormatId = SotClipboardFormatId::DRAWING; + else if (aDataHelper.HasFormat( SotClipboardFormatId::SVXB )) + nFormatId = SotClipboardFormatId::SVXB; + else if (aDataHelper.HasFormat( SotClipboardFormatId::EMBED_SOURCE )) { // If it's a Writer object, insert RTF instead of OLE bool bDoRtf = false; TransferableObjectDescriptor aObjDesc; - if( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) ) + if( aDataHelper.GetTransferableObjectDescriptor( SotClipboardFormatId::OBJECTDESCRIPTOR, aObjDesc ) ) { bDoRtf = ( ( aObjDesc.maClassName == SvGlobalName( SO3_SW_CLASSID ) || aObjDesc.maClassName == SvGlobalName( SO3_SWWEB_CLASSID ) ) - && aDataHelper.HasFormat( SOT_FORMAT_RTF ) ); + && aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ); } if ( bDoRtf ) - nFormatId = FORMAT_RTF; + nFormatId = SotClipboardFormatId::RTF; else - nFormatId = SOT_FORMATSTR_ID_EMBED_SOURCE; + nFormatId = SotClipboardFormatId::EMBED_SOURCE; } - else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE )) - nFormatId = SOT_FORMATSTR_ID_LINK_SOURCE; + else if (aDataHelper.HasFormat( SotClipboardFormatId::LINK_SOURCE )) + nFormatId = SotClipboardFormatId::LINK_SOURCE; // the following format can not affect scenario from #89579# - else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE )) - nFormatId = SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE; - // FORMAT_PRIVATE no longer here (can't work if pOwnClip is NULL) + else if (aDataHelper.HasFormat( SotClipboardFormatId::EMBEDDED_OBJ_OLE )) + nFormatId = SotClipboardFormatId::EMBEDDED_OBJ_OLE; + // SotClipboardFormatId::PRIVATE no longer here (can't work if pOwnClip is NULL) else if (aDataHelper.HasFormat(nBiff8)) // before xxx_OLE formats nFormatId = nBiff8; else if (aDataHelper.HasFormat(nBiff5)) nFormatId = nBiff5; - else if (aDataHelper.HasFormat(FORMAT_RTF)) - nFormatId = FORMAT_RTF; - else if (aDataHelper.HasFormat(SOT_FORMATSTR_ID_HTML)) - nFormatId = SOT_FORMATSTR_ID_HTML; - else if (aDataHelper.HasFormat(SOT_FORMATSTR_ID_HTML_SIMPLE)) - nFormatId = SOT_FORMATSTR_ID_HTML_SIMPLE; - else if (aDataHelper.HasFormat(SOT_FORMATSTR_ID_SYLK)) - nFormatId = SOT_FORMATSTR_ID_SYLK; - else if (aDataHelper.HasFormat(FORMAT_STRING)) - nFormatId = FORMAT_STRING; - else if (aDataHelper.HasFormat(FORMAT_GDIMETAFILE)) - nFormatId = FORMAT_GDIMETAFILE; - else if (aDataHelper.HasFormat(FORMAT_BITMAP)) - nFormatId = FORMAT_BITMAP; + else if (aDataHelper.HasFormat(SotClipboardFormatId::RTF)) + nFormatId = SotClipboardFormatId::RTF; + else if (aDataHelper.HasFormat(SotClipboardFormatId::HTML)) + nFormatId = SotClipboardFormatId::HTML; + else if (aDataHelper.HasFormat(SotClipboardFormatId::HTML_SIMPLE)) + nFormatId = SotClipboardFormatId::HTML_SIMPLE; + else if (aDataHelper.HasFormat(SotClipboardFormatId::SYLK)) + nFormatId = SotClipboardFormatId::SYLK; + else if (aDataHelper.HasFormat(SotClipboardFormatId::STRING)) + nFormatId = SotClipboardFormatId::STRING; + else if (aDataHelper.HasFormat(SotClipboardFormatId::GDIMETAFILE)) + nFormatId = SotClipboardFormatId::GDIMETAFILE; + else if (aDataHelper.HasFormat(SotClipboardFormatId::BITMAP)) + nFormatId = SotClipboardFormatId::BITMAP; // xxx_OLE formats come last, like in SotExchange tables - else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE )) - nFormatId = SOT_FORMATSTR_ID_EMBED_SOURCE_OLE; - else if (aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK_SOURCE_OLE )) - nFormatId = SOT_FORMATSTR_ID_LINK_SOURCE_OLE; + else if (aDataHelper.HasFormat( SotClipboardFormatId::EMBED_SOURCE_OLE )) + nFormatId = SotClipboardFormatId::EMBED_SOURCE_OLE; + else if (aDataHelper.HasFormat( SotClipboardFormatId::LINK_SOURCE_OLE )) + nFormatId = SotClipboardFormatId::LINK_SOURCE_OLE; else return; @@ -687,14 +687,14 @@ void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTran } } -bool ScViewFunc::PasteFromSystem( sal_uLong nFormatId, bool bApi ) +bool ScViewFunc::PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi ) { UpdateInputLine(); bool bRet = true; vcl::Window* pWin = GetActiveWin(); ScTransferObj* pOwnClip = ScTransferObj::GetOwnClipboard( pWin ); - if ( nFormatId == 0 && pOwnClip ) + if ( nFormatId == SotClipboardFormatId::NONE && pOwnClip ) { // keep a reference in case the clipboard is changed during PasteFromClip uno::Reference<datatransfer::XTransferable> aOwnClipRef( pOwnClip ); @@ -742,12 +742,12 @@ bool ScViewFunc::PasteOnDrawObjectLinked( { TransferableDataHelper aDataHelper( rxTransferable ); - if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) ) + if ( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) ) { SotStorageStreamRef xStm; ScDrawView* pScDrawView = GetScDrawView(); - if( pScDrawView && aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_SVXB, xStm ) ) + if( pScDrawView && aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ) ) { Graphic aGraphic; @@ -762,12 +762,12 @@ bool ScViewFunc::PasteOnDrawObjectLinked( } } } - else if ( aDataHelper.HasFormat( SOT_FORMAT_GDIMETAFILE ) ) + else if ( aDataHelper.HasFormat( SotClipboardFormatId::GDIMETAFILE ) ) { GDIMetaFile aMtf; ScDrawView* pScDrawView = GetScDrawView(); - if( pScDrawView && aDataHelper.GetGDIMetaFile( FORMAT_GDIMETAFILE, aMtf ) ) + if( pScDrawView && aDataHelper.GetGDIMetaFile( SotClipboardFormatId::GDIMETAFILE, aMtf ) ) { const OUString aEmpty; const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP)); @@ -778,12 +778,12 @@ bool ScViewFunc::PasteOnDrawObjectLinked( } } } - else if ( aDataHelper.HasFormat( SOT_FORMAT_BITMAP ) || aDataHelper.HasFormat( SOT_FORMATSTR_ID_PNG ) ) + else if ( aDataHelper.HasFormat( SotClipboardFormatId::BITMAP ) || aDataHelper.HasFormat( SotClipboardFormatId::PNG ) ) { BitmapEx aBmpEx; ScDrawView* pScDrawView = GetScDrawView(); - if( pScDrawView && aDataHelper.GetBitmapEx( FORMAT_BITMAP, aBmpEx ) ) + if( pScDrawView && aDataHelper.GetBitmapEx( SotClipboardFormatId::BITMAP, aBmpEx ) ) { const OUString aEmpty; const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP)); diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index f4ad744a3637..f9d054cfb8f0 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -82,7 +82,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, ::com::sun::star::datatransfer::XTransferable >& rxTransferable ) { TransferableDataHelper aDataHelper( rxTransferable ); - if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_EDITENGINE ) ) + if ( aDataHelper.HasFormat( SotClipboardFormatId::EDITENGINE ) ) { HideAllCursors(); @@ -165,11 +165,11 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow, OUString aStr; SotStorageStreamRef xStream; - if ( aDataHelper.GetSotStorageStream( SOT_FORMAT_RTF, xStream ) && xStream.Is() ) + if ( aDataHelper.GetSotStorageStream( SotClipboardFormatId::RTF, xStream ) && xStream.Is() ) // mba: clipboard always must contain absolute URLs (could be from alien source) - aImpEx.ImportStream( *xStream, OUString(), SOT_FORMAT_RTF ); - else if ( aDataHelper.GetString( SOT_FORMAT_RTF, aStr ) ) - aImpEx.ImportString( aStr, SOT_FORMAT_RTF ); + aImpEx.ImportStream( *xStream, OUString(), SotClipboardFormatId::RTF ); + else if ( aDataHelper.GetString( SotClipboardFormatId::RTF, aStr ) ) + aImpEx.ImportString( aStr, SotClipboardFormatId::RTF ); AdjustRowHeight( nStartRow, aImpEx.GetRange().aEnd.Row() ); pDocSh->UpdateOle(&GetViewData()); @@ -564,7 +564,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, bool bR rDoc.EnableIdle(bOldEnabled); } -// Pasten von FORMAT_FILE-Items +// Pasten von SotClipboardFormatId::FILE-Items // wird nicht direkt aus Drop aufgerufen, sondern asynchron -> Dialoge sind erlaubt bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink ) @@ -669,7 +669,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink } } -bool ScViewFunc::PasteBookmark( sal_uLong nFormatId, +bool ScViewFunc::PasteBookmark( SotClipboardFormatId nFormatId, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable, SCCOL nPosX, SCROW nPosY ) diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 983a39ed922f..08c9f9e9b029 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -70,7 +70,7 @@ using namespace com::sun::star; -bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, +bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, const uno::Reference<datatransfer::XTransferable>& rxTransferable, SCCOL nPosX, SCROW nPosY, Point* pLogicPos, bool bLink, bool bAllowDialogs ) { @@ -84,7 +84,7 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, { // inserting position isn't needed for text formats bool bIsTextFormat = ( ScImportExport::IsFormatSupported( nFormatId ) || - nFormatId == FORMAT_RTF ); + nFormatId == SotClipboardFormatId::RTF ); if ( !bIsTextFormat ) { // Window MapMode isn't drawing MapMode if DrawingLayer hasn't been created yet @@ -105,16 +105,16 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, // handle individual formats - if ( nFormatId == SOT_FORMATSTR_ID_EMBED_SOURCE || - nFormatId == SOT_FORMATSTR_ID_LINK_SOURCE || - nFormatId == SOT_FORMATSTR_ID_EMBED_SOURCE_OLE || - nFormatId == SOT_FORMATSTR_ID_LINK_SOURCE_OLE || - nFormatId == SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ) + if ( nFormatId == SotClipboardFormatId::EMBED_SOURCE || + nFormatId == SotClipboardFormatId::LINK_SOURCE || + nFormatId == SotClipboardFormatId::EMBED_SOURCE_OLE || + nFormatId == SotClipboardFormatId::LINK_SOURCE_OLE || + nFormatId == SotClipboardFormatId::EMBEDDED_OBJ_OLE ) { uno::Reference < io::XInputStream > xStm; TransferableObjectDescriptor aObjDesc; - if (aDataHelper.GetTransferableObjectDescriptor(SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc)) + if (aDataHelper.GetTransferableObjectDescriptor(SotClipboardFormatId::OBJECTDESCRIPTOR, aObjDesc)) xStm = aDataHelper.GetInputStream(nFormatId, OUString()); if (xStm.is()) @@ -174,18 +174,18 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, { // try to get the replacement image from the clipboard Graphic aGraphic; - sal_uLong nGrFormat = 0; + SotClipboardFormatId nGrFormat = SotClipboardFormatId::NONE; // limit the size of the preview metafile to 100000 actions GDIMetaFile aMetafile; - if (aDataHelper.GetGDIMetaFile(FORMAT_GDIMETAFILE, aMetafile, 100000)) + if (aDataHelper.GetGDIMetaFile(SotClipboardFormatId::GDIMETAFILE, aMetafile, 100000)) { - nGrFormat = SOT_FORMAT_GDIMETAFILE; + nGrFormat = SotClipboardFormatId::GDIMETAFILE; aGraphic = aMetafile; } // insert replacement image ( if there is one ) into the object helper - if ( nGrFormat ) + if ( nGrFormat != SotClipboardFormatId::NONE ) { datatransfer::DataFlavor aDataFlavor; SotExchange::GetFormatDataFlavor( nGrFormat, aDataFlavor ); @@ -204,13 +204,13 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, } else { - if ( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE, aObjDesc ) ) + if ( aDataHelper.GetTransferableObjectDescriptor( SotClipboardFormatId::OBJECTDESCRIPTOR_OLE, aObjDesc ) ) { OUString aName; uno::Reference < embed::XEmbeddedObject > xObj; - xStm = aDataHelper.GetInputStream(SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, OUString()); + xStm = aDataHelper.GetInputStream(SotClipboardFormatId::EMBED_SOURCE_OLE, OUString()); if (!xStm.is()) - aDataHelper.GetInputStream(SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, OUString()); + aDataHelper.GetInputStream(SotClipboardFormatId::EMBEDDED_OBJ_OLE, OUString()); if (xStm.is()) { @@ -243,20 +243,20 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, { // try to get the replacement image from the clipboard Graphic aGraphic; - sal_uLong nGrFormat = 0; + SotClipboardFormatId nGrFormat = SotClipboardFormatId::NONE; // (wg. Selection Manager bei Trustet Solaris) #ifndef SOLARIS - if( aDataHelper.GetGraphic( SOT_FORMATSTR_ID_SVXB, aGraphic ) ) - nGrFormat = SOT_FORMATSTR_ID_SVXB; - else if( aDataHelper.GetGraphic( FORMAT_GDIMETAFILE, aGraphic ) ) - nGrFormat = SOT_FORMAT_GDIMETAFILE; - else if( aDataHelper.GetGraphic( FORMAT_BITMAP, aGraphic ) ) - nGrFormat = SOT_FORMAT_BITMAP; + if( aDataHelper.GetGraphic( SotClipboardFormatId::SVXB, aGraphic ) ) + nGrFormat = SotClipboardFormatId::SVXB; + else if( aDataHelper.GetGraphic( SotClipboardFormatId::GDIMETAFILE, aGraphic ) ) + nGrFormat = SotClipboardFormatId::GDIMETAFILE; + else if( aDataHelper.GetGraphic( SotClipboardFormatId::BITMAP, aGraphic ) ) + nGrFormat = SotClipboardFormatId::BITMAP; #endif // insert replacement image ( if there is one ) into the object helper - if ( nGrFormat ) + if ( nGrFormat != SotClipboardFormatId::NONE ) { datatransfer::DataFlavor aDataFlavor; SotExchange::GetFormatDataFlavor( nGrFormat, aDataFlavor ); @@ -277,13 +277,13 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, //TODO/LATER: if format is not available, create picture } } - else if ( nFormatId == SOT_FORMATSTR_ID_LINK ) // LINK is also in ScImportExport + else if ( nFormatId == SotClipboardFormatId::LINK ) // LINK is also in ScImportExport { bRet = PasteLink( rxTransferable ); } - else if ( ScImportExport::IsFormatSupported( nFormatId ) || nFormatId == SOT_FORMAT_RTF ) + else if ( ScImportExport::IsFormatSupported( nFormatId ) || nFormatId == SotClipboardFormatId::RTF ) { - if ( nFormatId == SOT_FORMAT_RTF && aDataHelper.HasFormat( SOT_FORMATSTR_ID_EDITENGINE ) ) + if ( nFormatId == SotClipboardFormatId::RTF && aDataHelper.HasFormat( SotClipboardFormatId::EDITENGINE ) ) { // use EditView's PasteSpecial / Drop PasteRTF( nPosX, nPosY, rxTransferable ); @@ -299,7 +299,7 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, SotStorageStreamRef xStream; if ( aDataHelper.GetSotStorageStream( nFormatId, xStream ) && xStream.Is() ) { - if (nFormatId == SOT_FORMATSTR_ID_HTML) + if (nFormatId == SotClipboardFormatId::HTML) { // Launch the text import options dialog. For now, we do // this for html pasting only, but in the future it may @@ -325,7 +325,7 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, bRet = aObj.ImportStream( *xStream, OUString(), nFormatId ); // mba: clipboard always must contain absolute URLs (could be from alien source) } - else if (nFormatId == FORMAT_STRING && aDataHelper.GetString( nFormatId, aStr )) + else if (nFormatId == SotClipboardFormatId::STRING && aDataHelper.GetString( nFormatId, aStr )) { // Do CSV dialog if more than one line. sal_Int32 nDelim = aStr.indexOf('\n'); @@ -361,14 +361,14 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, else bRet = aObj.ImportString( aStr, nFormatId ); } - else if (nFormatId != FORMAT_STRING && aDataHelper.GetString( nFormatId, aStr )) + else if (nFormatId != SotClipboardFormatId::STRING && aDataHelper.GetString( nFormatId, aStr )) bRet = aObj.ImportString( aStr, nFormatId ); InvalidateAttribs(); GetViewData().UpdateInputHandler(); } } - else if (nFormatId == SOT_FORMATSTR_ID_SBA_DATAEXCHANGE) + else if (nFormatId == SotClipboardFormatId::SBA_DATAEXCHANGE) { // import of database data into table @@ -412,7 +412,7 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, bRet = true; } } - else if (nFormatId == SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE) + else if (nFormatId == SotClipboardFormatId::SBA_FIELDDATAEXCHANGE) { // insert database field control @@ -457,32 +457,32 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, } } } - else if (nFormatId == SOT_FORMAT_BITMAP || nFormatId == SOT_FORMATSTR_ID_PNG) + else if (nFormatId == SotClipboardFormatId::BITMAP || nFormatId == SotClipboardFormatId::PNG) { BitmapEx aBmpEx; - if( aDataHelper.GetBitmapEx( FORMAT_BITMAP, aBmpEx ) ) + if( aDataHelper.GetBitmapEx( SotClipboardFormatId::BITMAP, aBmpEx ) ) bRet = PasteBitmapEx( aPos, aBmpEx ); } - else if (nFormatId == SOT_FORMAT_GDIMETAFILE) + else if (nFormatId == SotClipboardFormatId::GDIMETAFILE) { GDIMetaFile aMtf; - if( aDataHelper.GetGDIMetaFile( FORMAT_GDIMETAFILE, aMtf ) ) + if( aDataHelper.GetGDIMetaFile( SotClipboardFormatId::GDIMETAFILE, aMtf ) ) bRet = PasteMetaFile( aPos, aMtf ); } - else if (nFormatId == SOT_FORMATSTR_ID_SVXB) + else if (nFormatId == SotClipboardFormatId::SVXB) { SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_SVXB, xStm ) ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ) ) { Graphic aGraphic; ReadGraphic( *xStm, aGraphic ); bRet = PasteGraphic( aPos, aGraphic, EMPTY_OUSTRING, EMPTY_OUSTRING ); } } - else if ( nFormatId == SOT_FORMATSTR_ID_DRAWING ) + else if ( nFormatId == SotClipboardFormatId::DRAWING ) { SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_DRAWING, xStm ) ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStm ) ) { MakeDrawLayer(); // before loading model, so 3D factory has been created @@ -525,7 +525,7 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, bRet = true; } } - else if ( (nFormatId == SOT_FORMATSTR_ID_BIFF_5) || (nFormatId == SOT_FORMATSTR_ID_BIFF_8) ) + else if ( (nFormatId == SotClipboardFormatId::BIFF_5) || (nFormatId == SotClipboardFormatId::BIFF_8) ) { // do excel import into a clipboard document //TODO/MBA: testing @@ -586,13 +586,13 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, } } } - else if ( nFormatId == SOT_FORMAT_FILE ) + else if ( nFormatId == SotClipboardFormatId::FILE ) { OUString aFile; if ( aDataHelper.GetString( nFormatId, aFile ) ) bRet = PasteFile( aPos, aFile, bLink ); } - else if ( nFormatId == SOT_FORMAT_FILE_LIST ) + else if ( nFormatId == SotClipboardFormatId::FILE_LIST ) { FileList aFileList; if ( aDataHelper.GetFileList( nFormatId, aFileList ) ) @@ -610,10 +610,10 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, bRet = true; } } - else if ( nFormatId == SOT_FORMATSTR_ID_SOLK || - nFormatId == SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR || - nFormatId == SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK || - nFormatId == SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ) + else if ( nFormatId == SotClipboardFormatId::SOLK || + nFormatId == SotClipboardFormatId::UNIFORMRESOURCELOCATOR || + nFormatId == SotClipboardFormatId::NETSCAPE_BOOKMARK || + nFormatId == SotClipboardFormatId::FILEGRPDESCRIPTOR ) { bRet = PasteBookmark( nFormatId, rxTransferable, nPosX, nPosY ); } @@ -630,7 +630,7 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r // get link data from transferable before string data, // so the source knows it will be used for a link - uno::Sequence<sal_Int8> aSequence = aDataHelper.GetSequence(SOT_FORMATSTR_ID_LINK, OUString()); + uno::Sequence<sal_Int8> aSequence = aDataHelper.GetSequence(SotClipboardFormatId::LINK, OUString()); if (!aSequence.getLength()) { OSL_FAIL("DDE Data not found."); @@ -641,10 +641,10 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r sal_uInt16 nCols = 1; sal_uInt16 nRows = 1; - if ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) ) + if ( aDataHelper.HasFormat( SotClipboardFormatId::STRING ) ) { OUString aDataStr; - if ( aDataHelper.GetString( SOT_FORMAT_STRING, aDataStr ) ) + if ( aDataHelper.GetString( SotClipboardFormatId::STRING, aDataStr ) ) { // get size from string the same way as in ScDdeLink::DataChanged diff --git a/sd/qa/unit/filters-test.cxx b/sd/qa/unit/filters-test.cxx index e0e590546d1a..272f4a4a1ade 100644 --- a/sd/qa/unit/filters-test.cxx +++ b/sd/qa/unit/filters-test.cxx @@ -42,7 +42,7 @@ public: virtual bool load( const OUString &rFilter, const OUString &rURL, const OUString &rUserData, - unsigned int nFilterFlags, unsigned int nClipboardID, + unsigned int nFilterFlags, SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) SAL_OVERRIDE; virtual void setUp() SAL_OVERRIDE; @@ -60,7 +60,7 @@ private: }; bool SdFiltersTest::load(const OUString &rFilter, const OUString &rURL, - const OUString &rUserData, unsigned int nFilterFlags, unsigned int nClipboardID, + const OUString &rUserData, unsigned int nFilterFlags, SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) { SfxFilter aFilter( diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx index 583fe09468b7..430d07df10f1 100644 --- a/sd/qa/unit/sdmodeltestbase.hxx +++ b/sd/qa/unit/sdmodeltestbase.hxx @@ -106,9 +106,9 @@ protected: FileFormat *pFmt = getFormat(nFormat); CPPUNIT_ASSERT_MESSAGE( "missing filter info", pFmt->pName != NULL ); - sal_uInt32 nOptions = 0; + SotClipboardFormatId nOptions = SotClipboardFormatId::NONE; if (pFmt->nFormatType) - nOptions = SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS; + nOptions = SotClipboardFormatId::STARCALC_8; SfxFilter* aFilter = new SfxFilter( OUString::createFromAscii( pFmt->pFilterName ), OUString(), pFmt->nFormatType, nOptions, @@ -142,9 +142,9 @@ protected: void exportTo(sd::DrawDocShell* pShell, FileFormat* pFormat, utl::TempFile& rTempFile) { SfxMedium aStoreMedium(rTempFile.GetURL(), STREAM_STD_WRITE); - sal_uInt32 nExportFormat = 0; + SotClipboardFormatId nExportFormat = SotClipboardFormatId::NONE; if (pFormat->nFormatType == ODP_FORMAT_TYPE) - nExportFormat = SFX_FILTER_EXPORT | SFX_FILTER_USESOPTIONS; + nExportFormat = SotClipboardFormatId::STARCALC_8; SfxFilter* pExportFilter = new SfxFilter( OUString::createFromAscii(pFormat->pFilterName), OUString(), pFormat->nFormatType, nExportFormat, @@ -161,9 +161,9 @@ protected: void save(sd::DrawDocShell* pShell, FileFormat* pFormat, utl::TempFile& rTempFile) { SfxMedium aStoreMedium(rTempFile.GetURL(), STREAM_STD_WRITE); - sal_uInt32 nExportFormat = 0; + SotClipboardFormatId nExportFormat = SotClipboardFormatId::NONE; if (pFormat->nFormatType == ODP_FORMAT_TYPE) - nExportFormat = SFX_FILTER_EXPORT | SFX_FILTER_USESOPTIONS; + nExportFormat = SotClipboardFormatId::STARCHART_8; SfxFilter* pExportFilter = new SfxFilter( OUString::createFromAscii(pFormat->pFilterName), OUString(), pFormat->nFormatType, nExportFormat, diff --git a/sd/source/core/pglink.cxx b/sd/source/core/pglink.cxx index 8e22aa118f03..65862e4f34f4 100644 --- a/sd/source/core/pglink.cxx +++ b/sd/source/core/pglink.cxx @@ -31,7 +31,7 @@ SdPageLink::SdPageLink(SdPage* pPg, const OUString& rFileName, const OUString& rBookmarkName) : - ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, FORMAT_FILE), + ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SotClipboardFormatId::FILE), pPage(pPg) { pPage->SetFileName(rFileName); diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 4c98f0beca82..637d6ec14c87 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -114,7 +114,7 @@ void PPTWriter::exportPPTPre( const std::vector< com::sun::star::beans::Property } SvGlobalName aGName( 0x64818d10L, 0x4f9b, 0x11cf, 0x86, 0xea, 0x00, 0xaa, 0x00, 0xb9, 0x29, 0xe8 ); - mrStg->SetClass( aGName, 0, OUString("MS PowerPoint 97") ); + mrStg->SetClass( aGName, SotClipboardFormatId::NONE, OUString("MS PowerPoint 97") ); if ( !ImplCreateCurrentUserStream() ) return; diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index d6a2a59c286e..9aa0b42344cf 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -73,8 +73,8 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::datatransfer; using namespace ::com::sun::star::datatransfer::clipboard; -#define SDTRANSFER_OBJECTTYPE_DRAWMODEL 0x00000001 -#define SDTRANSFER_OBJECTTYPE_DRAWOLE 0x00000002 +#define SDTRANSFER_OBJECTTYPE_DRAWMODEL static_cast<SotClipboardFormatId>(0x00000001) +#define SDTRANSFER_OBJECTTYPE_DRAWOLE static_cast<SotClipboardFormatId>(0x00000002) SdTransferable::SdTransferable( SdDrawDocument* pSrcDoc, ::sd::View* pWorkView, bool bInitOnGetData ) : mpPageDocShell( NULL ) @@ -393,11 +393,11 @@ void SdTransferable::AddSupportedFormats() CreateData(); if( mpObjDesc ) - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); if( mpOLEDataHelper ) { - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); DataFlavorExVector aVector( mpOLEDataHelper->GetDataFlavorExVector() ); DataFlavorExVector::iterator aIter( aVector.begin() ), aEnd( aVector.end() ); @@ -408,45 +408,45 @@ void SdTransferable::AddSupportedFormats() else if( mpGraphic ) { // #i25616# - AddFormat( SOT_FORMATSTR_ID_DRAWING ); + AddFormat( SotClipboardFormatId::DRAWING ); - AddFormat( SOT_FORMATSTR_ID_SVXB ); + AddFormat( SotClipboardFormatId::SVXB ); if( mpGraphic->GetType() == GRAPHIC_BITMAP ) { - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); - AddFormat( SOT_FORMAT_GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); } else { - AddFormat( SOT_FORMAT_GDIMETAFILE ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); } } else if( mpBookmark ) { - AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ); - AddFormat( FORMAT_STRING ); + AddFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ); + AddFormat( SotClipboardFormatId::STRING ); } else { - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); - AddFormat( SOT_FORMATSTR_ID_DRAWING ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::DRAWING ); if( !mpSdDrawDocument || !lcl_HasOnlyControls( mpSdDrawDocument ) ) { - AddFormat( SOT_FORMAT_GDIMETAFILE ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); } if( lcl_HasOnlyOneTable( mpSdDrawDocument ) ) - AddFormat( SOT_FORMAT_RTF ); + AddFormat( SotClipboardFormatId::RTF ); } if( mpImageMap ) - AddFormat( SOT_FORMATSTR_ID_SVIM ); + AddFormat( SotClipboardFormatId::SVIM ); } } @@ -455,12 +455,12 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo if (SD_MOD()==NULL) return false; - sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor ); + SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor ); bool bOK = false; CreateData(); - if( nFormat == SOT_FORMAT_RTF && lcl_HasOnlyOneTable( mpSdDrawDocument ) ) + if( nFormat == SotClipboardFormatId::RTF && lcl_HasOnlyOneTable( mpSdDrawDocument ) ) { bOK = SetTableRTF( mpSdDrawDocument, rFlavor ); } @@ -475,7 +475,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo } // TODO/LATER: support all the graphical formats, the embedded object scenario should not have separated handling - if( nFormat == FORMAT_GDIMETAFILE && mpGraphic ) + if( nFormat == SotClipboardFormatId::GDIMETAFILE && mpGraphic ) bOK = SetGDIMetaFile( mpGraphic->GetGDIMetaFile(), rFlavor ); else bOK = SetAny( mpOLEDataHelper->GetAny(rFlavor, rDestDoc), rFlavor ); @@ -485,11 +485,11 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo } else if( HasFormat( nFormat ) ) { - if( ( nFormat == SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR || nFormat == SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) && mpObjDesc ) + if( ( nFormat == SotClipboardFormatId::LINKSRCDESCRIPTOR || nFormat == SotClipboardFormatId::OBJECTDESCRIPTOR ) && mpObjDesc ) { bOK = SetTransferableObjectDescriptor( *mpObjDesc, rFlavor ); } - else if( nFormat == SOT_FORMATSTR_ID_DRAWING ) + else if( nFormat == SotClipboardFormatId::DRAWING ) { SfxObjectShellRef aOldRef( maDocShellRef ); @@ -516,25 +516,25 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo maDocShellRef = aOldRef; } - else if( nFormat == FORMAT_GDIMETAFILE ) + else if( nFormat == SotClipboardFormatId::GDIMETAFILE ) { if( mpSdViewIntern ) bOK = SetGDIMetaFile( mpSdViewIntern->GetMarkedObjMetaFile( true ), rFlavor ); } - else if( FORMAT_BITMAP == nFormat || SOT_FORMATSTR_ID_PNG == nFormat ) + else if( SotClipboardFormatId::BITMAP == nFormat || SotClipboardFormatId::PNG == nFormat ) { if( mpSdViewIntern ) bOK = SetBitmapEx( mpSdViewIntern->GetMarkedObjBitmapEx(true), rFlavor ); } - else if( ( nFormat == FORMAT_STRING ) && mpBookmark ) + else if( ( nFormat == SotClipboardFormatId::STRING ) && mpBookmark ) { bOK = SetString( mpBookmark->GetURL(), rFlavor ); } - else if( ( nFormat == SOT_FORMATSTR_ID_SVXB ) && mpGraphic ) + else if( ( nFormat == SotClipboardFormatId::SVXB ) && mpGraphic ) { bOK = SetGraphic( *mpGraphic, rFlavor ); } - else if( ( nFormat == SOT_FORMATSTR_ID_SVIM ) && mpImageMap ) + else if( ( nFormat == SotClipboardFormatId::SVIM ) && mpImageMap ) { bOK = SetImageMap( *mpImageMap, rFlavor ); } @@ -542,7 +542,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo { bOK = SetINetBookmark( *mpBookmark, rFlavor ); } - else if( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ) + else if( nFormat == SotClipboardFormatId::EMBED_SOURCE ) { sal_uLong nOldSwapMode = 0; @@ -573,7 +573,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo return bOK; } -bool SdTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pObject, sal_uInt32 nObjectType, const DataFlavor& ) +bool SdTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pObject, SotClipboardFormatId nObjectType, const DataFlavor& ) { bool bRet = false; diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index efe298eeb481..ab82b7c1d149 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -78,7 +78,7 @@ bool SdPageObjsTLB::IsInDrag() return bIsInDrag; } -sal_uInt32 SdPageObjsTLB::SdPageObjsTransferable::mnListBoxDropFormatId = SAL_MAX_UINT32; +SotClipboardFormatId SdPageObjsTLB::SdPageObjsTransferable::mnListBoxDropFormatId = static_cast<SotClipboardFormatId>(SAL_MAX_UINT32); // - SdPageObjsTLB::SdPageObjsTransferable - @@ -112,21 +112,21 @@ SdPageObjsTLB::SdPageObjsTransferable::~SdPageObjsTransferable() void SdPageObjsTLB::SdPageObjsTransferable::AddSupportedFormats() { - AddFormat(SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK); - AddFormat(SOT_FORMATSTR_ID_TREELISTBOX); + AddFormat(SotClipboardFormatId::NETSCAPE_BOOKMARK); + AddFormat(SotClipboardFormatId::TREELISTBOX); AddFormat(GetListBoxDropFormatId()); } bool SdPageObjsTLB::SdPageObjsTransferable::GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& /*rDestDoc*/ ) { - sal_uLong nFormatId = SotExchange::GetFormat( rFlavor ); + SotClipboardFormatId nFormatId = SotExchange::GetFormat( rFlavor ); switch (nFormatId) { - case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK: + case SotClipboardFormatId::NETSCAPE_BOOKMARK: SetINetBookmark( maBookmark, rFlavor ); return true; - case SOT_FORMATSTR_ID_TREELISTBOX: + case SotClipboardFormatId::TREELISTBOX: SetAny(maTreeListBoxData, rFlavor); return true; @@ -183,9 +183,9 @@ SdPageObjsTLB::SdPageObjsTransferable* SdPageObjsTLB::SdPageObjsTransferable::ge return 0; } -sal_uInt32 SdPageObjsTLB::SdPageObjsTransferable::GetListBoxDropFormatId (void) +SotClipboardFormatId SdPageObjsTLB::SdPageObjsTransferable::GetListBoxDropFormatId() { - if (mnListBoxDropFormatId == SAL_MAX_UINT32) + if (mnListBoxDropFormatId == static_cast<SotClipboardFormatId>(SAL_MAX_UINT32)) mnListBoxDropFormatId = SotExchange::RegisterFormatMimeType(OUString( "application/x-openoffice-treelistbox-moveonly;windows_formatname=\"SV_LBOX_DD_FORMAT_MOVE\"")); return mnListBoxDropFormatId; @@ -1281,7 +1281,7 @@ sal_Int8 SdPageObjsTLB::AcceptDrop (const AcceptDropEvent& rEvent) { sal_Int8 nResult (DND_ACTION_NONE); - if ( !bIsInDrag && IsDropFormatSupported( FORMAT_FILE ) ) + if ( !bIsInDrag && IsDropFormatSupported( SotClipboardFormatId::FILE ) ) { nResult = rEvent.mnAction; } @@ -1342,7 +1342,7 @@ sal_Int8 SdPageObjsTLB::ExecuteDrop( const ExecuteDropEvent& rEvt ) TransferableDataHelper aDataHelper( rEvt.maDropEvent.Transferable ); OUString aFile; - if( aDataHelper.GetString( FORMAT_FILE, aFile ) && + if( aDataHelper.GetString( SotClipboardFormatId::FILE, aFile ) && static_cast<SdNavigatorWin*>(mpParent)->InsertFile( aFile ) ) { nRet = rEvt.mnAction; diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index af598c28204d..4ad0774d3ffd 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -1071,7 +1071,7 @@ bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium ) } void DrawDocShell::FillClass(SvGlobalName* pClassName, - sal_uInt32* pFormat, + SotClipboardFormatId* pFormat, OUString* , OUString* pFullTypeName, OUString* pShortTypeName, @@ -1083,13 +1083,13 @@ void DrawDocShell::FillClass(SvGlobalName* pClassName, if ( meDocType == DOCUMENT_TYPE_DRAW ) { *pClassName = SvGlobalName(SO3_SDRAW_CLASSID_60); - *pFormat = SOT_FORMATSTR_ID_STARDRAW_60; + *pFormat = SotClipboardFormatId::STARDRAW_60; *pFullTypeName = OUString(SdResId(STR_GRAPHIC_DOCUMENT_FULLTYPE_60)); } else { *pClassName = SvGlobalName(SO3_SIMPRESS_CLASSID_60); - *pFormat = SOT_FORMATSTR_ID_STARIMPRESS_60; + *pFormat = SotClipboardFormatId::STARIMPRESS_60; *pFullTypeName = OUString(SdResId(STR_IMPRESS_DOCUMENT_FULLTYPE_60)); } } @@ -1098,13 +1098,13 @@ void DrawDocShell::FillClass(SvGlobalName* pClassName, if ( meDocType == DOCUMENT_TYPE_DRAW ) { *pClassName = SvGlobalName(SO3_SDRAW_CLASSID_60); - *pFormat = bTemplate ? SOT_FORMATSTR_ID_STARDRAW_8_TEMPLATE : SOT_FORMATSTR_ID_STARDRAW_8; + *pFormat = bTemplate ? SotClipboardFormatId::STARDRAW_8_TEMPLATE : SotClipboardFormatId::STARDRAW_8; *pFullTypeName = "Draw 8"; // HACK: method will be removed with new storage API } else { *pClassName = SvGlobalName(SO3_SIMPRESS_CLASSID_60); - *pFormat = bTemplate ? SOT_FORMATSTR_ID_STARIMPRESS_8_TEMPLATE : SOT_FORMATSTR_ID_STARIMPRESS_8; + *pFormat = bTemplate ? SotClipboardFormatId::STARIMPRESS_8_TEMPLATE : SotClipboardFormatId::STARIMPRESS_8; *pFullTypeName = "Impress 8"; // HACK: method will be removed with new storage API } } diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index 53e992ae0ce5..ffa9c4977965 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -199,7 +199,7 @@ rtl::Reference<FuPoor> FuInsertClipboard::Create( ViewShell* pViewSh, ::sd::Wind void FuInsertClipboard::DoExecute( SfxRequest& ) { TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( mpWindow ) ); - sal_uLong nFormatId; + SotClipboardFormatId nFormatId; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); boost::scoped_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( mpViewShell->GetActiveWindow() )); @@ -207,21 +207,21 @@ void FuInsertClipboard::DoExecute( SfxRequest& ) { ::com::sun::star::datatransfer::DataFlavor aFlavor; - pDlg->Insert( SOT_FORMATSTR_ID_EMBED_SOURCE, OUString() ); - pDlg->Insert( SOT_FORMATSTR_ID_LINK_SOURCE, OUString() ); - pDlg->Insert( SOT_FORMATSTR_ID_DRAWING, OUString() ); - pDlg->Insert( SOT_FORMATSTR_ID_SVXB, OUString() ); - pDlg->Insert( FORMAT_GDIMETAFILE, OUString() ); - pDlg->Insert( FORMAT_BITMAP, OUString() ); - pDlg->Insert( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, OUString() ); - pDlg->Insert( FORMAT_STRING, OUString() ); - pDlg->Insert( SOT_FORMATSTR_ID_HTML, OUString() ); - pDlg->Insert( FORMAT_RTF, OUString() ); - pDlg->Insert( SOT_FORMATSTR_ID_EDITENGINE, OUString() ); + pDlg->Insert( SotClipboardFormatId::EMBED_SOURCE, OUString() ); + pDlg->Insert( SotClipboardFormatId::LINK_SOURCE, OUString() ); + pDlg->Insert( SotClipboardFormatId::DRAWING, OUString() ); + pDlg->Insert( SotClipboardFormatId::SVXB, OUString() ); + pDlg->Insert( SotClipboardFormatId::GDIMETAFILE, OUString() ); + pDlg->Insert( SotClipboardFormatId::BITMAP, OUString() ); + pDlg->Insert( SotClipboardFormatId::NETSCAPE_BOOKMARK, OUString() ); + pDlg->Insert( SotClipboardFormatId::STRING, OUString() ); + pDlg->Insert( SotClipboardFormatId::HTML, OUString() ); + pDlg->Insert( SotClipboardFormatId::RTF, OUString() ); + pDlg->Insert( SotClipboardFormatId::EDITENGINE, OUString() ); //TODO/MBA: testing nFormatId = pDlg->GetFormat( aDataHelper ); - if( nFormatId && aDataHelper.GetTransferable().is() ) + if( nFormatId != SotClipboardFormatId::NONE && aDataHelper.GetTransferable().is() ) { sal_Int8 nAction = DND_ACTION_COPY; @@ -233,12 +233,12 @@ void FuInsertClipboard::DoExecute( SfxRequest& ) DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>(mpViewShell); INetBookmark aINetBookmark( aEmptyStr, aEmptyStr ); - if( ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, aINetBookmark ) ) || - ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, aINetBookmark ) ) || - ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, aINetBookmark ) ) ) + if( ( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) ) || + ( aDataHelper.HasFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::FILEGRPDESCRIPTOR, aINetBookmark ) ) || + ( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::UNIFORMRESOURCELOCATOR, aINetBookmark ) ) ) { pDrViewSh->InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), aEmptyStr, NULL ); } diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx index e3684654e3ea..e5635392b42c 100644 --- a/sd/source/ui/func/fuinsfil.cxx +++ b/sd/source/ui/func/fuinsfil.cxx @@ -162,51 +162,51 @@ void FuInsertFile::DoExecute( SfxRequest& rReq ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); // Get other draw/impress filters - pFilter = aMatch.GetFilter4ClipBoardId( SOT_FORMATSTR_ID_STARIMPRESS_60, SFX_FILTER_IMPORT, SFX_FILTER_TEMPLATEPATH ); + pFilter = aMatch.GetFilter4ClipBoardId( SotClipboardFormatId::STARIMPRESS_60, SFX_FILTER_IMPORT, SFX_FILTER_TEMPLATEPATH ); if( pFilter ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); - pFilter = aMatch.GetFilter4ClipBoardId( SOT_FORMATSTR_ID_STARIMPRESS_60, SFX_FILTER_TEMPLATEPATH ); + pFilter = aMatch.GetFilter4ClipBoardId( SotClipboardFormatId::STARIMPRESS_60, SFX_FILTER_TEMPLATEPATH ); if( pFilter ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); - pFilter = aMatch.GetFilter4ClipBoardId( SOT_FORMATSTR_ID_STARDRAW_60, SFX_FILTER_IMPORT, SFX_FILTER_TEMPLATEPATH ); + pFilter = aMatch.GetFilter4ClipBoardId( SotClipboardFormatId::STARDRAW_60, SFX_FILTER_IMPORT, SFX_FILTER_TEMPLATEPATH ); if( pFilter ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); - pFilter = aMatch.GetFilter4ClipBoardId( SOT_FORMATSTR_ID_STARDRAW_60, SFX_FILTER_TEMPLATEPATH ); + pFilter = aMatch.GetFilter4ClipBoardId( SotClipboardFormatId::STARDRAW_60, SFX_FILTER_TEMPLATEPATH ); if( pFilter ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); - pFilter = aMatch.GetFilter4ClipBoardId( SOT_FORMATSTR_ID_STARIMPRESS_50, SFX_FILTER_IMPORT, SFX_FILTER_TEMPLATEPATH ); + pFilter = aMatch.GetFilter4ClipBoardId( SotClipboardFormatId::STARIMPRESS_50, SFX_FILTER_IMPORT, SFX_FILTER_TEMPLATEPATH ); if( pFilter ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); - pFilter = aMatch.GetFilter4ClipBoardId( SOT_FORMATSTR_ID_STARIMPRESS_50, SFX_FILTER_TEMPLATEPATH ); + pFilter = aMatch.GetFilter4ClipBoardId( SotClipboardFormatId::STARIMPRESS_50, SFX_FILTER_TEMPLATEPATH ); if( pFilter ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); - pFilter = aMatch.GetFilter4ClipBoardId( SOT_FORMATSTR_ID_STARDRAW_50, SFX_FILTER_IMPORT, SFX_FILTER_TEMPLATEPATH ); + pFilter = aMatch.GetFilter4ClipBoardId( SotClipboardFormatId::STARDRAW_50, SFX_FILTER_IMPORT, SFX_FILTER_TEMPLATEPATH ); if( pFilter ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); - pFilter = aMatch.GetFilter4ClipBoardId( SOT_FORMATSTR_ID_STARDRAW_50, SFX_FILTER_TEMPLATEPATH ); + pFilter = aMatch.GetFilter4ClipBoardId( SotClipboardFormatId::STARDRAW_50, SFX_FILTER_TEMPLATEPATH ); if( pFilter ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); - pFilter = aMatch.GetFilter4ClipBoardId( SOT_FORMATSTR_ID_STARDRAW_40, SFX_FILTER_IMPORT, SFX_FILTER_TEMPLATEPATH ); + pFilter = aMatch.GetFilter4ClipBoardId( SotClipboardFormatId::STARDRAW_40, SFX_FILTER_IMPORT, SFX_FILTER_TEMPLATEPATH ); if( pFilter ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); - pFilter = aMatch.GetFilter4ClipBoardId( SOT_FORMATSTR_ID_STARDRAW_40, SFX_FILTER_TEMPLATEPATH ); + pFilter = aMatch.GetFilter4ClipBoardId( SotClipboardFormatId::STARDRAW_40, SFX_FILTER_TEMPLATEPATH ); if( pFilter ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); - pFilter = aMatch.GetFilter4ClipBoardId( SOT_FORMATSTR_ID_STARDRAW, SFX_FILTER_IMPORT, SFX_FILTER_TEMPLATEPATH ); + pFilter = aMatch.GetFilter4ClipBoardId( SotClipboardFormatId::STARDRAW, SFX_FILTER_IMPORT, SFX_FILTER_TEMPLATEPATH ); if( pFilter ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); - pFilter = aMatch.GetFilter4ClipBoardId( SOT_FORMATSTR_ID_STARDRAW, SFX_FILTER_TEMPLATEPATH ); + pFilter = aMatch.GetFilter4ClipBoardId( SotClipboardFormatId::STARDRAW, SFX_FILTER_TEMPLATEPATH ); if( pFilter ) xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() ); diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx index c35371644ac5..79c13a17a444 100644 --- a/sd/source/ui/func/fuoltext.cxx +++ b/sd/source/ui/func/fuoltext.cxx @@ -279,7 +279,7 @@ void FuOutlineText::DoPasteUnformatted() if (aDataHelper.GetTransferable().is()) { OUString aText; - if (aDataHelper.GetString(FORMAT_STRING, aText)) + if (aDataHelper.GetString(SotClipboardFormatId::STRING, aText)) pOutlineView->GetViewByWindow(mpWindow)->InsertText(aText); } } diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index 05072796b402..a76b7031e841 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -946,7 +946,7 @@ void FuPoor::DoPasteUnformatted() { mpView->InsertData( aDataHelper, mpWindow->PixelToLogic( Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ), - nAction, false, FORMAT_STRING); + nAction, false, SotClipboardFormatId::STRING); } } } diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index f72acbc845e6..43aec19d3f07 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -100,7 +100,7 @@ public: virtual void OnDocumentPrinterChanged(Printer* pNewPrinter) SAL_OVERRIDE; virtual SfxStyleSheetBasePool* GetStyleSheetPool() SAL_OVERRIDE; virtual Size GetFirstPageSize() SAL_OVERRIDE; - virtual void FillClass(SvGlobalName* pClassName, sal_uInt32* pFormat, OUString* pAppName, OUString* pFullTypeName, OUString* pShortTypeName, sal_Int32 nFileFormat, bool bTemplate = false ) const SAL_OVERRIDE; + virtual void FillClass(SvGlobalName* pClassName, SotClipboardFormatId* pFormat, OUString* pAppName, OUString* pFullTypeName, OUString* pShortTypeName, sal_Int32 nFileFormat, bool bTemplate = false ) const SAL_OVERRIDE; virtual void SetModified( bool = true ) SAL_OVERRIDE; virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog( ::vcl::Window *pParent, const SfxItemSet &rSet ) SAL_OVERRIDE; diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx index ddb14399183c..9e60436b5e77 100644 --- a/sd/source/ui/inc/View.hxx +++ b/sd/source/ui/inc/View.hxx @@ -147,7 +147,8 @@ public: bool InsertData( const TransferableDataHelper& rDataHelper, const Point& rPos, sal_Int8& rDnDAction, bool bDrag, - sal_uLong nFormat = 0, sal_uInt16 nPage = SDRPAGE_NOTFOUND, sal_uInt16 nLayer = SDRLAYER_NOTFOUND ); + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE, + sal_uInt16 nPage = SDRPAGE_NOTFOUND, sal_uInt16 nLayer = SDRLAYER_NOTFOUND ); /** gets the metafile from the given transferable helper and insert it as a graphic shape. @param bOptimize if set to true, the metafile is analyzed and if only one bitmap action is present, then is inserted as a single graphic. diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index 35ff0763d4e8..1d2a5bbdbe73 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -84,13 +84,13 @@ public: internally in the navigator for reordering entries. Its lifetime ends with the office application. */ - static sal_uInt32 GetListBoxDropFormatId (void); + static SotClipboardFormatId GetListBoxDropFormatId (void); private: /** Temporary drop flavor id that is used internally in the navigator. */ - static sal_uInt32 mnListBoxDropFormatId; + static SotClipboardFormatId mnListBoxDropFormatId; SdPageObjsTLB& mrParent; INetBookmark maBookmark; diff --git a/sd/source/ui/inc/sdxfer.hxx b/sd/source/ui/inc/sdxfer.hxx index 797d5205429f..917395f88356 100644 --- a/sd/source/ui/inc/sdxfer.hxx +++ b/sd/source/ui/inc/sdxfer.hxx @@ -106,7 +106,7 @@ protected: virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; - virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; + virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; virtual void ObjectReleased() SAL_OVERRIDE; virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index bd7f2faacf01..21c95f0dd29f 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -494,7 +494,7 @@ void Clipboard::CreateSlideTransferable ( // Get bookmark from transferable. TransferableDataHelper aDataHelper (pTransferable); INetBookmark aINetBookmark; - if ( ! aDataHelper.GetINetBookmark(SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, aINetBookmark)) + if ( ! aDataHelper.GetINetBookmark(SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark)) break; const OUString sURL (aINetBookmark.GetURL()); const sal_Int32 nIndex (sURL.indexOf((sal_Unicode)'#')); diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index afd241bc1464..a4bf08bb6afa 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -491,12 +491,12 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) { INetBookmark aINetBookmark( aEmptyStr, aEmptyStr ); - if( ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, aINetBookmark ) ) || - ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, aINetBookmark ) ) || - ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, aINetBookmark ) ) ) + if( ( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) ) || + ( aDataHelper.HasFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::FILEGRPDESCRIPTOR, aINetBookmark ) ) || + ( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::UNIFORMRESOURCELOCATOR, aINetBookmark ) ) ) { InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), aEmptyStr, NULL ); } diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 37e8a31d668d..055dcd865ddb 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -104,7 +104,7 @@ using namespace ::com::sun::star::linguistic2; sal_uInt32 nFormatCount (rDataHelper.GetFormatCount()); for (sal_uInt32 i=0; i<nFormatCount; i++) { - const SotFormatStringId nTestFormat = rDataHelper.GetFormat(i); + const SotClipboardFormatId nTestFormat = rDataHelper.GetFormat(i); // Check if the current format is the same as one that has already // been handled. @@ -124,13 +124,13 @@ using namespace ::com::sun::star::linguistic2; { switch (nTestFormat) { - case SOT_FORMATSTR_ID_EMBED_SOURCE: + case SotClipboardFormatId::EMBED_SOURCE: { OUString sName; TransferableObjectDescriptor aDescriptor; if (rDataHelper.GetTransferableObjectDescriptor( - SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aDescriptor)) + SotClipboardFormatId::OBJECTDESCRIPTOR, aDescriptor)) { sName = aDescriptor.maTypeName; } @@ -142,24 +142,25 @@ using namespace ::com::sun::star::linguistic2; break; } - case SOT_FORMATSTR_ID_LINK_SOURCE: - case SOT_FORMATSTR_ID_DRAWING: - case SOT_FORMATSTR_ID_SVXB: - case FORMAT_GDIMETAFILE: - case FORMAT_BITMAP: - case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK: - case FORMAT_STRING: - case SOT_FORMATSTR_ID_HTML: - case FORMAT_RTF: - case SOT_FORMATSTR_ID_EDITENGINE: + case SotClipboardFormatId::LINK_SOURCE: + case SotClipboardFormatId::DRAWING: + case SotClipboardFormatId::SVXB: + case SotClipboardFormatId::GDIMETAFILE: + case SotClipboardFormatId::BITMAP: + case SotClipboardFormatId::NETSCAPE_BOOKMARK: + case SotClipboardFormatId::STRING: + case SotClipboardFormatId::HTML: + case SotClipboardFormatId::RTF: + case SotClipboardFormatId::EDITENGINE: pResult->AddClipbrdFormat(nTestFormat); break; + default: break; } } } // Check some OLE formats whose names are handled differently. - SotFormatStringId nFormat (SOT_FORMATSTR_ID_EMBED_SOURCE_OLE); + SotClipboardFormatId nFormat (SotClipboardFormatId::EMBED_SOURCE_OLE); bool bHasFormat (rDataHelper.HasFormat(nFormat)); if ( ! bHasFormat) { diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 95367394f289..bded56ca05b9 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -884,7 +884,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) { mpDrawView->InsertData( aDataHelper, GetActiveWindow()->PixelToLogic( Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), - nAction, false, FORMAT_STRING); + nAction, false, SotClipboardFormatId::STRING); } } @@ -897,15 +897,15 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) WaitObject aWait( (Window*)GetActiveWindow() ); TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( GetActiveWindow() ) ); const SfxItemSet* pReqArgs = rReq.GetArgs(); - sal_uInt32 nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; if( pReqArgs ) { SFX_REQUEST_ARG( rReq, pIsActive, SfxUInt32Item, SID_CLIPBOARD_FORMAT_ITEMS, false ); - nFormat = pIsActive->GetValue(); + nFormat = static_cast<SotClipboardFormatId>(pIsActive->GetValue()); } - if( nFormat && aDataHelper.GetTransferable().is() ) + if( nFormat != SotClipboardFormatId::NONE && aDataHelper.GetTransferable().is() ) { sal_Int8 nAction = DND_ACTION_COPY; @@ -915,12 +915,12 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) { INetBookmark aINetBookmark( aEmptyStr, aEmptyStr ); - if( ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, aINetBookmark ) ) || - ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, aINetBookmark ) ) || - ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, aINetBookmark ) ) ) + if( ( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) ) || + ( aDataHelper.HasFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::FILEGRPDESCRIPTOR, aINetBookmark ) ) || + ( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::UNIFORMRESOURCELOCATOR, aINetBookmark ) ) ) { InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), aEmptyStr, NULL ); } diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 98217ebf9182..2aed1877775f 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -514,7 +514,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq) { pOlView->InsertData( aDataHelper, GetActiveWindow()->PixelToLogic( Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ), - nAction, false, FORMAT_STRING); + nAction, false, SotClipboardFormatId::STRING); } } @@ -716,9 +716,9 @@ IMPL_LINK( OutlineViewShell, ClipboardChanged, TransferableDataHelper*, pDataHel if ( pDataHelper ) { bPastePossible = ( pDataHelper->GetFormatCount() != 0 && - ( pDataHelper->HasFormat( FORMAT_STRING ) || - pDataHelper->HasFormat( FORMAT_RTF ) || - pDataHelper->HasFormat( SOT_FORMATSTR_ID_HTML ) ) ); + ( pDataHelper->HasFormat( SotClipboardFormatId::STRING ) || + pDataHelper->HasFormat( SotClipboardFormatId::RTF ) || + pDataHelper->HasFormat( SotClipboardFormatId::HTML ) ) ); SfxBindings& rBindings = GetViewFrame()->GetBindings(); rBindings.Invalidate( SID_PASTE ); @@ -901,9 +901,9 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet ) // get initial state TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( GetActiveWindow() ) ); bPastePossible = ( aDataHelper.GetFormatCount() != 0 && - ( aDataHelper.HasFormat( FORMAT_STRING ) || - aDataHelper.HasFormat( FORMAT_RTF ) || - aDataHelper.HasFormat( SOT_FORMATSTR_ID_HTML ) ) ); + ( aDataHelper.HasFormat( SotClipboardFormatId::STRING ) || + aDataHelper.HasFormat( SotClipboardFormatId::RTF ) || + aDataHelper.HasFormat( SotClipboardFormatId::HTML ) ) ); } if( !bPastePossible ) diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index bfd682dde46b..1fc129943eb9 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -340,12 +340,12 @@ void View::DoPaste (vcl::Window* pWindow) { INetBookmark aINetBookmark( aEmptyStr, aEmptyStr ); - if( ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, aINetBookmark ) ) || - ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, aINetBookmark ) ) || - ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, aINetBookmark ) ) ) + if( ( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) ) || + ( aDataHelper.HasFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::FILEGRPDESCRIPTOR, aINetBookmark ) ) || + ( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::UNIFORMRESOURCELOCATOR, aINetBookmark ) ) ) { pDrViewSh->InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), aEmptyStr, NULL ); } @@ -512,12 +512,12 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge } else { - const bool bDrawing = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_DRAWING ); - const bool bGraphic = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_SVXB ); - const bool bMtf = rTargetHelper.IsDropFormatSupported( FORMAT_GDIMETAFILE ); - const bool bBitmap = rTargetHelper.IsDropFormatSupported( FORMAT_BITMAP ); - bool bBookmark = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ); - bool bXFillExchange = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_XFA ); + const bool bDrawing = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::DRAWING ); + const bool bGraphic = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::SVXB ); + const bool bMtf = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::GDIMETAFILE ); + const bool bBitmap = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::BITMAP ); + bool bBookmark = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::NETSCAPE_BOOKMARK ); + bool bXFillExchange = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::XFA ); // check handle insert if( !nRet && ( (bXFillExchange && ( SDRDRAG_GRADIENT == GetDragMode() )) || ( SDRDRAG_TRANSPARENCE == GetDragMode() ) ) ) @@ -584,12 +584,12 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge // check normal insert if( !nRet ) { - const bool bSBAFormat = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_SVX_FORMFIELDEXCH ); - const bool bEditEngine = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_EDITENGINE ); - const bool bString = rTargetHelper.IsDropFormatSupported( FORMAT_STRING ); - const bool bRTF = rTargetHelper.IsDropFormatSupported( FORMAT_RTF ); - const bool bFile = rTargetHelper.IsDropFormatSupported( FORMAT_FILE ); - const bool bFileList = rTargetHelper.IsDropFormatSupported( FORMAT_FILE_LIST ); + const bool bSBAFormat = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::SVX_FORMFIELDEXCH ); + const bool bEditEngine = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::EDITENGINE ); + const bool bString = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::STRING ); + const bool bRTF = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::RTF ); + const bool bFile = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::FILE ); + const bool bFileList = rTargetHelper.IsDropFormatSupported( SotClipboardFormatId::FILE_LIST ); if( mpDropMarker ) { @@ -674,7 +674,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar aPos = pTargetWindow->PixelToLogic( rEvt.maPosPixel ); // handle insert? - if( (!nRet && ( SDRDRAG_GRADIENT == GetDragMode() )) || (( SDRDRAG_TRANSPARENCE == GetDragMode() ) && aDataHelper.HasFormat( SOT_FORMATSTR_ID_XFA )) ) + if( (!nRet && ( SDRDRAG_GRADIENT == GetDragMode() )) || (( SDRDRAG_TRANSPARENCE == GetDragMode() ) && aDataHelper.HasFormat( SotClipboardFormatId::XFA )) ) { const SdrHdlList& rHdlList = GetHdlList(); @@ -688,7 +688,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar { SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_XFA, xStm ) && xStm.Is() ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::XFA, xStm ) && xStm.Is() ) { XFillExchangeData aFillData( XFillAttrSetItem( &mrDoc.GetPool() ) ); @@ -703,7 +703,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar } // standard insert? - if( !nRet && InsertData( aDataHelper, aPos, nDropAction, true, 0, nPage, nLayer ) ) + if( !nRet && InsertData( aDataHelper, aPos, nDropAction, true, SotClipboardFormatId::NONE, nPage, nLayer ) ) nRet = nDropAction; // special insert? @@ -713,8 +713,8 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar INetBookmark aINetBookmark( aTmpString1, aTmpString2 ); // insert bookmark - if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) && - aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, aINetBookmark ) ) + if( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) && + aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) ) { SdPageObjsTLB::SdPageObjsTransferable* pPageObjsTransferable = SdPageObjsTLB::SdPageObjsTransferable::getImplementation( aDataHelper.GetXTransferable() ); @@ -816,7 +816,7 @@ IMPL_LINK( View, ExecuteNavigatorDrop, SdNavigatorDropEvent*, pSdNavigatorDropEv SdPageObjsTLB::SdPageObjsTransferable* pPageObjsTransferable = SdPageObjsTLB::SdPageObjsTransferable::getImplementation( aDataHelper.GetXTransferable() ); INetBookmark aINetBookmark; - if( pPageObjsTransferable && aDataHelper.GetINetBookmark( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, aINetBookmark ) ) + if( pPageObjsTransferable && aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) ) { Point aPos; OUString aBookmark; diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 77ae2631a11d..4aa492a116ef 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -89,7 +89,7 @@ using namespace ::com::sun::star::datatransfer::clipboard; namespace sd { -#define CHECK_FORMAT_TRANS( _def_Type ) ( ( nFormat == (_def_Type) || !nFormat ) && aDataHelper.HasFormat( _def_Type ) ) +#define CHECK_FORMAT_TRANS( _def_Type ) ( ( nFormat == (_def_Type) || nFormat == SotClipboardFormatId::NONE ) && aDataHelper.HasFormat( _def_Type ) ) /************************************************************************* |* @@ -149,7 +149,7 @@ bool View::InsertMetaFile( TransferableDataHelper& rDataHelper, const Point& rPo { GDIMetaFile aMtf; - if( !rDataHelper.GetGDIMetaFile( FORMAT_GDIMETAFILE, aMtf ) ) + if( !rDataHelper.GetGDIMetaFile( SotClipboardFormatId::GDIMETAFILE, aMtf ) ) return false; bool bVector = false; @@ -256,7 +256,7 @@ bool View::InsertMetaFile( TransferableDataHelper& rDataHelper, const Point& rPo bool View::InsertData( const TransferableDataHelper& rDataHelper, const Point& rPos, sal_Int8& rDnDAction, bool bDrag, - sal_uLong nFormat, sal_uInt16 nPage, sal_uInt16 nLayer ) + SotClipboardFormatId nFormat, sal_uInt16 nPage, sal_uInt16 nLayer ) { maDropPos = rPos; mnAction = rDnDAction; @@ -310,11 +310,11 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } // ImageMap? - if( !pOwnData && aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVIM ) ) + if( !pOwnData && aDataHelper.HasFormat( SotClipboardFormatId::SVIM ) ) { SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_SVIM, xStm ) ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVIM, xStm ) ) { pImageMap.reset(new ImageMap); // mba: clipboard always must contain absolute URLs (could be from alien source) @@ -324,14 +324,14 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, bool bTable = false; // check special cases for pasting table formats as RTL - if( !bLink && (!nFormat || (nFormat == SOT_FORMAT_RTF)) ) + if( !bLink && (nFormat == SotClipboardFormatId::NONE || (nFormat == SotClipboardFormatId::RTF)) ) { // if the objekt supports rtf and there is a table involved, default is to create a table - if( aDataHelper.HasFormat( SOT_FORMAT_RTF ) && ! aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) ) + if( aDataHelper.HasFormat( SotClipboardFormatId::RTF ) && ! aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) ) { SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( FORMAT_RTF, xStm ) ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::RTF, xStm ) ) { xStm->Seek( 0 ); @@ -342,7 +342,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if (x != -1) { bTable = true; - nFormat = FORMAT_RTF; + nFormat = SotClipboardFormatId::RTF; break; } } @@ -353,8 +353,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, // Changed the whole decision tree to be dependent of bReturn as a flag that // the work was done; this allows to check multiple formats and not just fail // when a CHECK_FORMAT_TRANS(*format*) detected format does not work. This is - // e.g. necessary for FORMAT_BITMAP - if( pOwnData && !nFormat ) + // e.g. necessary for SotClipboardFormatId::BITMAP + if( pOwnData && nFormat == SotClipboardFormatId::NONE ) { const View* pSourceView = pOwnData->GetView(); @@ -657,11 +657,11 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } } - if(!bReturn && CHECK_FORMAT_TRANS( SOT_FORMATSTR_ID_DRAWING )) + if(!bReturn && CHECK_FORMAT_TRANS( SotClipboardFormatId::DRAWING )) { SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_DRAWING, xStm ) ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStm ) ) { DrawDocShellRef xShell = new DrawDocShell(SFX_CREATE_MODE_INTERNAL); xShell->DoInitNew(0); @@ -811,11 +811,11 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } } - if(!bReturn && CHECK_FORMAT_TRANS(SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE)) + if(!bReturn && CHECK_FORMAT_TRANS(SotClipboardFormatId::SBA_FIELDDATAEXCHANGE)) { OUString aOUString; - if( aDataHelper.GetString( SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE, aOUString ) ) + if( aDataHelper.GetString( SotClipboardFormatId::SBA_FIELDDATAEXCHANGE, aOUString ) ) { SdrObject* pObj = CreateFieldControl( aOUString ); @@ -837,19 +837,19 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if(!bReturn && !bLink && - (CHECK_FORMAT_TRANS(SOT_FORMATSTR_ID_EMBED_SOURCE) || CHECK_FORMAT_TRANS(SOT_FORMATSTR_ID_EMBEDDED_OBJ)) && - aDataHelper.HasFormat(SOT_FORMATSTR_ID_OBJECTDESCRIPTOR)) + (CHECK_FORMAT_TRANS(SotClipboardFormatId::EMBED_SOURCE) || CHECK_FORMAT_TRANS(SotClipboardFormatId::EMBEDDED_OBJ)) && + aDataHelper.HasFormat(SotClipboardFormatId::OBJECTDESCRIPTOR)) { //TODO/LATER: is it possible that this format is binary?! (from old versions of SO) uno::Reference < io::XInputStream > xStm; TransferableObjectDescriptor aObjDesc; - if (aDataHelper.GetTransferableObjectDescriptor(SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc)) + if (aDataHelper.GetTransferableObjectDescriptor(SotClipboardFormatId::OBJECTDESCRIPTOR, aObjDesc)) { OUString aDocShellID = SfxObjectShell::CreateShellID(mrDoc.GetDocSh()); - xStm = aDataHelper.GetInputStream(nFormat ? nFormat : SOT_FORMATSTR_ID_EMBED_SOURCE, aDocShellID); + xStm = aDataHelper.GetInputStream(nFormat != SotClipboardFormatId::NONE ? nFormat : SotClipboardFormatId::EMBED_SOURCE, aDocShellID); if (!xStm.is()) - xStm = aDataHelper.GetInputStream(SOT_FORMATSTR_ID_EMBEDDED_OBJ, aDocShellID); + xStm = aDataHelper.GetInputStream(SotClipboardFormatId::EMBEDDED_OBJ, aDocShellID); } if (xStm.is()) @@ -912,10 +912,10 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, // try to get the replacement image from the clipboard Graphic aGraphic; - sal_uLong nGrFormat = 0; + SotClipboardFormatId nGrFormat = SotClipboardFormatId::NONE; // insert replacement image ( if there is one ) into the object helper - if ( nGrFormat ) + if ( nGrFormat != SotClipboardFormatId::NONE ) { datatransfer::DataFlavor aDataFlavor; SotExchange::GetFormatDataFlavor( nGrFormat, aDataFlavor ); @@ -1020,23 +1020,23 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if(!bReturn && !bLink && - (CHECK_FORMAT_TRANS(SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE) || CHECK_FORMAT_TRANS(SOT_FORMATSTR_ID_EMBED_SOURCE_OLE)) && - aDataHelper.HasFormat(SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE)) + (CHECK_FORMAT_TRANS(SotClipboardFormatId::EMBEDDED_OBJ_OLE) || CHECK_FORMAT_TRANS(SotClipboardFormatId::EMBED_SOURCE_OLE)) && + aDataHelper.HasFormat(SotClipboardFormatId::OBJECTDESCRIPTOR_OLE)) { // online insert ole if format is forced or no gdi metafile is available - if( (nFormat != 0) || !aDataHelper.HasFormat( FORMAT_GDIMETAFILE ) ) + if( (nFormat != SotClipboardFormatId::NONE) || !aDataHelper.HasFormat( SotClipboardFormatId::GDIMETAFILE ) ) { uno::Reference < io::XInputStream > xStm; TransferableObjectDescriptor aObjDesc; - if ( aDataHelper.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE, aObjDesc ) ) + if ( aDataHelper.GetTransferableObjectDescriptor( SotClipboardFormatId::OBJECTDESCRIPTOR_OLE, aObjDesc ) ) { uno::Reference < embed::XEmbeddedObject > xObj; OUString aName; - xStm = aDataHelper.GetInputStream(nFormat ? nFormat : SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, OUString()); + xStm = aDataHelper.GetInputStream(nFormat != SotClipboardFormatId::NONE ? nFormat : SotClipboardFormatId::EMBED_SOURCE_OLE, OUString()); if (!xStm.is()) - xStm = aDataHelper.GetInputStream(SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, OUString()); + xStm = aDataHelper.GetInputStream(SotClipboardFormatId::EMBEDDED_OBJ_OLE, OUString()); if (xStm.is()) { @@ -1071,20 +1071,20 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, // try to get the replacement image from the clipboard Graphic aGraphic; - sal_uLong nGrFormat = 0; + SotClipboardFormatId nGrFormat = SotClipboardFormatId::NONE; // (wg. Selection Manager bei Trustet Solaris) #ifndef SOLARIS - if( aDataHelper.GetGraphic( SOT_FORMATSTR_ID_SVXB, aGraphic ) ) - nGrFormat = SOT_FORMATSTR_ID_SVXB; - else if( aDataHelper.GetGraphic( FORMAT_GDIMETAFILE, aGraphic ) ) - nGrFormat = SOT_FORMAT_GDIMETAFILE; - else if( aDataHelper.GetGraphic( FORMAT_BITMAP, aGraphic ) ) - nGrFormat = SOT_FORMAT_BITMAP; + if( aDataHelper.GetGraphic( SotClipboardFormatId::SVXB, aGraphic ) ) + nGrFormat = SotClipboardFormatId::SVXB; + else if( aDataHelper.GetGraphic( SotClipboardFormatId::GDIMETAFILE, aGraphic ) ) + nGrFormat = SotClipboardFormatId::GDIMETAFILE; + else if( aDataHelper.GetGraphic( SotClipboardFormatId::BITMAP, aGraphic ) ) + nGrFormat = SotClipboardFormatId::BITMAP; #endif // insert replacement image ( if there is one ) into the object helper - if ( nGrFormat ) + if ( nGrFormat != SotClipboardFormatId::NONE ) { datatransfer::DataFlavor aDataFlavor; SotExchange::GetFormatDataFlavor( nGrFormat, aDataFlavor ); @@ -1170,7 +1170,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } } - if( !bReturn && aDataHelper.HasFormat( FORMAT_GDIMETAFILE ) ) + if( !bReturn && aDataHelper.HasFormat( SotClipboardFormatId::GDIMETAFILE ) ) { // if no object was inserted, insert a picture InsertMetaFile( aDataHelper, rPos, pImageMap.get(), true ); @@ -1178,11 +1178,11 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } } - if(!bReturn && (!bLink || pPickObj) && CHECK_FORMAT_TRANS(SOT_FORMATSTR_ID_SVXB)) + if(!bReturn && (!bLink || pPickObj) && CHECK_FORMAT_TRANS(SotClipboardFormatId::SVXB)) { SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_SVXB, xStm ) ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::SVXB, xStm ) ) { Point aInsertPos( rPos ); Graphic aGraphic; @@ -1216,7 +1216,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } } - if(!bReturn && (!bLink || pPickObj) && CHECK_FORMAT_TRANS(FORMAT_GDIMETAFILE)) + if(!bReturn && (!bLink || pPickObj) && CHECK_FORMAT_TRANS(SotClipboardFormatId::GDIMETAFILE)) { Point aInsertPos( rPos ); @@ -1237,30 +1237,30 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, aInsertPos.Y() = pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 ); } - bReturn = InsertMetaFile( aDataHelper, aInsertPos, pImageMap.get(), nFormat == 0 ); + bReturn = InsertMetaFile( aDataHelper, aInsertPos, pImageMap.get(), nFormat == SotClipboardFormatId::NONE ); } - if(!bReturn && (!bLink || pPickObj) && CHECK_FORMAT_TRANS(FORMAT_BITMAP)) + if(!bReturn && (!bLink || pPickObj) && CHECK_FORMAT_TRANS(SotClipboardFormatId::BITMAP)) { BitmapEx aBmpEx; // get basic Bitmap data - aDataHelper.GetBitmapEx(FORMAT_BITMAP, aBmpEx); + aDataHelper.GetBitmapEx(SotClipboardFormatId::BITMAP, aBmpEx); if(aBmpEx.IsEmpty()) { // if this did not work, try to get graphic formats and convert these to bitmap Graphic aGraphic; - if(aDataHelper.GetGraphic(FORMAT_GDIMETAFILE, aGraphic)) + if(aDataHelper.GetGraphic(SotClipboardFormatId::GDIMETAFILE, aGraphic)) { aBmpEx = aGraphic.GetBitmapEx(); } - else if(aDataHelper.GetGraphic(SOT_FORMATSTR_ID_SVXB, aGraphic)) + else if(aDataHelper.GetGraphic(SotClipboardFormatId::SVXB, aGraphic)) { aBmpEx = aGraphic.GetBitmapEx(); } - else if(aDataHelper.GetGraphic(FORMAT_BITMAP, aGraphic)) + else if(aDataHelper.GetGraphic(SotClipboardFormatId::BITMAP, aGraphic)) { aBmpEx = aGraphic.GetBitmapEx(); } @@ -1295,11 +1295,11 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } } - if(!bReturn && pPickObj && CHECK_FORMAT_TRANS( SOT_FORMATSTR_ID_XFA ) ) + if(!bReturn && pPickObj && CHECK_FORMAT_TRANS( SotClipboardFormatId::XFA ) ) { SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_XFA, xStm ) ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::XFA, xStm ) ) { XFillExchangeData aFillData( XFillAttrSetItem( &mrDoc.GetPool() ) ); @@ -1360,11 +1360,11 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } } - if(!bReturn && !bLink && CHECK_FORMAT_TRANS(SOT_FORMATSTR_ID_HTML)) + if(!bReturn && !bLink && CHECK_FORMAT_TRANS(SotClipboardFormatId::HTML)) { SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_HTML, xStm ) ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::HTML, xStm ) ) { xStm->Seek( 0 ); // mba: clipboard always must contain absolute URLs (could be from alien source) @@ -1372,11 +1372,11 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } } - if(!bReturn && !bLink && CHECK_FORMAT_TRANS(SOT_FORMATSTR_ID_EDITENGINE)) + if(!bReturn && !bLink && CHECK_FORMAT_TRANS(SotClipboardFormatId::EDITENGINE)) { SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_EDITENGINE, xStm ) ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::EDITENGINE, xStm ) ) { OutlinerView* pOLV = GetTextEditOutlinerView(); @@ -1401,11 +1401,11 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } } - if(!bReturn && !bLink && CHECK_FORMAT_TRANS(FORMAT_RTF)) + if(!bReturn && !bLink && CHECK_FORMAT_TRANS(SotClipboardFormatId::RTF)) { SotStorageStreamRef xStm; - if( aDataHelper.GetSotStorageStream( FORMAT_RTF, xStm ) ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::RTF, xStm ) ) { xStm->Seek( 0 ); @@ -1437,11 +1437,11 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, } } - if(!bReturn && CHECK_FORMAT_TRANS(FORMAT_FILE_LIST)) + if(!bReturn && CHECK_FORMAT_TRANS(SotClipboardFormatId::FILE_LIST)) { FileList aDropFileList; - if( aDataHelper.GetFileList( FORMAT_FILE_LIST, aDropFileList ) ) + if( aDataHelper.GetFileList( SotClipboardFormatId::FILE_LIST, aDropFileList ) ) { maDropFileVector.clear(); @@ -1454,11 +1454,11 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, bReturn = true; } - if(!bReturn && CHECK_FORMAT_TRANS(FORMAT_FILE)) + if(!bReturn && CHECK_FORMAT_TRANS(SotClipboardFormatId::FILE)) { OUString aDropFile; - if( aDataHelper.GetString( FORMAT_FILE, aDropFile ) ) + if( aDataHelper.GetString( SotClipboardFormatId::FILE, aDropFile ) ) { maDropFileVector.clear(); maDropFileVector.push_back( aDropFile ); @@ -1468,16 +1468,16 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, bReturn = true; } - if(!bReturn && !bLink && CHECK_FORMAT_TRANS(FORMAT_STRING)) + if(!bReturn && !bLink && CHECK_FORMAT_TRANS(SotClipboardFormatId::STRING)) { - if( ( FORMAT_STRING == nFormat ) || - ( !aDataHelper.HasFormat( SOT_FORMATSTR_ID_SOLK ) && - !aDataHelper.HasFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) && - !aDataHelper.HasFormat( SOT_FORMATSTR_ID_FILENAME ) ) ) + if( ( SotClipboardFormatId::STRING == nFormat ) || + ( !aDataHelper.HasFormat( SotClipboardFormatId::SOLK ) && + !aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) && + !aDataHelper.HasFormat( SotClipboardFormatId::FILENAME ) ) ) { OUString aOUString; - if( aDataHelper.GetString( FORMAT_STRING, aOUString ) ) + if( aDataHelper.GetString( SotClipboardFormatId::STRING, aOUString ) ) { OutlinerView* pOLV = GetTextEditOutlinerView(); diff --git a/sd/source/ui/view/tabcontr.cxx b/sd/source/ui/view/tabcontr.cxx index 950cc7da480e..194d065e6eb3 100644 --- a/sd/source/ui/view/tabcontr.cxx +++ b/sd/source/ui/view/tabcontr.cxx @@ -50,7 +50,7 @@ TabControl::TabControlTransferable::~TabControlTransferable() void TabControl::TabControlTransferable::AddSupportedFormats() { - AddFormat( SOT_FORMATSTR_ID_STARDRAW_TABBAR ); + AddFormat( SotClipboardFormatId::STARDRAW_TABBAR ); } bool TabControl::TabControlTransferable::GetData( const css::datatransfer::DataFlavor& /*rFlavor*/, const OUString& /*rDestDoc*/ ) diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx index d2bf891e2c59..67b2f508573a 100644 --- a/sfx2/source/appl/appdde.cxx +++ b/sfx2/source/appl/appdde.cxx @@ -437,7 +437,7 @@ bool SfxApplication::InitializeDde() pAppData_Impl->pDocTopics = new SfxDdeDocTopics_Impl; // we certainly want to support RTF! - pAppData_Impl->pDdeService->AddFormat( FORMAT_RTF ); + pAppData_Impl->pDdeService->AddFormat( SotClipboardFormatId::RTF ); // Config path as a topic becauseof multiple starts INetURLObject aOfficeLockFile( SvtPathOptions().GetUserConfigPath() ); diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index db30c8354584..a1c1d989722a 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -76,11 +76,11 @@ bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData, const OUString & rMimeType, bool bGetSynchron ) { - sal_uIntPtr nFmt = SotExchange::RegisterFormatMimeType( rMimeType ); + SotClipboardFormatId nFmt = SotExchange::RegisterFormatMimeType( rMimeType ); switch( nType ) { case FILETYPE_TEXT: - if( FORMAT_FILE == nFmt ) + if( SotClipboardFormatId::FILE == nFmt ) { // The media in the application must be opened to lookup the // relative file links!! This is done through the link manager @@ -94,8 +94,8 @@ bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData, { SfxMediumRef xTmpMed; - if( FORMAT_GDIMETAFILE == nFmt || FORMAT_BITMAP == nFmt || - SOT_FORMATSTR_ID_SVXB == nFmt ) + if( SotClipboardFormatId::GDIMETAFILE == nFmt || SotClipboardFormatId::BITMAP == nFmt || + SotClipboardFormatId::SVXB == nFmt ) { Graphic aGrf; @@ -138,15 +138,15 @@ bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData, aGrf.SetDefaultType(); } - if( SOT_FORMATSTR_ID_SVXB != nFmt ) + if( SotClipboardFormatId::SVXB != nFmt ) nFmt = (bLoadError || GRAPHIC_BITMAP == aGrf.GetType()) - ? FORMAT_BITMAP - : FORMAT_GDIMETAFILE; + ? SotClipboardFormatId::BITMAP + : SotClipboardFormatId::GDIMETAFILE; SvMemoryStream aMemStm( 0, 65535 ); switch ( nFmt ) { - case SOT_FORMATSTR_ID_SVXB: + case SotClipboardFormatId::SVXB: if( GRAPHIC_NONE != aGrf.GetType() ) { aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 ); @@ -154,7 +154,7 @@ bool SvFileObject::GetData( ::com::sun::star::uno::Any & rData, } break; - case FORMAT_BITMAP: + case SotClipboardFormatId::BITMAP: { const Bitmap aBitmap(aGrf.GetBitmap()); diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 6f1cb5196bfb..1d9617636c48 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -265,31 +265,32 @@ void SvDDEObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const bool SvDDEObject::ImplHasOtherFormat( DdeTransaction& rReq ) { - sal_uInt16 nFmt = 0; + SotClipboardFormatId nFmt = SotClipboardFormatId::NONE; switch( rReq.GetFormat() ) { - case FORMAT_RTF: - nFmt = FORMAT_STRING; + case SotClipboardFormatId::RTF: + nFmt = SotClipboardFormatId::STRING; break; - case SOT_FORMATSTR_ID_HTML_SIMPLE: - case SOT_FORMATSTR_ID_HTML: - nFmt = FORMAT_RTF; + case SotClipboardFormatId::HTML_SIMPLE: + case SotClipboardFormatId::HTML: + nFmt = SotClipboardFormatId::RTF; break; - case FORMAT_GDIMETAFILE: - nFmt = FORMAT_BITMAP; + case SotClipboardFormatId::GDIMETAFILE: + nFmt = SotClipboardFormatId::BITMAP; break; - case SOT_FORMATSTR_ID_SVXB: - nFmt = FORMAT_GDIMETAFILE; + case SotClipboardFormatId::SVXB: + nFmt = SotClipboardFormatId::GDIMETAFILE; break; // something else? + default: break; } - if( nFmt ) + if( nFmt != SotClipboardFormatId::NONE ) rReq.SetFormat( nFmt ); // try it once more - return 0 != nFmt; + return SotClipboardFormatId::NONE != nFmt; } bool SvDDEObject::IsPending() const @@ -313,19 +314,19 @@ bool SvDDEObject::IsDataComplete() const IMPL_LINK( SvDDEObject, ImplGetDDEData, DdeData*, pData ) { - sal_uIntPtr nFmt = pData->GetFormat(); + SotClipboardFormatId nFmt = pData->GetFormat(); switch( nFmt ) { - case FORMAT_GDIMETAFILE: + case SotClipboardFormatId::GDIMETAFILE: break; - case FORMAT_BITMAP: + case SotClipboardFormatId::BITMAP: break; default: { const sal_Char* p = (sal_Char*)( pData->operator const void*() ); - long nLen = FORMAT_STRING == nFmt ? (p ? strlen( p ) : 0) : (long)*pData; + long nLen = SotClipboardFormatId::STRING == nFmt ? (p ? strlen( p ) : 0) : (long)*pData; Sequence< sal_Int8 > aSeq( reinterpret_cast<const sal_Int8*>(p), nLen ); if( pGetData ) diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index 6b8a19d09176..9d910a92beff 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -501,11 +501,11 @@ void LinkManager::CancelTransfers() // gets the appropriate information as a string // For now this is required for file object in conjunction with JavaScript // - needs information about Load/Abort/Error -sal_uIntPtr LinkManager::RegisterStatusInfoId() +SotClipboardFormatId LinkManager::RegisterStatusInfoId() { - static sal_uIntPtr nFormat = 0; + static SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; - if( !nFormat ) + if( nFormat == SotClipboardFormatId::NONE ) { nFormat = SotExchange::RegisterFormatName( OUString("StatusInfo from SvxInternalLink")); @@ -529,13 +529,13 @@ bool LinkManager::GetGraphicFromAny( const OUString& rMimeType, switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) ) { - case SOT_FORMATSTR_ID_SVXB: + case SotClipboardFormatId::SVXB: { ReadGraphic( aMemStm, rGrf ); bRet = true; } break; - case FORMAT_GDIMETAFILE: + case SotClipboardFormatId::GDIMETAFILE: { GDIMetaFile aMtf; aMtf.Read( aMemStm ); @@ -543,7 +543,7 @@ bool LinkManager::GetGraphicFromAny( const OUString& rMimeType, bRet = true; } break; - case FORMAT_BITMAP: + case SotClipboardFormatId::BITMAP: { Bitmap aBmp; ReadDIB(aBmp, aMemStm, true); @@ -551,6 +551,7 @@ bool LinkManager::GetGraphicFromAny( const OUString& rMimeType, bRet = true; } break; + default: break; } } return bRet; diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 9e1e8603d941..d75252df67c2 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -67,10 +67,10 @@ struct ImplBaseLinkData struct tClientType { // applies for all links - sal_uIntPtr nCntntType; // Update Format + SotClipboardFormatId nCntntType; // Update Format // Not Ole-Links - bool bIntrnlLnk; // It is an internal link - sal_uInt16 nUpdateMode; // UpdateMode + bool bIntrnlLnk; // It is an internal link + sal_uInt16 nUpdateMode; // UpdateMode }; struct tDDEType @@ -84,7 +84,7 @@ struct ImplBaseLinkData }; ImplBaseLinkData() { - ClientType.nCntntType = 0; + ClientType.nCntntType = SotClipboardFormatId::NONE; ClientType.bIntrnlLnk = false; ClientType.nUpdateMode = 0; DDEType.pItem = NULL; @@ -108,7 +108,7 @@ public: #endif virtual ~ImplDdeItem(); - virtual DdeData* Get( sal_uIntPtr ) SAL_OVERRIDE; + virtual DdeData* Get( SotClipboardFormatId ) SAL_OVERRIDE; virtual bool Put( const DdeData* ) SAL_OVERRIDE; virtual void AdviseLoop( bool ) SAL_OVERRIDE; @@ -135,7 +135,7 @@ SvBaseLink::SvBaseLink() -SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, sal_uIntPtr nContentType ) +SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, SotClipboardFormatId nContentType ) : m_bIsReadOnly(false) { pImpl = new BaseLink_Impl(); @@ -419,16 +419,16 @@ void SvBaseLink::_GetRealObject( bool bConnect) Disconnect(); } -sal_uIntPtr SvBaseLink::GetContentType() const +SotClipboardFormatId SvBaseLink::GetContentType() const { if( OBJECT_CLIENT_SO & nObjType ) return pImplData->ClientType.nCntntType; - return 0; // all Formats ? + return SotClipboardFormatId::NONE; // all Formats ? } -bool SvBaseLink::SetContentType( sal_uIntPtr nType ) +bool SvBaseLink::SetContentType( SotClipboardFormatId nType ) { if( OBJECT_CLIENT_SO & nObjType ) { @@ -578,7 +578,7 @@ ImplDdeItem::~ImplDdeItem() aRef->Disconnect(); } -DdeData* ImplDdeItem::Get( sal_uIntPtr nFormat ) +DdeData* ImplDdeItem::Get( SotClipboardFormatId nFormat ) { if( pLink->GetObj() ) { diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index c2d5014bdebb..c8143170cced 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -775,9 +775,9 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Extension( const OUString& rExt, Sf return GetFilterForProps( aSeq, nMust, nDont ); } -const SfxFilter* SfxFilterMatcher::GetFilter4ClipBoardId( sal_uInt32 nId, SfxFilterFlags nMust, SfxFilterFlags nDont ) const +const SfxFilter* SfxFilterMatcher::GetFilter4ClipBoardId( SotClipboardFormatId nId, SfxFilterFlags nMust, SfxFilterFlags nDont ) const { - if (nId == 0) + if (nId == SotClipboardFormatId::NONE) return 0; com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aSeq(1); @@ -970,7 +970,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl( // collect information to add filter to container // (attention: some information aren't available on filter directly ... you must search for corresponding type too!) sal_Int32 nFlags = 0 ; - sal_Int32 nClipboardId = 0 ; + SotClipboardFormatId nClipboardId = SotClipboardFormatId::NONE; sal_Int32 nDocumentIconId = 0 ; sal_Int32 nFormatVersion = 0 ; OUString sMimeType ; @@ -1086,7 +1086,7 @@ void SfxFilterContainer::ReadSingleFilter_Impl( // For external filters ignore clipboard IDs if((nFlags & SFX_FILTER_STARONEFILTER) == SFX_FILTER_STARONEFILTER) { - nClipboardId = 0; + nClipboardId = SotClipboardFormatId::NONE; } } // register SfxFilter diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index bc17030b7907..70f8c977880d 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -146,7 +146,7 @@ sal_Int8 DropListBox_Impl::AcceptDrop( const AcceptDropEvent& rEvt ) */ { - if ( IsDropFormatSupported( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) ) + if ( IsDropFormatSupported( SotClipboardFormatId::OBJECTDESCRIPTOR ) ) { // special case: page styles are allowed to create new styles by example // but not allowed to be created by drag and drop @@ -173,7 +173,7 @@ sal_Int8 DropListBox_Impl::ExecuteDrop( const ExecuteDropEvent& rEvt ) for ( sal_uInt32 i = 0; i < nFormatCount; ++i ) { - SotFormatStringId nId = aHelper.GetFormat(i); + SotClipboardFormatId nId = aHelper.GetFormat(i); TransferableObjectDescriptor aDesc; if ( aHelper.GetTransferableObjectDescriptor( nId, aDesc ) ) @@ -2617,7 +2617,7 @@ sal_Int8 DropToolBox_Impl::AcceptDrop( const AcceptDropEvent& rEvt ) // special case: page styles are allowed to create new styles by example // but not allowed to be created by drag and drop if ( nItemId != SfxTemplate::SfxFamilyIdToNId( SFX_STYLE_FAMILY_PAGE )&& - IsDropFormatSupported( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) && + IsDropFormatSupported( SotClipboardFormatId::OBJECTDESCRIPTOR ) && !rParent.bNewByExampleDisabled ) { nReturn = DND_ACTION_COPY; diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx index 08ac76eaaa92..2599f3528919 100644 --- a/sfx2/source/doc/docfilt.cxx +++ b/sfx2/source/doc/docfilt.cxx @@ -41,7 +41,7 @@ SfxFilter::SfxFilter( const OUString& rProvider, const OUString &rFilterName ) : maProvider(rProvider), nFormatType(0), nVersion(0), - lFormat(0), + lFormat(SotClipboardFormatId::NONE), nDocIcon(0) { } @@ -49,7 +49,7 @@ SfxFilter::SfxFilter( const OUString& rProvider, const OUString &rFilterName ) : SfxFilter::SfxFilter( const OUString &rName, const OUString &rWildCard, SfxFilterFlags nType, - sal_uInt32 lFmt, + SotClipboardFormatId lFmt, const OUString &rTypNm, sal_uInt16 nIcon, const OUString &rMimeType, @@ -165,8 +165,8 @@ OUString SfxFilter::GetTypeFromStorage( const SotStorage& rStg ) } else { - sal_Int32 nClipId = ((SotStorage&)rStg).GetFormat(); - if ( nClipId ) + SotClipboardFormatId nClipId = ((SotStorage&)rStg).GetFormat(); + if ( nClipId != SotClipboardFormatId::NONE ) { const SfxFilter* pFilter = SfxFilterMatcher().GetFilter4ClipBoardId( nClipId ); if ( pFilter ) @@ -198,8 +198,8 @@ OUString SfxFilter::GetTypeFromStorage( { ::com::sun::star::datatransfer::DataFlavor aDataFlavor; aDataFlavor.MimeType = aMediaType; - sal_uInt32 nClipId = SotExchange::GetFormat( aDataFlavor ); - if ( nClipId ) + SotClipboardFormatId nClipId = SotExchange::GetFormat( aDataFlavor ); + if ( nClipId != SotClipboardFormatId::NONE ) { SfxFilterFlags nMust = SFX_FILTER_IMPORT, nDont = SFX_FILTER_NOTINSTALLED; if ( bTemplate ) diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx index fe7432823882..c21bdc735466 100644 --- a/sfx2/source/doc/objembed.cxx +++ b/sfx2/source/doc/objembed.cxx @@ -156,7 +156,7 @@ void SfxObjectShell::SetMapUnit( MapUnit nMapUnit ) void SfxObjectShell::FillTransferableObjectDescriptor( TransferableObjectDescriptor& rDesc ) const { - sal_uInt32 nClipFormat; + SotClipboardFormatId nClipFormat; OUString aAppName, aShortName; FillClass( &rDesc.maClassName, &nClipFormat, &aAppName, &rDesc.maTypeName, &aShortName, SOFFICE_FILEFORMAT_CURRENT ); diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 59cb2e81ad45..2129913c5137 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -310,25 +310,25 @@ namespace { * Chart2 does not have an Object shell, so handle this here for now * If we ever implement a full scale object shell in chart2 move it there */ -sal_uInt32 GetChartVersion( sal_Int32 nVersion, bool bTemplate ) +SotClipboardFormatId GetChartVersion( sal_Int32 nVersion, bool bTemplate ) { if( nVersion == SOFFICE_FILEFORMAT_60) { - return SOT_FORMATSTR_ID_STARCHART_60; + return SotClipboardFormatId::STARCHART_60; } else if( nVersion == SOFFICE_FILEFORMAT_8) { if (bTemplate) { SAL_WARN("sfx", "no chart template support yet"); - return SOT_FORMATSTR_ID_STARCHART_8; + return SotClipboardFormatId::STARCHART_8; } else - return SOT_FORMATSTR_ID_STARCHART_8; + return SotClipboardFormatId::STARCHART_8; } SAL_WARN("sfx", "unsupported version"); - return 0; + return SotClipboardFormatId::NONE; } } @@ -343,14 +343,14 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto { SvGlobalName aName; OUString aFullTypeName, aShortTypeName, aAppName; - sal_uInt32 nClipFormat=0; + SotClipboardFormatId nClipFormat = SotClipboardFormatId::NONE; if(!bChart) FillClass( &aName, &nClipFormat, &aAppName, &aFullTypeName, &aShortTypeName, nVersion, bTemplate ); else nClipFormat = GetChartVersion(nVersion, bTemplate); - if ( nClipFormat ) + if ( nClipFormat != SotClipboardFormatId::NONE ) { // basic doesn't have a ClipFormat // without MediaType the storage is not really usable, but currently the BasicIDE still @@ -1346,7 +1346,7 @@ bool SfxObjectShell::SaveTo_Impl // If the filter is a "cross export" filter ( f.e. a filter for exporting an impress document from // a draw document ), the ClassId of the destination storage is different from the ClassId of this // document. It can be retrieved from the default filter for the desired target format - long nFormat = rMedium.GetFilter()->GetFormat(); + SotClipboardFormatId nFormat = rMedium.GetFilter()->GetFormat(); SfxFilterMatcher& rMatcher = SfxGetpApp()->GetFilterMatcher(); const SfxFilter *pFilt = rMatcher.GetFilter4ClipBoardId( nFormat ); if ( pFilt ) @@ -3330,26 +3330,26 @@ bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::XSto { ::com::sun::star::datatransfer::DataFlavor aDataFlavor; aDataFlavor.MimeType = aMediaType; - sal_uInt32 nFormat = SotExchange::GetFormat( aDataFlavor ); + SotClipboardFormatId nFormat = SotExchange::GetFormat( aDataFlavor ); switch ( nFormat ) { - case SOT_FORMATSTR_ID_STARWRITER_60 : - case SOT_FORMATSTR_ID_STARWRITERWEB_60 : - case SOT_FORMATSTR_ID_STARWRITERGLOB_60 : - case SOT_FORMATSTR_ID_STARDRAW_60 : - case SOT_FORMATSTR_ID_STARIMPRESS_60 : - case SOT_FORMATSTR_ID_STARCALC_60 : - case SOT_FORMATSTR_ID_STARCHART_60 : - case SOT_FORMATSTR_ID_STARMATH_60 : - case SOT_FORMATSTR_ID_STARWRITER_8: - case SOT_FORMATSTR_ID_STARWRITERWEB_8: - case SOT_FORMATSTR_ID_STARWRITERGLOB_8: - case SOT_FORMATSTR_ID_STARDRAW_8: - case SOT_FORMATSTR_ID_STARIMPRESS_8: - case SOT_FORMATSTR_ID_STARCALC_8: - case SOT_FORMATSTR_ID_STARCHART_8: - case SOT_FORMATSTR_ID_STARMATH_8: + case SotClipboardFormatId::STARWRITER_60 : + case SotClipboardFormatId::STARWRITERWEB_60 : + case SotClipboardFormatId::STARWRITERGLOB_60 : + case SotClipboardFormatId::STARDRAW_60 : + case SotClipboardFormatId::STARIMPRESS_60 : + case SotClipboardFormatId::STARCALC_60 : + case SotClipboardFormatId::STARCHART_60 : + case SotClipboardFormatId::STARMATH_60 : + case SotClipboardFormatId::STARWRITER_8: + case SotClipboardFormatId::STARWRITERWEB_8: + case SotClipboardFormatId::STARWRITERGLOB_8: + case SotClipboardFormatId::STARDRAW_8: + case SotClipboardFormatId::STARIMPRESS_8: + case SotClipboardFormatId::STARCALC_8: + case SotClipboardFormatId::STARCHART_8: + case SotClipboardFormatId::STARMATH_8: break; default: @@ -3468,26 +3468,26 @@ bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< embed { ::com::sun::star::datatransfer::DataFlavor aDataFlavor; aDataFlavor.MimeType = aMediaType; - sal_uInt32 nFormat = SotExchange::GetFormat( aDataFlavor ); + SotClipboardFormatId nFormat = SotExchange::GetFormat( aDataFlavor ); switch ( nFormat ) { - case SOT_FORMATSTR_ID_STARWRITER_60 : - case SOT_FORMATSTR_ID_STARWRITERWEB_60 : - case SOT_FORMATSTR_ID_STARWRITERGLOB_60 : - case SOT_FORMATSTR_ID_STARDRAW_60 : - case SOT_FORMATSTR_ID_STARIMPRESS_60 : - case SOT_FORMATSTR_ID_STARCALC_60 : - case SOT_FORMATSTR_ID_STARCHART_60 : - case SOT_FORMATSTR_ID_STARMATH_60 : - case SOT_FORMATSTR_ID_STARWRITER_8: - case SOT_FORMATSTR_ID_STARWRITERWEB_8: - case SOT_FORMATSTR_ID_STARWRITERGLOB_8: - case SOT_FORMATSTR_ID_STARDRAW_8: - case SOT_FORMATSTR_ID_STARIMPRESS_8: - case SOT_FORMATSTR_ID_STARCALC_8: - case SOT_FORMATSTR_ID_STARCHART_8: - case SOT_FORMATSTR_ID_STARMATH_8: + case SotClipboardFormatId::STARWRITER_60 : + case SotClipboardFormatId::STARWRITERWEB_60 : + case SotClipboardFormatId::STARWRITERGLOB_60 : + case SotClipboardFormatId::STARDRAW_60 : + case SotClipboardFormatId::STARIMPRESS_60 : + case SotClipboardFormatId::STARCALC_60 : + case SotClipboardFormatId::STARCHART_60 : + case SotClipboardFormatId::STARMATH_60 : + case SotClipboardFormatId::STARWRITER_8: + case SotClipboardFormatId::STARWRITERWEB_8: + case SotClipboardFormatId::STARWRITERGLOB_8: + case SotClipboardFormatId::STARDRAW_8: + case SotClipboardFormatId::STARIMPRESS_8: + case SotClipboardFormatId::STARCALC_8: + case SotClipboardFormatId::STARCHART_8: + case SotClipboardFormatId::STARMATH_8: break; default: diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 972c328500a3..2c3bd55979d5 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -1688,7 +1688,7 @@ static bool lcl_getServiceName ( const OUString &rFileURL, OUString &rName ) uno::Reference< embed::XStorage > xStorage = comphelper::OStorageHelper::GetStorageFromURL( rFileURL, embed::ElementModes::READ ); - sal_uIntPtr nFormat = SotStorage::GetFormatID( xStorage ); + SotClipboardFormatId nFormat = SotStorage::GetFormatID( xStorage ); const SfxFilter* pFilter = SfxGetpApp()->GetFilterMatcher().GetFilter4ClipBoardId( nFormat ); diff --git a/sot/qa/cppunit/test_sot.cxx b/sot/qa/cppunit/test_sot.cxx index c1ebb1bebc9c..d984e2e2f158 100644 --- a/sot/qa/cppunit/test_sot.cxx +++ b/sot/qa/cppunit/test_sot.cxx @@ -33,7 +33,7 @@ namespace virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; void test(); void testSize(); @@ -104,7 +104,7 @@ namespace bool SotTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aStream(rURL, StreamMode::READ); SotStorageRef xObjStor = new SotStorage(aStream); diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx index ff79cb642b4a..8a059c64166a 100644 --- a/sot/source/base/exchange.cxx +++ b/sot/source/base/exchange.cxx @@ -59,148 +59,148 @@ namespace static const DataFlavorRepresentation aInstance[] = { /* 0 SOT_FORMAT_SYSTEM_START*/ { "", "", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 1 SOT_FORMAT_STRING*/ { "text/plain;charset=utf-16", "Text", &cppu::UnoType<OUString>::get()}, - /* 2 SOT_FORMAT_BITMAP*/ { "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 3 SOT_FORMAT_GDIMETAFILE*/ { "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"", "GDIMetaFile", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 4 SOT_FORMAT_PRIVATE*/ { "application/x-openoffice-private;windows_formatname=\"Private\"", "Private", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 5 SOT_FORMAT_FILE*/ { "application/x-openoffice-file;windows_formatname=\"FileName\"", "FileName", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 6 SOT_FORMAT_FILE_LIST*/ { "application/x-openoffice-filelist;windows_formatname=\"FileList\"", "FileList", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 1 SotClipboardFormatId::STRING*/ { "text/plain;charset=utf-16", "Text", &cppu::UnoType<OUString>::get()}, + /* 2 SotClipboardFormatId::BITMAP*/ { "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 3 SotClipboardFormatId::GDIMETAFILE*/ { "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"", "GDIMetaFile", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 4 SotClipboardFormatId::PRIVATE*/ { "application/x-openoffice-private;windows_formatname=\"Private\"", "Private", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 5 SotClipboardFormatId::FILE*/ { "application/x-openoffice-file;windows_formatname=\"FileName\"", "FileName", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 6 SotClipboardFormatId::FILE_LIST*/ { "application/x-openoffice-filelist;windows_formatname=\"FileList\"", "FileList", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, /* 7 EMPTY*/ { "", "", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, /* 8 EMPTY*/ { "", "", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, /* 9 EMPTY*/ { "", "", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 10 SOT_FORMAT_RTF*/ { "text/richtext", "Rich Text Format", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 11 SOT_FORMATSTR_ID_DRAWING*/ { "application/x-openoffice-drawing;windows_formatname=\"Drawing Format\"", "Drawing Format", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 12 SOT_FORMATSTR_ID_SVXB*/ { "application/x-openoffice-svxb;windows_formatname=\"SVXB (StarView Bitmap/Animation)\"", "SVXB (StarView Bitmap/Animation)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 13 SOT_FORMATSTR_ID_SVIM*/ { "application/x-openoffice-svim;windows_formatname=\"SVIM (StarView ImageMap)\"", "SVIM (StarView ImageMap)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 14 SOT_FORMATSTR_ID_XFA*/ { "application/x-openoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr)\"", "XFA (XOutDev FillAttr)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 15 SOT_FORMATSTR_ID_EDITENGINE*/ { "application/x-openoffice-editengine;windows_formatname=\"EditEngineFormat\"", "EditEngineFormat", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 16 SOT_FORMATSTR_ID_INTERNALLINK_STATE*/ { "application/x-openoffice-internallink-state;windows_formatname=\"StatusInfo vom SvxInternalLink\"", "StatusInfo vom SvxInternalLink", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 17 SOT_FORMATSTR_ID_SOLK*/ { "application/x-openoffice-solk;windows_formatname=\"SOLK (StarOffice Link)\"", "SOLK (StarOffice Link)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 18 SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK*/ { "application/x-openoffice-netscape-bookmark;windows_formatname=\"Netscape Bookmark\"", "Netscape Bookmark", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 19 SOT_FORMATSTR_ID_TREELISTBOX*/ { "application/x-openoffice-treelistbox;windows_formatname=\"SV_LBOX_DD_FORMAT\"", "SV_LBOX_DD_FORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 20 SOT_FORMATSTR_ID_NATIVE*/ { "application/x-openoffice-native;windows_formatname=\"Native\"", "Native", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 21 SOT_FORMATSTR_ID_OWNERLINK*/ { "application/x-openoffice-ownerlink;windows_formatname=\"OwnerLink\"", "OwnerLink", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 22 SOT_FORMATSTR_ID_STARSERVER*/ { "application/x-openoffice-starserver;windows_formatname=\"StarServerFormat\"", "StarServerFormat", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 23 SOT_FORMATSTR_ID_STAROBJECT*/ { "application/x-openoffice-starobject;windows_formatname=\"StarObjectFormat\"", "StarObjectFormat", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 24 SOT_FORMATSTR_ID_APPLETOBJECT*/ { "application/x-openoffice-appletobject;windows_formatname=\"Applet Object\"", "Applet Object", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 25 SOT_FORMATSTR_ID_PLUGIN_OBJECT*/ { "application/x-openoffice-plugin-object;windows_formatname=\"PlugIn Object\"", "PlugIn Object", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 26 SOT_FORMATSTR_ID_STARWRITER_30*/ { "application/x-openoffice-starwriter-30;windows_formatname=\"StarWriter 3.0\"", "StarWriter 3.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 27 SOT_FORMATSTR_ID_STARWRITER_40*/ { "application/x-openoffice-starwriter-40;windows_formatname=\"StarWriter 4.0\"", "StarWriter 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 28 SOT_FORMATSTR_ID_STARWRITER_50*/ { "application/x-openoffice-starwriter-50;windows_formatname=\"StarWriter 5.0\"", "StarWriter 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 29 SOT_FORMATSTR_ID_STARWRITERWEB_40*/ { "application/x-openoffice-starwriterweb-40;windows_formatname=\"StarWriter/Web 4.0\"", "StarWriter/Web 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 30 SOT_FORMATSTR_ID_STARWRITERWEB_50*/ { "application/x-openoffice-starwriterweb-50;windows_formatname=\"StarWriter/Web 5.0\"", "StarWriter/Web 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 31 SOT_FORMATSTR_ID_STARWRITERGLOB_40*/ { "application/x-openoffice-starwriterglob-40;windows_formatname=\"StarWriter/Global 4.0\"", "StarWriter/Global 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 32 SOT_FORMATSTR_ID_STARWRITERGLOB_50*/ { "application/x-openoffice-starwriterglob-50;windows_formatname=\"StarWriter/Global 5.0\"", "StarWriter/Global 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 33 SOT_FORMATSTR_ID_STARDRAW*/ { "application/x-openoffice-stardraw;windows_formatname=\"StarDrawDocument\"", "StarDrawDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 34 SOT_FORMATSTR_ID_STARDRAW_40*/ { "application/x-openoffice-stardraw-40;windows_formatname=\"StarDrawDocument 4.0\"", "StarDrawDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 35 SOT_FORMATSTR_ID_STARIMPRESS_50*/ { "application/x-openoffice-starimpress-50;windows_formatname=\"StarImpress 5.0\"", "StarImpress 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 36 SOT_FORMATSTR_ID_STARDRAW_50*/ { "application/x-openoffice-stardraw-50;windows_formatname=\"StarDraw 5.0\"", "StarDraw 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 37 SOT_FORMATSTR_ID_STARCALC*/ { "application/x-openoffice-starcalc;windows_formatname=\"StarCalcDocument\"", "StarCalcDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 38 SOT_FORMATSTR_ID_STARCALC_40*/ { "application/x-openoffice-starcalc-40;windows_formatname=\"StarCalc 4.0\"", "StarCalc 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 39 SOT_FORMATSTR_ID_STARCALC_50*/ { "application/x-openoffice-starcalc-50;windows_formatname=\"StarCalc 5.0\"", "StarCalc 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 40 SOT_FORMATSTR_ID_STARCHART*/ { "application/x-openoffice-starchart;windows_formatname=\"StarChartDocument\"", "StarChartDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 41 SOT_FORMATSTR_ID_STARCHART_40*/ { "application/x-openoffice-starchart-40;windows_formatname=\"StarChartDocument 4.0\"", "StarChartDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 42 SOT_FORMATSTR_ID_STARCHART_50*/ { "application/x-openoffice-starchart-50;windows_formatname=\"StarChart 5.0\"", "StarChart 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 43 SOT_FORMATSTR_ID_STARIMAGE*/ { "application/x-openoffice-starimage;windows_formatname=\"StarImageDocument\"", "StarImageDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 44 SOT_FORMATSTR_ID_STARIMAGE_40*/ { "application/x-openoffice-starimage-40;windows_formatname=\"StarImageDocument 4.0\"", "StarImageDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 45 SOT_FORMATSTR_ID_STARIMAGE_50*/ { "application/x-openoffice-starimage-50;windows_formatname=\"StarImage 5.0\"", "StarImage 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 46 SOT_FORMATSTR_ID_STARMATH*/ { "application/x-openoffice-starmath;windows_formatname=\"StarMath\"", "StarMath", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 47 SOT_FORMATSTR_ID_STARMATH_40*/ { "application/x-openoffice-starmath-40;windows_formatname=\"StarMathDocument 4.0\"", "StarMathDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 48 SOT_FORMATSTR_ID_STARMATH_50*/ { "application/x-openoffice-starmath-50;windows_formatname=\"StarMath 5.0\"", "StarMath 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 49 SOT_FORMATSTR_ID_STAROBJECT_PAINTDOC*/ { "application/x-openoffice-starobject-paintdoc;windows_formatname=\"StarObjectPaintDocument\"", "StarObjectPaintDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 50 SOT_FORMATSTR_ID_FILLED_AREA*/ { "application/x-openoffice-filled-area;windows_formatname=\"FilledArea\"", "FilledArea", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 51 SOT_FORMATSTR_ID_HTML*/ { "text/html", "HTML (HyperText Markup Language)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 52 SOT_FORMATSTR_ID_HTML_SIMPLE*/ { "application/x-openoffice-html-simple;windows_formatname=\"HTML Format\"", "HTML Format", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 53 SOT_FORMATSTR_ID_CHAOS*/ { "application/x-openoffice-chaos;windows_formatname=\"FORMAT_CHAOS\"", "FORMAT_CHAOS", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 54 SOT_FORMATSTR_ID_CNT_MSGATTACHFILE*/ { "application/x-openoffice-cnt-msgattachfile;windows_formatname=\"CNT_MSGATTACHFILE_FORMAT\"", "CNT_MSGATTACHFILE_FORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 55 SOT_FORMATSTR_ID_BIFF_5*/ { "application/x-openoffice-biff5;windows_formatname=\"Biff5\"", "Biff5", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 56 SOT_FORMATSTR_ID_BIFF__5*/ { "application/x-openoffice-biff-5;windows_formatname=\"Biff 5\"", "Biff 5", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 57 SOT_FORMATSTR_ID_SYLK*/ { "application/x-openoffice-sylk;windows_formatname=\"Sylk\"", "Sylk", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 58 SOT_FORMATSTR_ID_SYLK_BIGCAPS*/ { "application/x-openoffice-sylk-bigcaps;windows_formatname=\"SYLK\"", "SYLK", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 59 SOT_FORMATSTR_ID_LINK*/ { "application/x-openoffice-link;windows_formatname=\"Link\"", "Link", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 60 SOT_FORMATSTR_ID_DIF*/ { "application/x-openoffice-dif;windows_formatname=\"DIF\"", "DIF", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 61 SOT_FORMATSTR_ID_STARDRAW_TABBAR*/ { "application/x-openoffice-stardraw-tabbar;windows_formatname=\"StarDraw TabBar\"", "StarDraw TabBar", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 62 SOT_FORMATSTR_ID_SONLK*/ { "application/x-openoffice-sonlk;windows_formatname=\"SONLK (StarOffice Navi Link)\"", "SONLK (StarOffice Navi Link)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 63 SOT_FORMATSTR_ID_MSWORD_DOC*/ { "application/msword", "MSWordDoc", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 64 SOT_FORMATSTR_ID_STAR_FRAMESET_DOC*/ { "application/x-openoffice-star-frameset-doc;windows_formatname=\"StarFrameSetDocument\"", "StarFrameSetDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 65 SOT_FORMATSTR_ID_OFFICE_DOC*/ { "application/x-openoffice-office-doc;windows_formatname=\"OfficeDocument\"", "OfficeDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 66 SOT_FORMATSTR_ID_NOTES_DOCINFO*/ { "application/x-openoffice-notes-docinfo;windows_formatname=\"NotesDocInfo\"", "NotesDocInfo", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 67 SOT_FORMATSTR_ID_NOTES_HNOTE*/ { "application/x-openoffice-notes-hnote;windows_formatname=\"NoteshNote\"", "NoteshNote", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 68 SOT_FORMATSTR_ID_NOTES_NATIVE*/ { "application/x-openoffice-notes-native;windows_formatname=\"Native\"", "Native", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 69 SOT_FORMATSTR_ID_SFX_DOC*/ { "application/x-openoffice-sfx-doc;windows_formatname=\"SfxDocument\"", "SfxDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 70 SOT_FORMATSTR_ID_EVDF*/ { "application/x-openoffice-evdf;windows_formatname=\"EVDF (Explorer View Dummy Format)\"", "EVDF (Explorer View Dummy Format)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 71 SOT_FORMATSTR_ID_ESDF*/ { "application/x-openoffice-esdf;windows_formatname=\"ESDF (Explorer Search Dummy Format)\"", "ESDF (Explorer Search Dummy Format)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 72 SOT_FORMATSTR_ID_IDF*/ { "application/x-openoffice-idf;windows_formatname=\"IDF (Iconview Dummy Format)\"", "IDF (Iconview Dummy Format)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 73 SOT_FORMATSTR_ID_EFTP*/ { "application/x-openoffice-eftp;windows_formatname=\"EFTP (Explorer Ftp File)\"", "EFTP (Explorer Ftp File)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 74 SOT_FORMATSTR_ID_EFD*/ { "application/x-openoffice-efd;windows_formatname=\"EFD (Explorer Ftp Dir)\"", "EFD (Explorer Ftp Dir)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 75 SOT_FORMATSTR_ID_SVX_FORMFIELDEXCH*/ { "application/x-openoffice-svx-formfieldexch;windows_formatname=\"SvxFormFieldExch\"", "SvxFormFieldExch", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 76 SOT_FORMATSTR_ID_EXTENDED_TABBAR*/ { "application/x-openoffice-extended-tabbar;windows_formatname=\"ExtendedTabBar\"", "ExtendedTabBar", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 77 SOT_FORMATSTR_ID_SBA_DATAEXCHANGE*/ { "application/x-openoffice-sba-dataexchange;windows_formatname=\"SBA-DATAFORMAT\"", "SBA-DATAFORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 78 SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE*/ { "application/x-openoffice-sba-fielddataexchange;windows_formatname=\"SBA-FIELDFORMAT\"", "SBA-FIELDFORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 79 SOT_FORMATSTR_ID_SBA_PRIVATE_URL*/ { "application/x-openoffice-sba-private-url;windows_formatname=\"SBA-PRIVATEURLFORMAT\"", "SBA-PRIVATEURLFORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 80 SOT_FORMATSTR_ID_SBA_TABED*/ { "application/x-openofficesba-tabed;windows_formatname=\"Tabed\"", "Tabed", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 81 SOT_FORMATSTR_ID_SBA_TABID*/ { "application/x-openoffice-sba-tabid;windows_formatname=\"Tabid\"", "Tabid", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 82 SOT_FORMATSTR_ID_SBA_JOIN*/ { "application/x-openoffice-sba-join;windows_formatname=\"SBA-JOINFORMAT\"", "SBA-JOINFORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 83 SOT_FORMATSTR_ID_OBJECTDESCRIPTOR*/ { "application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\"", "Star Object Descriptor (XML)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 84 SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR*/ { "application/x-openoffice-linksrcdescriptor-xml;windows_formatname=\"Star Link Source Descriptor (XML)\"", "Star Link Source Descriptor (XML)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 85 SOT_FORMATSTR_ID_EMBED_SOURCE*/ { "application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source (XML)\"", "Star Embed Source (XML)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 86 SOT_FORMATSTR_ID_LINK_SOURCE*/ { "application/x-openoffice-link-source-xml;windows_formatname=\"Star Link Source (XML)\"", "Star Link Source (XML)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 87 SOT_FORMATSTR_ID_EMBEDDED_OBJ*/ { "application/x-openoffice-embedded-obj-xml;windows_formatname=\"Star Embedded Object (XML)\"", "Star Embedded Object (XML)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 88 SOT_FORMATSTR_ID_FILECONTENT*/ { "application/x-openoffice-filecontent;windows_formatname=\"FileContents\"", "FileContents", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 89 SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR*/ { "application/x-openoffice-filegrpdescriptor;windows_formatname=\"FileGroupDescriptor\"", "FileGroupDescriptor", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 90 SOT_FORMATSTR_ID_FILENAME*/ { "application/x-openoffice-filename;windows_formatname=\"FileName\"", "FileName", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 91 SOT_FORMATSTR_ID_SD_OLE*/ { "application/x-openoffice-sd-ole;windows_formatname=\"SD-OLE\"", "SD-OLE", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 92 SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE*/ { "application/x-openoffice-embedded-obj-ole;windows_formatname=\"Embedded Object\"", "Embedded Object", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 93 SOT_FORMATSTR_ID_EMBED_SOURCE_OLE*/ { "application/x-openoffice-embed-source-ole;windows_formatname=\"Embed Source\"", "Embed Source", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 94 SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE*/ { "application/x-openoffice-objectdescriptor-ole;windows_formatname=\"Object Descriptor\"", "Object Descriptor", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 95 SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR_OLE*/ { "application/x-openoffice-linkdescriptor-ole;windows_formatname=\"Link Source Descriptor\"", "Link Source Descriptor", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 96 SOT_FORMATSTR_ID_LINK_SOURCE_OLE*/ { "application/x-openoffice-link-source-ole;windows_formatname=\"Link Source\"", "Link Source", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 97 SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE*/ { "application/x-openoffice-sba-ctrldataexchange;windows_formatname=\"SBA-CTRLFORMAT\"", "SBA-CTRLFORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 98 SOT_FORMATSTR_ID_OUTPLACE_OBJ*/ { "application/x-openoffice-outplace-obj;windows_formatname=\"OutPlace Object\"", "OutPlace Object", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 99 SOT_FORMATSTR_ID_CNT_OWN_CLIP*/ { "application/x-openoffice-cnt-own-clip;windows_formatname=\"CntOwnClipboard\"", "CntOwnClipboard", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*100 SOT_FORMATSTR_ID_INET_IMAGE*/ { "application/x-openoffice-inet-image;windows_formatname=\"SO-INet-Image\"", "SO-INet-Image", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*101 SOT_FORMATSTR_ID_NETSCAPE_IMAGE*/ { "application/x-openoffice-netscape-image;windows_formatname=\"Netscape Image Format\"", "Netscape Image Format", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*102 SOT_FORMATSTR_ID_SBA_FORMEXCHANGE*/ { "application/x-openoffice-sba-formexchange;windows_formatname=\"SBA_FORMEXCHANGE\"", "SBA_FORMEXCHANGE", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*103 SOT_FORMATSTR_ID_SBA_REPORTEXCHANGE*/ { "application/x-openoffice-sba-reportexchange;windows_formatname=\"SBA_REPORTEXCHANGE\"", "SBA_REPORTEXCHANGE", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*104 SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR*/ { "application/x-openoffice-uniformresourcelocator;windows_formatname=\"UniformResourceLocator\"", "UniformResourceLocator", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*105 SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50*/ { "application/x-openoffice-starchartdocument-50;windows_formatname=\"StarChartDocument 5.0\"", "StarChartDocument 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*106 SOT_FORMATSTR_ID_GRAPHOBJ*/ { "application/x-openoffice-graphobj;windows_formatname=\"Graphic Object\"", "Graphic Object", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*107 SOT_FORMATSTR_ID_STARWRITER_60*/ { MIMETYPE_VND_SUN_XML_WRITER_ASCII, "Writer 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*108 SOT_FORMATSTR_ID_STARWRITERWEB_60*/ { MIMETYPE_VND_SUN_XML_WRITER_WEB_ASCII, "Writer/Web 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*109 SOT_FORMATSTR_ID_STARWRITERGLOB_60*/ { MIMETYPE_VND_SUN_XML_WRITER_GLOBAL_ASCII, "Writer/Global 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*110 SOT_FORMATSTR_ID_STARWDRAW_60*/ { MIMETYPE_VND_SUN_XML_DRAW_ASCII, "Draw 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*111 SOT_FORMATSTR_ID_STARIMPRESS_60*/ { MIMETYPE_VND_SUN_XML_IMPRESS_ASCII, "Impress 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*112 SOT_FORMATSTR_ID_STARCALC_60*/ { MIMETYPE_VND_SUN_XML_CALC_ASCII, "Calc 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*113 SOT_FORMATSTR_ID_STARCHART_60*/ { MIMETYPE_VND_SUN_XML_CHART_ASCII, "Chart 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*114 SOT_FORMATSTR_ID_STARMATH_60*/ { MIMETYPE_VND_SUN_XML_MATH_ASCII, "Math 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*115 SOT_FORMATSTR_ID_WMF*/ { "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"", "Windows MetaFile", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*116 SOT_FORMATSTR_ID_DBACCESS_QUERY*/ { "application/x-openoffice-dbaccess-query;windows_formatname=\"Data source Query Object\"", "Data source Query Object", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*117 SOT_FORMATSTR_ID_DBACCESS_TABLE*/ { "application/x-openoffice-dbaccess-table;windows_formatname=\"Data source Table\"", "Data source Table", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*118 SOT_FORMATSTR_ID_DBACCESS_COMMAND*/ { "application/x-openoffice-dbaccess-command;windows_formatname=\"SQL query\"", "SQL query", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*119 SOT_FORMATSTR_ID_DIALOG_60*/ { "application/vnd.sun.xml.dialog", "Dialog 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*120 SOT_FORMATSTR_ID_EMF*/ { "application/x-openoffice-emf;windows_formatname=\"Image EMF\"", "Windows Enhanced MetaFile", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*121 SOT_FORMATSTR_ID_BIFF_8*/ { "application/x-openoffice-biff-8;windows_formatname=\"Biff8\"", "Biff8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*122 SOT_FORMATSTR_ID_BMP*/ { "image/bmp", "Windows Bitmap", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*123 SOT_FORMATSTR_ID_HTML_NO_COMMENT */ { "application/x-openoffice-html-no-comment;windows_formatname=\"HTML Format\"", "HTML (no comment)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*124 SOT_FORMATSTR_ID_STARWRITER_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII, "Writer 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*125 SOT_FORMATSTR_ID_STARWRITERWEB_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII, "Writer/Web 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*126 SOT_FORMATSTR_ID_STARWRITERGLOB_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII, "Writer/Global 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*127 SOT_FORMATSTR_ID_STARWDRAW_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII, "Draw 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*128 SOT_FORMATSTR_ID_STARIMPRESS_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII, "Impress 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*129 SOT_FORMATSTR_ID_STARCALC_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII, "Calc 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*130 SOT_FORMATSTR_ID_STARCHART_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII, "Chart 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*131 SOT_FORMATSTR_ID_STARMATH_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII, "Math 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*132 SOT_FORMATSTR_ID_XFORMS */ { "application/x-openoffice-xforms;windows_formatname=\"??? Format\"", "???", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*133 SOT_FORMATSTR_ID_STARWRITER_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII, "Writer 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*134 SOT_FORMATSTR_ID_STARWDRAW_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII, "Draw 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*135 SOT_FORMATSTR_ID_STARIMPRESS_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII, "Impress 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*136 SOT_FORMATSTR_ID_STARCALC_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII, "Calc 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*137 SOT_FORMATSTR_ID_STARCHART_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE_ASCII, "Chart 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*138 SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE_ASCII, "Math 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*139 SOT_FORMATSTR_ID_STARBASE_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII, "StarBase 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*140 SOT_FORMAT_GDIMETAFILE*/ { "application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"", "High Contrast GDIMetaFile", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*141 SOT_FORMATSTR_ID_PNG*/ { "image/png", "PNG Bitmap", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /*142 SOT_FORMATSTR_ID_STARWRITERGLOB_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII, "Writer/Global 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 10 SotClipboardFormatId::RTF*/ { "text/richtext", "Rich Text Format", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 11 SotClipboardFormatId::DRAWING*/ { "application/x-openoffice-drawing;windows_formatname=\"Drawing Format\"", "Drawing Format", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 12 SotClipboardFormatId::SVXB*/ { "application/x-openoffice-svxb;windows_formatname=\"SVXB (StarView Bitmap/Animation)\"", "SVXB (StarView Bitmap/Animation)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 13 SotClipboardFormatId::SVIM*/ { "application/x-openoffice-svim;windows_formatname=\"SVIM (StarView ImageMap)\"", "SVIM (StarView ImageMap)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 14 SotClipboardFormatId::XFA*/ { "application/x-openoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr)\"", "XFA (XOutDev FillAttr)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 15 SotClipboardFormatId::EDITENGINE*/ { "application/x-openoffice-editengine;windows_formatname=\"EditEngineFormat\"", "EditEngineFormat", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 16 SotClipboardFormatId::INTERNALLINK_STATE*/ { "application/x-openoffice-internallink-state;windows_formatname=\"StatusInfo vom SvxInternalLink\"", "StatusInfo vom SvxInternalLink", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 17 SotClipboardFormatId::SOLK*/ { "application/x-openoffice-solk;windows_formatname=\"SOLK (StarOffice Link)\"", "SOLK (StarOffice Link)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 18 SotClipboardFormatId::NETSCAPE_BOOKMARK*/ { "application/x-openoffice-netscape-bookmark;windows_formatname=\"Netscape Bookmark\"", "Netscape Bookmark", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 19 SotClipboardFormatId::TREELISTBOX*/ { "application/x-openoffice-treelistbox;windows_formatname=\"SV_LBOX_DD_FORMAT\"", "SV_LBOX_DD_FORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 20 SotClipboardFormatId::NATIVE*/ { "application/x-openoffice-native;windows_formatname=\"Native\"", "Native", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 21 SotClipboardFormatId::OWNERLINK*/ { "application/x-openoffice-ownerlink;windows_formatname=\"OwnerLink\"", "OwnerLink", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 22 SotClipboardFormatId::STARSERVER*/ { "application/x-openoffice-starserver;windows_formatname=\"StarServerFormat\"", "StarServerFormat", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 23 SotClipboardFormatId::STAROBJECT*/ { "application/x-openoffice-starobject;windows_formatname=\"StarObjectFormat\"", "StarObjectFormat", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 24 SotClipboardFormatId::APPLETOBJECT*/ { "application/x-openoffice-appletobject;windows_formatname=\"Applet Object\"", "Applet Object", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 25 SotClipboardFormatId::PLUGIN_OBJECT*/ { "application/x-openoffice-plugin-object;windows_formatname=\"PlugIn Object\"", "PlugIn Object", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 26 SotClipboardFormatId::STARWRITER_30*/ { "application/x-openoffice-starwriter-30;windows_formatname=\"StarWriter 3.0\"", "StarWriter 3.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 27 SotClipboardFormatId::STARWRITER_40*/ { "application/x-openoffice-starwriter-40;windows_formatname=\"StarWriter 4.0\"", "StarWriter 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 28 SotClipboardFormatId::STARWRITER_50*/ { "application/x-openoffice-starwriter-50;windows_formatname=\"StarWriter 5.0\"", "StarWriter 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 29 SotClipboardFormatId::STARWRITERWEB_40*/ { "application/x-openoffice-starwriterweb-40;windows_formatname=\"StarWriter/Web 4.0\"", "StarWriter/Web 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 30 SotClipboardFormatId::STARWRITERWEB_50*/ { "application/x-openoffice-starwriterweb-50;windows_formatname=\"StarWriter/Web 5.0\"", "StarWriter/Web 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 31 SotClipboardFormatId::STARWRITERGLOB_40*/ { "application/x-openoffice-starwriterglob-40;windows_formatname=\"StarWriter/Global 4.0\"", "StarWriter/Global 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 32 SotClipboardFormatId::STARWRITERGLOB_50*/ { "application/x-openoffice-starwriterglob-50;windows_formatname=\"StarWriter/Global 5.0\"", "StarWriter/Global 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 33 SotClipboardFormatId::STARDRAW*/ { "application/x-openoffice-stardraw;windows_formatname=\"StarDrawDocument\"", "StarDrawDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 34 SotClipboardFormatId::STARDRAW_40*/ { "application/x-openoffice-stardraw-40;windows_formatname=\"StarDrawDocument 4.0\"", "StarDrawDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 35 SotClipboardFormatId::STARIMPRESS_50*/ { "application/x-openoffice-starimpress-50;windows_formatname=\"StarImpress 5.0\"", "StarImpress 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 36 SotClipboardFormatId::STARDRAW_50*/ { "application/x-openoffice-stardraw-50;windows_formatname=\"StarDraw 5.0\"", "StarDraw 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 37 SotClipboardFormatId::STARCALC*/ { "application/x-openoffice-starcalc;windows_formatname=\"StarCalcDocument\"", "StarCalcDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 38 SotClipboardFormatId::STARCALC_40*/ { "application/x-openoffice-starcalc-40;windows_formatname=\"StarCalc 4.0\"", "StarCalc 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 39 SotClipboardFormatId::STARCALC_50*/ { "application/x-openoffice-starcalc-50;windows_formatname=\"StarCalc 5.0\"", "StarCalc 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 40 SotClipboardFormatId::STARCHART*/ { "application/x-openoffice-starchart;windows_formatname=\"StarChartDocument\"", "StarChartDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 41 SotClipboardFormatId::STARCHART_40*/ { "application/x-openoffice-starchart-40;windows_formatname=\"StarChartDocument 4.0\"", "StarChartDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 42 SotClipboardFormatId::STARCHART_50*/ { "application/x-openoffice-starchart-50;windows_formatname=\"StarChart 5.0\"", "StarChart 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 43 SotClipboardFormatId::STARIMAGE*/ { "application/x-openoffice-starimage;windows_formatname=\"StarImageDocument\"", "StarImageDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 44 SotClipboardFormatId::STARIMAGE_40*/ { "application/x-openoffice-starimage-40;windows_formatname=\"StarImageDocument 4.0\"", "StarImageDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 45 SotClipboardFormatId::STARIMAGE_50*/ { "application/x-openoffice-starimage-50;windows_formatname=\"StarImage 5.0\"", "StarImage 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 46 SotClipboardFormatId::STARMATH*/ { "application/x-openoffice-starmath;windows_formatname=\"StarMath\"", "StarMath", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 47 SotClipboardFormatId::STARMATH_40*/ { "application/x-openoffice-starmath-40;windows_formatname=\"StarMathDocument 4.0\"", "StarMathDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 48 SotClipboardFormatId::STARMATH_50*/ { "application/x-openoffice-starmath-50;windows_formatname=\"StarMath 5.0\"", "StarMath 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 49 SotClipboardFormatId::STAROBJECT_PAINTDOC*/ { "application/x-openoffice-starobject-paintdoc;windows_formatname=\"StarObjectPaintDocument\"", "StarObjectPaintDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 50 SotClipboardFormatId::FILLED_AREA*/ { "application/x-openoffice-filled-area;windows_formatname=\"FilledArea\"", "FilledArea", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 51 SotClipboardFormatId::HTML*/ { "text/html", "HTML (HyperText Markup Language)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 52 SotClipboardFormatId::HTML_SIMPLE*/ { "application/x-openoffice-html-simple;windows_formatname=\"HTML Format\"", "HTML Format", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 53 SotClipboardFormatId::CHAOS*/ { "application/x-openoffice-chaos;windows_formatname=\"FORMAT_CHAOS\"", "FORMAT_CHAOS", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 54 SotClipboardFormatId::CNT_MSGATTACHFILE*/ { "application/x-openoffice-cnt-msgattachfile;windows_formatname=\"CNT_MSGATTACHFILE_FORMAT\"", "CNT_MSGATTACHFILE_FORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 55 SotClipboardFormatId::BIFF_5*/ { "application/x-openoffice-biff5;windows_formatname=\"Biff5\"", "Biff5", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 56 SotClipboardFormatId::BIFF__5*/ { "application/x-openoffice-biff-5;windows_formatname=\"Biff 5\"", "Biff 5", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 57 SotClipboardFormatId::SYLK*/ { "application/x-openoffice-sylk;windows_formatname=\"Sylk\"", "Sylk", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 58 SotClipboardFormatId::SYLK_BIGCAPS*/ { "application/x-openoffice-sylk-bigcaps;windows_formatname=\"SYLK\"", "SYLK", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 59 SotClipboardFormatId::LINK*/ { "application/x-openoffice-link;windows_formatname=\"Link\"", "Link", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 60 SotClipboardFormatId::DIF*/ { "application/x-openoffice-dif;windows_formatname=\"DIF\"", "DIF", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 61 SotClipboardFormatId::STARDRAW_TABBAR*/ { "application/x-openoffice-stardraw-tabbar;windows_formatname=\"StarDraw TabBar\"", "StarDraw TabBar", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 62 SotClipboardFormatId::SONLK*/ { "application/x-openoffice-sonlk;windows_formatname=\"SONLK (StarOffice Navi Link)\"", "SONLK (StarOffice Navi Link)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 63 SotClipboardFormatId::MSWORD_DOC*/ { "application/msword", "MSWordDoc", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 64 SotClipboardFormatId::STAR_FRAMESET_DOC*/ { "application/x-openoffice-star-frameset-doc;windows_formatname=\"StarFrameSetDocument\"", "StarFrameSetDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 65 SotClipboardFormatId::OFFICE_DOC*/ { "application/x-openoffice-office-doc;windows_formatname=\"OfficeDocument\"", "OfficeDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 66 SotClipboardFormatId::NOTES_DOCINFO*/ { "application/x-openoffice-notes-docinfo;windows_formatname=\"NotesDocInfo\"", "NotesDocInfo", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 67 SotClipboardFormatId::NOTES_HNOTE*/ { "application/x-openoffice-notes-hnote;windows_formatname=\"NoteshNote\"", "NoteshNote", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 68 SotClipboardFormatId::NOTES_NATIVE*/ { "application/x-openoffice-notes-native;windows_formatname=\"Native\"", "Native", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 69 SotClipboardFormatId::SFX_DOC*/ { "application/x-openoffice-sfx-doc;windows_formatname=\"SfxDocument\"", "SfxDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 70 SotClipboardFormatId::EVDF*/ { "application/x-openoffice-evdf;windows_formatname=\"EVDF (Explorer View Dummy Format)\"", "EVDF (Explorer View Dummy Format)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 71 SotClipboardFormatId::ESDF*/ { "application/x-openoffice-esdf;windows_formatname=\"ESDF (Explorer Search Dummy Format)\"", "ESDF (Explorer Search Dummy Format)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 72 SotClipboardFormatId::IDF*/ { "application/x-openoffice-idf;windows_formatname=\"IDF (Iconview Dummy Format)\"", "IDF (Iconview Dummy Format)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 73 SotClipboardFormatId::EFTP*/ { "application/x-openoffice-eftp;windows_formatname=\"EFTP (Explorer Ftp File)\"", "EFTP (Explorer Ftp File)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 74 SotClipboardFormatId::EFD*/ { "application/x-openoffice-efd;windows_formatname=\"EFD (Explorer Ftp Dir)\"", "EFD (Explorer Ftp Dir)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 75 SotClipboardFormatId::SVX_FORMFIELDEXCH*/ { "application/x-openoffice-svx-formfieldexch;windows_formatname=\"SvxFormFieldExch\"", "SvxFormFieldExch", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 76 SotClipboardFormatId::EXTENDED_TABBAR*/ { "application/x-openoffice-extended-tabbar;windows_formatname=\"ExtendedTabBar\"", "ExtendedTabBar", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 77 SotClipboardFormatId::SBA_DATAEXCHANGE*/ { "application/x-openoffice-sba-dataexchange;windows_formatname=\"SBA-DATAFORMAT\"", "SBA-DATAFORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 78 SotClipboardFormatId::SBA_FIELDDATAEXCHANGE*/ { "application/x-openoffice-sba-fielddataexchange;windows_formatname=\"SBA-FIELDFORMAT\"", "SBA-FIELDFORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 79 SotClipboardFormatId::SBA_PRIVATE_URL*/ { "application/x-openoffice-sba-private-url;windows_formatname=\"SBA-PRIVATEURLFORMAT\"", "SBA-PRIVATEURLFORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 80 SotClipboardFormatId::SBA_TABED*/ { "application/x-openofficesba-tabed;windows_formatname=\"Tabed\"", "Tabed", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 81 SotClipboardFormatId::SBA_TABID*/ { "application/x-openoffice-sba-tabid;windows_formatname=\"Tabid\"", "Tabid", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 82 SotClipboardFormatId::SBA_JOIN*/ { "application/x-openoffice-sba-join;windows_formatname=\"SBA-JOINFORMAT\"", "SBA-JOINFORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 83 SotClipboardFormatId::OBJECTDESCRIPTOR*/ { "application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\"", "Star Object Descriptor (XML)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 84 SotClipboardFormatId::LINKSRCDESCRIPTOR*/ { "application/x-openoffice-linksrcdescriptor-xml;windows_formatname=\"Star Link Source Descriptor (XML)\"", "Star Link Source Descriptor (XML)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 85 SotClipboardFormatId::EMBED_SOURCE*/ { "application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source (XML)\"", "Star Embed Source (XML)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 86 SotClipboardFormatId::LINK_SOURCE*/ { "application/x-openoffice-link-source-xml;windows_formatname=\"Star Link Source (XML)\"", "Star Link Source (XML)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 87 SotClipboardFormatId::EMBEDDED_OBJ*/ { "application/x-openoffice-embedded-obj-xml;windows_formatname=\"Star Embedded Object (XML)\"", "Star Embedded Object (XML)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 88 SotClipboardFormatId::FILECONTENT*/ { "application/x-openoffice-filecontent;windows_formatname=\"FileContents\"", "FileContents", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 89 SotClipboardFormatId::FILEGRPDESCRIPTOR*/ { "application/x-openoffice-filegrpdescriptor;windows_formatname=\"FileGroupDescriptor\"", "FileGroupDescriptor", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 90 SotClipboardFormatId::FILENAME*/ { "application/x-openoffice-filename;windows_formatname=\"FileName\"", "FileName", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 91 SotClipboardFormatId::SD_OLE*/ { "application/x-openoffice-sd-ole;windows_formatname=\"SD-OLE\"", "SD-OLE", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 92 SotClipboardFormatId::EMBEDDED_OBJ_OLE*/ { "application/x-openoffice-embedded-obj-ole;windows_formatname=\"Embedded Object\"", "Embedded Object", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 93 SotClipboardFormatId::EMBED_SOURCE_OLE*/ { "application/x-openoffice-embed-source-ole;windows_formatname=\"Embed Source\"", "Embed Source", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 94 SotClipboardFormatId::OBJECTDESCRIPTOR_OLE*/ { "application/x-openoffice-objectdescriptor-ole;windows_formatname=\"Object Descriptor\"", "Object Descriptor", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 95 SotClipboardFormatId::LINKSRCDESCRIPTOR_OLE*/ { "application/x-openoffice-linkdescriptor-ole;windows_formatname=\"Link Source Descriptor\"", "Link Source Descriptor", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 96 SotClipboardFormatId::LINK_SOURCE_OLE*/ { "application/x-openoffice-link-source-ole;windows_formatname=\"Link Source\"", "Link Source", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 97 SotClipboardFormatId::SBA_CTRLDATAEXCHANGE*/ { "application/x-openoffice-sba-ctrldataexchange;windows_formatname=\"SBA-CTRLFORMAT\"", "SBA-CTRLFORMAT", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 98 SotClipboardFormatId::OUTPLACE_OBJ*/ { "application/x-openoffice-outplace-obj;windows_formatname=\"OutPlace Object\"", "OutPlace Object", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /* 99 SotClipboardFormatId::CNT_OWN_CLIP*/ { "application/x-openoffice-cnt-own-clip;windows_formatname=\"CntOwnClipboard\"", "CntOwnClipboard", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*100 SotClipboardFormatId::INET_IMAGE*/ { "application/x-openoffice-inet-image;windows_formatname=\"SO-INet-Image\"", "SO-INet-Image", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*101 SotClipboardFormatId::NETSCAPE_IMAGE*/ { "application/x-openoffice-netscape-image;windows_formatname=\"Netscape Image Format\"", "Netscape Image Format", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*102 SotClipboardFormatId::SBA_FORMEXCHANGE*/ { "application/x-openoffice-sba-formexchange;windows_formatname=\"SBA_FORMEXCHANGE\"", "SBA_FORMEXCHANGE", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*103 SotClipboardFormatId::SBA_REPORTEXCHANGE*/ { "application/x-openoffice-sba-reportexchange;windows_formatname=\"SBA_REPORTEXCHANGE\"", "SBA_REPORTEXCHANGE", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*104 SotClipboardFormatId::UNIFORMRESOURCELOCATOR*/ { "application/x-openoffice-uniformresourcelocator;windows_formatname=\"UniformResourceLocator\"", "UniformResourceLocator", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*105 SotClipboardFormatId::STARCHARTDOCUMENT_50*/ { "application/x-openoffice-starchartdocument-50;windows_formatname=\"StarChartDocument 5.0\"", "StarChartDocument 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*106 SotClipboardFormatId::GRAPHOBJ*/ { "application/x-openoffice-graphobj;windows_formatname=\"Graphic Object\"", "Graphic Object", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*107 SotClipboardFormatId::STARWRITER_60*/ { MIMETYPE_VND_SUN_XML_WRITER_ASCII, "Writer 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*108 SotClipboardFormatId::STARWRITERWEB_60*/ { MIMETYPE_VND_SUN_XML_WRITER_WEB_ASCII, "Writer/Web 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*109 SotClipboardFormatId::STARWRITERGLOB_60*/ { MIMETYPE_VND_SUN_XML_WRITER_GLOBAL_ASCII, "Writer/Global 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*110 SotClipboardFormatId::STARWDRAW_60*/ { MIMETYPE_VND_SUN_XML_DRAW_ASCII, "Draw 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*111 SotClipboardFormatId::STARIMPRESS_60*/ { MIMETYPE_VND_SUN_XML_IMPRESS_ASCII, "Impress 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*112 SotClipboardFormatId::STARCALC_60*/ { MIMETYPE_VND_SUN_XML_CALC_ASCII, "Calc 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*113 SotClipboardFormatId::STARCHART_60*/ { MIMETYPE_VND_SUN_XML_CHART_ASCII, "Chart 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*114 SotClipboardFormatId::STARMATH_60*/ { MIMETYPE_VND_SUN_XML_MATH_ASCII, "Math 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*115 SotClipboardFormatId::WMF*/ { "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"", "Windows MetaFile", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*116 SotClipboardFormatId::DBACCESS_QUERY*/ { "application/x-openoffice-dbaccess-query;windows_formatname=\"Data source Query Object\"", "Data source Query Object", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*117 SotClipboardFormatId::DBACCESS_TABLE*/ { "application/x-openoffice-dbaccess-table;windows_formatname=\"Data source Table\"", "Data source Table", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*118 SotClipboardFormatId::DBACCESS_COMMAND*/ { "application/x-openoffice-dbaccess-command;windows_formatname=\"SQL query\"", "SQL query", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*119 SotClipboardFormatId::DIALOG_60*/ { "application/vnd.sun.xml.dialog", "Dialog 6.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*120 SotClipboardFormatId::EMF*/ { "application/x-openoffice-emf;windows_formatname=\"Image EMF\"", "Windows Enhanced MetaFile", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*121 SotClipboardFormatId::BIFF_8*/ { "application/x-openoffice-biff-8;windows_formatname=\"Biff8\"", "Biff8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*122 SotClipboardFormatId::BMP*/ { "image/bmp", "Windows Bitmap", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*123 SotClipboardFormatId::HTML_NO_COMMENT */ { "application/x-openoffice-html-no-comment;windows_formatname=\"HTML Format\"", "HTML (no comment)", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*124 SotClipboardFormatId::STARWRITER_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII, "Writer 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*125 SotClipboardFormatId::STARWRITERWEB_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII, "Writer/Web 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*126 SotClipboardFormatId::STARWRITERGLOB_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII, "Writer/Global 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*127 SotClipboardFormatId::STARWDRAW_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII, "Draw 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*128 SotClipboardFormatId::STARIMPRESS_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII, "Impress 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*129 SotClipboardFormatId::STARCALC_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII, "Calc 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*130 SotClipboardFormatId::STARCHART_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII, "Chart 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*131 SotClipboardFormatId::STARMATH_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII, "Math 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*132 SotClipboardFormatId::XFORMS */ { "application/x-openoffice-xforms;windows_formatname=\"??? Format\"", "???", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*133 SotClipboardFormatId::STARWRITER_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII, "Writer 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*134 SotClipboardFormatId::STARWDRAW_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII, "Draw 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*135 SotClipboardFormatId::STARIMPRESS_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII, "Impress 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*136 SotClipboardFormatId::STARCALC_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII, "Calc 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*137 SotClipboardFormatId::STARCHART_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE_ASCII, "Chart 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*138 SotClipboardFormatId::STARMATH_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE_ASCII, "Math 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*139 SotClipboardFormatId::STARBASE_8*/ { MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII, "StarBase 8", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*140 SotClipboardFormatId::GDIMETAFILE*/ { "application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"", "High Contrast GDIMetaFile", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*141 SotClipboardFormatId::PNG*/ { "image/png", "PNG Bitmap", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, + /*142 SotClipboardFormatId::STARWRITERGLOB_8_TEMPLATE*/ { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII, "Writer/Global 8 Template", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, }; return &aInstance[0]; } @@ -225,32 +225,32 @@ static tDataFlavorList& InitFormats_Impl() |* |* Beschreibung CLIP.SDW *************************************************************************/ -sal_uLong SotExchange::RegisterFormatName( const OUString& rName ) +SotClipboardFormatId SotExchange::RegisterFormatName( const OUString& rName ) { const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get(); // teste zuerst die Standard - Name - sal_uLong i, nMax = SOT_FORMAT_FILE_LIST; - for( i = SOT_FORMAT_STRING; i <= nMax; ++i ) - if( rName.equalsAscii( pFormatArray_Impl[ i ].pName ) ) + SotClipboardFormatId nMax = SotClipboardFormatId::FILE_LIST; + for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= nMax; ++i ) + if( rName.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pName ) ) return i; // BM: the chart format 105 ("StarChartDocument 5.0") was written // only into 5.1 chart documents - in 5.0 and 5.2 it was 42 ("StarChart 5.0") // The registry only contains the entry for the 42 format id. - nMax = SOT_FORMATSTR_ID_USER_END; - for( i = SOT_FORMAT_RTF; i <= nMax; ++i ) - if( rName.equalsAscii( pFormatArray_Impl[ i ].pName ) ) - return ( (i == SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50) - ? SOT_FORMATSTR_ID_STARCHART_50 + nMax = SotClipboardFormatId::USER_END; + for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= nMax; ++i ) + if( rName.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pName ) ) + return ( (i == SotClipboardFormatId::STARCHARTDOCUMENT_50) + ? SotClipboardFormatId::STARCHART_50 : i ); // dann in der dynamischen Liste tDataFlavorList& rL = InitFormats_Impl(); - for( i = 0, nMax = rL.size(); i < nMax; i++ ) + for( tDataFlavorList::size_type i = 0; i < rL.size(); i++ ) { DataFlavor* pFlavor = rL[ i ]; if( pFlavor && rName == pFlavor->HumanPresentableName ) - return i + SOT_FORMATSTR_ID_USER_END + 1; + return static_cast<SotClipboardFormatId>(i + static_cast<int>(SotClipboardFormatId::USER_END) + 1); } // nMax ist der neue Platz @@ -262,30 +262,30 @@ sal_uLong SotExchange::RegisterFormatName( const OUString& rName ) rL.push_back( pNewFlavor ); - return nMax + SOT_FORMATSTR_ID_USER_END + 1; + return static_cast<SotClipboardFormatId>(static_cast<int>(nMax) + static_cast<int>(SotClipboardFormatId::USER_END) + 1); } -sal_uLong SotExchange::RegisterFormatMimeType( const OUString& rMimeType ) +SotClipboardFormatId SotExchange::RegisterFormatMimeType( const OUString& rMimeType ) { const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get(); // teste zuerst die Standard - Name - sal_uLong i, nMax = SOT_FORMAT_FILE_LIST; - for( i = SOT_FORMAT_STRING; i <= nMax; ++i ) - if( rMimeType.equalsAscii( pFormatArray_Impl[ i ].pMimeType ) ) + SotClipboardFormatId nMax = SotClipboardFormatId::FILE_LIST; + for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= nMax; ++i ) + if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) ) return i; - nMax = SOT_FORMATSTR_ID_USER_END; - for( i = SOT_FORMAT_RTF; i <= nMax; ++i ) - if( rMimeType.equalsAscii( pFormatArray_Impl[ i ].pMimeType ) ) + nMax = SotClipboardFormatId::USER_END; + for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= nMax; ++i ) + if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) ) return i; // dann in der dynamischen Liste tDataFlavorList& rL = InitFormats_Impl(); - for( i = 0, nMax = rL.size(); i < nMax; i++ ) + for( tDataFlavorList::size_type i = 0; i < rL.size(); i++ ) { DataFlavor* pFlavor = rL[ i ]; if( pFlavor && rMimeType == pFlavor->MimeType ) - return i + SOT_FORMATSTR_ID_USER_END + 1; + return static_cast<SotClipboardFormatId>(i + static_cast<int>(SotClipboardFormatId::USER_END) + 1); } // nMax ist der neue Platz @@ -297,7 +297,7 @@ sal_uLong SotExchange::RegisterFormatMimeType( const OUString& rMimeType ) rL.push_back( pNewFlavor ); - return nMax + SOT_FORMATSTR_ID_USER_END + 1; + return static_cast<SotClipboardFormatId>(static_cast<int>(nMax) + static_cast<int>(SotClipboardFormatId::USER_END) + 1); } /************************************************************************* @@ -306,14 +306,14 @@ sal_uLong SotExchange::RegisterFormatMimeType( const OUString& rMimeType ) |* |* Beschreibung CLIP.SDW *************************************************************************/ -sal_uLong SotExchange::RegisterFormat( const DataFlavor& rFlavor ) +SotClipboardFormatId SotExchange::RegisterFormat( const DataFlavor& rFlavor ) { - sal_uLong nRet = GetFormat( rFlavor ); + SotClipboardFormatId nRet = GetFormat( rFlavor ); - if( !nRet ) + if( nRet == SotClipboardFormatId::NONE ) { tDataFlavorList& rL = InitFormats_Impl(); - nRet = rL.size() + SOT_FORMATSTR_ID_USER_END + 1; + nRet = static_cast<SotClipboardFormatId>(rL.size() + static_cast<int>(SotClipboardFormatId::USER_END) + 1); rL.push_back( new DataFlavor( rFlavor ) ); } @@ -326,13 +326,13 @@ sal_uLong SotExchange::RegisterFormat( const DataFlavor& rFlavor ) |* *************************************************************************/ -bool SotExchange::GetFormatDataFlavor( sal_uLong nFormat, DataFlavor& rFlavor ) +bool SotExchange::GetFormatDataFlavor( SotClipboardFormatId nFormat, DataFlavor& rFlavor ) { bool bRet; - if( SOT_FORMATSTR_ID_USER_END >= nFormat ) + if( SotClipboardFormatId::USER_END >= nFormat ) { - const DataFlavorRepresentation& rData = FormatArray_Impl::get()[nFormat]; + const DataFlavorRepresentation& rData = FormatArray_Impl::get()[static_cast<int>(nFormat)]; rFlavor.MimeType = OUString::createFromAscii( rData.pMimeType ); rFlavor.HumanPresentableName = OUString::createFromAscii( rData.pName ); rFlavor.DataType = *rData.pType; @@ -343,11 +343,11 @@ bool SotExchange::GetFormatDataFlavor( sal_uLong nFormat, DataFlavor& rFlavor ) { tDataFlavorList& rL = InitFormats_Impl(); - nFormat -= SOT_FORMATSTR_ID_USER_END + 1; + unsigned i = static_cast<int>(nFormat) - static_cast<int>(SotClipboardFormatId::USER_END) + 1; - if( rL.size() > nFormat ) + if( rL.size() > i ) { - rFlavor = *rL[ nFormat ]; + rFlavor = *rL[ i ]; bRet = true; } else @@ -368,19 +368,19 @@ bool SotExchange::GetFormatDataFlavor( sal_uLong nFormat, DataFlavor& rFlavor ) |* *************************************************************************/ -OUString SotExchange::GetFormatMimeType( sal_uLong nFormat ) +OUString SotExchange::GetFormatMimeType( SotClipboardFormatId nFormat ) { OUString sMimeType; - if( SOT_FORMATSTR_ID_USER_END >= nFormat ) - sMimeType = OUString::createFromAscii( FormatArray_Impl::get()[nFormat].pMimeType ); + if( SotClipboardFormatId::USER_END >= nFormat ) + sMimeType = OUString::createFromAscii( FormatArray_Impl::get()[static_cast<int>(nFormat)].pMimeType ); else { tDataFlavorList& rL = InitFormats_Impl(); - nFormat -= SOT_FORMATSTR_ID_USER_END + 1; + unsigned i = static_cast<int>(nFormat) - static_cast<int>(SotClipboardFormatId::USER_END) + 1; - if( rL.size() > nFormat ) - sMimeType = rL[ nFormat ]->MimeType; + if( rL.size() > i ) + sMimeType = rL[ i ]->MimeType; } DBG_ASSERT( !sMimeType.isEmpty(), "SotExchange::GetFormatMimeType(): DataFlavor not initialized" ); @@ -394,35 +394,35 @@ OUString SotExchange::GetFormatMimeType( sal_uLong nFormat ) |* *************************************************************************/ -sal_uLong SotExchange::GetFormatIdFromMimeType( const OUString& rMimeType ) +SotClipboardFormatId SotExchange::GetFormatIdFromMimeType( const OUString& rMimeType ) { const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get(); - sal_uLong i, nMax = SOT_FORMAT_FILE_LIST; - for( i = SOT_FORMAT_STRING; i <= nMax; ++i ) - if( rMimeType.equalsAscii( pFormatArray_Impl[ i ].pMimeType ) ) + SotClipboardFormatId nMax = SotClipboardFormatId::FILE_LIST; + for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= nMax; ++i ) + if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) ) return i; // BM: the chart format 105 ("StarChartDocument 5.0") was written // only into 5.1 chart documents - in 5.0 and 5.2 it was 42 ("StarChart 5.0") // The registry only contains the entry for the 42 format id. - nMax = SOT_FORMATSTR_ID_USER_END; - for( i = SOT_FORMAT_RTF; i <= nMax; ++i ) - if( rMimeType.equalsAscii( pFormatArray_Impl[ i ].pMimeType ) ) - return ( (i == SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50) - ? SOT_FORMATSTR_ID_STARCHART_50 + nMax = SotClipboardFormatId::USER_END; + for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= nMax; ++i ) + if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) ) + return ( (i == SotClipboardFormatId::STARCHARTDOCUMENT_50) + ? SotClipboardFormatId::STARCHART_50 : i ); // dann in der dynamischen Liste tDataFlavorList& rL = InitFormats_Impl(); - for( i = 0, nMax = rL.size(); i < nMax; i++ ) + for( tDataFlavorList::size_type i = 0; i < rL.size(); i++ ) { DataFlavor* pFlavor = rL[ i ]; if( pFlavor && rMimeType == pFlavor->MimeType ) - return i + SOT_FORMATSTR_ID_USER_END + 1; + return static_cast<SotClipboardFormatId>(i + static_cast<int>(SotClipboardFormatId::USER_END) + 1); } - return 0; + return SotClipboardFormatId::NONE; } /************************************************************************* @@ -431,37 +431,37 @@ sal_uLong SotExchange::GetFormatIdFromMimeType( const OUString& rMimeType ) |* |* Beschreibung CLIP.SDW *************************************************************************/ -sal_uLong SotExchange::GetFormat( const DataFlavor& rFlavor ) +SotClipboardFormatId SotExchange::GetFormat( const DataFlavor& rFlavor ) { // teste zuerst die Standard - Name const OUString& rMimeType = rFlavor.MimeType; - sal_uLong i, nMax = SOT_FORMAT_FILE_LIST; + SotClipboardFormatId nMax = SotClipboardFormatId::FILE_LIST; const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get(); - for( i = SOT_FORMAT_STRING; i <= nMax; ++i ) - if( rMimeType.equalsAscii( pFormatArray_Impl[ i ].pMimeType ) ) - return i; + for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= nMax; ++i ) + if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) ) + return static_cast<SotClipboardFormatId>(i); // BM: the chart format 105 ("StarChartDocument 5.0") was written // only into 5.1 chart documents - in 5.0 and 5.2 it was 42 ("StarChart 5.0") // The registry only contains the entry for the 42 format id. - nMax = SOT_FORMATSTR_ID_USER_END; - for( i = SOT_FORMAT_RTF; i <= nMax; ++i ) - if( rMimeType.equalsAscii( pFormatArray_Impl[ i ].pMimeType ) ) - return ( (i == SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50) - ? SOT_FORMATSTR_ID_STARCHART_50 - : i ); + nMax = SotClipboardFormatId::USER_END; + for( SotClipboardFormatId i = SotClipboardFormatId::RTF; i <= nMax; ++i ) + if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) ) + return ( (i == SotClipboardFormatId::STARCHARTDOCUMENT_50) + ? static_cast<SotClipboardFormatId>(SotClipboardFormatId::STARCHART_50) + : static_cast<SotClipboardFormatId>(i) ); // dann in der dynamischen Liste tDataFlavorList& rL = InitFormats_Impl(); - for( i = 0, nMax = rL.size(); i < nMax; i++ ) + for( tDataFlavorList::size_type i = 0; i < rL.size(); i++ ) { DataFlavor* pFlavor = rL[ i ]; if( pFlavor && rMimeType == pFlavor->MimeType ) - return i + SOT_FORMATSTR_ID_USER_END + 1; + return static_cast<SotClipboardFormatId>(i + static_cast<int>(SotClipboardFormatId::USER_END) + 1); } - return 0; + return SotClipboardFormatId::NONE; } /************************************************************************* @@ -470,7 +470,7 @@ sal_uLong SotExchange::GetFormat( const DataFlavor& rFlavor ) |* |* Beschreibung CLIP.SDW *************************************************************************/ -OUString SotExchange::GetFormatName( sal_uLong nFormat ) +OUString SotExchange::GetFormatName( SotClipboardFormatId nFormat ) { DataFlavor aFlavor; OUString aRet; diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx index 66a766fd9c96..01cb1c88888a 100644 --- a/sot/source/base/filelist.cxx +++ b/sot/source/base/filelist.cxx @@ -96,7 +96,7 @@ SvStream& WriteFileList( SvStream& rOStm, SAL_UNUSED_PARAMETER const FileList& ) /* #i28176# The Windows clipboard bridge now provides a double '\0' - terminated list of file names for format SOT_FORMAT_FILE_LIST + terminated list of file names for format SotClipboardFormatId::FILE_LIST instead of the original Windows Sv_DROPFILES structure. All strings in this list are UTF16 strings. Shell link files will be already resolved by the Windows clipboard bridge.*/ diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx index b9fafaffb28e..8f16f795b6cb 100644 --- a/sot/source/base/formats.cxx +++ b/sot/source/base/formats.cxx @@ -35,9 +35,9 @@ using namespace::com::sun::star::datatransfer; struct SotAction_Impl { - sal_uLong nFormatId; // Clipboard Id - sal_uInt16 nAction; // Action Id - sal_uInt8 nContextCheckId; // additional check of content in clipboard + SotClipboardFormatId nFormatId; // Clipboard Id + sal_uInt16 nAction; // Action Id + sal_uInt8 nContextCheckId; // additional check of content in clipboard }; @@ -83,1078 +83,1078 @@ struct SotDestinationEntry_Impl #define EXCHG_EMPYT_ARRAY \ static SotAction_Impl const aEmptyArr[] = \ { \ - { 0xffff, 0, 0 } \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; #define EXCHG_DEST_DOC_OLEOBJ_ARRAY \ static SotAction_Impl const aEXCHG_DEST_DOC_OLEOBJ_Def[] = \ { \ - { SOT_FORMATSTR_ID_INET_IMAGE, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_LINK, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_LINK, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::INET_IMAGE, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_LINK, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_LINK, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_OLEOBJ_Move[] = \ { \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_OLEOBJ_Link[] = \ { \ - { SOT_FORMATSTR_ID_INET_IMAGE, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ - { SOT_FORMAT_FILE_LIST, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 },\ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::INET_IMAGE, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ + { SotClipboardFormatId::FILE_LIST, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 },\ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; #define EXCHG_DEST_CHARTDOC_OLEOBJ_ARRAY \ static SotAction_Impl const aEXCHG_DEST_CHARTDOC_OLEOBJ_Def[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_INET_IMAGE, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_LINK, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_LINK, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::INET_IMAGE, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_LINK, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_LINK, 0 }, \ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_CHARTDOC_OLEOBJ_Move[] = \ { \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP, 0 }, \ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_CHARTDOC_OLEOBJ_Link[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ - { SOT_FORMATSTR_ID_INET_IMAGE, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 },\ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ + { SotClipboardFormatId::INET_IMAGE, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_INTERACTIVE, 0 },\ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP, 0 }, \ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; #define EXCHG_DEST_DOC_TEXTFRAME_ARRAY \ static SotAction_Impl const aEXCHG_DEST_DOC_TEXTFRAME_Def[] = \ { \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_INET_IMAGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SD_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_IN_ACTION_MOVE, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::INET_IMAGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SD_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_IN_ACTION_MOVE, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_TEXTFRAME_Move[] = \ { \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_MOVE, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_RTF, EXCHG_IN_ACTION_COPY| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_MOVE, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::RTF, EXCHG_IN_ACTION_COPY| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_TEXTFRAME_Copy[] = \ { \ - { SOT_FORMATSTR_ID_SBA_DATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_XFORMS, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_COPY, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_RTF, EXCHG_IN_ACTION_COPY| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SBA_DATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SBA_CTRLDATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SBA_FIELDDATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::XFORMS, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_COPY, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::RTF, EXCHG_IN_ACTION_COPY| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_TEXTFRAME_Link[] = \ { \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_SBA_DATAEXCHANGE, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::SBA_DATAEXCHANGE, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::SBA_CTRLDATAEXCHANGE, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::SBA_FIELDDATAEXCHANGE, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; #define EXCHG_DEST_DOC_TEXTFRAME_WEB_ARRAY \ static SotAction_Impl const aEXCHG_DEST_DOC_TEXTFRAME_WEB_Def[] = \ { \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_INET_IMAGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_IN_ACTION_MOVE, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::INET_IMAGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_IN_ACTION_MOVE, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_TEXTFRAME_WEB_Move[] = \ { \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_MOVE, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_RTF, EXCHG_IN_ACTION_COPY| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_MOVE, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::RTF, EXCHG_IN_ACTION_COPY| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_TEXTFRAME_WEB_Copy[] = \ { \ - { SOT_FORMATSTR_ID_SBA_DATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_XFORMS, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_COPY, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_RTF, EXCHG_IN_ACTION_COPY| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SBA_DATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SBA_CTRLDATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SBA_FIELDDATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::XFORMS, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_COPY, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::RTF, EXCHG_IN_ACTION_COPY| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_TEXTFRAME_WEB_Link[] = \ { \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; #define EXCHG_DEST_DOC_GRAPHOBJ_ARRAY \ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Def[] = \ { \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Move[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Copy[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPHOBJ_Link[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; #define EXCHG_DEST_DOC_LNKD_GRAPHOBJ_ARRAY \ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Def[] = \ { \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Move[] =\ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Copy[] =\ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPHOBJ_Link[] =\ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; #define EXCHG_DEST_DOC_GRAPH_W_IMAP_ARRAY \ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Def[] = \ { \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Move[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Copy[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_GRAPH_W_IMAP_Link[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; #define EXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_ARRAY \ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Def[] =\ { \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Move[] =\ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Copy[] =\ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP_Link[] =\ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; #define EXCHG_DEST_DOC_IMAPREGION_ARRAY \ static SotAction_Impl const aEXCHG_DEST_DOC_IMAPREGION_Def[] = \ { \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_IMAPREGION_Copy[] = \ { \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; #define EXCHG_DEST_DOC_DRAWOBJ_ARRAY \ static SotAction_Impl const aEXCHG_DEST_DOC_DRAWOBJ_Def[] = \ { \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_DRAWOBJ_Copy[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_DRAWOBJ_Move[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_DRAWOBJ_Link[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; #define EXCHG_DEST_DOC_URLBUTTON_ARRAY \ static SotAction_Impl const aEXCHG_DEST_DOC_URLBUTTON_Def[] = \ { \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_URLBUTTON_Move[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_URLBUTTON_Copy[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; #define EXCHG_DEST_DOC_URLFIELD_ARRAY \ static SotAction_Impl const aEXCHG_DEST_DOC_URLFIELD_Def[] = \ { \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_URLFIELD_Copy[] = \ { \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_URLFIELD_Link[] = \ { \ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_HYPERLINK, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_HYPERLINK, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; #define EXCHG_DEST_DOC_GROUPOBJ_ARRAY \ static SotAction_Impl const aEXCHG_DEST_DOC_GROUPOBJ_Def[] = \ { \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_GROUPOBJ_Move[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_REPLACE_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_REPLACE_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_REPLACE_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_REPLACE_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_GROUPOBJ_Copy[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP| EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_GRAPH | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_DOC_GROUPOBJ_Link[] = \ { \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES| EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_GET_ATTRIBUTES | EXCHG_OUT_ACTION_FLAG_FILL | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; #define EXCHG_DEST_SWDOC_FREE_AREA_ARRAY \ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_Def[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_RTF, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SD_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_IN_ACTION_MOVE, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::RTF, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SD_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_IN_ACTION_MOVE, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_Move[] = \ { \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_MOVE, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_RTF, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING, 0 }, \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_MOVE, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::RTF, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING, 0 }, \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_Copy[] = \ { \ - { SOT_FORMATSTR_ID_SBA_DATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_XFORMS, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_COPY, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_RTF, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SBA_DATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SBA_CTRLDATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SBA_FIELDDATAEXCHANGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::XFORMS, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_COPY, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::RTF, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_Link[] = \ { \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_SBA_DATAEXCHANGE, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::SBA_DATAEXCHANGE, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::SBA_CTRLDATAEXCHANGE, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::SBA_FIELDDATAEXCHANGE, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; #define EXCHG_DEST_SWDOC_FREE_AREA_WEB_ARRAY \ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_WEB_Def[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_RTF, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_IN_ACTION_MOVE, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::RTF, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_IN_ACTION_MOVE, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_WEB_Move[] = \ { \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_MOVE, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_RTF, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING, 0 }, \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_MOVE, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::RTF, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING, 0 }, \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_WEB_Copy[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_COPY, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_RTF, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_COPY, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::RTF, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::NETSCAPE_IMAGE, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_SWDOC_FREE_AREA_WEB_Link[] = \ { \ - { SOT_FORMATSTR_ID_SONLK, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::SONLK, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SOLK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; #define EXCHG_DEST_SCDOC_FREE_AREA_ARRAY \ static SotAction_Impl const aEXCHG_DEST_SCDOC_FREE_AREA_Def[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SD_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_IN_ACTION_MOVE, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SD_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_IN_ACTION_MOVE, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_SCDOC_FREE_AREA_Move[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_MOVE, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_BIFF_5, EXCHG_IN_ACTION_MOVE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_BIFF__5,EXCHG_IN_ACTION_MOVE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_BIFF_8, EXCHG_IN_ACTION_MOVE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_MOVE, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::BIFF_5, EXCHG_IN_ACTION_MOVE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::BIFF__5,EXCHG_IN_ACTION_MOVE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::BIFF_8, EXCHG_IN_ACTION_MOVE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_SCDOC_FREE_AREA_Copy[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_COPY, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_BIFF_5, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_BIFF__5,EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_BIFF_8, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_COPY, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::BIFF_5, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::BIFF__5,EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::BIFF_8, EXCHG_IN_ACTION_COPY | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_SCDOC_FREE_AREA_Link[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; #define EXCHG_DEST_SDDOC_FREE_AREA_ARRAY \ static SotAction_Impl const aEXCHG_DEST_SDDOC_FREE_AREA_Def[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_STRING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_PNG, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMAT_BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ - { SOT_FORMATSTR_ID_SD_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_IN_ACTION_MOVE, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::STRING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_IN_ACTION_COPY, FILEGRPDSC_ONLY_URL }, \ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::DRAWING, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SVXB, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::PNG, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::BITMAP, EXCHG_IN_ACTION_COPY, 0 }, \ + { SotClipboardFormatId::SD_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_IN_ACTION_MOVE, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_IN_ACTION_MOVE, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_SDDOC_FREE_AREA_Move[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_MOVE, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_MOVE, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_SDDOC_FREE_AREA_Copy[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_COPY, 0 },\ - { SOT_FORMAT_FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMAT_GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMAT_STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_COPY, 0 },\ + { SotClipboardFormatId::FILE, EXCHG_OUT_ACTION_INSERT_FILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::DRAWING, EXCHG_OUT_ACTION_INSERT_DRAWOBJ | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SVXB, EXCHG_OUT_ACTION_INSERT_SVXB | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::SD_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::GDIMETAFILE, EXCHG_OUT_ACTION_INSERT_GDIMETAFILE | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::PNG, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::BITMAP, EXCHG_OUT_ACTION_INSERT_BITMAP | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_NO_COMMENT, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::HTML_SIMPLE, EXCHG_OUT_ACTION_INSERT_HTML | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::STRING, EXCHG_OUT_ACTION_INSERT_STRING | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::SVIM, EXCHG_OUT_ACTION_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; \ static SotAction_Impl const aEXCHG_DEST_SDDOC_FREE_AREA_Link[] = \ { \ - { SOT_FORMAT_FILE_LIST, EXCHG_IN_ACTION_LINK, 0 }, \ - { SOT_FORMAT_FILE, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ - { SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ - { SOT_FORMATSTR_ID_LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ - { 0xffff, 0, 0 } \ + { SotClipboardFormatId::FILE_LIST, EXCHG_IN_ACTION_LINK, 0 }, \ + { SotClipboardFormatId::FILE, EXCHG_IN_ACTION_LINK | EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::NETSCAPE_BOOKMARK, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::FILEGRPDESCRIPTOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, FILEGRPDSC_ONLY_URL },\ + { SotClipboardFormatId::UNIFORMRESOURCELOCATOR, EXCHG_OUT_ACTION_INSERT_HYPERLINK | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 },\ + { SotClipboardFormatId::LINK, EXCHG_OUT_ACTION_INSERT_DDE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBED_SOURCE_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { SotClipboardFormatId::EMBEDDED_OBJ_OLE, EXCHG_OUT_ACTION_INSERT_OLE | EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL, 0 }, \ + { static_cast<SotClipboardFormatId>(0xffff), 0, 0 } \ }; @@ -1287,7 +1287,7 @@ static SotDestinationEntry_Impl const aDestinationArray[] = \ aEXCHG_DEST_SWDOC_FREE_AREA_WEB_Link \ }, \ { \ - static_cast<SotExchangeDest>(0xffff), 0, 0, 0, 0 \ + static_cast<SotExchangeDest>(static_cast<SotClipboardFormatId>(0xffff)), 0, 0, 0, 0 \ } \ }; @@ -1298,7 +1298,7 @@ static SotDestinationEntry_Impl const aDestinationArray[] = \ // - new style GetExchange methods - -bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, sal_uLong nId ) +bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, SotClipboardFormatId nId ) { DataFlavorExVector::iterator aIter( ( (DataFlavorExVector&) rDataFlavorExVector ).begin() ); DataFlavorExVector::iterator aEnd( ( (DataFlavorExVector&) rDataFlavorExVector ).end() ); @@ -1326,7 +1326,7 @@ static bool CheckTransferableContext_Impl( const Reference< XTransferable >* pxT try { if( pxTransferable && (*pxTransferable).is() && - SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, aFlavor ) && + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::FILEGRPDESCRIPTOR, aFlavor ) && (*pxTransferable)->isDataFlavorSupported( aFlavor ) ) { #ifdef WNT @@ -1336,7 +1336,7 @@ static bool CheckTransferableContext_Impl( const Reference< XTransferable >* pxT { bRet = false; - if( SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_FILECONTENT, aFlavor ) && + if( SotExchange::GetFormatDataFlavor( SotClipboardFormatId::FILECONTENT, aFlavor ) && (*pxTransferable)->isDataFlavorSupported( aFlavor ) && SotExchange::GetFormatDataFlavor( rEntry.nFormatId, aFlavor ) && (*pxTransferable)->isDataFlavorSupported( aFlavor ) ) @@ -1383,8 +1383,8 @@ static bool CheckTransferableContext_Impl( const Reference< XTransferable >* pxT static sal_uInt16 GetTransferableAction_Impl( const DataFlavorExVector& rDataFlavorExVector, const SotAction_Impl* pArray, - sal_uLong& rFormat, - sal_uLong nOnlyTestFormat, + SotClipboardFormatId& rFormat, + SotClipboardFormatId nOnlyTestFormat, const Reference< XTransferable >* pxTransferable ) { try @@ -1393,34 +1393,34 @@ static sal_uInt16 GetTransferableAction_Impl( { DataFlavor aFlavor; const SotAction_Impl* pArrayStart = pArray; - sal_uLong nId = pArray->nFormatId; + SotClipboardFormatId nId = pArray->nFormatId; #if OSL_DEBUG_LEVEL > 1 // used for testing a specific format - change in the debugger the value static sal_uLong nChkFormat = 0; if( nChkFormat ) { - for( ; 0xffff != pArray->nFormatId && + for( ; static_cast<SotClipboardFormatId>(0xffff) != pArray->nFormatId && nChkFormat != pArray->nFormatId; ++pArray ) ; nId = pArray->nFormatId; } #endif - while( nId != 0xffff ) + while( nId != static_cast<SotClipboardFormatId>(0xffff) ) { rFormat = nId; - if( ( !nOnlyTestFormat || nOnlyTestFormat == nId ) && + if( ( nOnlyTestFormat == SotClipboardFormatId::NONE || nOnlyTestFormat == nId ) && IsFormatSupported( rDataFlavorExVector, nId ) && ( !pArray->nContextCheckId || CheckTransferableContext_Impl( pxTransferable, *pArray ) ) ) { - if( pxTransferable && (*pxTransferable).is() && ( SOT_FORMAT_FILE_LIST == rFormat ) ) + if( pxTransferable && (*pxTransferable).is() && ( SotClipboardFormatId::FILE_LIST == rFormat ) ) { - if( IsFormatSupported( rDataFlavorExVector, SOT_FORMAT_FILE ) ) + if( IsFormatSupported( rDataFlavorExVector, SotClipboardFormatId::FILE ) ) { DataFlavor aFileListFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_FILE_LIST, aFileListFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::FILE_LIST, aFileListFlavor ); Any aAny( (*pxTransferable)->getTransferData( aFileListFlavor ) ); if( aAny.hasValue() ) @@ -1435,11 +1435,11 @@ static sal_uInt16 GetTransferableAction_Impl( { const SotAction_Impl* pCur = pArrayStart; - while( pCur->nFormatId != 0xffff ) + while( pCur->nFormatId != static_cast<SotClipboardFormatId>(0xffff) ) { - if( pCur->nFormatId == SOT_FORMAT_FILE ) + if( pCur->nFormatId == SotClipboardFormatId::FILE ) { - rFormat = SOT_FORMAT_FILE; + rFormat = SotClipboardFormatId::FILE; return pCur->nAction; } pCur++; @@ -1471,9 +1471,9 @@ sal_uInt16 SotExchange::GetExchangeAction( const DataFlavorExVector& rDataFlavor SotExchangeDest nDestination, sal_uInt16 nSourceOptions, sal_uInt16 nUserAction, - sal_uLong& rFormat, + SotClipboardFormatId& rFormat, sal_uInt16& rDefaultAction, - sal_uLong nOnlyTestFormat, + SotClipboardFormatId nOnlyTestFormat, const Reference< XTransferable >* pxTransferable ) { // hier wird jetzt die oben definierte Tabelle "implementiert" @@ -1481,24 +1481,24 @@ sal_uInt16 SotExchange::GetExchangeAction( const DataFlavorExVector& rDataFlavor IMPL_DATA_ARRAY_2; IMPL_DATA_ARRAY_3; - rFormat = SOT_FORMAT_STRING; + rFormat = SotClipboardFormatId::STRING; //Todo: Binaere Suche einbauen const SotDestinationEntry_Impl* pEntry = aDestinationArray; - while( static_cast<SotExchangeDest>(0xffff) != pEntry->nDestination ) + while( static_cast<SotExchangeDest>(static_cast<SotClipboardFormatId>(0xffff)) != pEntry->nDestination ) { if( pEntry->nDestination == nDestination ) break; ++pEntry; } - if( static_cast<SotExchangeDest>(0xffff) == pEntry->nDestination ) + if( static_cast<SotExchangeDest>(static_cast<SotClipboardFormatId>(0xffff)) == pEntry->nDestination ) { return EXCHG_INOUT_ACTION_NONE; } nUserAction &= EXCHG_ACTION_MASK; - rFormat = 0; + rFormat = SotClipboardFormatId::NONE; /* Behandlung der Default-Action nach folgender Vorgehensweise: diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx index a199f2e7989b..eb708bc82136 100644 --- a/sot/source/sdstor/stg.cxx +++ b/sot/source/sdstor/stg.cxx @@ -19,6 +19,7 @@ #include <sot/storinfo.hxx> +#include <sot/exchange.hxx> #include <osl/file.hxx> #include <unotools/tempfile.hxx> #include <tools/stream.hxx> @@ -932,7 +933,7 @@ bool Storage::Revert() // Set the storage type void Storage::SetClass( const SvGlobalName & rClass, - sal_uLong nOriginalClipFormat, + SotClipboardFormatId nOriginalClipFormat, const OUString & rUserTypeName ) { if( Validate( true ) ) @@ -959,7 +960,7 @@ void Storage::SetClass( const SvGlobalName & rClass, } void Storage::SetConvertClass( const SvGlobalName & rConvertClass, - sal_uLong nOriginalClipFormat, + SotClipboardFormatId nOriginalClipFormat, const OUString & rUserTypeName ) { if( Validate( true ) ) @@ -986,13 +987,13 @@ SvGlobalName Storage::GetClassName() return SvGlobalName(); } -sal_uLong Storage::GetFormat() +SotClipboardFormatId Storage::GetFormat() { StgCompObjStream aCompObj( *this, false ); if( aCompObj.Load() ) return aCompObj.GetCbFormat(); pIo->ResetError(); - return 0; + return SotClipboardFormatId::NONE; } OUString Storage::GetUserName() diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx index f52dff841cd8..2fcbffabf1e5 100644 --- a/sot/source/sdstor/stgole.cxx +++ b/sot/source/sdstor/stgole.cxx @@ -23,6 +23,7 @@ #include "stgole.hxx" #include "sot/storinfo.hxx" #include <boost/scoped_array.hpp> +#include <sot/exchange.hxx> #ifdef _MSC_VER #pragma warning(disable: 4342) @@ -97,13 +98,13 @@ StgCompObjStream::StgCompObjStream( BaseStorage& rStg, bool bWr ) : StgInternalStream( rStg, OUString("\1CompObj"), bWr ) { memset( &aClsId, 0, sizeof( ClsId ) ); - nCbFormat = 0; + nCbFormat = SotClipboardFormatId::NONE; } bool StgCompObjStream::Load() { memset( &aClsId, 0, sizeof( ClsId ) ); - nCbFormat = 0; + nCbFormat = SotClipboardFormatId::NONE; aUserName.clear(); if( GetError() != SVSTREAM_OK ) return false; diff --git a/sot/source/sdstor/stgole.hxx b/sot/source/sdstor/stgole.hxx index 035041d632a8..0ba992f70641 100644 --- a/sot/source/sdstor/stgole.hxx +++ b/sot/source/sdstor/stgole.hxx @@ -42,14 +42,14 @@ public: class StgCompObjStream : public StgInternalStream { - ClsId aClsId; - OUString aUserName; - sal_uLong nCbFormat; + ClsId aClsId; + OUString aUserName; + SotClipboardFormatId nCbFormat; public: StgCompObjStream( BaseStorage&, bool ); ClsId& GetClsId() { return aClsId; } OUString& GetUserName() { return aUserName; } - sal_uLong& GetCbFormat() { return nCbFormat; } + SotClipboardFormatId& GetCbFormat() { return nCbFormat; } bool Load(); bool Store(); }; diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 6de540de9d3b..d6e9bc1085f7 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -606,7 +606,7 @@ const OUString & SotStorage::GetName() const } void SotStorage::SetClass( const SvGlobalName & rName, - sal_uLong nOriginalClipFormat, + SotClipboardFormatId nOriginalClipFormat, const OUString & rUserTypeName ) { DBG_ASSERT( Owner(), "must be owner" ); @@ -627,9 +627,9 @@ SvGlobalName SotStorage::GetClassName() return aGN; } -sal_uLong SotStorage::GetFormat() +SotClipboardFormatId SotStorage::GetFormat() { - sal_uLong nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; DBG_ASSERT( Owner(), "must be owner" ); if( m_pOwnStg ) nFormat = m_pOwnStg->GetFormat(); @@ -863,11 +863,11 @@ SotStorage* SotStorage::OpenOLEStorage( const com::sun::star::uno::Reference < c return new SotStorage( pStream, true ); } -sal_Int32 SotStorage::GetFormatID( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage ) +SotClipboardFormatId SotStorage::GetFormatID( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage ) { uno::Reference< beans::XPropertySet > xProps( xStorage, uno::UNO_QUERY ); if ( !xProps.is() ) - return 0; + return SotClipboardFormatId::NONE; OUString aMediaType; xProps->getPropertyValue("MediaType") >>= aMediaType; @@ -878,39 +878,40 @@ sal_Int32 SotStorage::GetFormatID( const com::sun::star::uno::Reference < com::s return SotExchange::GetFormat( aDataFlavor ); } - return 0; + return SotClipboardFormatId::NONE; } sal_Int32 SotStorage::GetVersion( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage ) { - sal_Int32 nSotFormatID = SotStorage::GetFormatID( xStorage ); + SotClipboardFormatId nSotFormatID = SotStorage::GetFormatID( xStorage ); switch( nSotFormatID ) { - case SOT_FORMATSTR_ID_STARWRITER_8: - case SOT_FORMATSTR_ID_STARWRITER_8_TEMPLATE: - case SOT_FORMATSTR_ID_STARWRITERWEB_8: - case SOT_FORMATSTR_ID_STARWRITERGLOB_8: - case SOT_FORMATSTR_ID_STARWRITERGLOB_8_TEMPLATE: - case SOT_FORMATSTR_ID_STARDRAW_8: - case SOT_FORMATSTR_ID_STARDRAW_8_TEMPLATE: - case SOT_FORMATSTR_ID_STARIMPRESS_8: - case SOT_FORMATSTR_ID_STARIMPRESS_8_TEMPLATE: - case SOT_FORMATSTR_ID_STARCALC_8: - case SOT_FORMATSTR_ID_STARCALC_8_TEMPLATE: - case SOT_FORMATSTR_ID_STARCHART_8: - case SOT_FORMATSTR_ID_STARCHART_8_TEMPLATE: - case SOT_FORMATSTR_ID_STARMATH_8: - case SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE: + case SotClipboardFormatId::STARWRITER_8: + case SotClipboardFormatId::STARWRITER_8_TEMPLATE: + case SotClipboardFormatId::STARWRITERWEB_8: + case SotClipboardFormatId::STARWRITERGLOB_8: + case SotClipboardFormatId::STARWRITERGLOB_8_TEMPLATE: + case SotClipboardFormatId::STARDRAW_8: + case SotClipboardFormatId::STARDRAW_8_TEMPLATE: + case SotClipboardFormatId::STARIMPRESS_8: + case SotClipboardFormatId::STARIMPRESS_8_TEMPLATE: + case SotClipboardFormatId::STARCALC_8: + case SotClipboardFormatId::STARCALC_8_TEMPLATE: + case SotClipboardFormatId::STARCHART_8: + case SotClipboardFormatId::STARCHART_8_TEMPLATE: + case SotClipboardFormatId::STARMATH_8: + case SotClipboardFormatId::STARMATH_8_TEMPLATE: return SOFFICE_FILEFORMAT_8; - case SOT_FORMATSTR_ID_STARWRITER_60: - case SOT_FORMATSTR_ID_STARWRITERWEB_60: - case SOT_FORMATSTR_ID_STARWRITERGLOB_60: - case SOT_FORMATSTR_ID_STARDRAW_60: - case SOT_FORMATSTR_ID_STARIMPRESS_60: - case SOT_FORMATSTR_ID_STARCALC_60: - case SOT_FORMATSTR_ID_STARCHART_60: - case SOT_FORMATSTR_ID_STARMATH_60: + case SotClipboardFormatId::STARWRITER_60: + case SotClipboardFormatId::STARWRITERWEB_60: + case SotClipboardFormatId::STARWRITERGLOB_60: + case SotClipboardFormatId::STARDRAW_60: + case SotClipboardFormatId::STARIMPRESS_60: + case SotClipboardFormatId::STARCALC_60: + case SotClipboardFormatId::STARCHART_60: + case SotClipboardFormatId::STARMATH_60: return SOFFICE_FILEFORMAT_60; + default: break; } return 0; diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx index a12b353e94ae..7ff16c38f5a6 100644 --- a/sot/source/sdstor/storinfo.cxx +++ b/sot/source/sdstor/storinfo.cxx @@ -25,9 +25,9 @@ /************** class SvStorageInfo ************************************** *************************************************************************/ -sal_uLong ReadClipboardFormat( SvStream & rStm ) +SotClipboardFormatId ReadClipboardFormat( SvStream & rStm ) { - sal_uInt32 nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; sal_Int32 nLen = 0; rStm.ReadInt32( nLen ); if( rStm.IsEof() ) @@ -44,12 +44,18 @@ sal_uLong ReadClipboardFormat( SvStream & rStm ) rStm.SetError( SVSTREAM_GENERALERROR ); } else if( nLen == -1L ) + { // Windows clipboard format - // SV und Win stimmen ueberein (bis einschl. FORMAT_GDIMETAFILE) - rStm.ReadUInt32( nFormat ); + // SV und Win stimmen ueberein (bis einschl. SotClipboardFormatId::GDIMETAFILE) + sal_uInt32 nTmp; + rStm.ReadUInt32( nTmp ); + nFormat = static_cast<SotClipboardFormatId>(nTmp); + } else if( nLen == -2L ) { - rStm.ReadUInt32( nFormat ); + sal_uInt32 nTmp; + rStm.ReadUInt32( nTmp ); + nFormat = static_cast<SotClipboardFormatId>(nTmp); // Mac clipboard format // ??? not implemented rStm.SetError( SVSTREAM_GENERALERROR ); @@ -62,11 +68,11 @@ sal_uLong ReadClipboardFormat( SvStream & rStm ) return nFormat; } -void WriteClipboardFormat( SvStream & rStm, sal_uLong nFormat ) +void WriteClipboardFormat( SvStream & rStm, SotClipboardFormatId nFormat ) { // determine the clipboard format string OUString aCbFmt; - if( nFormat > FORMAT_GDIMETAFILE ) + if( nFormat > SotClipboardFormatId::GDIMETAFILE ) aCbFmt = SotExchange::GetFormatName( nFormat ); if( !aCbFmt.isEmpty() ) { @@ -76,10 +82,10 @@ void WriteClipboardFormat( SvStream & rStm, sal_uLong nFormat ) rStm.WriteCharPtr( (const char *)aAsciiCbFmt.getStr() ); rStm.WriteUChar( 0 ); } - else if( nFormat ) + else if( nFormat != SotClipboardFormatId::NONE ) { rStm.WriteInt32( -1 ) // for Windows - .WriteInt32( nFormat ); + .WriteInt32( static_cast<sal_Int32>(nFormat) ); } else { diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 69d75df14e70..11a6f61ce483 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -314,80 +314,80 @@ TYPEINIT1( UCBStorage, BaseStorage ); #define min( x, y ) (( x < y ) ? x : y) -sal_Int32 GetFormatId_Impl( SvGlobalName aName ) +SotClipboardFormatId GetFormatId_Impl( SvGlobalName aName ) { if ( aName == SvGlobalName( SO3_SW_CLASSID_60 ) ) - return SOT_FORMATSTR_ID_STARWRITER_60; + return SotClipboardFormatId::STARWRITER_60; if ( aName == SvGlobalName( SO3_SWWEB_CLASSID_60 ) ) - return SOT_FORMATSTR_ID_STARWRITERWEB_60; + return SotClipboardFormatId::STARWRITERWEB_60; if ( aName == SvGlobalName( SO3_SWGLOB_CLASSID_60 ) ) - return SOT_FORMATSTR_ID_STARWRITERGLOB_60; + return SotClipboardFormatId::STARWRITERGLOB_60; if ( aName == SvGlobalName( SO3_SDRAW_CLASSID_60 ) ) - return SOT_FORMATSTR_ID_STARDRAW_60; + return SotClipboardFormatId::STARDRAW_60; if ( aName == SvGlobalName( SO3_SIMPRESS_CLASSID_60 ) ) - return SOT_FORMATSTR_ID_STARIMPRESS_60; + return SotClipboardFormatId::STARIMPRESS_60; if ( aName == SvGlobalName( SO3_SC_CLASSID_60 ) ) - return SOT_FORMATSTR_ID_STARCALC_60; + return SotClipboardFormatId::STARCALC_60; if ( aName == SvGlobalName( SO3_SCH_CLASSID_60 ) ) - return SOT_FORMATSTR_ID_STARCHART_60; + return SotClipboardFormatId::STARCHART_60; if ( aName == SvGlobalName( SO3_SM_CLASSID_60 ) ) - return SOT_FORMATSTR_ID_STARMATH_60; + return SotClipboardFormatId::STARMATH_60; if ( aName == SvGlobalName( SO3_OUT_CLASSID ) || aName == SvGlobalName( SO3_APPLET_CLASSID ) || aName == SvGlobalName( SO3_PLUGIN_CLASSID ) || aName == SvGlobalName( SO3_IFRAME_CLASSID ) ) // allowed, but not supported - return 0; + return SotClipboardFormatId::NONE; else { OSL_FAIL( "Unknown UCB storage format!" ); - return 0; + return SotClipboardFormatId::NONE; } } -SvGlobalName GetClassId_Impl( sal_Int32 nFormat ) +SvGlobalName GetClassId_Impl( SotClipboardFormatId nFormat ) { switch ( nFormat ) { - case SOT_FORMATSTR_ID_STARWRITER_8 : - case SOT_FORMATSTR_ID_STARWRITER_8_TEMPLATE : + case SotClipboardFormatId::STARWRITER_8 : + case SotClipboardFormatId::STARWRITER_8_TEMPLATE : return SvGlobalName( SO3_SW_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARWRITERWEB_8 : + case SotClipboardFormatId::STARWRITERWEB_8 : return SvGlobalName( SO3_SWWEB_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARWRITERGLOB_8 : - case SOT_FORMATSTR_ID_STARWRITERGLOB_8_TEMPLATE : + case SotClipboardFormatId::STARWRITERGLOB_8 : + case SotClipboardFormatId::STARWRITERGLOB_8_TEMPLATE : return SvGlobalName( SO3_SWGLOB_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARDRAW_8 : - case SOT_FORMATSTR_ID_STARDRAW_8_TEMPLATE : + case SotClipboardFormatId::STARDRAW_8 : + case SotClipboardFormatId::STARDRAW_8_TEMPLATE : return SvGlobalName( SO3_SDRAW_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARIMPRESS_8 : - case SOT_FORMATSTR_ID_STARIMPRESS_8_TEMPLATE : + case SotClipboardFormatId::STARIMPRESS_8 : + case SotClipboardFormatId::STARIMPRESS_8_TEMPLATE : return SvGlobalName( SO3_SIMPRESS_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARCALC_8 : - case SOT_FORMATSTR_ID_STARCALC_8_TEMPLATE : + case SotClipboardFormatId::STARCALC_8 : + case SotClipboardFormatId::STARCALC_8_TEMPLATE : return SvGlobalName( SO3_SC_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARCHART_8 : - case SOT_FORMATSTR_ID_STARCHART_8_TEMPLATE : + case SotClipboardFormatId::STARCHART_8 : + case SotClipboardFormatId::STARCHART_8_TEMPLATE : return SvGlobalName( SO3_SCH_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARMATH_8 : - case SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE : + case SotClipboardFormatId::STARMATH_8 : + case SotClipboardFormatId::STARMATH_8_TEMPLATE : return SvGlobalName( SO3_SM_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARWRITER_60 : + case SotClipboardFormatId::STARWRITER_60 : return SvGlobalName( SO3_SW_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARWRITERWEB_60 : + case SotClipboardFormatId::STARWRITERWEB_60 : return SvGlobalName( SO3_SWWEB_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARWRITERGLOB_60 : + case SotClipboardFormatId::STARWRITERGLOB_60 : return SvGlobalName( SO3_SWGLOB_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARDRAW_60 : + case SotClipboardFormatId::STARDRAW_60 : return SvGlobalName( SO3_SDRAW_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARIMPRESS_60 : + case SotClipboardFormatId::STARIMPRESS_60 : return SvGlobalName( SO3_SIMPRESS_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARCALC_60 : + case SotClipboardFormatId::STARCALC_60 : return SvGlobalName( SO3_SC_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARCHART_60 : + case SotClipboardFormatId::STARCHART_60 : return SvGlobalName( SO3_SCH_CLASSID_60 ); - case SOT_FORMATSTR_ID_STARMATH_60 : + case SotClipboardFormatId::STARMATH_60 : return SvGlobalName( SO3_SM_CLASSID_60 ); default : return SvGlobalName(); @@ -492,7 +492,7 @@ public: bool m_bDirty; // ??? bool m_bIsLinked; bool m_bListCreated; - sal_uLong m_nFormat; + SotClipboardFormatId m_nFormat; OUString m_aUserTypeName; SvGlobalName m_aClassId; @@ -1540,7 +1540,7 @@ UCBStorage_Impl::UCBStorage_Impl( const ::ucbhelper::Content& rContent, const OU , m_bDirty( false ) , m_bIsLinked( true ) , m_bListCreated( false ) - , m_nFormat( 0 ) + , m_nFormat( SotClipboardFormatId::NONE ) , m_aClassId( SvGlobalName() ) , m_bRepairPackage( bIsRepair ) , m_xProgressHandler( xProgressHandler ) @@ -1573,7 +1573,7 @@ UCBStorage_Impl::UCBStorage_Impl( const OUString& rName, StreamMode nMode, UCBSt , m_bDirty( false ) , m_bIsLinked( false ) , m_bListCreated( false ) - , m_nFormat( 0 ) + , m_nFormat( SotClipboardFormatId::NONE ) , m_aClassId( SvGlobalName() ) , m_bRepairPackage( bIsRepair ) , m_xProgressHandler( xProgressHandler ) @@ -1624,7 +1624,7 @@ UCBStorage_Impl::UCBStorage_Impl( SvStream& rStream, UCBStorage* pStorage, bool , m_bDirty( false ) , m_bIsLinked( false ) , m_bListCreated( false ) - , m_nFormat( 0 ) + , m_nFormat( SotClipboardFormatId::NONE ) , m_aClassId( SvGlobalName() ) , m_bRepairPackage( false ) { @@ -2429,7 +2429,7 @@ void UCBStorage::SetDirty() pImp->m_bDirty = true; } -void UCBStorage::SetClass( const SvGlobalName & rClass, sal_uLong nOriginalClipFormat, const OUString & rUserTypeName ) +void UCBStorage::SetClass( const SvGlobalName & rClass, SotClipboardFormatId nOriginalClipFormat, const OUString & rUserTypeName ) { pImp->m_aClassId = rClass; pImp->m_nFormat = nOriginalClipFormat; @@ -2454,7 +2454,7 @@ void UCBStorage::SetClassId( const ClsId& rClsId ) // kept up to date, and also the other type information that is hold only at runtime because it can be reconstructed from // the content type pImp->m_nFormat = GetFormatId_Impl( pImp->m_aClassId ); - if ( pImp->m_nFormat ) + if ( pImp->m_nFormat != SotClipboardFormatId::NONE ) { ::com::sun::star::datatransfer::DataFlavor aDataFlavor; SotExchange::GetFormatDataFlavor( pImp->m_nFormat, aDataFlavor ); @@ -2468,7 +2468,7 @@ const ClsId& UCBStorage::GetClassId() const return ( const ClsId& ) pImp->m_aClassId.GetCLSID(); } -void UCBStorage::SetConvertClass( const SvGlobalName & /*rConvertClass*/, sal_uLong /*nOriginalClipFormat*/, const OUString & /*rUserTypeName*/ ) +void UCBStorage::SetConvertClass( const SvGlobalName & /*rConvertClass*/, SotClipboardFormatId /*nOriginalClipFormat*/, const OUString & /*rUserTypeName*/ ) { // ??? } @@ -2484,7 +2484,7 @@ SvGlobalName UCBStorage::GetClassName() return pImp->m_aClassId; } -sal_uLong UCBStorage::GetFormat() +SotClipboardFormatId UCBStorage::GetFormat() { return pImp->m_nFormat; } diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index 19012e1204d1..0976c863fbc4 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -117,7 +117,7 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener sal_uInt16 nAspect = ASPECT_CONTENT) SAL_OVERRIDE; virtual void FillClass(SvGlobalName* pClassName, - sal_uInt32* pFormat, + SotClipboardFormatId* pFormat, OUString* pAppName, OUString* pFullTypeName, OUString* pShortTypeName, diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx index adf80aabf7b2..293d94d4e5cf 100644 --- a/starmath/qa/extras/mmlimport-test.cxx +++ b/starmath/qa/extras/mmlimport-test.cxx @@ -45,7 +45,7 @@ private: SfxFilter* pFilter = new SfxFilter(MATHML_XML, OUString(), SFX_FILTER_IMPORT | SFX_FILTER_EXPORT | SFX_FILTER_TEMPLATE, - SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS, + SotClipboardFormatId::STARCALC_8, "MathML 1.01", 0, OUString(), diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index e958b43f8e92..e61da8fa5356 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -1308,7 +1308,7 @@ void SmDocShell::SetVisArea(const Rectangle & rVisArea) void SmDocShell::FillClass(SvGlobalName* pClassName, - sal_uInt32* pFormat, + SotClipboardFormatId* pFormat, OUString* /*pAppName*/, OUString* pFullTypeName, OUString* pShortTypeName, @@ -1318,14 +1318,14 @@ void SmDocShell::FillClass(SvGlobalName* pClassName, if (nFileFormat == SOFFICE_FILEFORMAT_60 ) { *pClassName = SvGlobalName(SO3_SM_CLASSID_60); - *pFormat = SOT_FORMATSTR_ID_STARMATH_60; + *pFormat = SotClipboardFormatId::STARMATH_60; *pFullTypeName = SM_RESSTR(STR_MATH_DOCUMENT_FULLTYPE_CURRENT); *pShortTypeName = SM_RESSTR(RID_DOCUMENTSTR); } else if (nFileFormat == SOFFICE_FILEFORMAT_8 ) { *pClassName = SvGlobalName(SO3_SM_CLASSID_60); - *pFormat = bTemplate ? SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE : SOT_FORMATSTR_ID_STARMATH_8; + *pFormat = bTemplate ? SotClipboardFormatId::STARMATH_8_TEMPLATE : SotClipboardFormatId::STARMATH_8; *pFullTypeName = SM_RESSTR(STR_MATH_DOCUMENT_FULLTYPE_CURRENT); *pShortTypeName = SM_RESSTR(RID_DOCUMENTSTR); } diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 875019098970..2d24750181cd 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -1889,7 +1889,7 @@ int MathType::ConvertFromStarMath( SfxMedium& rMedium ) SvGlobalName aGName(0x0002ce02L, 0x0000, 0x0000,0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46 ); - pStor->SetClass( aGName, 0, OUString("Microsoft Equation 3.0")); + pStor->SetClass( aGName, SotClipboardFormatId::NONE, OUString("Microsoft Equation 3.0")); static sal_uInt8 const aCompObj[] = { 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00, diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 6b1f2cf56b57..f0c497fd5bf3 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1554,11 +1554,11 @@ void SmViewShell::Execute(SfxRequest& rReq) { TransferableDataHelper aData( TransferableDataHelper::CreateFromSystemClipboard(GetEditWindow()) ); uno::Reference < io::XInputStream > xStrm; - SotFormatStringId nId; + SotClipboardFormatId nId; if( aData.GetTransferable().is() && - ( aData.HasFormat( nId = SOT_FORMATSTR_ID_EMBEDDED_OBJ ) || - (aData.HasFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) && - aData.HasFormat( nId = SOT_FORMATSTR_ID_EMBED_SOURCE )))) + ( aData.HasFormat( nId = SotClipboardFormatId::EMBEDDED_OBJ ) || + (aData.HasFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ) && + aData.HasFormat( nId = SotClipboardFormatId::EMBED_SOURCE )))) xStrm = aData.GetInputStream(nId, OUString()); if (xStrm.is()) @@ -1610,7 +1610,7 @@ void SmViewShell::Execute(SfxRequest& rReq) GetEditWindow()) ); if( aDataHelper.GetTransferable().is() && - aDataHelper.HasFormat( FORMAT_STRING )) + aDataHelper.HasFormat( SotClipboardFormatId::STRING )) pWin->Paste(); else bCallExec = true; @@ -1861,10 +1861,10 @@ void SmViewShell::GetState(SfxItemSet &rSet) pEditWin) ); bPasteState = aDataHelper.GetTransferable().is() && - ( aDataHelper.HasFormat( FORMAT_STRING ) || - aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBEDDED_OBJ ) || - (aDataHelper.HasFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) - && aDataHelper.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ))); + ( aDataHelper.HasFormat( SotClipboardFormatId::STRING ) || + aDataHelper.HasFormat( SotClipboardFormatId::EMBEDDED_OBJ ) || + (aDataHelper.HasFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ) + && aDataHelper.HasFormat( SotClipboardFormatId::EMBED_SOURCE ))); } if( !bPasteState ) rSet.DisableItem( nWh ); diff --git a/svl/source/svdde/ddedata.cxx b/svl/source/svdde/ddedata.cxx index d7568543485e..070bde18ca85 100644 --- a/svl/source/svdde/ddedata.cxx +++ b/svl/source/svdde/ddedata.cxx @@ -117,13 +117,13 @@ sal_uLong DdeData::GetExternalFormat( sal_uLong nFmt ) { switch( nFmt ) { - case FORMAT_STRING: + case SotClipboardFormatId::STRING: nFmt = CF_TEXT; break; - case FORMAT_BITMAP: + case SotClipboardFormatId::BITMAP: nFmt = CF_BITMAP; break; - case FORMAT_GDIMETAFILE: + case SotClipboardFormatId::GDIMETAFILE: nFmt = CF_METAFILEPICT; break; @@ -144,15 +144,15 @@ sal_uLong DdeData::GetInternalFormat( sal_uLong nFmt ) switch( nFmt ) { case CF_TEXT: - nFmt = FORMAT_STRING; + nFmt = SotClipboardFormatId::STRING; break; case CF_BITMAP: - nFmt = FORMAT_BITMAP; + nFmt = SotClipboardFormatId::BITMAP; break; case CF_METAFILEPICT: - nFmt = FORMAT_GDIMETAFILE; + nFmt = SotClipboardFormatId::GDIMETAFILE; break; default: diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index 952dfe9fb6b5..984d899fc598 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -477,7 +477,7 @@ DdeService::DdeService( const OUString& rService ) nStatus = DMLERR_SYS_ERROR; } } - AddFormat( FORMAT_STRING ); + AddFormat( SotClipboardFormatId::STRING ); pSysTopic = new DdeTopic( reinterpret_cast<const sal_Unicode*>(SZDDESYS_TOPIC) ); pSysTopic->AddItem( DdeItem( reinterpret_cast<const sal_Unicode*>(SZDDESYS_ITEM_TOPICS) ) ); pSysTopic->AddItem( DdeItem( reinterpret_cast<const sal_Unicode*>(SZDDESYS_ITEM_SYSITEMS) ) ); diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx index 33600249c321..d53594eb41f5 100644 --- a/svl/unx/source/svdde/ddedummy.cxx +++ b/svl/unx/source/svdde/ddedummy.cxx @@ -35,7 +35,7 @@ DdeData::DdeData( const DdeData& ) { } -DdeData::DdeData( const void*, long, sal_uLong) +DdeData::DdeData( const void*, long, SotClipboardFormatId) : pImp(NULL) { } @@ -44,13 +44,13 @@ DdeData::~DdeData() { } -void DdeData::SetFormat( SAL_UNUSED_PARAMETER sal_uLong ) +void DdeData::SetFormat( SAL_UNUSED_PARAMETER SotClipboardFormatId ) { } -sal_uLong DdeData::GetFormat() const +SotClipboardFormatId DdeData::GetFormat() const { - return 0L; + return SotClipboardFormatId::NONE; } DdeData& DdeData::operator = ( const DdeData& ) @@ -319,7 +319,7 @@ DdeGetPutItem::DdeGetPutItem( const DdeItem& rItem ) { } -DdeData* DdeGetPutItem::Get( SAL_UNUSED_PARAMETER sal_uLong ) +DdeData* DdeGetPutItem::Get( SAL_UNUSED_PARAMETER SotClipboardFormatId ) { return NULL; } diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index b64b7c4d70a4..5eb10d95e61f 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -86,7 +86,7 @@ void* BrowseBox::implGetDataFlavors() const -bool BrowseBox::IsDropFormatSupported( SotFormatStringId _nFormat ) +bool BrowseBox::IsDropFormatSupported( SotClipboardFormatId _nFormat ) { if ( static_cast< BrowserDataWin* >( pDataWin )->bCallingDropCallback ) return static_cast< BrowserDataWin* >( pDataWin )->IsDropFormatSupported( _nFormat ); @@ -96,7 +96,7 @@ bool BrowseBox::IsDropFormatSupported( SotFormatStringId _nFormat ) -bool BrowseBox::IsDropFormatSupported( SotFormatStringId _nFormat ) const +bool BrowseBox::IsDropFormatSupported( SotClipboardFormatId _nFormat ) const { return const_cast< BrowseBox* >( this )->IsDropFormatSupported( _nFormat ); } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index fcb1836103bd..581485ab6789 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -1223,7 +1223,7 @@ sal_Int8 SvTreeListBox::AcceptDrop( const AcceptDropEvent& rEvt ) else { SvTreeListEntry* pEntry = GetDropTarget( rEvt.maPosPixel ); - if( !IsDropFormatSupported( SOT_FORMATSTR_ID_TREELISTBOX ) ) + if( !IsDropFormatSupported( SotClipboardFormatId::TREELISTBOX ) ) { SAL_WARN( "svtools.contnr", "SvTreeListBox::QueryDrop(): no format" ); } @@ -1265,9 +1265,9 @@ sal_Int8 SvTreeListBox::ExecuteDrop( const ExecuteDropEvent& rEvt, SvTreeListBox SvLBoxDDInfo aDDInfo; TransferableDataHelper aData( rEvt.maDropEvent.Transferable ); - if( aData.HasFormat( SOT_FORMATSTR_ID_TREELISTBOX )) + if( aData.HasFormat( SotClipboardFormatId::TREELISTBOX )) { - css::uno::Sequence<sal_Int8> aSeq = aData.GetSequence(SOT_FORMATSTR_ID_TREELISTBOX, OUString()); + css::uno::Sequence<sal_Int8> aSeq = aData.GetSequence(SotClipboardFormatId::TREELISTBOX, OUString()); if (sizeof(SvLBoxDDInfo) == aSeq.getLength()) { memcpy( &aDDInfo, aSeq.getConstArray(), sizeof(SvLBoxDDInfo) ); @@ -1347,7 +1347,7 @@ void SvTreeListBox::StartDrag( sal_Int8, const Point& rPosPixel ) // let derived views do their thing WriteDragServerInfo( rPosPixel, &aDDInfo ); - pContainer->CopyAnyData( SOT_FORMATSTR_ID_TREELISTBOX, + pContainer->CopyAnyData( SotClipboardFormatId::TREELISTBOX, reinterpret_cast<char*>(&aDDInfo), sizeof(SvLBoxDDInfo) ); pDDSource = this; pDDTarget = 0; diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index c7d9aa09719d..e7aec0197af7 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -188,82 +188,82 @@ void SvObjectServerList::FillInsertObjects() } } -OUString SvPasteObjectHelper::GetSotFormatUIName( SotFormatStringId nId ) +OUString SvPasteObjectHelper::GetSotFormatUIName( SotClipboardFormatId nId ) { struct SotResourcePair { - SotFormatStringId mnSotId; + SotClipboardFormatId mnSotId; sal_uInt16 mnResId; }; static const SotResourcePair aSotResourcePairs[] = { - { SOT_FORMAT_STRING, STR_FORMAT_STRING }, - { SOT_FORMAT_BITMAP, STR_FORMAT_BITMAP }, - { SOT_FORMAT_GDIMETAFILE, STR_FORMAT_GDIMETAFILE }, - { SOT_FORMAT_RTF, STR_FORMAT_RTF }, - { SOT_FORMATSTR_ID_DRAWING, STR_FORMAT_ID_DRAWING }, - { SOT_FORMATSTR_ID_SVXB, STR_FORMAT_ID_SVXB }, - { SOT_FORMATSTR_ID_INTERNALLINK_STATE, STR_FORMAT_ID_INTERNALLINK_STATE }, - { SOT_FORMATSTR_ID_SOLK, STR_FORMAT_ID_SOLK }, - { SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, STR_FORMAT_ID_NETSCAPE_BOOKMARK }, - { SOT_FORMATSTR_ID_STARSERVER, STR_FORMAT_ID_STARSERVER }, - { SOT_FORMATSTR_ID_STAROBJECT, STR_FORMAT_ID_STAROBJECT }, - { SOT_FORMATSTR_ID_APPLETOBJECT, STR_FORMAT_ID_APPLETOBJECT }, - { SOT_FORMATSTR_ID_PLUGIN_OBJECT, STR_FORMAT_ID_PLUGIN_OBJECT }, - { SOT_FORMATSTR_ID_STARWRITER_30, STR_FORMAT_ID_STARWRITER_30 }, - { SOT_FORMATSTR_ID_STARWRITER_40, STR_FORMAT_ID_STARWRITER_40 }, - { SOT_FORMATSTR_ID_STARWRITER_50, STR_FORMAT_ID_STARWRITER_50 }, - { SOT_FORMATSTR_ID_STARWRITERWEB_40, STR_FORMAT_ID_STARWRITERWEB_40 }, - { SOT_FORMATSTR_ID_STARWRITERWEB_50, STR_FORMAT_ID_STARWRITERWEB_50 }, - { SOT_FORMATSTR_ID_STARWRITERGLOB_40, STR_FORMAT_ID_STARWRITERGLOB_40 }, - { SOT_FORMATSTR_ID_STARWRITERGLOB_50, STR_FORMAT_ID_STARWRITERGLOB_50 }, - { SOT_FORMATSTR_ID_STARDRAW, STR_FORMAT_ID_STARDRAW }, - { SOT_FORMATSTR_ID_STARDRAW_40, STR_FORMAT_ID_STARDRAW_40 }, - { SOT_FORMATSTR_ID_STARIMPRESS_50, STR_FORMAT_ID_STARIMPRESS_50 }, - { SOT_FORMATSTR_ID_STARDRAW_50, STR_FORMAT_ID_STARDRAW_50 }, - { SOT_FORMATSTR_ID_STARCALC, STR_FORMAT_ID_STARCALC }, - { SOT_FORMATSTR_ID_STARCALC_40, STR_FORMAT_ID_STARCALC_40 }, - { SOT_FORMATSTR_ID_STARCALC_50, STR_FORMAT_ID_STARCALC_50 }, - { SOT_FORMATSTR_ID_STARCHART, STR_FORMAT_ID_STARCHART }, - { SOT_FORMATSTR_ID_STARCHART_40, STR_FORMAT_ID_STARCHART_40 }, - { SOT_FORMATSTR_ID_STARCHART_50, STR_FORMAT_ID_STARCHART_50 }, - { SOT_FORMATSTR_ID_STARIMAGE, STR_FORMAT_ID_STARIMAGE }, - { SOT_FORMATSTR_ID_STARIMAGE_40, STR_FORMAT_ID_STARIMAGE_40 }, - { SOT_FORMATSTR_ID_STARIMAGE_50, STR_FORMAT_ID_STARIMAGE_50 }, - { SOT_FORMATSTR_ID_STARMATH, STR_FORMAT_ID_STARMATH }, - { SOT_FORMATSTR_ID_STARMATH_40, STR_FORMAT_ID_STARMATH_40 }, - { SOT_FORMATSTR_ID_STARMATH_50, STR_FORMAT_ID_STARMATH_50 }, - { SOT_FORMATSTR_ID_STAROBJECT_PAINTDOC, STR_FORMAT_ID_STAROBJECT_PAINTDOC }, - { SOT_FORMATSTR_ID_HTML, STR_FORMAT_ID_HTML }, - { SOT_FORMATSTR_ID_HTML_SIMPLE, STR_FORMAT_ID_HTML_SIMPLE }, - { SOT_FORMATSTR_ID_BIFF_5, STR_FORMAT_ID_BIFF_5 }, - { SOT_FORMATSTR_ID_BIFF_8, STR_FORMAT_ID_BIFF_8 }, - { SOT_FORMATSTR_ID_SYLK, STR_FORMAT_ID_SYLK }, - { SOT_FORMATSTR_ID_LINK, STR_FORMAT_ID_LINK }, - { SOT_FORMATSTR_ID_DIF, STR_FORMAT_ID_DIF }, - { SOT_FORMATSTR_ID_MSWORD_DOC, STR_FORMAT_ID_MSWORD_DOC }, - { SOT_FORMATSTR_ID_STAR_FRAMESET_DOC, STR_FORMAT_ID_STAR_FRAMESET_DOC }, - { SOT_FORMATSTR_ID_OFFICE_DOC, STR_FORMAT_ID_OFFICE_DOC }, - { SOT_FORMATSTR_ID_NOTES_DOCINFO, STR_FORMAT_ID_NOTES_DOCINFO }, - { SOT_FORMATSTR_ID_SFX_DOC, STR_FORMAT_ID_SFX_DOC }, - { SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50,STR_FORMAT_ID_STARCHARTDOCUMENT_50 }, - { SOT_FORMATSTR_ID_GRAPHOBJ, STR_FORMAT_ID_GRAPHOBJ }, - { SOT_FORMATSTR_ID_STARWRITER_60, STR_FORMAT_ID_STARWRITER_60 }, - { SOT_FORMATSTR_ID_STARWRITERWEB_60, STR_FORMAT_ID_STARWRITERWEB_60 }, - { SOT_FORMATSTR_ID_STARWRITERGLOB_60, STR_FORMAT_ID_STARWRITERGLOB_60 }, - { SOT_FORMATSTR_ID_STARDRAW_60, STR_FORMAT_ID_STARDRAW_60 }, - { SOT_FORMATSTR_ID_STARIMPRESS_60, STR_FORMAT_ID_STARIMPRESS_60 }, - { SOT_FORMATSTR_ID_STARCALC_60, STR_FORMAT_ID_STARCALC_60 }, - { SOT_FORMATSTR_ID_STARCHART_60, STR_FORMAT_ID_STARCHART_60 }, - { SOT_FORMATSTR_ID_STARMATH_60, STR_FORMAT_ID_STARMATH_60 }, - { SOT_FORMATSTR_ID_WMF, STR_FORMAT_ID_WMF }, - { SOT_FORMATSTR_ID_DBACCESS_QUERY, STR_FORMAT_ID_DBACCESS_QUERY }, - { SOT_FORMATSTR_ID_DBACCESS_TABLE, STR_FORMAT_ID_DBACCESS_TABLE }, - { SOT_FORMATSTR_ID_DBACCESS_COMMAND, STR_FORMAT_ID_DBACCESS_COMMAND }, - { SOT_FORMATSTR_ID_DIALOG_60, STR_FORMAT_ID_DIALOG_60 }, - { SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, STR_FORMAT_ID_FILEGRPDESCRIPTOR }, - { SOT_FORMATSTR_ID_HTML_NO_COMMENT, STR_FORMAT_ID_HTML_NO_COMMENT } + { SotClipboardFormatId::STRING, STR_FORMAT_STRING }, + { SotClipboardFormatId::BITMAP, STR_FORMAT_BITMAP }, + { SotClipboardFormatId::GDIMETAFILE, STR_FORMAT_GDIMETAFILE }, + { SotClipboardFormatId::RTF, STR_FORMAT_RTF }, + { SotClipboardFormatId::DRAWING, STR_FORMAT_ID_DRAWING }, + { SotClipboardFormatId::SVXB, STR_FORMAT_ID_SVXB }, + { SotClipboardFormatId::INTERNALLINK_STATE, STR_FORMAT_ID_INTERNALLINK_STATE }, + { SotClipboardFormatId::SOLK, STR_FORMAT_ID_SOLK }, + { SotClipboardFormatId::NETSCAPE_BOOKMARK, STR_FORMAT_ID_NETSCAPE_BOOKMARK }, + { SotClipboardFormatId::STARSERVER, STR_FORMAT_ID_STARSERVER }, + { SotClipboardFormatId::STAROBJECT, STR_FORMAT_ID_STAROBJECT }, + { SotClipboardFormatId::APPLETOBJECT, STR_FORMAT_ID_APPLETOBJECT }, + { SotClipboardFormatId::PLUGIN_OBJECT, STR_FORMAT_ID_PLUGIN_OBJECT }, + { SotClipboardFormatId::STARWRITER_30, STR_FORMAT_ID_STARWRITER_30 }, + { SotClipboardFormatId::STARWRITER_40, STR_FORMAT_ID_STARWRITER_40 }, + { SotClipboardFormatId::STARWRITER_50, STR_FORMAT_ID_STARWRITER_50 }, + { SotClipboardFormatId::STARWRITERWEB_40, STR_FORMAT_ID_STARWRITERWEB_40 }, + { SotClipboardFormatId::STARWRITERWEB_50, STR_FORMAT_ID_STARWRITERWEB_50 }, + { SotClipboardFormatId::STARWRITERGLOB_40, STR_FORMAT_ID_STARWRITERGLOB_40 }, + { SotClipboardFormatId::STARWRITERGLOB_50, STR_FORMAT_ID_STARWRITERGLOB_50 }, + { SotClipboardFormatId::STARDRAW, STR_FORMAT_ID_STARDRAW }, + { SotClipboardFormatId::STARDRAW_40, STR_FORMAT_ID_STARDRAW_40 }, + { SotClipboardFormatId::STARIMPRESS_50, STR_FORMAT_ID_STARIMPRESS_50 }, + { SotClipboardFormatId::STARDRAW_50, STR_FORMAT_ID_STARDRAW_50 }, + { SotClipboardFormatId::STARCALC, STR_FORMAT_ID_STARCALC }, + { SotClipboardFormatId::STARCALC_40, STR_FORMAT_ID_STARCALC_40 }, + { SotClipboardFormatId::STARCALC_50, STR_FORMAT_ID_STARCALC_50 }, + { SotClipboardFormatId::STARCHART, STR_FORMAT_ID_STARCHART }, + { SotClipboardFormatId::STARCHART_40, STR_FORMAT_ID_STARCHART_40 }, + { SotClipboardFormatId::STARCHART_50, STR_FORMAT_ID_STARCHART_50 }, + { SotClipboardFormatId::STARIMAGE, STR_FORMAT_ID_STARIMAGE }, + { SotClipboardFormatId::STARIMAGE_40, STR_FORMAT_ID_STARIMAGE_40 }, + { SotClipboardFormatId::STARIMAGE_50, STR_FORMAT_ID_STARIMAGE_50 }, + { SotClipboardFormatId::STARMATH, STR_FORMAT_ID_STARMATH }, + { SotClipboardFormatId::STARMATH_40, STR_FORMAT_ID_STARMATH_40 }, + { SotClipboardFormatId::STARMATH_50, STR_FORMAT_ID_STARMATH_50 }, + { SotClipboardFormatId::STAROBJECT_PAINTDOC, STR_FORMAT_ID_STAROBJECT_PAINTDOC }, + { SotClipboardFormatId::HTML, STR_FORMAT_ID_HTML }, + { SotClipboardFormatId::HTML_SIMPLE, STR_FORMAT_ID_HTML_SIMPLE }, + { SotClipboardFormatId::BIFF_5, STR_FORMAT_ID_BIFF_5 }, + { SotClipboardFormatId::BIFF_8, STR_FORMAT_ID_BIFF_8 }, + { SotClipboardFormatId::SYLK, STR_FORMAT_ID_SYLK }, + { SotClipboardFormatId::LINK, STR_FORMAT_ID_LINK }, + { SotClipboardFormatId::DIF, STR_FORMAT_ID_DIF }, + { SotClipboardFormatId::MSWORD_DOC, STR_FORMAT_ID_MSWORD_DOC }, + { SotClipboardFormatId::STAR_FRAMESET_DOC, STR_FORMAT_ID_STAR_FRAMESET_DOC }, + { SotClipboardFormatId::OFFICE_DOC, STR_FORMAT_ID_OFFICE_DOC }, + { SotClipboardFormatId::NOTES_DOCINFO, STR_FORMAT_ID_NOTES_DOCINFO }, + { SotClipboardFormatId::SFX_DOC, STR_FORMAT_ID_SFX_DOC }, + { SotClipboardFormatId::STARCHARTDOCUMENT_50,STR_FORMAT_ID_STARCHARTDOCUMENT_50 }, + { SotClipboardFormatId::GRAPHOBJ, STR_FORMAT_ID_GRAPHOBJ }, + { SotClipboardFormatId::STARWRITER_60, STR_FORMAT_ID_STARWRITER_60 }, + { SotClipboardFormatId::STARWRITERWEB_60, STR_FORMAT_ID_STARWRITERWEB_60 }, + { SotClipboardFormatId::STARWRITERGLOB_60, STR_FORMAT_ID_STARWRITERGLOB_60 }, + { SotClipboardFormatId::STARDRAW_60, STR_FORMAT_ID_STARDRAW_60 }, + { SotClipboardFormatId::STARIMPRESS_60, STR_FORMAT_ID_STARIMPRESS_60 }, + { SotClipboardFormatId::STARCALC_60, STR_FORMAT_ID_STARCALC_60 }, + { SotClipboardFormatId::STARCHART_60, STR_FORMAT_ID_STARCHART_60 }, + { SotClipboardFormatId::STARMATH_60, STR_FORMAT_ID_STARMATH_60 }, + { SotClipboardFormatId::WMF, STR_FORMAT_ID_WMF }, + { SotClipboardFormatId::DBACCESS_QUERY, STR_FORMAT_ID_DBACCESS_QUERY }, + { SotClipboardFormatId::DBACCESS_TABLE, STR_FORMAT_ID_DBACCESS_TABLE }, + { SotClipboardFormatId::DBACCESS_COMMAND, STR_FORMAT_ID_DBACCESS_COMMAND }, + { SotClipboardFormatId::DIALOG_60, STR_FORMAT_ID_DIALOG_60 }, + { SotClipboardFormatId::FILEGRPDESCRIPTOR, STR_FORMAT_ID_FILEGRPDESCRIPTOR }, + { SotClipboardFormatId::HTML_NO_COMMENT, STR_FORMAT_ID_HTML_NO_COMMENT } }; OUString aUIName; @@ -283,13 +283,13 @@ OUString SvPasteObjectHelper::GetSotFormatUIName( SotFormatStringId nId ) return aUIName; } -bool SvPasteObjectHelper::GetEmbeddedName(const TransferableDataHelper& rData, OUString& _rName, OUString& _rSource, SotFormatStringId& _nFormat) +bool SvPasteObjectHelper::GetEmbeddedName(const TransferableDataHelper& rData, OUString& _rName, OUString& _rSource, SotClipboardFormatId& _nFormat) { bool bRet = false; - if( _nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE_OLE || _nFormat == SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ) + if( _nFormat == SotClipboardFormatId::EMBED_SOURCE_OLE || _nFormat == SotClipboardFormatId::EMBEDDED_OBJ_OLE ) { datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::OBJECTDESCRIPTOR_OLE, aFlavor ); uno::Any aAny; if( rData.HasFormat( aFlavor ) && @@ -315,7 +315,7 @@ bool SvPasteObjectHelper::GetEmbeddedName(const TransferableDataHelper& rData, O _rName += pUserTypeName; // the following statement was here for historical reasons, it is commented out since it causes bug i49460 - // _nFormat = SOT_FORMATSTR_ID_EMBED_SOURCE_OLE; + // _nFormat = SotClipboardFormatId::EMBED_SOURCE_OLE; } // determine the source of the embedded object diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx index da622b09a1ad..836b98977238 100644 --- a/svtools/source/misc/embedtransfer.cxx +++ b/svtools/source/misc/embedtransfer.cxx @@ -73,10 +73,10 @@ void SvEmbedTransferHelper::SetParentShellID( const OUString& rShellID ) void SvEmbedTransferHelper::AddSupportedFormats() { - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( FORMAT_GDIMETAFILE ); - AddFormat( FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::BITMAP ); } @@ -89,16 +89,16 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo { try { - sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor ); + SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor ); if( HasFormat( nFormat ) ) { - if( nFormat == SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) + if( nFormat == SotClipboardFormatId::OBJECTDESCRIPTOR ) { TransferableObjectDescriptor aDesc; FillTransferableObjectDescriptor( aDesc, m_xObj, m_pGraphic, m_nAspect ); bRet = SetTransferableObjectDescriptor( aDesc, rFlavor ); } - else if( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ) + else if( nFormat == SotClipboardFormatId::EMBED_SOURCE ) { try { @@ -157,7 +157,7 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo { } } - else if ( nFormat == FORMAT_GDIMETAFILE && m_pGraphic ) + else if ( nFormat == SotClipboardFormatId::GDIMETAFILE && m_pGraphic ) { SvMemoryStream aMemStm( 65535, 65535 ); aMemStm.SetVersion( SOFFICE_FILEFORMAT_CURRENT ); @@ -170,7 +170,7 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo SetAny( aAny, rFlavor ); bRet = true; } - else if ( ( nFormat == FORMAT_BITMAP || nFormat == SOT_FORMATSTR_ID_PNG ) && m_pGraphic ) + else if ( ( nFormat == SotClipboardFormatId::BITMAP || nFormat == SotClipboardFormatId::PNG ) && m_pGraphic ) { bRet = SetBitmapEx( m_pGraphic->GetBitmapEx(), rFlavor ); } @@ -209,7 +209,7 @@ void SvEmbedTransferHelper::FillTransferableObjectDescriptor( TransferableObject { //TODO/LATER: need TypeName to fill it into the Descriptor (will be shown in listbox) ::com::sun::star::datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::OBJECTDESCRIPTOR, aFlavor ); rDesc.maClassName = SvGlobalName( xObj->getClassID() ); rDesc.maTypeName = aFlavor.HumanPresentableName; diff --git a/svtools/source/misc/openfiledroptargetlistener.cxx b/svtools/source/misc/openfiledroptargetlistener.cxx index e50cb0b35293..042c5c78ab7a 100644 --- a/svtools/source/misc/openfiledroptargetlistener.cxx +++ b/svtools/source/misc/openfiledroptargetlistener.cxx @@ -78,7 +78,7 @@ void SAL_CALL OpenFileDropTargetListener::drop( const css::datatransfer::dnd::Dr FileList aFileList; // at first check filelist format - if ( aHelper.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ) ) + if ( aHelper.GetFileList( SotClipboardFormatId::FILE_LIST, aFileList ) ) { sal_uLong i, nCount = aFileList.Count(); for ( i = 0; i < nCount; ++i ) @@ -88,7 +88,7 @@ void SAL_CALL OpenFileDropTargetListener::drop( const css::datatransfer::dnd::Dr // then, if necessary, the file format OUString aFilePath; - if ( !bFormatFound && aHelper.GetString( SOT_FORMAT_FILE, aFilePath ) ) + if ( !bFormatFound && aHelper.GetString( SotClipboardFormatId::FILE, aFilePath ) ) implts_OpenFile( aFilePath ); } dtde.Context->dropComplete( css::datatransfer::dnd::DNDConstants::ACTION_NONE != nAction ); @@ -132,8 +132,8 @@ void SAL_CALL OpenFileDropTargetListener::dragOver( const css::datatransfer::dnd { try { - bool bAccept = ( implts_IsDropFormatSupported( SOT_FORMAT_FILE ) || - implts_IsDropFormatSupported( SOT_FORMAT_FILE_LIST ) ); + bool bAccept = ( implts_IsDropFormatSupported( SotClipboardFormatId::FILE ) || + implts_IsDropFormatSupported( SotClipboardFormatId::FILE_LIST ) ); if ( !bAccept ) dtde.Context->rejectDrag(); @@ -170,7 +170,7 @@ void OpenFileDropTargetListener::implts_EndDrag() /* } SAFE */ } -bool OpenFileDropTargetListener::implts_IsDropFormatSupported( SotFormatStringId nFormat ) +bool OpenFileDropTargetListener::implts_IsDropFormatSupported( SotClipboardFormatId nFormat ) { /* SAFE { */ SolarMutexGuard aGuard; diff --git a/svtools/source/misc/stringtransfer.cxx b/svtools/source/misc/stringtransfer.cxx index 0c8637f46c14..da7396101cfa 100644 --- a/svtools/source/misc/stringtransfer.cxx +++ b/svtools/source/misc/stringtransfer.cxx @@ -40,14 +40,14 @@ namespace svt void OStringTransferable::AddSupportedFormats() { - AddFormat(SOT_FORMAT_STRING); + AddFormat(SotClipboardFormatId::STRING); } bool OStringTransferable::GetData( const DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ ) { - sal_uInt32 nFormat = SotExchange::GetFormat( _rFlavor ); - if (SOT_FORMAT_STRING == nFormat) + SotClipboardFormatId nFormat = SotExchange::GetFormat( _rFlavor ); + if (SotClipboardFormatId::STRING == nFormat) return SetString( m_sContent, _rFlavor ); return false; @@ -76,10 +76,10 @@ namespace svt ++aSearch ) { - if (SOT_FORMAT_STRING == aSearch->mnSotId) + if (SotClipboardFormatId::STRING == aSearch->mnSotId) { OUString sContent; - bool bSuccess = aClipboardData.GetString( SOT_FORMAT_STRING, sContent ); + bool bSuccess = aClipboardData.GetString( SotClipboardFormatId::STRING, sContent ); _rContent = sContent; return bSuccess; } diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 255ba7fe3bb7..5c2ccbe7b414 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -325,22 +325,22 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co AddSupportedFormats(); // check alien formats first and try to get a substitution format - if( SotExchange::GetFormatDataFlavor( FORMAT_STRING, aSubstFlavor ) && + if( SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aSubstFlavor ) && TransferableDataHelper::IsEqual( aSubstFlavor, rFlavor ) ) { GetData(aSubstFlavor, rDestDoc); bDone = maAny.hasValue(); } - else if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_BMP, aSubstFlavor ) + else if(SotExchange::GetFormatDataFlavor(SotClipboardFormatId::BMP, aSubstFlavor ) && TransferableDataHelper::IsEqual( aSubstFlavor, rFlavor ) - && SotExchange::GetFormatDataFlavor(FORMAT_BITMAP, aSubstFlavor)) + && SotExchange::GetFormatDataFlavor(SotClipboardFormatId::BITMAP, aSubstFlavor)) { GetData(aSubstFlavor, rDestDoc); bDone = true; } - else if( SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_EMF, aSubstFlavor ) && + else if( SotExchange::GetFormatDataFlavor( SotClipboardFormatId::EMF, aSubstFlavor ) && TransferableDataHelper::IsEqual( aSubstFlavor, rFlavor ) && - SotExchange::GetFormatDataFlavor( FORMAT_GDIMETAFILE, aSubstFlavor ) ) + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::GDIMETAFILE, aSubstFlavor ) ) { GetData(aSubstFlavor, rDestDoc); @@ -368,9 +368,9 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co } } } - else if( SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_WMF, aSubstFlavor ) && + else if( SotExchange::GetFormatDataFlavor( SotClipboardFormatId::WMF, aSubstFlavor ) && TransferableDataHelper::IsEqual( aSubstFlavor, rFlavor ) && - SotExchange::GetFormatDataFlavor( FORMAT_GDIMETAFILE, aSubstFlavor ) ) + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::GDIMETAFILE, aSubstFlavor ) ) { GetData(aSubstFlavor, rDestDoc); @@ -589,7 +589,7 @@ void TransferableHelper::ImplFlush() -void TransferableHelper::AddFormat( SotFormatStringId nFormat ) +void TransferableHelper::AddFormat( SotClipboardFormatId nFormat ) { DataFlavor aFlavor; @@ -607,12 +607,12 @@ void TransferableHelper::AddFormat( const DataFlavor& rFlavor ) { if( TransferableDataHelper::IsEqual( *aIter, rFlavor ) ) { - // update MimeType for SOT_FORMATSTR_ID_OBJECTDESCRIPTOR in every case - if( ( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR == aIter->mnSotId ) && mpObjDesc ) + // update MimeType for SotClipboardFormatId::OBJECTDESCRIPTOR in every case + if( ( SotClipboardFormatId::OBJECTDESCRIPTOR == aIter->mnSotId ) && mpObjDesc ) { DataFlavor aObjDescFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDescFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::OBJECTDESCRIPTOR, aObjDescFlavor ); aIter->MimeType = aObjDescFlavor.MimeType; aIter->MimeType += ::ImplGetParameterString( *mpObjDesc ); @@ -637,27 +637,27 @@ void TransferableHelper::AddFormat( const DataFlavor& rFlavor ) aFlavorEx.DataType = rFlavor.DataType; aFlavorEx.mnSotId = SotExchange::RegisterFormat( rFlavor ); - if( ( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR == aFlavorEx.mnSotId ) && mpObjDesc ) + if( ( SotClipboardFormatId::OBJECTDESCRIPTOR == aFlavorEx.mnSotId ) && mpObjDesc ) aFlavorEx.MimeType += ::ImplGetParameterString( *mpObjDesc ); mpFormats->push_back( aFlavorEx ); - if( FORMAT_BITMAP == aFlavorEx.mnSotId ) + if( SotClipboardFormatId::BITMAP == aFlavorEx.mnSotId ) { - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMATSTR_ID_BMP ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BMP ); } - else if( FORMAT_GDIMETAFILE == aFlavorEx.mnSotId ) + else if( SotClipboardFormatId::GDIMETAFILE == aFlavorEx.mnSotId ) { - AddFormat( SOT_FORMATSTR_ID_EMF ); - AddFormat( SOT_FORMATSTR_ID_WMF ); + AddFormat( SotClipboardFormatId::EMF ); + AddFormat( SotClipboardFormatId::WMF ); } } } -void TransferableHelper::RemoveFormat( SotFormatStringId nFormat ) +void TransferableHelper::RemoveFormat( SotClipboardFormatId nFormat ) { DataFlavor aFlavor; @@ -682,7 +682,7 @@ void TransferableHelper::RemoveFormat( const DataFlavor& rFlavor ) -bool TransferableHelper::HasFormat( SotFormatStringId nFormat ) +bool TransferableHelper::HasFormat( SotClipboardFormatId nFormat ) { bool bRet = false; @@ -721,7 +721,7 @@ bool TransferableHelper::SetString( const OUString& rString, const DataFlavor& r DataFlavor aFileFlavor; if( !rString.isEmpty() && - SotExchange::GetFormatDataFlavor( FORMAT_FILE, aFileFlavor ) && + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::FILE, aFileFlavor ) && TransferableDataHelper::IsEqual( aFileFlavor, rFlavor ) ) { const OString aByteStr(OUStringToOString(rString, osl_getThreadTextEncoding())); @@ -846,7 +846,7 @@ bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk, switch( SotExchange::GetFormat( rFlavor ) ) { - case( SOT_FORMATSTR_ID_SOLK ): + case SotClipboardFormatId::SOLK: { OString sURL(OUStringToOString(rBmk.GetURL(), eSysCSet)); OString sDesc(OUStringToOString(rBmk.GetDescription(), eSysCSet)); @@ -862,11 +862,11 @@ bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk, } break; - case( FORMAT_STRING ): + case SotClipboardFormatId::STRING: maAny <<= OUString( rBmk.GetURL() ); break; - case( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ): + case SotClipboardFormatId::UNIFORMRESOURCELOCATOR: { OString sURL(OUStringToOString(rBmk.GetURL(), eSysCSet)); Sequence< sal_Int8 > aSeq( sURL.getLength() ); @@ -875,7 +875,7 @@ bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk, } break; - case( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ): + case SotClipboardFormatId::NETSCAPE_BOOKMARK: { Sequence< sal_Int8 > aSeq( 2048 ); @@ -888,7 +888,7 @@ bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk, break; #ifdef WNT - case SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR: + case SotClipboardFormatId::FILEGRPDESCRIPTOR: { Sequence< sal_Int8 > aSeq( sizeof( FILEGROUPDESCRIPTOR ) ); FILEGROUPDESCRIPTOR* pFDesc = (FILEGROUPDESCRIPTOR*) aSeq.getArray(); @@ -912,7 +912,7 @@ bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk, } break; - case SOT_FORMATSTR_ID_FILECONTENT: + case SotClipboardFormatId::FILECONTENT: { OUString aStr( "[InternetShortcut]\x0aURL=" ); maAny <<= ( aStr += rBmk.GetURL() ); @@ -944,7 +944,7 @@ bool TransferableHelper::SetINetImage( const INetImage& rINtImg, -bool TransferableHelper::SetObject( void* pUserObject, sal_uInt32 nUserObjectId, const DataFlavor& rFlavor ) +bool TransferableHelper::SetObject( void* pUserObject, SotClipboardFormatId nUserObjectId, const DataFlavor& rFlavor ) { SotStorageStreamRef xStm( new SotStorageStream( OUString() ) ); @@ -958,7 +958,7 @@ bool TransferableHelper::SetObject( void* pUserObject, sal_uInt32 nUserObjectId, xStm->Seek( STREAM_SEEK_TO_BEGIN ); xStm->Read( aSeq.getArray(), nLen ); - if( nLen && ( SotExchange::GetFormat( rFlavor ) == SOT_FORMAT_STRING ) ) + if( nLen && ( SotExchange::GetFormat( rFlavor ) == SotClipboardFormatId::STRING ) ) { //JP 24.7.2001: as I know was this only for the writer application and this // writes now UTF16 format into the stream @@ -975,7 +975,7 @@ bool TransferableHelper::SetObject( void* pUserObject, sal_uInt32 nUserObjectId, -bool TransferableHelper::WriteObject( SotStorageStreamRef&, void*, sal_uInt32, const DataFlavor& ) +bool TransferableHelper::WriteObject( SotStorageStreamRef&, void*, SotClipboardFormatId, const DataFlavor& ) { OSL_FAIL( "TransferableHelper::WriteObject( ... ) not implemented" ); return false; @@ -1000,8 +1000,8 @@ void TransferableHelper::PrepareOLE( const TransferableObjectDescriptor& rObjDes delete mpObjDesc; mpObjDesc = new TransferableObjectDescriptor( rObjDesc ); - if( HasFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) ) - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); + if( HasFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ) ) + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); } @@ -1357,26 +1357,26 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor rDataFlavorExVector.push_back( aFlavorEx ); // add additional formats for special mime types - if(SOT_FORMATSTR_ID_BMP == aFlavorEx.mnSotId || SOT_FORMATSTR_ID_PNG == aFlavorEx.mnSotId) + if(SotClipboardFormatId::BMP == aFlavorEx.mnSotId || SotClipboardFormatId::PNG == aFlavorEx.mnSotId) { - if( SotExchange::GetFormatDataFlavor( SOT_FORMAT_BITMAP, aFlavorEx ) ) + if( SotExchange::GetFormatDataFlavor( SotClipboardFormatId::BITMAP, aFlavorEx ) ) { - aFlavorEx.mnSotId = SOT_FORMAT_BITMAP; + aFlavorEx.mnSotId = SotClipboardFormatId::BITMAP; rDataFlavorExVector.push_back( aFlavorEx ); } } - else if( SOT_FORMATSTR_ID_WMF == aFlavorEx.mnSotId || SOT_FORMATSTR_ID_EMF == aFlavorEx.mnSotId ) + else if( SotClipboardFormatId::WMF == aFlavorEx.mnSotId || SotClipboardFormatId::EMF == aFlavorEx.mnSotId ) { - if( SotExchange::GetFormatDataFlavor( SOT_FORMAT_GDIMETAFILE, aFlavorEx ) ) + if( SotExchange::GetFormatDataFlavor( SotClipboardFormatId::GDIMETAFILE, aFlavorEx ) ) { - aFlavorEx.mnSotId = SOT_FORMAT_GDIMETAFILE; + aFlavorEx.mnSotId = SotClipboardFormatId::GDIMETAFILE; rDataFlavorExVector.push_back( aFlavorEx ); } } - else if ( SOT_FORMATSTR_ID_HTML_SIMPLE == aFlavorEx.mnSotId ) + else if ( SotClipboardFormatId::HTML_SIMPLE == aFlavorEx.mnSotId ) { // #104735# HTML_SIMPLE may also be inserted without comments - aFlavorEx.mnSotId = SOT_FORMATSTR_ID_HTML_NO_COMMENT; + aFlavorEx.mnSotId = SotClipboardFormatId::HTML_NO_COMMENT; rDataFlavorExVector.push_back( aFlavorEx ); } else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/plain" ) ) @@ -1387,27 +1387,27 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor if( xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( "unicode" ) || xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( "utf-16" ) ) { - rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = FORMAT_STRING; + rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SotClipboardFormatId::STRING; } } } else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/rtf" ) ) { - rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = FORMAT_RTF; + rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SotClipboardFormatId::RTF; } else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/html" ) ) { - rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SOT_FORMATSTR_ID_HTML; + rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SotClipboardFormatId::HTML; } else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "text/uri-list" ) ) { - rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SOT_FORMAT_FILE_LIST; + rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SotClipboardFormatId::FILE_LIST; } else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( "application/x-openoffice-objectdescriptor-xml" ) ) { - rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SOT_FORMATSTR_ID_OBJECTDESCRIPTOR; + rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SotClipboardFormatId::OBJECTDESCRIPTOR; } } } @@ -1432,7 +1432,7 @@ void TransferableDataHelper::InitFormats() for (DataFlavorExVector::const_iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() ); aIter != aEnd ; ++aIter) { - if( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR == aIter->mnSotId ) + if( SotClipboardFormatId::OBJECTDESCRIPTOR == aIter->mnSotId ) { ImplSetParameterString( *mpObjDesc, *aIter ); break; @@ -1443,7 +1443,7 @@ void TransferableDataHelper::InitFormats() -bool TransferableDataHelper::HasFormat( SotFormatStringId nFormat ) const +bool TransferableDataHelper::HasFormat( SotClipboardFormatId nFormat ) const { ::osl::MutexGuard aGuard( mpImpl->maMutex ); @@ -1494,11 +1494,11 @@ sal_uInt32 TransferableDataHelper::GetFormatCount() const -SotFormatStringId TransferableDataHelper::GetFormat( sal_uInt32 nFormat ) const +SotClipboardFormatId TransferableDataHelper::GetFormat( sal_uInt32 nFormat ) const { ::osl::MutexGuard aGuard( mpImpl->maMutex ); DBG_ASSERT( nFormat < mpFormats->size(), "TransferableDataHelper::GetFormat: invalid format index" ); - return( ( nFormat < mpFormats->size() ) ? (*mpFormats)[ nFormat ].mnSotId : 0 ); + return( ( nFormat < mpFormats->size() ) ? (*mpFormats)[ nFormat ].mnSotId : SotClipboardFormatId::NONE ); } @@ -1543,7 +1543,7 @@ Reference< XTransferable > TransferableDataHelper::GetXTransferable() const -Any TransferableDataHelper::GetAny( SotFormatStringId nFormat, const OUString& rDestDoc ) const +Any TransferableDataHelper::GetAny( SotClipboardFormatId nFormat, const OUString& rDestDoc ) const { Any aReturn; @@ -1566,11 +1566,11 @@ Any TransferableDataHelper::GetAny( const DataFlavor& rFlavor, const OUString& r { if( mxTransfer.is() ) { - const SotFormatStringId nRequestFormat = SotExchange::GetFormat( rFlavor ); + const SotClipboardFormatId nRequestFormat = SotExchange::GetFormat( rFlavor ); Reference<css::datatransfer::XTransferable2> xTransfer2(mxTransfer, UNO_QUERY); - if( nRequestFormat ) + if( nRequestFormat != SotClipboardFormatId::NONE ) { // try to get alien format first for (DataFlavorExVector::const_iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() ); aIter != aEnd ; ++aIter) @@ -1606,7 +1606,7 @@ Any TransferableDataHelper::GetAny( const DataFlavor& rFlavor, const OUString& r -bool TransferableDataHelper::GetString( SotFormatStringId nFormat, OUString& rStr ) +bool TransferableDataHelper::GetString( SotClipboardFormatId nFormat, OUString& rStr ) { DataFlavor aFlavor; return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetString( aFlavor, rStr ) ); @@ -1650,14 +1650,14 @@ bool TransferableDataHelper::GetString( const DataFlavor& rFlavor, OUString& rSt -bool TransferableDataHelper::GetBitmapEx( SotFormatStringId nFormat, BitmapEx& rBmpEx ) +bool TransferableDataHelper::GetBitmapEx( SotClipboardFormatId nFormat, BitmapEx& rBmpEx ) { - if(FORMAT_BITMAP == nFormat) + if(SotClipboardFormatId::BITMAP == nFormat) { // try to get PNG first DataFlavor aFlavor; - if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aFlavor)) + if(SotExchange::GetFormatDataFlavor(SotClipboardFormatId::PNG, aFlavor)) { if(GetBitmapEx(aFlavor, rBmpEx)) { @@ -1679,13 +1679,13 @@ bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& r bool bRet(GetSotStorageStream(rFlavor, xStm)); bool bSuppressPNG(false); // #122982# If PNG stream not accessed, but BMP one, suppress trying to load PNG - if(!bRet && HasFormat(SOT_FORMATSTR_ID_PNG) && SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aSubstFlavor)) + if(!bRet && HasFormat(SotClipboardFormatId::PNG) && SotExchange::GetFormatDataFlavor(SotClipboardFormatId::PNG, aSubstFlavor)) { // when no direct success, try if PNG is available bRet = GetSotStorageStream(aSubstFlavor, xStm); } - if(!bRet && HasFormat(SOT_FORMATSTR_ID_BMP) && SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_BMP, aSubstFlavor)) + if(!bRet && HasFormat(SotClipboardFormatId::BMP) && SotExchange::GetFormatDataFlavor(SotClipboardFormatId::BMP, aSubstFlavor)) { // when no direct success, try if BMP is available bRet = GetSotStorageStream(aSubstFlavor, xStm); @@ -1759,7 +1759,7 @@ bool TransferableDataHelper::GetBitmapEx( const DataFlavor& rFlavor, BitmapEx& r -bool TransferableDataHelper::GetGDIMetaFile(SotFormatStringId nFormat, GDIMetaFile& rMtf, size_t nMaxActions) +bool TransferableDataHelper::GetGDIMetaFile(SotClipboardFormatId nFormat, GDIMetaFile& rMtf, size_t nMaxActions) { DataFlavor aFlavor; return SotExchange::GetFormatDataFlavor(nFormat, aFlavor) && @@ -1782,8 +1782,8 @@ bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIMetaF } if( !bRet && - HasFormat( SOT_FORMATSTR_ID_EMF ) && - SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_EMF, aSubstFlavor ) && + HasFormat( SotClipboardFormatId::EMF ) && + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::EMF, aSubstFlavor ) && GetSotStorageStream( aSubstFlavor, xStm ) ) { Graphic aGraphic; @@ -1796,8 +1796,8 @@ bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIMetaF } if( !bRet && - HasFormat( SOT_FORMATSTR_ID_WMF ) && - SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_WMF, aSubstFlavor ) && + HasFormat( SotClipboardFormatId::WMF ) && + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::WMF, aSubstFlavor ) && GetSotStorageStream( aSubstFlavor, xStm ) ) { Graphic aGraphic; @@ -1814,14 +1814,14 @@ bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIMetaF -bool TransferableDataHelper::GetGraphic( SotFormatStringId nFormat, Graphic& rGraphic ) +bool TransferableDataHelper::GetGraphic( SotClipboardFormatId nFormat, Graphic& rGraphic ) { - if(FORMAT_BITMAP == nFormat) + if(SotClipboardFormatId::BITMAP == nFormat) { // try to get PNG first DataFlavor aFlavor; - if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aFlavor)) + if(SotExchange::GetFormatDataFlavor(SotClipboardFormatId::PNG, aFlavor)) { if(GetGraphic(aFlavor, rGraphic)) { @@ -1841,7 +1841,7 @@ bool TransferableDataHelper::GetGraphic( const ::com::sun::star::datatransfer::D DataFlavor aFlavor; bool bRet = false; - if(SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_PNG, aFlavor) && + if(SotExchange::GetFormatDataFlavor(SotClipboardFormatId::PNG, aFlavor) && TransferableDataHelper::IsEqual(aFlavor, rFlavor)) { // try to get PNG first @@ -1850,7 +1850,7 @@ bool TransferableDataHelper::GetGraphic( const ::com::sun::star::datatransfer::D if( ( bRet = GetBitmapEx( aFlavor, aBmpEx ) ) ) rGraphic = aBmpEx; } - else if(SotExchange::GetFormatDataFlavor( SOT_FORMAT_BITMAP, aFlavor ) && + else if(SotExchange::GetFormatDataFlavor( SotClipboardFormatId::BITMAP, aFlavor ) && TransferableDataHelper::IsEqual( aFlavor, rFlavor ) ) { BitmapEx aBmpEx; @@ -1858,7 +1858,7 @@ bool TransferableDataHelper::GetGraphic( const ::com::sun::star::datatransfer::D if( ( bRet = GetBitmapEx( aFlavor, aBmpEx ) ) ) rGraphic = aBmpEx; } - else if( SotExchange::GetFormatDataFlavor( SOT_FORMAT_GDIMETAFILE, aFlavor ) && + else if( SotExchange::GetFormatDataFlavor( SotClipboardFormatId::GDIMETAFILE, aFlavor ) && TransferableDataHelper::IsEqual( aFlavor, rFlavor ) ) { GDIMetaFile aMtf; @@ -1882,7 +1882,7 @@ bool TransferableDataHelper::GetGraphic( const ::com::sun::star::datatransfer::D -bool TransferableDataHelper::GetImageMap( SotFormatStringId nFormat, ImageMap& rIMap ) +bool TransferableDataHelper::GetImageMap( SotClipboardFormatId nFormat, ImageMap& rIMap ) { DataFlavor aFlavor; return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetImageMap( aFlavor, rIMap ) ); @@ -1906,7 +1906,7 @@ bool TransferableDataHelper::GetImageMap( const ::com::sun::star::datatransfer:: -bool TransferableDataHelper::GetTransferableObjectDescriptor( SotFormatStringId nFormat, TransferableObjectDescriptor& rDesc ) +bool TransferableDataHelper::GetTransferableObjectDescriptor( SotClipboardFormatId nFormat, TransferableObjectDescriptor& rDesc ) { DataFlavor aFlavor; return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetTransferableObjectDescriptor( aFlavor, rDesc ) ); @@ -1922,7 +1922,7 @@ bool TransferableDataHelper::GetTransferableObjectDescriptor( const ::com::sun:: -bool TransferableDataHelper::GetINetBookmark( SotFormatStringId nFormat, INetBookmark& rBmk ) +bool TransferableDataHelper::GetINetBookmark( SotClipboardFormatId nFormat, INetBookmark& rBmk ) { DataFlavor aFlavor; return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetINetBookmark( aFlavor, rBmk ) ); @@ -1935,16 +1935,16 @@ bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatransf bool bRet = false; if( HasFormat( rFlavor )) { - const SotFormatStringId nFormat = SotExchange::GetFormat( rFlavor ); + const SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor ); switch( nFormat ) { - case( SOT_FORMATSTR_ID_SOLK ): - case( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ): + case( SotClipboardFormatId::SOLK ): + case( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ): { OUString aString; if( GetString( rFlavor, aString ) ) { - if( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR == nFormat ) + if( SotClipboardFormatId::UNIFORMRESOURCELOCATOR == nFormat ) { rBmk = INetBookmark( aString, aString ); bRet = true; @@ -1985,7 +1985,7 @@ bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatransf } break; - case( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ): + case( SotClipboardFormatId::NETSCAPE_BOOKMARK ): { Sequence<sal_Int8> aSeq = GetSequence(rFlavor, OUString()); @@ -2001,7 +2001,7 @@ bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatransf break; #ifdef WNT - case SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR: + case SotClipboardFormatId::FILEGRPDESCRIPTOR: { Sequence<sal_Int8> aSeq = GetSequence(rFlavor, OUString()); @@ -2026,7 +2026,7 @@ bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatransf aSeq.realloc( 0 ); pStream.reset(); - if (SotExchange::GetFormatDataFlavor(SOT_FORMATSTR_ID_FILECONTENT, aFileContentFlavor)) + if (SotExchange::GetFormatDataFlavor(SotClipboardFormatId::FILECONTENT, aFileContentFlavor)) { aSeq = GetSequence(aFileContentFlavor, OUString()); if (aSeq.getLength()) @@ -2058,7 +2058,7 @@ bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatransf } break; #endif - + default: break; } } return bRet; @@ -2066,7 +2066,7 @@ bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatransf -bool TransferableDataHelper::GetINetImage( SotFormatStringId nFormat, +bool TransferableDataHelper::GetINetImage( SotClipboardFormatId nFormat, INetImage& rINtImg ) { DataFlavor aFlavor; @@ -2089,7 +2089,7 @@ bool TransferableDataHelper::GetINetImage( -bool TransferableDataHelper::GetFileList( SotFormatStringId nFormat, +bool TransferableDataHelper::GetFileList( SotClipboardFormatId nFormat, FileList& rFileList ) { DataFlavor aFlavor; @@ -2107,7 +2107,7 @@ bool TransferableDataHelper::GetFileList( for( sal_uInt32 i = 0, nFormatCount = GetFormatCount(); ( i < nFormatCount ) && !bRet; ++i ) { - if( SOT_FORMAT_FILE_LIST == GetFormat( i ) ) + if( SotClipboardFormatId::FILE_LIST == GetFormat( i ) ) { const DataFlavor aFlavor( GetFormatDataFlavor( i ) ); @@ -2134,7 +2134,7 @@ bool TransferableDataHelper::GetFileList( -Sequence<sal_Int8> TransferableDataHelper::GetSequence( SotFormatStringId nFormat, const OUString& rDestDoc ) +Sequence<sal_Int8> TransferableDataHelper::GetSequence( SotClipboardFormatId nFormat, const OUString& rDestDoc ) { DataFlavor aFlavor; if (!SotExchange::GetFormatDataFlavor(nFormat, aFlavor)) @@ -2159,7 +2159,7 @@ Sequence<sal_Int8> TransferableDataHelper::GetSequence( const DataFlavor& rFlavo -bool TransferableDataHelper::GetSotStorageStream( SotFormatStringId nFormat, SotStorageStreamRef& rxStream ) +bool TransferableDataHelper::GetSotStorageStream( SotClipboardFormatId nFormat, SotStorageStreamRef& rxStream ) { DataFlavor aFlavor; return( SotExchange::GetFormatDataFlavor( nFormat, aFlavor ) && GetSotStorageStream( aFlavor, rxStream ) ); @@ -2181,7 +2181,7 @@ bool TransferableDataHelper::GetSotStorageStream( const DataFlavor& rFlavor, Sot return aSeq.getLength(); } -Reference<XInputStream> TransferableDataHelper::GetInputStream( SotFormatStringId nFormat, const OUString& rDestDoc ) +Reference<XInputStream> TransferableDataHelper::GetInputStream( SotClipboardFormatId nFormat, const OUString& rDestDoc ) { DataFlavor aFlavor; if (!SotExchange::GetFormatDataFlavor(nFormat, aFlavor)) diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx index a5e80c4ca878..d4099a9d5782 100644 --- a/svtools/source/misc/transfer2.cxx +++ b/svtools/source/misc/transfer2.cxx @@ -322,7 +322,7 @@ sal_Int8 DropTargetHelper::ExecuteDrop( const ExecuteDropEvent& ) -bool DropTargetHelper::IsDropFormatSupported( SotFormatStringId nFormat ) +bool DropTargetHelper::IsDropFormatSupported( SotClipboardFormatId nFormat ) { DataFlavorExVector::iterator aIter( mpFormats->begin() ), aEnd( mpFormats->end() ); bool bRet = false; @@ -365,7 +365,7 @@ bool DropTargetHelper::IsDropFormatSupported( const DataFlavor& rFlavor ) struct TDataCntnrEntry_Impl { ::com::sun::star::uno::Any aAny; - SotFormatStringId nId; + SotClipboardFormatId nId; }; @@ -421,7 +421,7 @@ bool TransferDataContainer::GetData( TDataCntnrEntryList::iterator aIter( pImpl->aFmtList.begin() ), aEnd( pImpl->aFmtList.end() ); bool bFnd = false; - sal_uLong nFmtId = SotExchange::GetFormat( rFlavor ); + SotClipboardFormatId nFmtId = SotExchange::GetFormat( rFlavor ); // test first the list for( ; aIter != aEnd; ++aIter ) @@ -438,23 +438,24 @@ bool TransferDataContainer::GetData( if( !bFnd ) switch( nFmtId ) { - case SOT_FORMAT_STRING: - case SOT_FORMATSTR_ID_SOLK: - case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK: - case SOT_FORMATSTR_ID_FILECONTENT: - case SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR: - case SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR: + case SotClipboardFormatId::STRING: + case SotClipboardFormatId::SOLK: + case SotClipboardFormatId::NETSCAPE_BOOKMARK: + case SotClipboardFormatId::FILECONTENT: + case SotClipboardFormatId::FILEGRPDESCRIPTOR: + case SotClipboardFormatId::UNIFORMRESOURCELOCATOR: if( pImpl->pBookmk ) bFnd = SetINetBookmark( *pImpl->pBookmk, rFlavor ); break; - case SOT_FORMATSTR_ID_SVXB: - case SOT_FORMATSTR_ID_PNG: - case SOT_FORMAT_BITMAP: - case SOT_FORMAT_GDIMETAFILE: + case SotClipboardFormatId::SVXB: + case SotClipboardFormatId::PNG: + case SotClipboardFormatId::BITMAP: + case SotClipboardFormatId::GDIMETAFILE: if( pImpl->pGrf ) bFnd = SetGraphic( *pImpl->pGrf, rFlavor ); break; + default: break; } return bFnd; @@ -469,17 +470,17 @@ void TransferDataContainer::CopyINetBookmark( const INetBookmark& rBkmk ) else *pImpl->pBookmk = rBkmk; - AddFormat( SOT_FORMAT_STRING ); - AddFormat( SOT_FORMATSTR_ID_SOLK ); - AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ); - AddFormat( SOT_FORMATSTR_ID_FILECONTENT ); - AddFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ); + AddFormat( SotClipboardFormatId::STRING ); + AddFormat( SotClipboardFormatId::SOLK ); + AddFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ); + AddFormat( SotClipboardFormatId::FILECONTENT ); + AddFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ); + AddFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ); } -void TransferDataContainer::CopyAnyData( sal_uLong nFormatId, +void TransferDataContainer::CopyAnyData( SotClipboardFormatId nFormatId, const sal_Char* pData, sal_uLong nLen ) { if( nLen ) @@ -497,7 +498,7 @@ void TransferDataContainer::CopyAnyData( sal_uLong nFormatId, -void TransferDataContainer::CopyByteString( sal_uLong nFormatId, +void TransferDataContainer::CopyByteString( SotClipboardFormatId nFormatId, const OString& rStr ) { CopyAnyData( nFormatId, rStr.getStr(), rStr.getLength() ); @@ -509,8 +510,8 @@ void TransferDataContainer::CopyINetImage( const INetImage& rINtImg ) { SvMemoryStream aMemStm( 1024, 1024 ); aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 ); - rINtImg.Write( aMemStm, SOT_FORMATSTR_ID_INET_IMAGE ); - CopyAnyData( SOT_FORMATSTR_ID_INET_IMAGE, (sal_Char*)aMemStm.GetData(), + rINtImg.Write( aMemStm, SotClipboardFormatId::INET_IMAGE ); + CopyAnyData( SotClipboardFormatId::INET_IMAGE, (sal_Char*)aMemStm.GetData(), aMemStm.Seek( STREAM_SEEK_TO_END ) ); } @@ -521,7 +522,7 @@ void TransferDataContainer::CopyImageMap( const ImageMap& rImgMap ) SvMemoryStream aMemStm( 8192, 8192 ); aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 ); rImgMap.Write( aMemStm, OUString() ); - CopyAnyData( SOT_FORMATSTR_ID_SVIM, (sal_Char*)aMemStm.GetData(), + CopyAnyData( SotClipboardFormatId::SVIM, (sal_Char*)aMemStm.GetData(), aMemStm.Seek( STREAM_SEEK_TO_END ) ); } @@ -537,23 +538,23 @@ void TransferDataContainer::CopyGraphic( const Graphic& rGrf ) else *pImpl->pGrf = rGrf; - AddFormat( SOT_FORMATSTR_ID_SVXB ); + AddFormat( SotClipboardFormatId::SVXB ); if( GRAPHIC_BITMAP == nType ) { - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( SOT_FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); } else if( GRAPHIC_GDIMETAFILE == nType ) { - AddFormat( SOT_FORMAT_GDIMETAFILE ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); } } } -void TransferDataContainer::CopyString( sal_uInt16 nFmt, const OUString& rStr ) +void TransferDataContainer::CopyString( SotClipboardFormatId nFmt, const OUString& rStr ) { if( !rStr.isEmpty() ) { @@ -570,12 +571,12 @@ void TransferDataContainer::CopyString( sal_uInt16 nFmt, const OUString& rStr ) void TransferDataContainer::CopyString( const OUString& rStr ) { - CopyString( SOT_FORMAT_STRING, rStr ); + CopyString( SotClipboardFormatId::STRING, rStr ); } -void TransferDataContainer::CopyAny( sal_uInt16 nFmt, +void TransferDataContainer::CopyAny( SotClipboardFormatId nFmt, const ::com::sun::star::uno::Any& rAny ) { TDataCntnrEntry_Impl aEntry; diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx index 0ed6198e5e60..51ef978ee0bb 100644 --- a/svtools/source/urlobj/inetimg.cxx +++ b/svtools/source/urlobj/inetimg.cxx @@ -25,12 +25,12 @@ static const sal_Unicode TOKEN_SEPARATOR = '\001'; -bool INetImage::Write( SvStream& rOStm, sal_uLong nFormat ) const +bool INetImage::Write( SvStream& rOStm, SotClipboardFormatId nFormat ) const { bool bRet = false; switch( nFormat ) { - case SOT_FORMATSTR_ID_INET_IMAGE: + case SotClipboardFormatId::INET_IMAGE: { OUString sString; (sString += aImageURL ) += OUString(TOKEN_SEPARATOR); @@ -51,18 +51,19 @@ bool INetImage::Write( SvStream& rOStm, sal_uLong nFormat ) const } break; - case SOT_FORMATSTR_ID_NETSCAPE_IMAGE: + case SotClipboardFormatId::NETSCAPE_IMAGE: break; + default: break; } return bRet; } -bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat ) +bool INetImage::Read( SvStream& rIStm, SotClipboardFormatId nFormat ) { bool bRet = false; switch( nFormat ) { - case SOT_FORMATSTR_ID_INET_IMAGE: + case SotClipboardFormatId::INET_IMAGE: { OUString sINetImg = read_zeroTerminated_uInt8s_ToOUString(rIStm, RTL_TEXTENCODING_UTF8); sal_Int32 nStart = 0; @@ -78,7 +79,7 @@ bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat ) } break; - case SOT_FORMATSTR_ID_NETSCAPE_IMAGE: + case SotClipboardFormatId::NETSCAPE_IMAGE: { /* --> structure size MUST - alignment of 4! @@ -130,6 +131,7 @@ bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat ) bRet = 0 == rIStm.GetError(); } break; + default: break; } return bRet; } diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 054b67439789..7ff7feb7d1e5 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -524,13 +524,13 @@ sal_Int8 IMapWindow::ExecuteDrop( const ExecuteDropEvent& rEvt ) { sal_Int8 nRet = DND_ACTION_NONE; - if( IsDropFormatSupported( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) ) + if( IsDropFormatSupported( SotClipboardFormatId::NETSCAPE_BOOKMARK ) ) { const OUString aString; INetBookmark aBookMark( aString, aString ); SdrObject* pSdrObj = GetHitSdrObj( rEvt.maPosPixel ); - if( pSdrObj && TransferableDataHelper( rEvt.maDropEvent.Transferable ).GetINetBookmark( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, aBookMark ) ) + if( pSdrObj && TransferableDataHelper( rEvt.maDropEvent.Transferable ).GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aBookMark ) ) { IMapObject* pIMapObj = GetIMapObj( pSdrObj ); diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx index 59bbbb7a95b9..889173374c23 100644 --- a/svx/source/fmcomp/dbaexchange.cxx +++ b/svx/source/fmcomp/dbaexchange.cxx @@ -149,13 +149,13 @@ namespace svx } - sal_uInt32 OColumnTransferable::getDescriptorFormatId() + SotClipboardFormatId OColumnTransferable::getDescriptorFormatId() { - static sal_uInt32 s_nFormat = (sal_uInt32)-1; - if ((sal_uInt32)-1 == s_nFormat) + static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1); + if (static_cast<SotClipboardFormatId>(-1) == s_nFormat) { s_nFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"dbaccess.ColumnDescriptorTransfer\"")); - OSL_ENSURE((sal_uInt32)-1 != s_nFormat, "OColumnTransferable::getDescriptorFormatId: bad exchange id!"); + OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OColumnTransferable::getDescriptorFormatId: bad exchange id!"); } return s_nFormat; } @@ -210,10 +210,10 @@ namespace svx void OColumnTransferable::AddSupportedFormats() { if (CTF_CONTROL_EXCHANGE & m_nFormatFlags) - AddFormat(SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE); + AddFormat(SotClipboardFormatId::SBA_CTRLDATAEXCHANGE); if (CTF_FIELD_DESCRIPTOR & m_nFormatFlags) - AddFormat(SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE); + AddFormat(SotClipboardFormatId::SBA_FIELDDATAEXCHANGE); if (CTF_COLUMN_DESCRIPTOR & m_nFormatFlags) AddFormat(getDescriptorFormatId()); @@ -222,12 +222,13 @@ namespace svx bool OColumnTransferable::GetData( const DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ ) { - const sal_uInt32 nFormatId = SotExchange::GetFormat(_rFlavor); + const SotClipboardFormatId nFormatId = SotExchange::GetFormat(_rFlavor); switch (nFormatId) { - case SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE: - case SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE: + case SotClipboardFormatId::SBA_FIELDDATAEXCHANGE: + case SotClipboardFormatId::SBA_CTRLDATAEXCHANGE: return SetString(m_sCompatibleFormat, _rFlavor); + default: break; } if (nFormatId == getDescriptorFormatId()) return SetAny( makeAny( m_aDescriptor.createPropertyValueSequence() ), _rFlavor ); @@ -246,9 +247,9 @@ namespace svx ++aCheck ) { - if (bFieldFormat && (SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE == aCheck->mnSotId)) + if (bFieldFormat && (SotClipboardFormatId::SBA_FIELDDATAEXCHANGE == aCheck->mnSotId)) return true; - if (bControlFormat && (SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE == aCheck->mnSotId)) + if (bControlFormat && (SotClipboardFormatId::SBA_CTRLDATAEXCHANGE == aCheck->mnSotId)) return true; if (bDescriptorFormat && (getDescriptorFormatId() == aCheck->mnSotId)) return true; @@ -334,12 +335,12 @@ namespace svx } // check if we have a (string) format we can use .... - SotFormatStringId nRecognizedFormat = 0; - if (_rData.HasFormat(SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE)) - nRecognizedFormat = SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE; - if (_rData.HasFormat(SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE)) - nRecognizedFormat = SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE; - if (!nRecognizedFormat) + SotClipboardFormatId nRecognizedFormat = SotClipboardFormatId::NONE; + if (_rData.HasFormat(SotClipboardFormatId::SBA_FIELDDATAEXCHANGE)) + nRecognizedFormat = SotClipboardFormatId::SBA_FIELDDATAEXCHANGE; + if (_rData.HasFormat(SotClipboardFormatId::SBA_CTRLDATAEXCHANGE)) + nRecognizedFormat = SotClipboardFormatId::SBA_CTRLDATAEXCHANGE; + if (nRecognizedFormat == SotClipboardFormatId::NONE) return false; OUString sFieldDescription; @@ -361,17 +362,15 @@ namespace svx if ( _pContainer ) { if ( m_nFormatFlags & CTF_FIELD_DESCRIPTOR ) - _pContainer->CopyAny( SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE, makeAny( m_sCompatibleFormat ) ); + _pContainer->CopyAny( SotClipboardFormatId::SBA_FIELDDATAEXCHANGE, makeAny( m_sCompatibleFormat ) ); if ( m_nFormatFlags & CTF_CONTROL_EXCHANGE ) - _pContainer->CopyAny( SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE, makeAny( m_sCompatibleFormat ) ); + _pContainer->CopyAny( SotClipboardFormatId::SBA_CTRLDATAEXCHANGE, makeAny( m_sCompatibleFormat ) ); if ( m_nFormatFlags & CTF_COLUMN_DESCRIPTOR ) { Any aContent = makeAny( m_aDescriptor.createPropertyValueSequence() ); - _pContainer->CopyAny( - sal::static_int_cast< sal_uInt16 >( getDescriptorFormatId() ), - aContent ); + _pContainer->CopyAny( getDescriptorFormatId(), aContent ); } } } @@ -447,33 +446,34 @@ namespace svx switch (nObjectType) { case CommandType::TABLE: - AddFormat(SOT_FORMATSTR_ID_DBACCESS_TABLE); + AddFormat(SotClipboardFormatId::DBACCESS_TABLE); break; case CommandType::QUERY: - AddFormat(SOT_FORMATSTR_ID_DBACCESS_QUERY); + AddFormat(SotClipboardFormatId::DBACCESS_QUERY); break; case CommandType::COMMAND: - AddFormat(SOT_FORMATSTR_ID_DBACCESS_COMMAND); + AddFormat(SotClipboardFormatId::DBACCESS_COMMAND); break; } if (!m_sCompatibleObjectDescription.isEmpty()) - AddFormat(SOT_FORMATSTR_ID_SBA_DATAEXCHANGE); + AddFormat(SotClipboardFormatId::SBA_DATAEXCHANGE); } bool ODataAccessObjectTransferable::GetData( const DataFlavor& rFlavor, const OUString& /*rDestDoc*/ ) { - sal_uIntPtr nFormat = SotExchange::GetFormat(rFlavor); + SotClipboardFormatId nFormat = SotExchange::GetFormat(rFlavor); switch (nFormat) { - case SOT_FORMATSTR_ID_DBACCESS_TABLE: - case SOT_FORMATSTR_ID_DBACCESS_QUERY: - case SOT_FORMATSTR_ID_DBACCESS_COMMAND: + case SotClipboardFormatId::DBACCESS_TABLE: + case SotClipboardFormatId::DBACCESS_QUERY: + case SotClipboardFormatId::DBACCESS_COMMAND: return SetAny( makeAny(m_aDescriptor.createPropertyValueSequence()), rFlavor ); - case SOT_FORMATSTR_ID_SBA_DATAEXCHANGE: + case SotClipboardFormatId::SBA_DATAEXCHANGE: return SetString(m_sCompatibleObjectDescription, rFlavor); + default: break; } return false; } @@ -486,11 +486,11 @@ namespace svx ++aCheck ) { - if (SOT_FORMATSTR_ID_DBACCESS_TABLE == aCheck->mnSotId) + if (SotClipboardFormatId::DBACCESS_TABLE == aCheck->mnSotId) return true; - if (SOT_FORMATSTR_ID_DBACCESS_QUERY == aCheck->mnSotId) + if (SotClipboardFormatId::DBACCESS_QUERY == aCheck->mnSotId) return true; - if (SOT_FORMATSTR_ID_DBACCESS_COMMAND == aCheck->mnSotId) + if (SotClipboardFormatId::DBACCESS_COMMAND == aCheck->mnSotId) return true; } return false; @@ -499,15 +499,15 @@ namespace svx ODataAccessDescriptor ODataAccessObjectTransferable::extractObjectDescriptor(const TransferableDataHelper& _rData) { - sal_Int32 nKnownFormatId = 0; - if ( _rData.HasFormat( SOT_FORMATSTR_ID_DBACCESS_TABLE ) ) - nKnownFormatId = SOT_FORMATSTR_ID_DBACCESS_TABLE; - if ( _rData.HasFormat( SOT_FORMATSTR_ID_DBACCESS_QUERY ) ) - nKnownFormatId = SOT_FORMATSTR_ID_DBACCESS_QUERY; - if ( _rData.HasFormat( SOT_FORMATSTR_ID_DBACCESS_COMMAND ) ) - nKnownFormatId = SOT_FORMATSTR_ID_DBACCESS_COMMAND; - - if (0 != nKnownFormatId) + SotClipboardFormatId nKnownFormatId = SotClipboardFormatId::NONE; + if ( _rData.HasFormat( SotClipboardFormatId::DBACCESS_TABLE ) ) + nKnownFormatId = SotClipboardFormatId::DBACCESS_TABLE; + if ( _rData.HasFormat( SotClipboardFormatId::DBACCESS_QUERY ) ) + nKnownFormatId = SotClipboardFormatId::DBACCESS_QUERY; + if ( _rData.HasFormat( SotClipboardFormatId::DBACCESS_COMMAND ) ) + nKnownFormatId = SotClipboardFormatId::DBACCESS_COMMAND; + + if (SotClipboardFormatId::NONE != nKnownFormatId) { // extract the any from the transferable DataFlavor aFlavor; @@ -582,7 +582,7 @@ namespace svx OUString sDatasourceName = _rDatasource; sObjectName = _rCommand; - // for compatibility: create a string which can be used for the SOT_FORMATSTR_ID_SBA_DATAEXCHANGE format + // for compatibility: create a string which can be used for the SotClipboardFormatId::SBA_DATAEXCHANGE format bool bTreatAsStatement = (CommandType::COMMAND == _nCommandType); // statements are - in this old and ugly format - described as queries @@ -621,13 +621,13 @@ namespace svx { } - sal_uInt32 OMultiColumnTransferable::getDescriptorFormatId() + SotClipboardFormatId OMultiColumnTransferable::getDescriptorFormatId() { - static sal_uInt32 s_nFormat = (sal_uInt32)-1; - if ((sal_uInt32)-1 == s_nFormat) + static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1); + if (static_cast<SotClipboardFormatId>(-1) == s_nFormat) { s_nFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"dbaccess.MultipleColumnDescriptorTransfer\"")); - OSL_ENSURE((sal_uInt32)-1 != s_nFormat, "OColumnTransferable::getDescriptorFormatId: bad exchange id!"); + OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OColumnTransferable::getDescriptorFormatId: bad exchange id!"); } return s_nFormat; } @@ -639,7 +639,7 @@ namespace svx bool OMultiColumnTransferable::GetData( const DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ ) { - const sal_uInt32 nFormatId = SotExchange::GetFormat(_rFlavor); + const SotClipboardFormatId nFormatId = SotExchange::GetFormat(_rFlavor); if (nFormatId == getDescriptorFormatId()) { return SetAny( makeAny( m_aDescriptors ), _rFlavor ); diff --git a/svx/source/fmcomp/dbaobjectex.cxx b/svx/source/fmcomp/dbaobjectex.cxx index d43184e5c4e9..c2a66f28216c 100644 --- a/svx/source/fmcomp/dbaobjectex.cxx +++ b/svx/source/fmcomp/dbaobjectex.cxx @@ -52,19 +52,19 @@ namespace svx - sal_uInt32 OComponentTransferable::getDescriptorFormatId(bool _bExtractForm) + SotClipboardFormatId OComponentTransferable::getDescriptorFormatId(bool _bExtractForm) { - static sal_uInt32 s_nReportFormat = (sal_uInt32)-1; - static sal_uInt32 s_nFormFormat = (sal_uInt32)-1; - if ( _bExtractForm && (sal_uInt32)-1 == s_nFormFormat ) + static SotClipboardFormatId s_nReportFormat = static_cast<SotClipboardFormatId>(-1); + static SotClipboardFormatId s_nFormFormat = static_cast<SotClipboardFormatId>(-1); + if ( _bExtractForm && static_cast<SotClipboardFormatId>(-1) == s_nFormFormat ) { s_nFormFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"dbaccess.FormComponentDescriptorTransfer\"" )); - OSL_ENSURE((sal_uInt32)-1 != s_nFormFormat, "OComponentTransferable::getDescriptorFormatId: bad exchange id!"); + OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nFormFormat, "OComponentTransferable::getDescriptorFormatId: bad exchange id!"); } - else if ( !_bExtractForm && (sal_uInt32)-1 == s_nReportFormat) + else if ( !_bExtractForm && static_cast<SotClipboardFormatId>(-1) == s_nReportFormat) { s_nReportFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"dbaccess.ReportComponentDescriptorTransfer\"")); - OSL_ENSURE((sal_uInt32)-1 != s_nReportFormat, "OComponentTransferable::getDescriptorFormatId: bad exchange id!"); + OSL_ENSURE(static_cast<SotClipboardFormatId>(-1) != s_nReportFormat, "OComponentTransferable::getDescriptorFormatId: bad exchange id!"); } return _bExtractForm ? s_nFormFormat : s_nReportFormat; } @@ -88,7 +88,7 @@ namespace svx bool OComponentTransferable::GetData( const DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ ) { - const sal_uInt32 nFormatId = SotExchange::GetFormat(_rFlavor); + const SotClipboardFormatId nFormatId = SotExchange::GetFormat(_rFlavor); if ( nFormatId == getDescriptorFormatId(true) || nFormatId == getDescriptorFormatId(false) ) return SetAny( makeAny( m_aDescriptor.createPropertyValueSequence() ), _rFlavor ); diff --git a/svx/source/fmcomp/xmlexchg.cxx b/svx/source/fmcomp/xmlexchg.cxx index 6a493c261b4b..22b1a3ccc684 100644 --- a/svx/source/fmcomp/xmlexchg.cxx +++ b/svx/source/fmcomp/xmlexchg.cxx @@ -34,13 +34,13 @@ namespace svx void OXFormsTransferable::AddSupportedFormats() { - AddFormat( SOT_FORMATSTR_ID_XFORMS ); + AddFormat( SotClipboardFormatId::XFORMS ); } bool OXFormsTransferable::GetData( const DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ ) { - const sal_uInt32 nFormatId = SotExchange::GetFormat( _rFlavor ); - if ( SOT_FORMATSTR_ID_XFORMS == nFormatId ) + const SotClipboardFormatId nFormatId = SotExchange::GetFormat( _rFlavor ); + if ( SotClipboardFormatId::XFORMS == nFormatId ) { return SetString(OUString("XForms-Transferable"), _rFlavor); } diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index d6c423020bc6..bd421b778abd 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -117,13 +117,13 @@ void OFilterItemExchange::AddSupportedFormats() } -sal_uInt32 OFilterItemExchange::getFormatId() +SotClipboardFormatId OFilterItemExchange::getFormatId() { - static sal_uInt32 s_nFormat = (sal_uInt32)-1; - if ((sal_uInt32)-1 == s_nFormat) + static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1); + if (static_cast<SotClipboardFormatId>(-1) == s_nFormat) { s_nFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"form.FilterControlExchange\"")); - DBG_ASSERT((sal_uInt32)-1 != s_nFormat, "OFilterExchangeHelper::getFormatId: bad exchange id!"); + DBG_ASSERT(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OFilterExchangeHelper::getFormatId: bad exchange id!"); } return s_nFormat; } diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx index 7ad362e500af..50943bd1a92f 100644 --- a/svx/source/form/fmexch.cxx +++ b/svx/source/form/fmexch.cxx @@ -99,7 +99,7 @@ namespace svxform } - bool OLocalExchange::hasFormat( const DataFlavorExVector& _rFormats, sal_uInt32 _nFormatId ) + bool OLocalExchange::hasFormat( const DataFlavorExVector& _rFormats, SotClipboardFormatId _nFormatId ) { DataFlavorExVector::const_iterator aSearch; @@ -154,7 +154,7 @@ namespace svxform } - static bool lcl_fillDataFlavorEx( SotFormatStringId nId, DataFlavorEx& _rFlavor ) + static bool lcl_fillDataFlavorEx( SotClipboardFormatId nId, DataFlavorEx& _rFlavor ) { _rFlavor.mnSotId = nId; return SotExchange::GetFormatDataFlavor( _rFlavor.mnSotId, _rFlavor ); @@ -280,7 +280,7 @@ namespace svxform bool OControlExchange::GetData( const DataFlavor& _rFlavor, const OUString& rDestDoc ) { - const sal_uInt32 nFormatId = SotExchange::GetFormat( _rFlavor ); + const SotClipboardFormatId nFormatId = SotExchange::GetFormat( _rFlavor ); if ( getControlPathFormatId( ) == nFormatId ) { @@ -317,37 +317,37 @@ namespace svxform } - sal_uInt32 OControlExchange::getControlPathFormatId() + SotClipboardFormatId OControlExchange::getControlPathFormatId() { - static sal_uInt32 s_nFormat = (sal_uInt32)-1; - if ((sal_uInt32)-1 == s_nFormat) + static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1); + if (static_cast<SotClipboardFormatId>(-1) == s_nFormat) { s_nFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"svxform.ControlPathExchange\"")); - DBG_ASSERT((sal_uInt32)-1 != s_nFormat, "OControlExchange::getControlPathFormatId: bad exchange id!"); + DBG_ASSERT(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OControlExchange::getControlPathFormatId: bad exchange id!"); } return s_nFormat; } - sal_uInt32 OControlExchange::getHiddenControlModelsFormatId() + SotClipboardFormatId OControlExchange::getHiddenControlModelsFormatId() { - static sal_uInt32 s_nFormat = (sal_uInt32)-1; - if ((sal_uInt32)-1 == s_nFormat) + static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1); + if (static_cast<SotClipboardFormatId>(-1) == s_nFormat) { s_nFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"svxform.HiddenControlModelsExchange\"")); - DBG_ASSERT((sal_uInt32)-1 != s_nFormat, "OControlExchange::getHiddenControlModelsFormatId: bad exchange id!"); + DBG_ASSERT(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OControlExchange::getHiddenControlModelsFormatId: bad exchange id!"); } return s_nFormat; } - sal_uInt32 OControlExchange::getFieldExchangeFormatId() + SotClipboardFormatId OControlExchange::getFieldExchangeFormatId() { - static sal_uInt32 s_nFormat = (sal_uInt32)-1; - if ((sal_uInt32)-1 == s_nFormat) + static SotClipboardFormatId s_nFormat = static_cast<SotClipboardFormatId>(-1); + if (static_cast<SotClipboardFormatId>(-1) == s_nFormat) { s_nFormat = SotExchange::RegisterFormatName(OUString("application/x-openoffice;windows_formatname=\"svxform.FieldNameExchange\"")); - DBG_ASSERT((sal_uInt32)-1 != s_nFormat, "OControlExchange::getFieldExchangeFormatId: bad exchange id!"); + DBG_ASSERT(static_cast<SotClipboardFormatId>(-1) != s_nFormat, "OControlExchange::getFieldExchangeFormatId: bad exchange id!"); } return s_nFormat; } diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 7d1366c5852d..43dccd894b63 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -971,7 +971,7 @@ namespace svx if ( pActiveControlVCLWindow ) { TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pActiveControlVCLWindow) ); - bDisable |= !aDataHelper.HasFormat( SOT_FORMAT_STRING ); + bDisable |= !aDataHelper.HasFormat( SotClipboardFormatId::STRING ); } else bDisable |= true; diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 52574c269ee5..c68f6f91feb7 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -274,12 +274,12 @@ void GalleryThemePopup::ExecutePopup( vcl::Window *pWindow, const ::Point &aPos if( aDataHelper.GetFormatCount() ) { - if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) || - aDataHelper.HasFormat( SOT_FORMAT_FILE_LIST ) || - aDataHelper.HasFormat( FORMAT_FILE ) || - aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) || - aDataHelper.HasFormat( FORMAT_GDIMETAFILE ) || - aDataHelper.HasFormat( FORMAT_BITMAP ) ) + if( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) || + aDataHelper.HasFormat( SotClipboardFormatId::FILE_LIST ) || + aDataHelper.HasFormat( SotClipboardFormatId::FILE ) || + aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) || + aDataHelper.HasFormat( SotClipboardFormatId::GDIMETAFILE ) || + aDataHelper.HasFormat( SotClipboardFormatId::BITMAP ) ) { bEnable = sal_True; } @@ -574,12 +574,12 @@ sal_Int8 GalleryBrowser2::AcceptDrop( DropTargetHelper& rTarget, const AcceptDro { if( !mpCurTheme->IsDragging() ) { - if( rTarget.IsDropFormatSupported( SOT_FORMATSTR_ID_DRAWING ) || - rTarget.IsDropFormatSupported( SOT_FORMAT_FILE_LIST ) || - rTarget.IsDropFormatSupported( FORMAT_FILE ) || - rTarget.IsDropFormatSupported( SOT_FORMATSTR_ID_SVXB ) || - rTarget.IsDropFormatSupported( FORMAT_GDIMETAFILE ) || - rTarget.IsDropFormatSupported( FORMAT_BITMAP ) ) + if( rTarget.IsDropFormatSupported( SotClipboardFormatId::DRAWING ) || + rTarget.IsDropFormatSupported( SotClipboardFormatId::FILE_LIST ) || + rTarget.IsDropFormatSupported( SotClipboardFormatId::FILE ) || + rTarget.IsDropFormatSupported( SotClipboardFormatId::SVXB ) || + rTarget.IsDropFormatSupported( SotClipboardFormatId::GDIMETAFILE ) || + rTarget.IsDropFormatSupported( SotClipboardFormatId::BITMAP ) ) { nRet = DND_ACTION_COPY; } diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index fd0a90cc33be..7a7809df927a 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -477,29 +477,29 @@ void GalleryTransferable::AddSupportedFormats() { if( SGA_OBJ_SVDRAW == meObjectKind ) { - AddFormat( SOT_FORMATSTR_ID_DRAWING ); - AddFormat( SOT_FORMATSTR_ID_SVXB ); - AddFormat( FORMAT_GDIMETAFILE ); - AddFormat( FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::DRAWING ); + AddFormat( SotClipboardFormatId::SVXB ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::BITMAP ); } else { if( mpURL ) - AddFormat( FORMAT_FILE ); + AddFormat( SotClipboardFormatId::FILE ); if( mpGraphicObject ) { - AddFormat( SOT_FORMATSTR_ID_SVXB ); + AddFormat( SotClipboardFormatId::SVXB ); if( mpGraphicObject->GetType() == GRAPHIC_GDIMETAFILE ) { - AddFormat( FORMAT_GDIMETAFILE ); - AddFormat( FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::BITMAP ); } else { - AddFormat( FORMAT_BITMAP ); - AddFormat( FORMAT_GDIMETAFILE ); + AddFormat( SotClipboardFormatId::BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); } } } @@ -507,33 +507,33 @@ void GalleryTransferable::AddSupportedFormats() bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, const OUString& /*rDestDoc*/ ) { - sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor ); + SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor ); bool bRet = false; InitData( false ); - if( ( SOT_FORMATSTR_ID_DRAWING == nFormat ) && ( SGA_OBJ_SVDRAW == meObjectKind ) ) + if( ( SotClipboardFormatId::DRAWING == nFormat ) && ( SGA_OBJ_SVDRAW == meObjectKind ) ) { - bRet = ( mxModelStream.Is() && SetObject( &mxModelStream, 0, rFlavor ) ); + bRet = ( mxModelStream.Is() && SetObject( &mxModelStream, SotClipboardFormatId::NONE, rFlavor ) ); } - else if( ( SOT_FORMATSTR_ID_SVIM == nFormat ) && mpImageMap ) + else if( ( SotClipboardFormatId::SVIM == nFormat ) && mpImageMap ) { // TODO/MBA: do we need a BaseURL here?! bRet = SetImageMap( *mpImageMap, rFlavor ); } - else if( ( FORMAT_FILE == nFormat ) && mpURL ) + else if( ( SotClipboardFormatId::FILE == nFormat ) && mpURL ) { bRet = SetString( mpURL->GetMainURL( INetURLObject::NO_DECODE ), rFlavor ); } - else if( ( SOT_FORMATSTR_ID_SVXB == nFormat ) && mpGraphicObject ) + else if( ( SotClipboardFormatId::SVXB == nFormat ) && mpGraphicObject ) { bRet = SetGraphic( mpGraphicObject->GetGraphic(), rFlavor ); } - else if( ( FORMAT_GDIMETAFILE == nFormat ) && mpGraphicObject ) + else if( ( SotClipboardFormatId::GDIMETAFILE == nFormat ) && mpGraphicObject ) { bRet = SetGDIMetaFile( mpGraphicObject->GetGraphic().GetGDIMetaFile(), rFlavor ); } - else if( ( FORMAT_BITMAP == nFormat ) && mpGraphicObject ) + else if( ( SotClipboardFormatId::BITMAP == nFormat ) && mpGraphicObject ) { bRet = SetBitmapEx( mpGraphicObject->GetGraphic().GetBitmapEx(), rFlavor ); } @@ -542,7 +542,7 @@ bool GalleryTransferable::GetData( const datatransfer::DataFlavor& rFlavor, cons } bool GalleryTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, - sal_uInt32, const datatransfer::DataFlavor& ) + SotClipboardFormatId, const datatransfer::DataFlavor& ) { bool bRet = false; diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 2bf184f4c559..c0f5ecd6d00e 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -1185,24 +1185,24 @@ bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTran TransferableDataHelper aDataHelper( rxTransferable ); boost::scoped_ptr<Graphic> pGraphic; - if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_DRAWING ) ) + if( aDataHelper.HasFormat( SotClipboardFormatId::DRAWING ) ) { SotStorageStreamRef xModelStm; - if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_DRAWING, xModelStm ) ) + if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::DRAWING, xModelStm ) ) bRet = InsertModelStream( xModelStm, nInsertPos ); } - else if( aDataHelper.HasFormat( SOT_FORMAT_FILE_LIST ) || - aDataHelper.HasFormat( FORMAT_FILE ) ) + else if( aDataHelper.HasFormat( SotClipboardFormatId::FILE_LIST ) || + aDataHelper.HasFormat( SotClipboardFormatId::FILE ) ) { FileList aFileList; - if( aDataHelper.HasFormat( SOT_FORMAT_FILE_LIST ) ) - aDataHelper.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ); + if( aDataHelper.HasFormat( SotClipboardFormatId::FILE_LIST ) ) + aDataHelper.GetFileList( SotClipboardFormatId::FILE_LIST, aFileList ); else { OUString aFile; - if (aDataHelper.GetString(FORMAT_FILE, aFile) && !aFile.isEmpty()) + if (aDataHelper.GetString(SotClipboardFormatId::FILE, aFile) && !aFile.isEmpty()) aFileList.AppendFile( aFile ); } @@ -1226,16 +1226,16 @@ bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTran else { Graphic aGraphic; - sal_uIntPtr nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; - if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVXB ) ) - nFormat = SOT_FORMATSTR_ID_SVXB; - else if( aDataHelper.HasFormat( FORMAT_GDIMETAFILE ) ) - nFormat = FORMAT_GDIMETAFILE; - else if( aDataHelper.HasFormat( FORMAT_BITMAP ) ) - nFormat = FORMAT_BITMAP; + if( aDataHelper.HasFormat( SotClipboardFormatId::SVXB ) ) + nFormat = SotClipboardFormatId::SVXB; + else if( aDataHelper.HasFormat( SotClipboardFormatId::GDIMETAFILE ) ) + nFormat = SotClipboardFormatId::GDIMETAFILE; + else if( aDataHelper.HasFormat( SotClipboardFormatId::BITMAP ) ) + nFormat = SotClipboardFormatId::BITMAP; - if( nFormat && aDataHelper.GetGraphic( nFormat, aGraphic ) ) + if( nFormat != SotClipboardFormatId::NONE && aDataHelper.GetGraphic( nFormat, aGraphic ) ) pGraphic.reset(new Graphic( aGraphic )); } @@ -1243,13 +1243,13 @@ bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTran { bRet = false; - if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVIM ) ) + if( aDataHelper.HasFormat( SotClipboardFormatId::SVIM ) ) { ImageMap aImageMap; // according to KA we don't need a BaseURL here - if( aDataHelper.GetImageMap( SOT_FORMATSTR_ID_SVIM, aImageMap ) ) + if( aDataHelper.GetImageMap( SotClipboardFormatId::SVIM, aImageMap ) ) { SvxGalleryDrawModel aModel; diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx index 6e050a0f18a6..2ae3ff311f68 100644 --- a/svx/source/inc/filtnav.hxx +++ b/svx/source/inc/filtnav.hxx @@ -206,7 +206,7 @@ class OFilterItemExchange : public OLocalExchange public: OFilterItemExchange(); - static sal_uInt32 getFormatId( ); + static SotClipboardFormatId getFormatId( ); inline static bool hasFormat( const DataFlavorExVector& _rFormats ); const ::std::vector<FmFilterItem*>& getDraggedEntries() const { return m_aDraggedEntries; } diff --git a/svx/source/inc/fmexch.hxx b/svx/source/inc/fmexch.hxx index ea6d34a5b3c7..5f77950826de 100644 --- a/svx/source/inc/fmexch.hxx +++ b/svx/source/inc/fmexch.hxx @@ -74,7 +74,7 @@ namespace svxform void clear(); - static bool hasFormat( const DataFlavorExVector& _rFormats, sal_uInt32 _nFormatId ); + static bool hasFormat( const DataFlavorExVector& _rFormats, SotClipboardFormatId _nFormatId ); protected: // XClipboardOwner @@ -210,9 +210,9 @@ namespace svxform OControlExchange( ); public: - static sal_uInt32 getFieldExchangeFormatId( ); - static sal_uInt32 getControlPathFormatId( ); - static sal_uInt32 getHiddenControlModelsFormatId( ); + static SotClipboardFormatId getFieldExchangeFormatId( ); + static SotClipboardFormatId getControlPathFormatId( ); + static SotClipboardFormatId getHiddenControlModelsFormatId( ); inline static bool hasFieldExchangeFormat( const DataFlavorExVector& _rFormats ); inline static bool hasControlPathFormat( const DataFlavorExVector& _rFormats ); diff --git a/svx/source/items/clipfmtitem.cxx b/svx/source/items/clipfmtitem.cxx index f7ae1207de0c..bc9362fb6543 100644 --- a/svx/source/items/clipfmtitem.cxx +++ b/svx/source/items/clipfmtitem.cxx @@ -25,7 +25,7 @@ struct SvxClipboardFmtItem_Impl { boost::ptr_vector< boost::nullable<OUString> > aFmtNms; - std::vector<sal_uIntPtr> aFmtIds; + std::vector<SotClipboardFormatId> aFmtIds; SvxClipboardFmtItem_Impl() {} SvxClipboardFmtItem_Impl( const SvxClipboardFmtItem_Impl& ); @@ -84,7 +84,7 @@ bool SvxClipboardFmtItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_ pImpl->aFmtIds.clear(); pImpl->aFmtNms.clear(); for ( sal_uInt16 n=0; n < nCount; ++n ) - AddClipbrdFormat( sal_uIntPtr( aClipFormats.Identifiers[n] ), aClipFormats.Names[n], n ); + AddClipbrdFormat( static_cast<SotClipboardFormatId>(aClipFormats.Identifiers[n]), aClipFormats.Names[n], n ); return true; } @@ -118,7 +118,7 @@ SfxPoolItem* SvxClipboardFmtItem::Clone( SfxItemPool * /*pPool*/ ) const return new SvxClipboardFmtItem( *this ); } -void SvxClipboardFmtItem::AddClipbrdFormat( sal_uIntPtr nId, sal_uInt16 nPos ) +void SvxClipboardFmtItem::AddClipbrdFormat( SotClipboardFormatId nId, sal_uInt16 nPos ) { if( nPos > pImpl->aFmtNms.size() ) nPos = pImpl->aFmtNms.size(); @@ -127,7 +127,7 @@ void SvxClipboardFmtItem::AddClipbrdFormat( sal_uIntPtr nId, sal_uInt16 nPos ) pImpl->aFmtIds.insert( pImpl->aFmtIds.begin()+nPos, nId ); } -void SvxClipboardFmtItem::AddClipbrdFormat( sal_uIntPtr nId, const OUString& rName, +void SvxClipboardFmtItem::AddClipbrdFormat( SotClipboardFormatId nId, const OUString& rName, sal_uInt16 nPos ) { if( nPos > pImpl->aFmtNms.size() ) @@ -142,7 +142,7 @@ sal_uInt16 SvxClipboardFmtItem::Count() const return pImpl->aFmtIds.size(); } -sal_uIntPtr SvxClipboardFmtItem::GetClipbrdFormatId( sal_uInt16 nPos ) const +SotClipboardFormatId SvxClipboardFmtItem::GetClipbrdFormatId( sal_uInt16 nPos ) const { return pImpl->aFmtIds[ nPos ]; } diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx index 8602702e0fea..352dcb0cb651 100644 --- a/svx/source/mnuctrls/clipboardctl.cxx +++ b/svx/source/mnuctrls/clipboardctl.cxx @@ -74,7 +74,7 @@ SfxPopupWindow* SvxClipBoardControl::CreatePopupWindow() sal_uInt16 nCount = pFmtItem->Count(); for (sal_uInt16 i = 0; i < nCount; ++i) { - sal_uIntPtr nFmtID = pFmtItem->GetClipbrdFormatId( i ); + SotClipboardFormatId nFmtID = pFmtItem->GetClipbrdFormatId( i ); OUString aFmtStr( pFmtItem->GetClipbrdFormatName( i ) ); if (aFmtStr.isEmpty()) aFmtStr = SvPasteObjectHelper::GetSotFormatUIName( nFmtID ); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index c8aec7d0de11..612f2aa7105a 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -195,7 +195,7 @@ void SAL_CALL SdrGraphicUpdater::run(void) } SdrGraphicLink::SdrGraphicLink(SdrGrafObj& rObj) -: ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB ) +: ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SotClipboardFormatId::SVXB ) , rGrafObj( rObj ) , pGraphicUpdater( NULL ) { diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 2f495acf2293..2592c580b5b9 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -608,7 +608,7 @@ public: SdrEmbedObjectLink::SdrEmbedObjectLink(SdrOle2Obj* pObject): - ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB ), + ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SotClipboardFormatId::SVXB ), pObj(pObject) { SetSynchron( false ); diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx index b2bb10a99412..e1156160bde3 100644 --- a/svx/source/svdraw/svdotxln.cxx +++ b/svx/source/svdraw/svdotxln.cxx @@ -41,7 +41,7 @@ class ImpSdrObjTextLink: public ::sfx2::SvBaseLink public: ImpSdrObjTextLink( SdrTextObj* pObj1 ) - : ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, FORMAT_FILE ), + : ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SotClipboardFormatId::FILE ), pSdrObj( pObj1 ) {} virtual ~ImpSdrObjTextLink(); diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 689932bda7ad..f78e8276db9e 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -52,7 +52,7 @@ protected: virtual void AddSupportedFormats() SAL_OVERRIDE; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; - virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; + virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, SotClipboardFormatId nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; public: @@ -64,7 +64,7 @@ public: void SvxColorValueSetData::AddSupportedFormats() { - AddFormat( SOT_FORMATSTR_ID_XFA ); + AddFormat( SotClipboardFormatId::XFA ); } @@ -73,16 +73,16 @@ bool SvxColorValueSetData::GetData( const css::datatransfer::DataFlavor& rFlavor { bool bRet = false; - if( SotExchange::GetFormat( rFlavor ) == SOT_FORMATSTR_ID_XFA ) + if( SotExchange::GetFormat( rFlavor ) == SotClipboardFormatId::XFA ) { - SetObject( &maData, 0, rFlavor ); + SetObject( &maData, SotClipboardFormatId::NONE, rFlavor ); bRet = true; } return bRet; } -bool SvxColorValueSetData::WriteObject( SotStorageStreamRef& rxOStm, void*, sal_uInt32 , const ::com::sun::star::datatransfer::DataFlavor& ) +bool SvxColorValueSetData::WriteObject( SotStorageStreamRef& rxOStm, void*, SotClipboardFormatId, const ::com::sun::star::datatransfer::DataFlavor& ) { WriteXFillExchangeData( *rxOStm, maData ); return( rxOStm->GetError() == ERRCODE_NONE ); diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 9b917728bc53..7461487771f0 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -242,7 +242,7 @@ public: virtual void ReconnectDdeLink(SfxObjectShell& rServer) SAL_OVERRIDE; virtual void FillClass( SvGlobalName * pClassName, - sal_uInt32 * pClipFormat, + SotClipboardFormatId * pClipFormat, OUString * pAppName, OUString * pLongUserName, OUString * pUserName, diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index dc8edfd3153c..03aca2b9712c 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -29,6 +29,7 @@ #include <flyenum.hxx> #include <svx/svdtypes.hxx> +#include <sot/formats.hxx> #include <rtl/ustring.hxx> #include <svtools/embedhlp.hxx> #include <o3tl/typed_flags_set.hxx> @@ -520,7 +521,7 @@ public: /** Get selected DrawObj as graphics (MetaFile/Bitmap). Return value indicates if it was converted. */ - bool GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const; + bool GetDrawObjGraphic( SotClipboardFormatId nFmt, Graphic& rGrf ) const; void Paste( SvStream& rStm, sal_uInt16 nAction, const Point* pPt = 0 ); bool Paste( const Graphic &rGrf, const OUString& rURL ); diff --git a/sw/inc/globdoc.hxx b/sw/inc/globdoc.hxx index 4aee52bb303f..d2a7452aeb85 100644 --- a/sw/inc/globdoc.hxx +++ b/sw/inc/globdoc.hxx @@ -32,7 +32,7 @@ public: virtual ~SwGlobalDocShell(); virtual void FillClass( SvGlobalName * pClassName, - sal_uInt32 * pClipFormat, + SotClipboardFormatId * pClipFormat, OUString * pAppName, OUString * pLongUserName, OUString * pUserName, diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx index f32b7b4f0478..ecb83af8b5b9 100644 --- a/sw/inc/swbaslnk.hxx +++ b/sw/inc/swbaslnk.hxx @@ -42,7 +42,7 @@ protected: public: TYPEINFO_OVERRIDE(); - SwBaseLink( sal_uInt16 nMode, sal_uInt16 nFormat, SwCntntNode* pNode = 0 ) + SwBaseLink( sal_uInt16 nMode, SotClipboardFormatId nFormat, SwCntntNode* pNode = 0 ) : ::sfx2::SvBaseLink( nMode, nFormat ), pCntntNode( pNode ), bSwapIn( false ), bNoDataFlag( false ), bIgnoreDataChanged( false ), m_pReReadThread(0) diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx index f142de2cb17b..f365f935784b 100644 --- a/sw/inc/wdocsh.hxx +++ b/sw/inc/wdocsh.hxx @@ -42,7 +42,7 @@ public: virtual ~SwWebDocShell(); virtual void FillClass( SvGlobalName * pClassName, - sal_uInt32 * pClipFormat, + SotClipboardFormatId * pClipFormat, OUString * pAppName, OUString * pLongUserName, OUString * pUserName, diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx index 527f3ae3d50f..3de7da278397 100644 --- a/sw/qa/core/filters-test.cxx +++ b/sw/qa/core/filters-test.cxx @@ -44,10 +44,10 @@ class SwFiltersTest public: virtual bool load( const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion) SAL_OVERRIDE; + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) SAL_OVERRIDE; virtual bool save( const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion) SAL_OVERRIDE; + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) SAL_OVERRIDE; virtual void setUp() SAL_OVERRIDE; // Ensure CVEs remain unbroken @@ -60,27 +60,27 @@ public: private: bool filter( const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion, bool bExport); + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion, bool bExport); uno::Reference<uno::XInterface> m_xWriterComponent; }; bool SwFiltersTest::load(const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion) + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) { return filter(rFilter, rURL, rUserData, nFilterFlags, nClipboardID, nFilterVersion, false); } bool SwFiltersTest::save(const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion) + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) { return filter(rFilter, rURL, rUserData, nFilterFlags, nClipboardID, nFilterVersion, true); } bool SwFiltersTest::filter(const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion, bool bExport) + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion, bool bExport) { SfxFilter* pFilter = new SfxFilter( rFilter, OUString(), nFilterFlags, @@ -131,7 +131,7 @@ bool SwFiltersTest::filter(const OUString &rFilter, const OUString &rURL, return bSaved; } -#define isstorage 1 +#define isstorage SotClipboardFormatId::STRING void SwFiltersTest::testCVEs() { @@ -182,7 +182,7 @@ void SwFiltersTest::testCVEs() getURLFromSrc("/sw/qa/core/exportdata/rtf/"), OUString(), SFX_FILTER_STARONEFILTER, - 0, + SotClipboardFormatId::NONE, 0, /*bExport=*/true); @@ -190,7 +190,7 @@ void SwFiltersTest::testCVEs() getURLFromSrc("/sw/qa/core/exportdata/html/"), OUString(sHTML), 0, - 0, + SotClipboardFormatId::NONE, 0, /*bExport=*/true); @@ -198,7 +198,7 @@ void SwFiltersTest::testCVEs() getURLFromSrc("/sw/qa/core/exportdata/ooxml/"), OUString(), SFX_FILTER_STARONEFILTER, - 0, + SotClipboardFormatId::NONE, 0, /*bExport=*/true); diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 29f02fcd5a77..9cf6407686d4 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -174,7 +174,7 @@ void SwDocTest::testFileNameFields() SfxFilter aFilter( OUString("Text"), - OUString(), 0, 0, OUString(), 0, OUString(), + OUString(), 0, SotClipboardFormatId::NONE, OUString(), 0, OUString(), OUString("TEXT"), OUString() ); aDstMed.SetFilter(&aFilter); diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx index 4487b256d818..af84712d3b83 100644 --- a/sw/source/core/doc/swserv.cxx +++ b/sw/source/core/doc/swserv.cxx @@ -46,14 +46,15 @@ bool SwServerObject::GetData( uno::Any & rData, WriterRef xWrt; switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) ) { - case FORMAT_STRING: + case SotClipboardFormatId::STRING: ::GetASCWriter( OUString(), OUString(), xWrt ); break; - case FORMAT_RTF: + case SotClipboardFormatId::RTF: // mba: no BaseURL for data exchange ::GetRTFWriter( OUString(), OUString(), xWrt ); break; + default: break; } if( xWrt.Is() ) diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 62e00e663e8f..2bc1eb1b10b4 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -72,7 +72,7 @@ class SwIntrnlSectRefLink : public SwBaseLink { SwSectionFmt& rSectFmt; public: - SwIntrnlSectRefLink( SwSectionFmt& rFmt, sal_uInt16 nUpdateType, sal_uInt16 nFmt ) + SwIntrnlSectRefLink( SwSectionFmt& rFmt, sal_uInt16 nUpdateType, SotClipboardFormatId nFmt ) : SwBaseLink( nUpdateType, nFmt ), rSectFmt( rFmt ) {} @@ -1144,7 +1144,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) return ; const OUString sName( pDShell->GetMedium()->GetName() ); - const OUString sMimeType( SotExchange::GetFormatMimeType( FORMAT_FILE )); + const OUString sMimeType( SotExchange::GetFormatMimeType( SotClipboardFormatId::FILE )); uno::Any aValue; aValue <<= sName; // Arbitrary name @@ -1189,7 +1189,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) SwSectionNode* pSectNd = rSectFmt.GetSectionNode( false ); SwDoc* pDoc = rSectFmt.GetDoc(); - sal_uLong nDataFormat = SotExchange::GetFormatIdFromMimeType( rMimeType ); + SotClipboardFormatId nDataFormat = SotExchange::GetFormatIdFromMimeType( rMimeType ); if( !pSectNd || !pDoc || pDoc->IsInDtor() || ChkNoDataFlag() || sfx2::LinkManager::RegisterStatusInfoId() == nDataFormat ) @@ -1248,15 +1248,15 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) Reader* pRead = 0; switch( nDataFormat ) { - case FORMAT_STRING: + case SotClipboardFormatId::STRING: pRead = ReadAscii; break; - case FORMAT_RTF: + case SotClipboardFormatId::RTF: pRead = SwReaderWriter::GetReader( READER_WRITER_RTF ); break; - case FORMAT_FILE: + case SotClipboardFormatId::FILE: if ( rValue.hasValue() ) { OUString sFileName; @@ -1400,6 +1400,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) } } break; + default: break; } // Only create DDE if Shell is available! @@ -1510,7 +1511,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType ) if (!m_RefLink.Is()) { // create BaseLink - m_RefLink = new SwIntrnlSectRefLink( *pFmt, nUpdateType, FORMAT_RTF ); + m_RefLink = new SwIntrnlSectRefLink( *pFmt, nUpdateType, SotClipboardFormatId::RTF ); } else { @@ -1532,7 +1533,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType ) break; case FILE_LINK_SECTION: { - pLnk->SetContentType( FORMAT_FILE ); + pLnk->SetContentType( SotClipboardFormatId::FILE ); sal_Int32 nIndex = 0; const OUString sFile(sCmd.getToken( 0, sfx2::cTokenSeparator, nIndex )); const OUString sFltr(sCmd.getToken( 0, sfx2::cTokenSeparator, nIndex )); diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index c391d49a55ae..70204f3d2618 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -95,7 +95,7 @@ static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) return SUCCESS; } - sal_uLong nFmt = SotExchange::GetFormatIdFromMimeType( rMimeType ); + SotClipboardFormatId nFmt = SotExchange::GetFormatIdFromMimeType( rMimeType ); if( pCntntNode->IsNoTxtNode() && nFmt == sfx2::LinkManager::RegisterStatusInfoId() ) diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index 81d1517e2ac2..5d2a2b148aa7 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -43,7 +43,7 @@ class SwIntrnlRefLink : public SwBaseLink { SwDDEFieldType& rFldType; public: - SwIntrnlRefLink( SwDDEFieldType& rType, sal_uInt16 nUpdateType, sal_uInt16 nFmt ) + SwIntrnlRefLink( SwDDEFieldType& rType, sal_uInt16 nUpdateType, SotClipboardFormatId nFmt ) : SwBaseLink( nUpdateType, nFmt ), rFldType( rType ) {} @@ -62,7 +62,7 @@ public: { switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) ) { - case FORMAT_STRING: + case SotClipboardFormatId::STRING: if( !IsNoDataFlag() ) { uno::Sequence< sal_Int8 > aSeq; @@ -233,7 +233,7 @@ SwDDEFieldType::SwDDEFieldType(const OUString& rName, aName( rName ), pDoc( 0 ), nRefCnt( 0 ) { bCRLFFlag = bDeleted = false; - refLink = new SwIntrnlRefLink( *this, nUpdateType, FORMAT_STRING ); + refLink = new SwIntrnlRefLink( *this, nUpdateType, SotClipboardFormatId::STRING ); SetCmd( rCmd ); } diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index c4e2a350ac94..69226a020ac6 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -1209,7 +1209,7 @@ bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1 return true; } -bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const +bool SwFEShell::GetDrawObjGraphic( SotClipboardFormatId nFmt, Graphic& rGrf ) const { OSL_ENSURE( Imp()->HasDrawView(), "GetDrawObjGraphic without DrawView?" ); const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); @@ -1226,7 +1226,7 @@ bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const if ( pGrf ) { Graphic aGrf( *pGrf ); - if( SOT_FORMAT_GDIMETAFILE == nFmt ) + if( SotClipboardFormatId::GDIMETAFILE == nFmt ) { if( GRAPHIC_BITMAP != aGrf.GetType() ) { @@ -1284,9 +1284,9 @@ bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const } } } - else if( SOT_FORMAT_GDIMETAFILE == nFmt ) + else if( SotClipboardFormatId::GDIMETAFILE == nFmt ) rGrf = Imp()->GetDrawView()->GetMarkedObjMetaFile(); - else if( SOT_FORMAT_BITMAP == nFmt || SOT_FORMATSTR_ID_PNG == nFmt ) + else if( SotClipboardFormatId::BITMAP == nFmt || SotClipboardFormatId::PNG == nFmt ) rGrf = Imp()->GetDrawView()->GetMarkedObjBitmapEx(); } return bConvert; diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 80abe8c2ac39..2ae7c955fbed 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -697,7 +697,7 @@ bool SwGrfNode::RestorePersistentData() void SwGrfNode::InsertLink( const OUString& rGrfName, const OUString& rFltName ) { - refLink = new SwBaseLink( sfx2::LINKUPDATE_ONCALL, FORMAT_GDIMETAFILE, this ); + refLink = new SwBaseLink( sfx2::LINKUPDATE_ONCALL, SotClipboardFormatId::GDIMETAFILE, this ); IDocumentLinksAdministration* pIDLA = getIDocumentLinksAdministration(); if( GetNodes().IsDocNodes() ) @@ -717,7 +717,7 @@ void SwGrfNode::InsertLink( const OUString& rGrfName, const OUString& rFltName ) { const bool bSync = rFltName == "SYNCHRON"; refLink->SetSynchron( bSync ); - refLink->SetContentType( SOT_FORMATSTR_ID_SVXB ); + refLink->SetContentType( SotClipboardFormatId::SVXB ); pIDLA->GetLinkManager().InsertFileLink( *refLink, OBJECT_CLIENT_GRF, rGrfName, diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 50c0dc654743..b6898e549028 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -159,7 +159,7 @@ public: }; SwEmbedObjectLink::SwEmbedObjectLink(SwOLENode* pNode): - ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB ), + ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SotClipboardFormatId::SVXB ), pOleNode(pNode) { SetSynchron( false ); diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index 5234dce06df4..4154767253e9 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -303,7 +303,7 @@ sal_uLong SwXMLTextBlocks::StartPutBlock( const OUString& rShort, const OUString uno::Reference< beans::XPropertySet > xRootProps( xRoot, uno::UNO_QUERY_THROW ); OUString aPropName( "MediaType" ); - OUString aMime( SotExchange::GetFormatMimeType( SOT_FORMATSTR_ID_STARWRITER_8 ) ); + OUString aMime( SotExchange::GetFormatMimeType( SotClipboardFormatId::STARWRITER_8 ) ); xRootProps->setPropertyValue( aPropName, uno::makeAny( aMime ) ); } catch (const uno::Exception&) diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx index afb847de1aa7..c6d90dedd1bf 100644 --- a/sw/source/core/swg/SwXMLTextBlocks1.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx @@ -179,8 +179,7 @@ sal_uLong SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx, try { xRoot = xBlkRoot->openStorageElement( aPackageName, embed::ElementModes::READ ); - long nTmp = SOT_FORMATSTR_ID_STARWRITER_60; - bool bOasis = ( SotStorage::GetVersion( xRoot ) > nTmp ); + bool bOasis = SotStorage::GetVersion( xRoot ) > SOFFICE_FILEFORMAT_60; OUString sStreamName("atevent.xml"); uno::Reference < io::XStream > xDocStream = xRoot->openStreamElement( @@ -554,8 +553,7 @@ sal_uLong SwXMLTextBlocks::SetMacroTable( { xRoot = xBlkRoot->openStorageElement( aPackageName, embed::ElementModes::WRITE ); OUString sStreamName("atevent.xml" ); - long nTmp = SOT_FORMATSTR_ID_STARWRITER_60; - bool bOasis = ( SotStorage::GetVersion( xRoot ) > nTmp ); + bool bOasis = SotStorage::GetVersion( xRoot ) > SOFFICE_FILEFORMAT_60; uno::Reference < io::XStream > xDocStream = xRoot->openStreamElement( sStreamName, embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ); diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index cef4d239ab84..e9bb306c9310 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -92,10 +92,10 @@ bool SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::s bool bRet = false; try { - sal_uLong nStgFmtId = SotStorage::GetFormatID( rStg ); + SotClipboardFormatId nStgFmtId = SotStorage::GetFormatID( rStg ); bRet = rStg->isStreamElement( OUString("content.xml") ); if ( bRet ) - bRet = ( nStgFmtId && ( rFilter.GetFormat() == nStgFmtId ) ); + bRet = ( nStgFmtId != SotClipboardFormatId::NONE && ( rFilter.GetFormat() == nStgFmtId ) ); } catch (const com::sun::star::uno::Exception& ) { @@ -106,13 +106,13 @@ bool SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::s bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter) { - sal_uLong nStgFmtId = rStg.GetFormat(); + SotClipboardFormatId nStgFmtId = rStg.GetFormat(); /*#i8409# We cannot trust the clipboard id anymore :-(*/ if (rFilter.GetUserData() == FILTER_WW8 || rFilter.GetUserData() == sWW6) - nStgFmtId = 0; + nStgFmtId = SotClipboardFormatId::NONE; bool bRet = SVSTREAM_OK == rStg.GetError() && - ( !nStgFmtId || rFilter.GetFormat() == nStgFmtId ) && + ( nStgFmtId == SotClipboardFormatId::NONE || rFilter.GetFormat() == nStgFmtId ) && ( rStg.IsContained( SwIoSystem::GetSubStorageName( rFilter )) ); if( bRet ) { diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 15308941e99c..864db7fc8cbc 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3388,7 +3388,7 @@ void WW8Export::PrepareStorage() SvGlobalName aGName( nId1, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ); - GetWriter().GetStorage().SetClass( aGName, 0, OUString::createFromAscii( pName )); + GetWriter().GetStorage().SetClass( aGName, SotClipboardFormatId::NONE, OUString::createFromAscii( pName )); SvStorageStreamRef xStor( GetWriter().GetStorage().OpenSotStream(sCompObj) ); xStor->Write( pData, nLen ); diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 25a16f9a2083..cd8af756ab45 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1377,9 +1377,9 @@ static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox ) if( rMedium.IsStorage() && (xStg = rMedium.GetStorage()).is() ) { std::vector<OUString*> aArr; - sal_uInt32 nFormat = SotStorage::GetFormatID( xStg ); - if ( nFormat == SOT_FORMATSTR_ID_STARWRITER_60 || nFormat == SOT_FORMATSTR_ID_STARWRITERGLOB_60 || - nFormat == SOT_FORMATSTR_ID_STARWRITER_8 || nFormat == SOT_FORMATSTR_ID_STARWRITERGLOB_8) + SotClipboardFormatId nFormat = SotStorage::GetFormatID( xStg ); + if ( nFormat == SotClipboardFormatId::STARWRITER_60 || nFormat == SotClipboardFormatId::STARWRITERGLOB_60 || + nFormat == SotClipboardFormatId::STARWRITER_8 || nFormat == SotClipboardFormatId::STARWRITERGLOB_8) SwGetReaderXML()->GetSectionList( rMedium, aArr ); for(std::vector<OUString*>::const_iterator it(aArr.begin()); it != aArr.end(); ++it) { diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 5660bc8fa178..9aa2c2dda517 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -637,17 +637,17 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) // determine the desired Type sal_uInt8 nSaveType = 0; - sal_uLong nSaveClipId = pFlt->GetFormat(); - if( SOT_FORMATSTR_ID_STARWRITERWEB_8 == nSaveClipId || - SOT_FORMATSTR_ID_STARWRITERWEB_60 == nSaveClipId || - SOT_FORMATSTR_ID_STARWRITERWEB_50 == nSaveClipId || - SOT_FORMATSTR_ID_STARWRITERWEB_40 == nSaveClipId ) + SotClipboardFormatId nSaveClipId = pFlt->GetFormat(); + if( SotClipboardFormatId::STARWRITERWEB_8 == nSaveClipId || + SotClipboardFormatId::STARWRITERWEB_60 == nSaveClipId || + SotClipboardFormatId::STARWRITERWEB_50 == nSaveClipId || + SotClipboardFormatId::STARWRITERWEB_40 == nSaveClipId ) nSaveType = 1; - else if( SOT_FORMATSTR_ID_STARWRITERGLOB_8 == nSaveClipId || - SOT_FORMATSTR_ID_STARWRITERGLOB_8_TEMPLATE == nSaveClipId || - SOT_FORMATSTR_ID_STARWRITERGLOB_60 == nSaveClipId || - SOT_FORMATSTR_ID_STARWRITERGLOB_50 == nSaveClipId || - SOT_FORMATSTR_ID_STARWRITERGLOB_40 == nSaveClipId ) + else if( SotClipboardFormatId::STARWRITERGLOB_8 == nSaveClipId || + SotClipboardFormatId::STARWRITERGLOB_8_TEMPLATE == nSaveClipId || + SotClipboardFormatId::STARWRITERGLOB_60 == nSaveClipId || + SotClipboardFormatId::STARWRITERGLOB_50 == nSaveClipId || + SotClipboardFormatId::STARWRITERGLOB_40 == nSaveClipId ) nSaveType = 2; // Change Flags of the Document accordingly diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 1ece5cd5f485..2650f8cea84b 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -812,7 +812,7 @@ void SwDocShell::Execute(SfxRequest& rReq) ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xRef( pClipCntnr ); - pClipCntnr->CopyAnyData( FORMAT_RTF, (sal_Char*) + pClipCntnr->CopyAnyData( SotClipboardFormatId::RTF, (sal_Char*) pStrm->GetData(), pStrm->GetEndOfData() ); pClipCntnr->CopyToClipboard( GetView()? &GetView()->GetEditWin() : 0 ); @@ -1171,7 +1171,7 @@ void SwDocShell::ReconnectDdeLink(SfxObjectShell& rServer) } void SwDocShell::FillClass( SvGlobalName * pClassName, - sal_uInt32 * pClipFormat, + SotClipboardFormatId * pClipFormat, OUString * /*pAppName*/, OUString * pLongUserName, OUString * pUserName, @@ -1181,13 +1181,13 @@ void SwDocShell::FillClass( SvGlobalName * pClassName, if (nVersion == SOFFICE_FILEFORMAT_60) { *pClassName = SvGlobalName( SO3_SW_CLASSID_60 ); - *pClipFormat = SOT_FORMATSTR_ID_STARWRITER_60; + *pClipFormat = SotClipboardFormatId::STARWRITER_60; *pLongUserName = SW_RESSTR(STR_WRITER_DOCUMENT_FULLTYPE); } else if (nVersion == SOFFICE_FILEFORMAT_8) { *pClassName = SvGlobalName( SO3_SW_CLASSID_60 ); - *pClipFormat = bTemplate ? SOT_FORMATSTR_ID_STARWRITER_8_TEMPLATE : SOT_FORMATSTR_ID_STARWRITER_8; + *pClipFormat = bTemplate ? SotClipboardFormatId::STARWRITER_8_TEMPLATE : SotClipboardFormatId::STARWRITER_8; *pLongUserName = SW_RESSTR(STR_WRITER_DOCUMENT_FULLTYPE); } // #FIXME check with new Event handling diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index 0e1275a69aad..a9f60cff73be 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -501,7 +501,7 @@ void SwDBTreeList::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ ) sDBName += "." + sColumnName; } - pContainer->CopyString( FORMAT_STRING, sDBName ); + pContainer->CopyString( SotClipboardFormatId::STRING, sDBName ); pContainer->StartDrag( this, DND_ACTION_COPY | DND_ACTION_LINK, Link() ); } diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index b658b7f04c19..fdb2dee289d0 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -136,12 +136,12 @@ extern bool g_bExecuteDrag; #define OLESIZE 11905 - 2 * lMinBorder, 6 * MM50 -#define SWTRANSFER_OBJECTTYPE_DRAWMODEL 0x00000001 -#define SWTRANSFER_OBJECTTYPE_HTML 0x00000002 -#define SWTRANSFER_OBJECTTYPE_RTF 0x00000004 -#define SWTRANSFER_OBJECTTYPE_STRING 0x00000008 -#define SWTRANSFER_OBJECTTYPE_SWOLE 0x00000010 -#define SWTRANSFER_OBJECTTYPE_DDE 0x00000020 +#define SWTRANSFER_OBJECTTYPE_DRAWMODEL static_cast<SotClipboardFormatId>(0x00000001) +#define SWTRANSFER_OBJECTTYPE_HTML static_cast<SotClipboardFormatId>(0x00000002) +#define SWTRANSFER_OBJECTTYPE_RTF static_cast<SotClipboardFormatId>(0x00000004) +#define SWTRANSFER_OBJECTTYPE_STRING static_cast<SotClipboardFormatId>(0x00000008) +#define SWTRANSFER_OBJECTTYPE_SWOLE static_cast<SotClipboardFormatId>(0x00000010) +#define SWTRANSFER_OBJECTTYPE_DDE static_cast<SotClipboardFormatId>(0x00000020) using namespace ::svx; using namespace ::com::sun::star; @@ -355,7 +355,7 @@ const Graphic* SwTransferable::FindOLEReplacementGraphic() const void SwTransferable::RemoveDDELinkFormat( const vcl::Window& rWin ) { - RemoveFormat( SOT_FORMATSTR_ID_LINK ); + RemoveFormat( SotClipboardFormatId::LINK ); CopyToClipboard( (vcl::Window*)&rWin ); } @@ -401,7 +401,7 @@ namespace bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDoc ) { - sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor ); + SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor ); // we can only fullfil the request if // 1) we have data for this format @@ -423,10 +423,10 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo if(bPending || ((nsSelectionType::SEL_GRF | nsSelectionType::SEL_DRW_FORM) & nSelectionType)) { pClpGraphic = new Graphic; - if( !pWrtShell->GetDrawObjGraphic( FORMAT_GDIMETAFILE, *pClpGraphic )) + if( !pWrtShell->GetDrawObjGraphic( SotClipboardFormatId::GDIMETAFILE, *pClpGraphic )) pOrigGrf = pClpGraphic; pClpBitmap = new Graphic; - if( !pWrtShell->GetDrawObjGraphic( FORMAT_BITMAP, *pClpBitmap )) + if( !pWrtShell->GetDrawObjGraphic( SotClipboardFormatId::BITMAP, *pClpBitmap )) pOrigGrf = pClpBitmap; // is it an URL-Button ? @@ -503,7 +503,7 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo // the following solution will be used in the case when the object can not generate the image // TODO/LATER: in future the transferhelper must probably be created based on object and the replacement stream // TODO: Block not required now, SvEmbedTransferHelper should be able to handle GDIMetaFile format - if ( nFormat == SOT_FORMAT_GDIMETAFILE ) + if ( nFormat == SotClipboardFormatId::GDIMETAFILE ) { pOLEGraph = FindOLEReplacementGraphic(); if ( pOLEGraph ) @@ -514,18 +514,18 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo { switch( nFormat ) { - case SOT_FORMATSTR_ID_LINK: + case SotClipboardFormatId::LINK: if( refDdeLink.Is() ) bOK = SetObject( &refDdeLink, SWTRANSFER_OBJECTTYPE_DDE, rFlavor ); break; - case SOT_FORMATSTR_ID_OBJECTDESCRIPTOR: - case SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR: + case SotClipboardFormatId::OBJECTDESCRIPTOR: + case SotClipboardFormatId::LINKSRCDESCRIPTOR: bOK = SetTransferableObjectDescriptor( aObjDesc, rFlavor ); break; - case SOT_FORMATSTR_ID_DRAWING: + case SotClipboardFormatId::DRAWING: { SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); bOK = SetObject( pDoc->getIDocumentDrawModelAccess().GetDrawModel(), @@ -533,63 +533,63 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo } break; - case SOT_FORMAT_STRING: + case SotClipboardFormatId::STRING: { SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_STRING, rFlavor ); } break; - case SOT_FORMAT_RTF: + case SotClipboardFormatId::RTF: { SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_RTF, rFlavor ); } break; - case SOT_FORMATSTR_ID_HTML: + case SotClipboardFormatId::HTML: { SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_HTML, rFlavor ); } break; - case SOT_FORMATSTR_ID_SVXB: + case SotClipboardFormatId::SVXB: if( eBufferType & TRNSFR_GRAPHIC && pOrigGrf ) bOK = SetGraphic( *pOrigGrf, rFlavor ); break; - case SOT_FORMAT_GDIMETAFILE: + case SotClipboardFormatId::GDIMETAFILE: if( eBufferType & TRNSFR_GRAPHIC ) bOK = SetGDIMetaFile( pClpGraphic->GetGDIMetaFile(), rFlavor ); break; - case SOT_FORMAT_BITMAP: - case SOT_FORMATSTR_ID_PNG: + case SotClipboardFormatId::BITMAP: + case SotClipboardFormatId::PNG: // Neither pClpBitmap nor pClpGraphic are necessarily set if( (eBufferType & TRNSFR_GRAPHIC) && (pClpBitmap != 0 || pClpGraphic != 0)) bOK = SetBitmapEx( (pClpBitmap ? pClpBitmap : pClpGraphic)->GetBitmapEx(), rFlavor ); break; - case SOT_FORMATSTR_ID_SVIM: + case SotClipboardFormatId::SVIM: if( pImageMap ) bOK = SetImageMap( *pImageMap, rFlavor ); break; - case SOT_FORMATSTR_ID_INET_IMAGE: + case SotClipboardFormatId::INET_IMAGE: if( pTargetURL ) bOK = SetINetImage( *pTargetURL, rFlavor ); break; - case SOT_FORMATSTR_ID_SOLK: - case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK: - case SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR: - case SOT_FORMATSTR_ID_FILECONTENT: - case SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR: - case SOT_FORMAT_FILE: + case SotClipboardFormatId::SOLK: + case SotClipboardFormatId::NETSCAPE_BOOKMARK: + case SotClipboardFormatId::FILEGRPDESCRIPTOR: + case SotClipboardFormatId::FILECONTENT: + case SotClipboardFormatId::UNIFORMRESOURCELOCATOR: + case SotClipboardFormatId::FILE: if( (TRNSFR_INETFLD & eBufferType) && pBkmk ) bOK = SetINetBookmark( *pBkmk, rFlavor ); break; - case SOT_FORMATSTR_ID_EMBED_SOURCE: + case SotClipboardFormatId::EMBED_SOURCE: if( !aDocShellRef.Is() ) { SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); @@ -602,13 +602,14 @@ bool SwTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo bOK = SetObject( &aDocShellRef, SWTRANSFER_OBJECTTYPE_SWOLE, rFlavor ); break; + default: break; } } return bOK; } bool SwTransferable::WriteObject( SotStorageStreamRef& xStream, - void* pObject, sal_uInt32 nObjectType, + void* pObject, SotClipboardFormatId nObjectType, const DataFlavor& /*rFlavor*/ ) { bool bRet = false; @@ -732,6 +733,7 @@ bool SwTransferable::WriteObject( SotStorageStreamRef& xStream, xWrt->bUCS2_WithStartChar = false; } break; + default: break; } if( xWrt.Is() ) @@ -792,10 +794,10 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) if( nSelection == nsSelectionType::SEL_GRF ) { pClpGraphic = new Graphic; - if( !pWrtShell->GetDrawObjGraphic( FORMAT_GDIMETAFILE, *pClpGraphic )) + if( !pWrtShell->GetDrawObjGraphic( SotClipboardFormatId::GDIMETAFILE, *pClpGraphic )) pOrigGrf = pClpGraphic; pClpBitmap = new Graphic; - if( !pWrtShell->GetDrawObjGraphic( FORMAT_BITMAP, *pClpBitmap )) + if( !pWrtShell->GetDrawObjGraphic( SotClipboardFormatId::BITMAP, *pClpBitmap )) pOrigGrf = pClpBitmap; pClpDocFac = new SwDocFac; @@ -803,17 +805,17 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) pWrtShell->Copy( pDoc ); if (pOrigGrf && !pOrigGrf->GetBitmap().IsEmpty()) - AddFormat( SOT_FORMATSTR_ID_SVXB ); + AddFormat( SotClipboardFormatId::SVXB ); PrepareOLE( aObjDesc ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); const Graphic* pGrf = pWrtShell->GetGraphic(); if( pGrf && pGrf->IsSupportedGraphic() ) { - AddFormat( FORMAT_GDIMETAFILE ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); } eBufferType = TRNSFR_GRAPHIC; pWrtShell->GetGrfNms( &sGrfNm, 0 ); @@ -826,16 +828,16 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) aDocShellRef->DoInitNew( NULL ); pWrtShell->Copy( pDoc ); - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); // --> OD #i98753# // set size of embedded object at the object description structure aObjDesc.maSize = OutputDevice::LogicToLogic( pWrtShell->GetObjSize(), MAP_TWIP, MAP_100TH_MM ); // <-- PrepareOLE( aObjDesc ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); - AddFormat( FORMAT_GDIMETAFILE ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); // Fetch the formats supported via embedtransferhelper as well sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; @@ -918,33 +920,33 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) } //When someone needs it, we 'OLE' him something - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); //put RTF ahead of the OLE's Metafile to have less loss if( !pWrtShell->IsObjSelected() ) { - AddFormat( FORMAT_RTF ); - AddFormat( SOT_FORMATSTR_ID_HTML ); + AddFormat( SotClipboardFormatId::RTF ); + AddFormat( SotClipboardFormatId::HTML ); } if( pWrtShell->IsSelection() ) - AddFormat( FORMAT_STRING ); + AddFormat( SotClipboardFormatId::STRING ); if( nSelection & ( nsSelectionType::SEL_DRW | nsSelectionType::SEL_DRW_FORM )) { - AddFormat( SOT_FORMATSTR_ID_DRAWING ); + AddFormat( SotClipboardFormatId::DRAWING ); if ( nSelection & nsSelectionType::SEL_DRW ) { - AddFormat( FORMAT_GDIMETAFILE ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); } eBufferType = (TransferBufferType)( TRNSFR_GRAPHIC | eBufferType ); pClpGraphic = new Graphic; - if( !pWrtShell->GetDrawObjGraphic( FORMAT_GDIMETAFILE, *pClpGraphic )) + if( !pWrtShell->GetDrawObjGraphic( SotClipboardFormatId::GDIMETAFILE, *pClpGraphic )) pOrigGrf = pClpGraphic; pClpBitmap = new Graphic; - if( !pWrtShell->GetDrawObjGraphic( FORMAT_BITMAP, *pClpBitmap )) + if( !pWrtShell->GetDrawObjGraphic( SotClipboardFormatId::BITMAP, *pClpBitmap )) pOrigGrf = pClpBitmap; // is it an URL-Button ? @@ -952,12 +954,12 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) OUString sDesc; if( pWrtShell->GetURLFromButton( sURL, sDesc ) ) { - AddFormat( FORMAT_STRING ); - AddFormat( SOT_FORMATSTR_ID_SOLK ); - AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ); - AddFormat( SOT_FORMATSTR_ID_FILECONTENT ); - AddFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ); + AddFormat( SotClipboardFormatId::STRING ); + AddFormat( SotClipboardFormatId::SOLK ); + AddFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ); + AddFormat( SotClipboardFormatId::FILECONTENT ); + AddFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ); + AddFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ); eBufferType = (TransferBufferType)( TRNSFR_INETFLD | eBufferType ); nRet = 1; } @@ -969,7 +971,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) 0 != ( pDShell = pWrtShell->GetDoc()->GetDocShell()) && SFX_CREATE_MODE_STANDARD == pDShell->GetCreateMode() ) { - AddFormat( SOT_FORMATSTR_ID_LINK ); + AddFormat( SotClipboardFormatId::LINK ); refDdeLink = new SwTrnsfrDdeLink( *this, *pWrtShell ); } @@ -981,7 +983,7 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM ); PrepareOLE( aObjDesc ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); } else nRet = 0; @@ -994,14 +996,14 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) if( rURL.GetMap() ) { pImageMap = new ImageMap( *rURL.GetMap() ); - AddFormat( SOT_FORMATSTR_ID_SVIM ); + AddFormat( SotClipboardFormatId::SVIM ); } else if( !rURL.GetURL().isEmpty() ) { pTargetURL = new INetImage( sGrfNm, rURL.GetURL(), rURL.GetTargetFrameName(), aEmptyOUStr, Size() ); - AddFormat( SOT_FORMATSTR_ID_INET_IMAGE ); + AddFormat( SotClipboardFormatId::INET_IMAGE ); } } @@ -1030,7 +1032,7 @@ int SwTransferable::CalculateAndCopy() SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac); pWrtShell->Copy(pDoc, & aStr); eBufferType = TRNSFR_DOCUMENT; - AddFormat( FORMAT_STRING ); + AddFormat( SotClipboardFormatId::STRING ); CopyToClipboard( &pWrtShell->GetView().GetEditWin() ); @@ -1065,10 +1067,10 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, eBufferType = TRNSFR_DOCUMENT; //When someone needs it, we 'OLE' her something. - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); - AddFormat( FORMAT_RTF ); - AddFormat( SOT_FORMATSTR_ID_HTML ); - AddFormat( FORMAT_STRING ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::RTF ); + AddFormat( SotClipboardFormatId::HTML ); + AddFormat( SotClipboardFormatId::STRING ); //ObjectDescriptor was already filled from the old DocShell. //Now adjust it. Thus in GetData the first query can still @@ -1078,7 +1080,7 @@ int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, MAP_100TH_MM ); PrepareOLE( aObjDesc ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); CopyToClipboard( &pWrtShell->GetView().GetEditWin() ); @@ -1114,14 +1116,14 @@ bool SwTransferable::IsPaste( const SwWrtShell& rSh, ? EXCHG_IN_ACTION_COPY : EXCHG_IN_ACTION_MOVE); - sal_uLong nFormat; // output param for GetExchangeAction + SotClipboardFormatId nFormat; // output param for GetExchangeAction sal_uInt16 nEventAction; // output param for GetExchangeAction sal_uInt16 nAction = SotExchange::GetExchangeAction( rData.GetDataFlavorExVector(), nDestination, nSourceOptions, /* ?? */ EXCHG_IN_ACTION_DEFAULT, /* ?? */ - nFormat, nEventAction, 0, + nFormat, nEventAction, SotClipboardFormatId::NONE, lcl_getTransferPointer ( xTransferable ) ); // if we find a suitable action, we can paste! @@ -1135,7 +1137,7 @@ bool SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData ) { sal_uInt16 nEventAction, nAction=0; SotExchangeDest nDestination = SwTransferable::GetSotDestination( rSh ); - sal_uLong nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; if( GetSwTransferable( rData ) ) { @@ -1156,17 +1158,17 @@ bool SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData ) nDestination, nSourceOptions, /* ?? */ EXCHG_IN_ACTION_DEFAULT, /* ?? */ - nFormat, nEventAction, 0, + nFormat, nEventAction, SotClipboardFormatId::NONE, lcl_getTransferPointer ( xTransferable ) ); } // special case for tables from draw application if( EXCHG_OUT_ACTION_INSERT_DRAWOBJ == (nAction & EXCHG_ACTION_MASK) ) { - if( rData.HasFormat( SOT_FORMAT_RTF ) ) + if( rData.HasFormat( SotClipboardFormatId::RTF ) ) { nAction = EXCHG_OUT_ACTION_INSERT_STRING | (nAction & ~EXCHG_ACTION_MASK); - nFormat = SOT_FORMAT_RTF; + nFormat = SotClipboardFormatId::RTF; } } @@ -1176,7 +1178,7 @@ bool SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData ) } bool SwTransferable::PasteData( TransferableDataHelper& rData, - SwWrtShell& rSh, sal_uInt16 nAction, sal_uLong nFormat, + SwWrtShell& rSh, sal_uInt16 nAction, SotClipboardFormatId nFormat, SotExchangeDest nDestination, bool bIsPasteFmt, bool bIsDefault, const Point* pPt, sal_Int8 nDropAction, @@ -1315,22 +1317,22 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, // then we have to use the format switch( nFormat ) { - case SOT_FORMATSTR_ID_DRAWING: + case SotClipboardFormatId::DRAWING: nRet = SwTransferable::_PasteSdrFormat( rData, rSh, SW_PASTESDR_INSERT, pPt, nActionFlags, bNeedToSelectBeforePaste); break; - case SOT_FORMATSTR_ID_HTML: - case SOT_FORMATSTR_ID_HTML_SIMPLE: - case SOT_FORMATSTR_ID_HTML_NO_COMMENT: - case SOT_FORMAT_RTF: - case SOT_FORMAT_STRING: + case SotClipboardFormatId::HTML: + case SotClipboardFormatId::HTML_SIMPLE: + case SotClipboardFormatId::HTML_NO_COMMENT: + case SotClipboardFormatId::RTF: + case SotClipboardFormatId::STRING: nRet = SwTransferable::_PasteFileContent( rData, rSh, nFormat, bMsg ); break; - case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK: + case SotClipboardFormatId::NETSCAPE_BOOKMARK: { INetBookmark aBkmk; if( rData.GetINetBookmark( nFormat, aBkmk ) ) @@ -1342,34 +1344,34 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, } break; - case SOT_FORMATSTR_ID_SD_OLE: + case SotClipboardFormatId::SD_OLE: nRet = SwTransferable::_PasteOLE( rData, rSh, nFormat, nActionFlags, bMsg ); break; - case SOT_FORMATSTR_ID_SVIM: + case SotClipboardFormatId::SVIM: nRet = SwTransferable::_PasteImageMap( rData, rSh ); break; - case SOT_FORMATSTR_ID_SVXB: - case SOT_FORMAT_BITMAP: - case SOT_FORMATSTR_ID_PNG: - case SOT_FORMAT_GDIMETAFILE: + case SotClipboardFormatId::SVXB: + case SotClipboardFormatId::BITMAP: + case SotClipboardFormatId::PNG: + case SotClipboardFormatId::GDIMETAFILE: nRet = SwTransferable::_PasteGrf( rData, rSh, nFormat, SW_PASTESDR_INSERT,pPt, nActionFlags, nDropAction, bNeedToSelectBeforePaste); break; - case SOT_FORMATSTR_ID_XFORMS: - case SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE: - case SOT_FORMATSTR_ID_SBA_DATAEXCHANGE: - case SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE: + case SotClipboardFormatId::XFORMS: + case SotClipboardFormatId::SBA_FIELDDATAEXCHANGE: + case SotClipboardFormatId::SBA_DATAEXCHANGE: + case SotClipboardFormatId::SBA_CTRLDATAEXCHANGE: nRet = SwTransferable::_PasteDBData( rData, rSh, nFormat, EXCHG_IN_ACTION_LINK == nClearedAction, pPt, bMsg ); break; - case SOT_FORMAT_FILE: + case SotClipboardFormatId::FILE: nRet = SwTransferable::_PasteFileName( rData, rSh, nFormat, ( EXCHG_IN_ACTION_MOVE == nClearedAction ? SW_PASTESDR_REPLACE @@ -1379,14 +1381,14 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, pPt, nActionFlags, bMsg, 0 ); break; - case SOT_FORMAT_FILE_LIST: + case SotClipboardFormatId::FILE_LIST: // then insert as graphics only nRet = SwTransferable::_PasteFileList( rData, rSh, EXCHG_IN_ACTION_LINK == nClearedAction, pPt, bMsg ); break; - case SOT_FORMATSTR_ID_SONLK: + case SotClipboardFormatId::SONLK: if( pPt ) { NaviContentBookmark aBkmk; @@ -1407,8 +1409,8 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, } break; - case SOT_FORMATSTR_ID_INET_IMAGE: - case SOT_FORMATSTR_ID_NETSCAPE_IMAGE: + case SotClipboardFormatId::INET_IMAGE: + case SotClipboardFormatId::NETSCAPE_IMAGE: nRet = SwTransferable::_PasteTargetURL( rData, rSh, SW_PASTESDR_INSERT, pPt, true ); @@ -1446,7 +1448,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, case EXCHG_OUT_ACTION_INSERT_HYPERLINK: { OUString sURL, sDesc; - if( SOT_FORMAT_FILE == nFormat ) + if( SotClipboardFormatId::FILE == nFormat ) { if( rData.GetString( nFormat, sURL ) && !sURL.isEmpty() ) { @@ -1478,19 +1480,19 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData, case EXCHG_OUT_ACTION_GET_ATTRIBUTES: switch( nFormat ) { - case SOT_FORMATSTR_ID_DRAWING: + case SotClipboardFormatId::DRAWING: nRet = SwTransferable::_PasteSdrFormat( rData, rSh, SW_PASTESDR_SETATTR, pPt, nActionFlags, bNeedToSelectBeforePaste); break; - case SOT_FORMATSTR_ID_SVXB: - case SOT_FORMAT_GDIMETAFILE: - case SOT_FORMAT_BITMAP: - case SOT_FORMATSTR_ID_PNG: - case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK: - case SOT_FORMAT_FILE: - case SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR: - case SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR: + case SotClipboardFormatId::SVXB: + case SotClipboardFormatId::GDIMETAFILE: + case SotClipboardFormatId::BITMAP: + case SotClipboardFormatId::PNG: + case SotClipboardFormatId::NETSCAPE_BOOKMARK: + case SotClipboardFormatId::FILE: + case SotClipboardFormatId::FILEGRPDESCRIPTOR: + case SotClipboardFormatId::UNIFORMRESOURCELOCATOR: nRet = SwTransferable::_PasteGrf( rData, rSh, nFormat, SW_PASTESDR_SETATTR, pPt, nActionFlags, nDropAction, bNeedToSelectBeforePaste); @@ -1624,7 +1626,7 @@ SotExchangeDest SwTransferable::GetSotDestination( const SwWrtShell& rSh, } bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, - SwWrtShell& rSh, sal_uLong nFmt, bool bMsg ) + SwWrtShell& rSh, SotClipboardFormatId nFmt, bool bMsg ) { sal_uInt16 nResId = STR_CLPBRD_FORMAT_ERROR; bool nRet = false; @@ -1637,7 +1639,7 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, OUString sData; switch( nFmt ) { - case SOT_FORMAT_STRING: + case SotClipboardFormatId::STRING: { pRead = ReadAscii; if( rData.GetString( nFmt, sData ) ) @@ -1662,21 +1664,21 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, default: if( rData.GetSotStorageStream( nFmt, xStrm ) ) { - if( ( SOT_FORMATSTR_ID_HTML_SIMPLE == nFmt ) || - ( SOT_FORMATSTR_ID_HTML_NO_COMMENT == nFmt ) ) + if( ( SotClipboardFormatId::HTML_SIMPLE == nFmt ) || + ( SotClipboardFormatId::HTML_NO_COMMENT == nFmt ) ) { pStream = aMSE40ClpObj.IsValid( *xStrm ); pRead = ReadHTML; pRead->SetReadUTF8( true ); bool bNoComments = - ( nFmt == SOT_FORMATSTR_ID_HTML_NO_COMMENT ); + ( nFmt == SotClipboardFormatId::HTML_NO_COMMENT ); pRead->SetIgnoreHTMLComments( bNoComments ); } else { pStream = &xStrm; - if( SOT_FORMAT_RTF == nFmt ) + if( SotClipboardFormatId::RTF == nFmt ) pRead = SwReaderWriter::GetReader( READER_WRITER_RTF ); else if( !pRead ) { @@ -1720,7 +1722,7 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData, } bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, - sal_uLong nFmt, sal_uInt8 nActionFlags, bool bMsg ) + SotClipboardFormatId nFmt, sal_uInt8 nActionFlags, bool bMsg ) { bool nRet = false; TransferableObjectDescriptor aObjDesc; @@ -1729,16 +1731,16 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, Reader* pRead = 0; // Get the preferred format - SotFormatStringId nId; - if( rData.HasFormat( SOT_FORMATSTR_ID_EMBEDDED_OBJ ) ) - nId = SOT_FORMATSTR_ID_EMBEDDED_OBJ; - else if( rData.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ) && - rData.HasFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR )) - nId = SOT_FORMATSTR_ID_EMBED_SOURCE; + SotClipboardFormatId nId; + if( rData.HasFormat( SotClipboardFormatId::EMBEDDED_OBJ ) ) + nId = SotClipboardFormatId::EMBEDDED_OBJ; + else if( rData.HasFormat( SotClipboardFormatId::EMBED_SOURCE ) && + rData.HasFormat( SotClipboardFormatId::OBJECTDESCRIPTOR )) + nId = SotClipboardFormatId::EMBED_SOURCE; else - nId = 0; + nId = SotClipboardFormatId::NONE; - if (nId) + if (nId != SotClipboardFormatId::NONE) { SwDocShell* pDocSh = rSh.GetDoc()->GetDocShell(); xStrm = rData.GetInputStream(nId, SfxObjectShell::CreateShellID(pDocSh)); @@ -1753,12 +1755,12 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, xStore = comphelper::OStorageHelper::GetStorageFromInputStream( xStrm ); switch( SotStorage::GetFormatID( xStore ) ) { - case SOT_FORMATSTR_ID_STARWRITER_60: - case SOT_FORMATSTR_ID_STARWRITERWEB_60: - case SOT_FORMATSTR_ID_STARWRITERGLOB_60: - case SOT_FORMATSTR_ID_STARWRITER_8: - case SOT_FORMATSTR_ID_STARWRITERWEB_8: - case SOT_FORMATSTR_ID_STARWRITERGLOB_8: + case SotClipboardFormatId::STARWRITER_60: + case SotClipboardFormatId::STARWRITERWEB_60: + case SotClipboardFormatId::STARWRITERGLOB_60: + case SotClipboardFormatId::STARWRITER_8: + case SotClipboardFormatId::STARWRITERWEB_8: + case SotClipboardFormatId::STARWRITERGLOB_8: pRead = ReadXML; break; default: @@ -1802,18 +1804,18 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, if ( xStrm.is() ) { - if ( !rData.GetTransferableObjectDescriptor( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aObjDesc ) ) + if ( !rData.GetTransferableObjectDescriptor( SotClipboardFormatId::OBJECTDESCRIPTOR, aObjDesc ) ) { OSL_ENSURE( !xStrm.is(), "An object without descriptor in clipboard!"); } } else { - if( rData.HasFormat( nFmt = SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE ) && rData.GetTransferableObjectDescriptor( nFmt, aObjDesc ) ) + if( rData.HasFormat( nFmt = SotClipboardFormatId::OBJECTDESCRIPTOR_OLE ) && rData.GetTransferableObjectDescriptor( nFmt, aObjDesc ) ) { - xStrm = rData.GetInputStream(SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, OUString()); + xStrm = rData.GetInputStream(SotClipboardFormatId::EMBED_SOURCE_OLE, OUString()); if (!xStrm.is()) - xStrm = rData.GetInputStream(SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, OUString()); + xStrm = rData.GetInputStream(SotClipboardFormatId::EMBEDDED_OBJ_OLE, OUString()); if ( !xStrm.is() ) { @@ -1849,18 +1851,18 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, // try to get the replacement image from the clipboard Graphic aGraphic; - sal_uLong nGrFormat = 0; + SotClipboardFormatId nGrFormat = SotClipboardFormatId::NONE; // limit the size of the preview metafile to 100000 actions GDIMetaFile aMetafile; - if (rData.GetGDIMetaFile(FORMAT_GDIMETAFILE, aMetafile, 100000)) + if (rData.GetGDIMetaFile(SotClipboardFormatId::GDIMETAFILE, aMetafile, 100000)) { - nGrFormat = SOT_FORMAT_GDIMETAFILE; + nGrFormat = SotClipboardFormatId::GDIMETAFILE; aGraphic = aMetafile; } // insert replacement image ( if there is one ) into the object helper - if ( nGrFormat ) + if ( nGrFormat != SotClipboardFormatId::NONE ) { DataFlavor aDataFlavor; SotExchange::GetFormatDataFlavor( nGrFormat, aDataFlavor ); @@ -1948,10 +1950,10 @@ bool SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, { bool nRet = false; INetImage aINetImg; - if( ( rData.HasFormat( SOT_FORMATSTR_ID_INET_IMAGE ) && - rData.GetINetImage( SOT_FORMATSTR_ID_INET_IMAGE, aINetImg )) || - ( rData.HasFormat( SOT_FORMATSTR_ID_NETSCAPE_IMAGE ) && - rData.GetINetImage( SOT_FORMATSTR_ID_NETSCAPE_IMAGE, aINetImg )) ) + if( ( rData.HasFormat( SotClipboardFormatId::INET_IMAGE ) && + rData.GetINetImage( SotClipboardFormatId::INET_IMAGE, aINetImg )) || + ( rData.HasFormat( SotClipboardFormatId::NETSCAPE_IMAGE ) && + rData.GetINetImage( SotClipboardFormatId::NETSCAPE_IMAGE, aINetImg )) ) { if( !aINetImg.GetImageURL().isEmpty() && bInsertGRF ) { @@ -2068,7 +2070,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData, { SotStorageStreamRef xStrm; - if( !rData.GetSotStorageStream( SOT_FORMATSTR_ID_LINK, xStrm )) + if( !rData.GetSotStorageStream( SotClipboardFormatId::LINK, xStrm )) { OSL_ENSURE( false, "DDE Data not found." ); return false; @@ -2084,12 +2086,12 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData, sfx2::MakeLnkName( aCmd, &aApp, aTopic, aItem ); // do we want to read in a graphic now? - sal_uLong nFormat; - if( !rData.HasFormat( FORMAT_RTF ) && - !rData.HasFormat( SOT_FORMATSTR_ID_HTML ) && - !rData.HasFormat( FORMAT_STRING ) && - (rData.HasFormat( nFormat = FORMAT_GDIMETAFILE ) || - rData.HasFormat( nFormat = FORMAT_BITMAP )) ) + SotClipboardFormatId nFormat; + if( !rData.HasFormat( SotClipboardFormatId::RTF ) && + !rData.HasFormat( SotClipboardFormatId::HTML ) && + !rData.HasFormat( SotClipboardFormatId::STRING ) && + (rData.HasFormat( nFormat = SotClipboardFormatId::GDIMETAFILE ) || + rData.HasFormat( nFormat = SotClipboardFormatId::BITMAP )) ) { Graphic aGrf; bool nRet = rData.GetGraphic( nFormat, aGrf ); @@ -2150,13 +2152,13 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData, SwDDEFieldType* pDDETyp = static_cast<SwDDEFieldType*>(pTyp); OUString aExpand; - if( rData.GetString( FORMAT_STRING, aExpand )) + if( rData.GetString( SotClipboardFormatId::STRING, aExpand )) { do { // middle checked loop // When data comes from a spreadsheet, we add a DDE-table - if( ( rData.HasFormat( SOT_FORMATSTR_ID_SYLK ) || - rData.HasFormat( SOT_FORMATSTR_ID_SYLK_BIGCAPS ) ) && + if( ( rData.HasFormat( SotClipboardFormatId::SYLK ) || + rData.HasFormat( SotClipboardFormatId::SYLK_BIGCAPS ) ) && !aExpand.isEmpty() && ( 1 < comphelper::string::getTokenCount(aExpand, '\n') || comphelper::string::getTokenCount(aExpand, '\t') ) ) @@ -2226,7 +2228,7 @@ bool SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData, { bool nRet = false; SotStorageStreamRef xStrm; - if( rData.GetSotStorageStream( SOT_FORMATSTR_ID_DRAWING, xStrm )) + if( rData.GetSotStorageStream( SotClipboardFormatId::DRAWING, xStrm )) { xStrm->SetVersion( SOFFICE_FILEFORMAT_50 ); @@ -2248,7 +2250,7 @@ bool SwTransferable::_PasteSdrFormat( TransferableDataHelper& rData, } bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, - sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt, + SotClipboardFormatId nFmt, sal_uInt16 nAction, const Point* pPt, sal_uInt8 nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste) { bool nRet = false; @@ -2259,17 +2261,17 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, switch( nFmt ) { - case SOT_FORMAT_BITMAP: - case SOT_FORMATSTR_ID_PNG: - case SOT_FORMAT_GDIMETAFILE: + case SotClipboardFormatId::BITMAP: + case SotClipboardFormatId::PNG: + case SotClipboardFormatId::GDIMETAFILE: nRet = rData.GetGraphic( nFmt, aGraphic ); break; - case SOT_FORMATSTR_ID_SVXB: + case SotClipboardFormatId::SVXB: { SotStorageStreamRef xStm; - if(rData.GetSotStorageStream(SOT_FORMATSTR_ID_SVXB, xStm)) + if(rData.GetSotStorageStream(SotClipboardFormatId::SVXB, xStm)) { ReadGraphic( *xStm, aGraphic ); nRet = (GRAPHIC_NONE != aGraphic.GetType() && GRAPHIC_DEFAULT != aGraphic.GetType()); @@ -2278,19 +2280,19 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, break; } - case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK: - case SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR: - case SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR: + case SotClipboardFormatId::NETSCAPE_BOOKMARK: + case SotClipboardFormatId::FILEGRPDESCRIPTOR: + case SotClipboardFormatId::UNIFORMRESOURCELOCATOR: if( ( nRet = rData.GetINetBookmark( nFmt, aBkmk ) )) { if( SW_PASTESDR_SETATTR == nAction ) - nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK; + nFmt = SotClipboardFormatId::NETSCAPE_BOOKMARK; else bCheckForGrf = true; } break; - case SOT_FORMAT_FILE: + case SotClipboardFormatId::FILE: { OUString sTxt; if( ( nRet = rData.GetString( nFmt, sTxt ) ) ) @@ -2320,12 +2322,12 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, aGraphic, &rFlt ); if( !nRet && SW_PASTESDR_SETATTR == nAction && - SOT_FORMAT_FILE == nFmt && + SotClipboardFormatId::FILE == nFmt && // only at frame selection rSh.IsFrmSelected() ) { // then set as hyperlink after the graphic - nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK; + nFmt = SotClipboardFormatId::NETSCAPE_BOOKMARK; nRet = true; } } @@ -2386,7 +2388,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, case SW_PASTESDR_SETATTR: { - if( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK == nFmt ) + if( SotClipboardFormatId::NETSCAPE_BOOKMARK == nFmt ) { if( rSh.IsFrmSelected() ) { @@ -2465,7 +2467,7 @@ bool SwTransferable::_PasteImageMap( TransferableDataHelper& rData, SwWrtShell& rSh ) { bool nRet = false; - if( rData.HasFormat( SOT_FORMATSTR_ID_SVIM )) + if( rData.HasFormat( SotClipboardFormatId::SVIM )) { SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL ); rSh.GetFlyFrmAttr( aSet ); @@ -2474,7 +2476,7 @@ bool SwTransferable::_PasteImageMap( TransferableDataHelper& rData, // set or replace, that is the question ImageMap aImageMap; - if( rData.GetImageMap( SOT_FORMATSTR_ID_SVIM, aImageMap ) && + if( rData.GetImageMap( SotClipboardFormatId::SVIM, aImageMap ) && ( !pOld || aImageMap != *pOld )) { aURL.SetMap( &aImageMap ); @@ -2487,7 +2489,7 @@ bool SwTransferable::_PasteImageMap( TransferableDataHelper& rData, } bool SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, - SwWrtShell& rSh, sal_uLong nFmt ) + SwWrtShell& rSh, SotClipboardFormatId nFmt ) { bool nRet = false; OUString sFile; @@ -2531,7 +2533,7 @@ bool SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, } bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, - SwWrtShell& rSh, sal_uLong nFmt, + SwWrtShell& rSh, SotClipboardFormatId nFmt, sal_uInt16 nAction, const Point* pPt, sal_uInt8 nActionFlags, bool /* bMsg */, bool * graphicInserted) @@ -2628,16 +2630,16 @@ bool SwTransferable::_PasteFileName( TransferableDataHelper& rData, } bool SwTransferable::_PasteDBData( TransferableDataHelper& rData, - SwWrtShell& rSh, sal_uLong nFmt, bool bLink, + SwWrtShell& rSh, SotClipboardFormatId nFmt, bool bLink, const Point* pDragPt, bool bMsg ) { bool nRet = false; OUString sTxt; if( rData.GetString( nFmt, sTxt ) && !sTxt.isEmpty() ) { - sal_uInt16 nWh = SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE == nFmt + sal_uInt16 nWh = SotClipboardFormatId::SBA_CTRLDATAEXCHANGE == nFmt ? 0 - : SOT_FORMATSTR_ID_SBA_DATAEXCHANGE == nFmt + : SotClipboardFormatId::SBA_DATAEXCHANGE == nFmt ? (bLink ? FN_QRY_MERGE_FIELD : FN_QRY_INSERT) @@ -2646,7 +2648,7 @@ bool SwTransferable::_PasteDBData( TransferableDataHelper& rData, : FN_QRY_INSERT_FIELD ); DataFlavorExVector& rVector = rData.GetDataFlavorExVector(); bool bHaveColumnDescriptor = OColumnTransferable::canExtractColumnDescriptor(rVector, CTF_COLUMN_DESCRIPTOR | CTF_CONTROL_EXCHANGE); - if ( SOT_FORMATSTR_ID_XFORMS == nFmt ) + if ( SotClipboardFormatId::XFORMS == nFmt ) { rSh.MakeDrawView(); FmFormView* pFmView = PTR_CAST( FmFormView, rSh.GetDrawView() ); @@ -2728,7 +2730,7 @@ bool SwTransferable::_PasteFileList( TransferableDataHelper& rData, { bool nRet = false; FileList aFileList; - if( rData.GetFileList( SOT_FORMAT_FILE_LIST, aFileList ) && + if( rData.GetFileList( SotClipboardFormatId::FILE_LIST, aFileList ) && aFileList.Count() ) { sal_uInt16 nAct = bLink ? SW_PASTESDR_SETATTR : SW_PASTESDR_INSERT; @@ -2737,10 +2739,10 @@ bool SwTransferable::_PasteFileList( TransferableDataHelper& rData, for( sal_uLong n = 0, nEnd = aFileList.Count(); n < nEnd; ++n ) { TransferDataContainer* pHlp = new TransferDataContainer; - pHlp->CopyString( FORMAT_FILE, aFileList.GetFile( n )); + pHlp->CopyString( SotClipboardFormatId::FILE, aFileList.GetFile( n )); TransferableDataHelper aData( pHlp ); - if( SwTransferable::_PasteFileName( aData, rSh, SOT_FORMAT_FILE, nAct, + if( SwTransferable::_PasteFileName( aData, rSh, SotClipboardFormatId::FILE, nAct, pPt, 0, bMsg, 0 )) { if( bLink ) @@ -2766,7 +2768,7 @@ bool SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData, { bool bIsURLFile = false; INetBookmark aBkmk; - if( rData.GetINetBookmark( SOT_FORMATSTR_ID_SOLK, aBkmk ) ) + if( rData.GetINetBookmark( SotClipboardFormatId::SOLK, aBkmk ) ) { rFileName = aBkmk.GetURL(); if( pTitle ) @@ -2799,16 +2801,16 @@ bool SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell, bool SwTransferable::PasteFormat( SwWrtShell& rSh, TransferableDataHelper& rData, - sal_uLong nFormat ) + SotClipboardFormatId nFormat ) { SwWait aWait( *rSh.GetView().GetDocShell(), false ); bool nRet = false; - sal_uLong nPrivateFmt = FORMAT_PRIVATE; + SotClipboardFormatId nPrivateFmt = SotClipboardFormatId::PRIVATE; SwTransferable *pClipboard = GetSwTransferable( rData ); if( pClipboard && ((TRNSFR_DOCUMENT|TRNSFR_GRAPHIC|TRNSFR_OLE) & pClipboard->eBufferType )) - nPrivateFmt = SOT_FORMATSTR_ID_EMBED_SOURCE; + nPrivateFmt = SotClipboardFormatId::EMBED_SOURCE; if( pClipboard && nPrivateFmt == nFormat ) nRet = pClipboard->PrivatePaste( rSh ); @@ -2840,7 +2842,7 @@ bool SwTransferable::PasteFormat( SwWrtShell& rSh, } bool SwTransferable::_TestAllowedFormat( const TransferableDataHelper& rData, - sal_uLong nFormat, SotExchangeDest nDestination ) + SotClipboardFormatId nFormat, SotExchangeDest nDestination ) { sal_uInt16 nAction = EXCHG_INOUT_ACTION_NONE, nEventAction; if( rData.HasFormat( nFormat )) { @@ -2859,31 +2861,31 @@ bool SwTransferable::_TestAllowedFormat( const TransferableDataHelper& rData, * the list of formats which will be offered to the user in the 'Paste * Special...' dialog and the paste button menu */ -static sal_uInt16 aPasteSpecialIds[] = +static SotClipboardFormatId aPasteSpecialIds[] = { - SOT_FORMATSTR_ID_HTML, - SOT_FORMATSTR_ID_HTML_SIMPLE, - SOT_FORMATSTR_ID_HTML_NO_COMMENT, - FORMAT_RTF, - FORMAT_STRING, - SOT_FORMATSTR_ID_SONLK, - SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, - SOT_FORMATSTR_ID_DRAWING, - SOT_FORMATSTR_ID_SVXB, - FORMAT_GDIMETAFILE, - FORMAT_BITMAP, - SOT_FORMATSTR_ID_SVIM, - SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR, - 0 + SotClipboardFormatId::HTML, + SotClipboardFormatId::HTML_SIMPLE, + SotClipboardFormatId::HTML_NO_COMMENT, + SotClipboardFormatId::RTF, + SotClipboardFormatId::STRING, + SotClipboardFormatId::SONLK, + SotClipboardFormatId::NETSCAPE_BOOKMARK, + SotClipboardFormatId::DRAWING, + SotClipboardFormatId::SVXB, + SotClipboardFormatId::GDIMETAFILE, + SotClipboardFormatId::BITMAP, + SotClipboardFormatId::SVIM, + SotClipboardFormatId::FILEGRPDESCRIPTOR, + SotClipboardFormatId::NONE }; bool SwTransferable::PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& rData ) { // Plain text == unformatted - return SwTransferable::PasteFormat( rSh, rData, SOT_FORMAT_STRING ); + return SwTransferable::PasteFormat( rSh, rData, SotClipboardFormatId::STRING ); } -bool SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData, sal_uLong& rFormatUsed ) +bool SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rData, SotClipboardFormatId& rFormatUsed ) { bool nRet = false; SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -2912,41 +2914,41 @@ bool SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& rDat { if( STR_PRIVATEOLE == nResId || STR_PRIVATEGRAPHIC == nResId ) { - // add SOT_FORMATSTR_ID_EMBED_SOURCE to the formats. This + // add SotClipboardFormatId::EMBED_SOURCE to the formats. This // format display then the private format name. DataFlavorEx aFlavorEx; - aFlavorEx.mnSotId = SOT_FORMATSTR_ID_EMBED_SOURCE; + aFlavorEx.mnSotId = SotClipboardFormatId::EMBED_SOURCE; aFormats.insert( aFormats.begin(), aFlavorEx ); } pDlg->SetObjName( pClipboard->aObjDesc.maClassName, SW_RES( nResId ) ); - pDlg->Insert( SOT_FORMATSTR_ID_EMBED_SOURCE, aEmptyOUStr ); + pDlg->Insert( SotClipboardFormatId::EMBED_SOURCE, aEmptyOUStr ); } } else { - if( rData.HasFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) ) + if( rData.HasFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ) ) { (void)rData.GetTransferableObjectDescriptor( - SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aDesc ); + SotClipboardFormatId::OBJECTDESCRIPTOR, aDesc ); } - if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_EMBED_SOURCE, nDest )) - pDlg->Insert( SOT_FORMATSTR_ID_EMBED_SOURCE, aEmptyOUStr ); - if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_LINK_SOURCE, nDest )) - pDlg->Insert( SOT_FORMATSTR_ID_LINK_SOURCE, aEmptyOUStr ); + if( SwTransferable::_TestAllowedFormat( rData, SotClipboardFormatId::EMBED_SOURCE, nDest )) + pDlg->Insert( SotClipboardFormatId::EMBED_SOURCE, aEmptyOUStr ); + if( SwTransferable::_TestAllowedFormat( rData, SotClipboardFormatId::LINK_SOURCE, nDest )) + pDlg->Insert( SotClipboardFormatId::LINK_SOURCE, aEmptyOUStr ); } - if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_LINK, nDest )) - pDlg->Insert( SOT_FORMATSTR_ID_LINK, SW_RES(STR_DDEFORMAT) ); + if( SwTransferable::_TestAllowedFormat( rData, SotClipboardFormatId::LINK, nDest )) + pDlg->Insert( SotClipboardFormatId::LINK, SW_RES(STR_DDEFORMAT) ); - for( sal_uInt16* pIds = aPasteSpecialIds; *pIds; ++pIds ) + for( SotClipboardFormatId* pIds = aPasteSpecialIds; *pIds != SotClipboardFormatId::NONE; ++pIds ) if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest )) pDlg->Insert( *pIds, aEmptyOUStr ); - sal_uLong nFormat = pDlg->GetFormat( rData.GetTransferable() ); + SotClipboardFormatId nFormat = pDlg->GetFormat( rData.GetTransferable() ); - if( nFormat ) + if( nFormat != SotClipboardFormatId::NONE ) nRet = SwTransferable::PasteFormat( rSh, rData, nFormat ); if ( nRet ) @@ -2975,26 +2977,26 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh, nResId = 0; if( nResId ) - rToFill.AddClipbrdFormat( SOT_FORMATSTR_ID_EMBED_SOURCE, + rToFill.AddClipbrdFormat( SotClipboardFormatId::EMBED_SOURCE, SW_RESSTR( nResId ) ); } else { TransferableObjectDescriptor aDesc; - if (rData.HasFormat(SOT_FORMATSTR_ID_OBJECTDESCRIPTOR)) + if (rData.HasFormat(SotClipboardFormatId::OBJECTDESCRIPTOR)) { (void)const_cast<TransferableDataHelper&>(rData).GetTransferableObjectDescriptor( - SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aDesc); + SotClipboardFormatId::OBJECTDESCRIPTOR, aDesc); } - if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_EMBED_SOURCE, nDest )) - rToFill.AddClipbrdFormat( SOT_FORMATSTR_ID_EMBED_SOURCE, + if( SwTransferable::_TestAllowedFormat( rData, SotClipboardFormatId::EMBED_SOURCE, nDest )) + rToFill.AddClipbrdFormat( SotClipboardFormatId::EMBED_SOURCE, aDesc.maTypeName ); - if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_LINK_SOURCE, nDest )) - rToFill.AddClipbrdFormat( SOT_FORMATSTR_ID_LINK_SOURCE ); + if( SwTransferable::_TestAllowedFormat( rData, SotClipboardFormatId::LINK_SOURCE, nDest )) + rToFill.AddClipbrdFormat( SotClipboardFormatId::LINK_SOURCE ); - SotFormatStringId nFormat; - if ( rData.HasFormat(nFormat = SOT_FORMATSTR_ID_EMBED_SOURCE_OLE) || rData.HasFormat(nFormat = SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE) ) + SotClipboardFormatId nFormat; + if ( rData.HasFormat(nFormat = SotClipboardFormatId::EMBED_SOURCE_OLE) || rData.HasFormat(nFormat = SotClipboardFormatId::EMBEDDED_OBJ_OLE) ) { OUString sName,sSource; if ( SvPasteObjectHelper::GetEmbeddedName(rData,sName,sSource,nFormat) ) @@ -3002,10 +3004,10 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh, } } - if( SwTransferable::_TestAllowedFormat( rData, SOT_FORMATSTR_ID_LINK, nDest )) - rToFill.AddClipbrdFormat( SOT_FORMATSTR_ID_LINK, SW_RESSTR(STR_DDEFORMAT) ); + if( SwTransferable::_TestAllowedFormat( rData, SotClipboardFormatId::LINK, nDest )) + rToFill.AddClipbrdFormat( SotClipboardFormatId::LINK, SW_RESSTR(STR_DDEFORMAT) ); - for( sal_uInt16* pIds = aPasteSpecialIds; *pIds; ++pIds ) + for( SotClipboardFormatId* pIds = aPasteSpecialIds; *pIds != SotClipboardFormatId::NONE; ++pIds ) if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest )) rToFill.AddClipbrdFormat( *pIds, aEmptyOUStr ); } @@ -3018,23 +3020,23 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) const int nSelection = pWrtShell->GetSelectionType(); if( nsSelectionType::SEL_GRF == nSelection) { - AddFormat( SOT_FORMATSTR_ID_SVXB ); + AddFormat( SotClipboardFormatId::SVXB ); const Graphic* pGrf = pWrtShell->GetGraphic(); if ( pGrf && pGrf->IsSupportedGraphic() ) { - AddFormat( FORMAT_GDIMETAFILE ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); } eBufferType = TRNSFR_GRAPHIC; pWrtShell->GetGrfNms( &sGrfNm, 0 ); } else if( nsSelectionType::SEL_OLE == nSelection ) { - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); PrepareOLE( aObjDesc ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); - AddFormat( FORMAT_GDIMETAFILE ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); eBufferType = TRNSFR_OLE; } //Is there anything to provide anyway? @@ -3055,33 +3057,33 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) if( nSelection & nsSelectionType::SEL_TBL_CELLS ) eBufferType = (TransferBufferType)(TRNSFR_TABELLE | eBufferType); - AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); + AddFormat( SotClipboardFormatId::EMBED_SOURCE ); //put RTF ahead of the OLE's Metafile for less loss if( !pWrtShell->IsObjSelected() ) { - AddFormat( FORMAT_RTF ); - AddFormat( SOT_FORMATSTR_ID_HTML ); + AddFormat( SotClipboardFormatId::RTF ); + AddFormat( SotClipboardFormatId::HTML ); } if( pWrtShell->IsSelection() ) - AddFormat( FORMAT_STRING ); + AddFormat( SotClipboardFormatId::STRING ); if( nSelection & ( nsSelectionType::SEL_DRW | nsSelectionType::SEL_DRW_FORM )) { - AddFormat( SOT_FORMATSTR_ID_DRAWING ); + AddFormat( SotClipboardFormatId::DRAWING ); if ( nSelection & nsSelectionType::SEL_DRW ) { - AddFormat( FORMAT_GDIMETAFILE ); - AddFormat( SOT_FORMATSTR_ID_PNG ); - AddFormat( FORMAT_BITMAP ); + AddFormat( SotClipboardFormatId::GDIMETAFILE ); + AddFormat( SotClipboardFormatId::PNG ); + AddFormat( SotClipboardFormatId::BITMAP ); } eBufferType = (TransferBufferType)( TRNSFR_GRAPHIC | eBufferType ); pClpGraphic = new Graphic; - if( !pWrtShell->GetDrawObjGraphic( FORMAT_GDIMETAFILE, *pClpGraphic )) + if( !pWrtShell->GetDrawObjGraphic( SotClipboardFormatId::GDIMETAFILE, *pClpGraphic )) pOrigGrf = pClpGraphic; pClpBitmap = new Graphic; - if( !pWrtShell->GetDrawObjGraphic( FORMAT_BITMAP, *pClpBitmap )) + if( !pWrtShell->GetDrawObjGraphic( SotClipboardFormatId::BITMAP, *pClpBitmap )) pOrigGrf = pClpBitmap; // is it an URL-Button ? @@ -3089,12 +3091,12 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) OUString sDesc; if( pWrtShell->GetURLFromButton( sURL, sDesc ) ) { - AddFormat( FORMAT_STRING ); - AddFormat( SOT_FORMATSTR_ID_SOLK ); - AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ); - AddFormat( SOT_FORMATSTR_ID_FILECONTENT ); - AddFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ); + AddFormat( SotClipboardFormatId::STRING ); + AddFormat( SotClipboardFormatId::SOLK ); + AddFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ); + AddFormat( SotClipboardFormatId::FILECONTENT ); + AddFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ); + AddFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ); eBufferType = (TransferBufferType)( TRNSFR_INETFLD | eBufferType ); } } @@ -3107,7 +3109,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) aObjDesc.maSize = OutputDevice::LogicToLogic( Size( OLESIZE ), MAP_TWIP, MAP_100TH_MM ); PrepareOLE( aObjDesc ); - AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); + AddFormat( SotClipboardFormatId::OBJECTDESCRIPTOR ); } else if( nSelection & nsSelectionType::SEL_TXT && !pWrtShell->HasMark() ) { @@ -3117,12 +3119,12 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) if( pWrtShell->GetContentAtPos( aPos, aCntntAtPos ) ) { - AddFormat( FORMAT_STRING ); - AddFormat( SOT_FORMATSTR_ID_SOLK ); - AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ); - AddFormat( SOT_FORMATSTR_ID_FILECONTENT ); - AddFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ); - AddFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ); + AddFormat( SotClipboardFormatId::STRING ); + AddFormat( SotClipboardFormatId::SOLK ); + AddFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ); + AddFormat( SotClipboardFormatId::FILECONTENT ); + AddFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ); + AddFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ); eBufferType = TRNSFR_INETFLD; } } @@ -3135,14 +3137,14 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos ) if( rURL.GetMap() ) { pImageMap = new ImageMap( *rURL.GetMap() ); - AddFormat( SOT_FORMATSTR_ID_SVIM ); + AddFormat( SotClipboardFormatId::SVIM ); } else if( !rURL.GetURL().isEmpty() ) { pTargetURL = new INetImage( sGrfNm, rURL.GetURL(), rURL.GetTargetFrameName(), aEmptyOUStr, Size() ); - AddFormat( SOT_FORMATSTR_ID_INET_IMAGE ); + AddFormat( SotClipboardFormatId::INET_IMAGE ); } } } diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index 32f0a0ffa8c4..83c5b8031631 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -227,7 +227,7 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt ) GetDataFlavorExVector(), m_nDropDestination, rEvt.mnAction, - nUserOpt, m_nDropFormat, nEventAction, 0, + nUserOpt, m_nDropFormat, nEventAction, SotClipboardFormatId::NONE, &rEvt.maDropEvent.Transferable ); TransferableDataHelper aData( rEvt.maDropEvent.Transferable ); @@ -430,9 +430,9 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) DND_ACTION_MOVE == rEvt.mnAction ) nEventAction = DND_ACTION_COPY; - if( (SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE == m_nDropFormat && + if( (SotClipboardFormatId::SBA_FIELDDATAEXCHANGE == m_nDropFormat && EXCHG_IN_ACTION_LINK == m_nDropAction) || - SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE == m_nDropFormat ) + SotClipboardFormatId::SBA_CTRLDATAEXCHANGE == m_nDropFormat ) { SdrMarkView* pMView = PTR_CAST( SdrMarkView, rSh.GetDrawView() ); if( pMView && !pMView->IsDesignMode() ) diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index ca6dd8b89a65..89bf2736fd2b 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -4960,7 +4960,7 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView): m_rView( rMyView ), m_aActHitType(SDRHIT_NONE), - m_nDropFormat( 0 ), + m_nDropFormat( SotClipboardFormatId::NONE ), m_nDropAction( 0 ), m_nDropDestination( SotExchangeDest::NONE ), @@ -5368,7 +5368,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) if( !aDataHelper.GetXTransferable().is() ) break; - sal_uLong nDropFormat; + SotClipboardFormatId nDropFormat; sal_uInt16 nEventAction, nDropAction; SotExchangeDest nDropDestination; nDropDestination = GetDropDestination( rCEvt.GetMousePosPixel() ); diff --git a/sw/source/uibase/globdoc/globdoc.cxx b/sw/source/uibase/globdoc/globdoc.cxx index 23caf617c53a..22684610461c 100644 --- a/sw/source/uibase/globdoc/globdoc.cxx +++ b/sw/source/uibase/globdoc/globdoc.cxx @@ -44,7 +44,7 @@ SwGlobalDocShell::~SwGlobalDocShell() } void SwGlobalDocShell::FillClass( SvGlobalName * pClassName, - sal_uInt32 * pClipFormat, + SotClipboardFormatId * pClipFormat, OUString * /*pAppName*/, OUString * pLongUserName, OUString * pUserName, @@ -54,14 +54,14 @@ void SwGlobalDocShell::FillClass( SvGlobalName * pClassName, if (nVersion == SOFFICE_FILEFORMAT_60) { *pClassName = SvGlobalName( SO3_SWGLOB_CLASSID_60 ); - *pClipFormat = SOT_FORMATSTR_ID_STARWRITERGLOB_60; + *pClipFormat = SotClipboardFormatId::STARWRITERGLOB_60; *pLongUserName = SW_RESSTR(STR_WRITER_GLOBALDOC_FULLTYPE); OSL_ENSURE( !bTemplate, "No template for Writer Global" ); } else if (nVersion == SOFFICE_FILEFORMAT_8) { *pClassName = SvGlobalName( SO3_SWGLOB_CLASSID_60 ); - *pClipFormat = bTemplate ? SOT_FORMATSTR_ID_STARWRITERGLOB_8_TEMPLATE : SOT_FORMATSTR_ID_STARWRITERGLOB_8; + *pClipFormat = bTemplate ? SotClipboardFormatId::STARWRITERGLOB_8_TEMPLATE : SotClipboardFormatId::STARWRITERGLOB_8; *pLongUserName = SW_RESSTR(STR_WRITER_GLOBALDOC_FULLTYPE); } diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index 3aeee1963a14..b89b049fdaac 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -108,7 +108,7 @@ friend void PageNumNotify( SwViewShell* pVwSh, int m_aActHitType; // current mouse pointer - sal_uLong m_nDropFormat; // format from the last QueryDrop + SotClipboardFormatId m_nDropFormat; // format from the last QueryDrop sal_uInt16 m_nDropAction; // action from the last QueryDrop SotExchangeDest m_nDropDestination; // destination from the last QueryDrop @@ -250,8 +250,8 @@ public: void StartExecuteDrag(); void DragFinished(); - sal_uInt16 GetDropAction() const { return m_nDropAction; } - sal_uLong GetDropFormat() const { return m_nDropFormat; } + sal_uInt16 GetDropAction() const { return m_nDropAction; } + SotClipboardFormatId GetDropFormat() const { return m_nDropFormat; } Color GetTextColor() { return m_aTextColor; } diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx index a11c45014ea2..ec11afc86846 100644 --- a/sw/source/uibase/inc/swdtflvr.hxx +++ b/sw/source/uibase/inc/swdtflvr.hxx @@ -86,12 +86,12 @@ class SW_DLLPUBLIC SwTransferable : public TransferableHelper static bool _CheckForURLOrLNKFile( TransferableDataHelper& rData, OUString& rFileName, OUString* pTitle = 0 ); static bool _TestAllowedFormat( const TransferableDataHelper& rData, - sal_uLong nFormat, SotExchangeDest nDestination ); + SotClipboardFormatId nFormat, SotExchangeDest nDestination ); static bool _PasteFileContent( TransferableDataHelper&, - SwWrtShell& rSh, sal_uLong nFmt, bool bMsg ); + SwWrtShell& rSh, SotClipboardFormatId nFmt, bool bMsg ); static bool _PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh, - sal_uLong nFmt, sal_uInt8 nActionFlags, bool bMsg ); + SotClipboardFormatId nFmt, sal_uInt8 nActionFlags, bool bMsg ); static bool _PasteTargetURL( TransferableDataHelper& rData, SwWrtShell& rSh, sal_uInt16 nAction, const Point* pPt, bool bInsertGRF ); @@ -103,21 +103,21 @@ class SW_DLLPUBLIC SwTransferable : public TransferableHelper const Point* pPt, sal_uInt8 nActionFlags, bool bNeedToSelectBeforePaste); static bool _PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, - sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt, + SotClipboardFormatId nFmt, sal_uInt16 nAction, const Point* pPt, sal_uInt8 nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste); static bool _PasteImageMap( TransferableDataHelper& rData, SwWrtShell& rSh ); static bool _PasteAsHyperlink( TransferableDataHelper& rData, - SwWrtShell& rSh, sal_uLong nFmt ); + SwWrtShell& rSh, SotClipboardFormatId nFmt ); static bool _PasteFileName( TransferableDataHelper& rData, - SwWrtShell& rSh, sal_uLong nFmt, sal_uInt16 nAction, + SwWrtShell& rSh, SotClipboardFormatId nFmt, sal_uInt16 nAction, const Point* pPt, sal_uInt8 nActionFlags, bool bMsg, bool * graphicInserted ); static bool _PasteDBData( TransferableDataHelper& rData, SwWrtShell& rSh, - sal_uLong nFmt, bool bLink, const Point* pDragPt, + SotClipboardFormatId nFmt, bool bLink, const Point* pDragPt, bool bMsg ); static bool _PasteFileList( TransferableDataHelper& rData, @@ -138,7 +138,7 @@ protected: virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) SAL_OVERRIDE; virtual bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, - sal_uInt32 nUserObjectId, + SotClipboardFormatId nUserObjectId, const css::datatransfer::DataFlavor& rFlavor ) SAL_OVERRIDE; virtual void DragFinished( sal_Int8 nDropAction ) SAL_OVERRIDE; virtual void ObjectReleased() SAL_OVERRIDE; @@ -169,7 +169,7 @@ public: static bool IsPaste( const SwWrtShell&, const TransferableDataHelper& ); static bool Paste( SwWrtShell&, TransferableDataHelper& ); static bool PasteData( TransferableDataHelper& rData, - SwWrtShell& rSh, sal_uInt16 nAction, sal_uLong nFormat, + SwWrtShell& rSh, sal_uInt16 nAction, SotClipboardFormatId nFormat, SotExchangeDest nDestination, bool bIsPasteFmt, bool bIsDefault, const Point* pDDPos = 0, sal_Int8 nDropAction = 0, @@ -178,9 +178,9 @@ public: static bool IsPasteSpecial( const SwWrtShell& rWrtShell, const TransferableDataHelper& ); static bool PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& ); - static bool PasteSpecial( SwWrtShell& rSh, TransferableDataHelper&, sal_uLong& rFormatUsed ); + static bool PasteSpecial( SwWrtShell& rSh, TransferableDataHelper&, SotClipboardFormatId& rFormatUsed ); static bool PasteFormat( SwWrtShell& rSh, TransferableDataHelper& rData, - sal_uLong nFormat ); + SotClipboardFormatId nFormat ); static void FillClipFmtItem( const SwWrtShell& rSh, const TransferableDataHelper& rData, diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index f00737290dd4..2796fb863e27 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -902,16 +902,16 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); boost::scoped_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( &rView.GetEditWin() )); - pDlg->Insert( SOT_FORMAT_STRING, OUString() ); - pDlg->Insert( SOT_FORMAT_RTF, OUString() ); + pDlg->Insert( SotClipboardFormatId::STRING, OUString() ); + pDlg->Insert( SotClipboardFormatId::RTF, OUString() ); TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( &rView.GetEditWin() ) ); - sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() ); + SotClipboardFormatId nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() ); - if (nFormat > 0) + if (nFormat != SotClipboardFormatId::NONE) { - if (nFormat == SOT_FORMAT_STRING) + if (nFormat == SotClipboardFormatId::STRING) pOLV->Paste(); else pOLV->PasteSpecial(); @@ -921,17 +921,17 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq) } case SID_CLIPBOARD_FORMAT_ITEMS: { - sal_uLong nFormat = 0; + SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; const SfxPoolItem* pItem; if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, true, &pItem) == SfxItemState::SET && pItem->ISA(SfxUInt32Item) ) { - nFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue(); + nFormat = static_cast<SotClipboardFormatId>(static_cast<const SfxUInt32Item*>(pItem)->GetValue()); } - if ( nFormat ) + if ( nFormat != SotClipboardFormatId::NONE ) { - if (SOT_FORMAT_STRING == nFormat) + if (SotClipboardFormatId::STRING == nFormat) pOLV->Paste(); else pOLV->PasteSpecial(); @@ -950,7 +950,7 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet) OutlinerView* pOLV = pPostItMgr->GetActiveSidebarWin()->GetOutlinerView(); TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( &rView.GetEditWin() ) ); - bool bPastePossible = ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) || aDataHelper.HasFormat( SOT_FORMAT_RTF ) ); + bool bPastePossible = ( aDataHelper.HasFormat( SotClipboardFormatId::STRING ) || aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ); bPastePossible = bPastePossible && (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED); SfxWhichIter aIter(rSet); @@ -984,9 +984,9 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet) if ( bPastePossible ) { SvxClipboardFmtItem aFormats( SID_CLIPBOARD_FORMAT_ITEMS ); - if ( aDataHelper.HasFormat( SOT_FORMAT_RTF ) ) - aFormats.AddClipbrdFormat( SOT_FORMAT_RTF ); - aFormats.AddClipbrdFormat( SOT_FORMAT_STRING ); + if ( aDataHelper.HasFormat( SotClipboardFormatId::RTF ) ) + aFormats.AddClipbrdFormat( SotClipboardFormatId::RTF ); + aFormats.AddClipbrdFormat( SotClipboardFormatId::STRING ); rSet.Put( aFormats ); } else diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index b2dfb85ea231..66cb5f3db872 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -312,7 +312,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) SwView* pView = &rView; SwTransferable::PasteFormat( rSh, aDataHelper, - static_cast<const SfxUInt32Item*>(pFmt)->GetValue() ); + static_cast<SotClipboardFormatId>(static_cast<const SfxUInt32Item*>(pFmt)->GetValue()) ); //Done() has to be called before the shell has been removed rReq.Done(); @@ -344,7 +344,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) pViewFrame->GetBindings().GetRecorder(); if(xRecorder.is()) { SfxRequest aReq( pViewFrame, SID_CLIPBOARD_FORMAT_ITEMS ); - aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, SOT_FORMAT_STRING ) ); + aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, static_cast<sal_uInt32>(SotClipboardFormatId::STRING) ) ); aReq.Done(); } } @@ -369,7 +369,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) // Temporary variables, because the shell could already be // destroyed after the paste. SwView* pView = &rView; - sal_uLong nFormatId = 0; + SotClipboardFormatId nFormatId = SotClipboardFormatId::NONE; rReq.Ignore(); bIgnore = true; if(SwTransferable::PasteSpecial( rSh, aDataHelper, nFormatId )) @@ -379,7 +379,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq) pViewFrame->GetBindings().GetRecorder(); if(xRecorder.is()) { SfxRequest aReq( pViewFrame, SID_CLIPBOARD_FORMAT_ITEMS ); - aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, nFormatId ) ); + aReq.AppendItem( SfxUInt32Item( SID_CLIPBOARD_FORMAT_ITEMS, static_cast<sal_uInt32>(nFormatId) ) ); aReq.Done(); } } diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 96f671b2a1db..57fda8308bf8 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3447,13 +3447,13 @@ void NaviContentBookmark::Copy( TransferDataContainer& rData ) const OUStringToOString(aDescr, eSysCSet) + OString(NAVI_BOOKMARK_DELIM) + OString::number(nDefDrag) + OString(NAVI_BOOKMARK_DELIM) + OString::number(nDocSh)); - rData.CopyByteString(SOT_FORMATSTR_ID_SONLK, sStrBuf); + rData.CopyByteString(SotClipboardFormatId::SONLK, sStrBuf); } bool NaviContentBookmark::Paste( TransferableDataHelper& rData ) { OUString sStr; - bool bRet = rData.GetString( SOT_FORMATSTR_ID_SONLK, sStr ); + bool bRet = rData.GetString( SotClipboardFormatId::SONLK, sStr ); if( bRet ) { sal_Int32 nPos = 0; diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index ae6d50e71bd8..b1bf72faaeb7 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -213,7 +213,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt ) const SwGlblDocContent* pCnt = pDropEntry ? (const SwGlblDocContent*)pDropEntry->GetUserData() : 0; - if( aData.HasFormat( FORMAT_FILE_LIST )) + if( aData.HasFormat( SotClipboardFormatId::FILE_LIST )) { nRet = rEvt.mnAction; boost::scoped_ptr<SwGlblDocContents> pTempContents(new SwGlblDocContents); @@ -224,7 +224,7 @@ sal_Int8 SwGlobalTree::ExecuteDrop( const ExecuteDropEvent& rEvt ) // Get data FileList aFileList; - aData.GetFileList( FORMAT_FILE_LIST, aFileList ); + aData.GetFileList( SotClipboardFormatId::FILE_LIST, aFileList ); for ( size_t n = aFileList.Count(); n--; ) { sFileName = aFileList.GetFile(n); @@ -290,15 +290,15 @@ sal_Int8 SwGlobalTree::AcceptDrop( const AcceptDropEvent& rEvt ) if( pDDSource != pDropEntry ) nRet = rEvt.mnAction; } - else if( IsDropFormatSupported( FORMAT_FILE ) || - IsDropFormatSupported( FORMAT_STRING ) || - IsDropFormatSupported( FORMAT_FILE_LIST ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_SOLK ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK )|| - IsDropFormatSupported( SOT_FORMATSTR_ID_FILECONTENT ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ) || - IsDropFormatSupported( SOT_FORMATSTR_ID_FILENAME )) + else if( IsDropFormatSupported( SotClipboardFormatId::FILE ) || + IsDropFormatSupported( SotClipboardFormatId::STRING ) || + IsDropFormatSupported( SotClipboardFormatId::FILE_LIST ) || + IsDropFormatSupported( SotClipboardFormatId::SOLK ) || + IsDropFormatSupported( SotClipboardFormatId::NETSCAPE_BOOKMARK )|| + IsDropFormatSupported( SotClipboardFormatId::FILECONTENT ) || + IsDropFormatSupported( SotClipboardFormatId::FILEGRPDESCRIPTOR ) || + IsDropFormatSupported( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) || + IsDropFormatSupported( SotClipboardFormatId::FILENAME )) nRet = DND_ACTION_LINK; if(pEmphasisEntry && pEmphasisEntry != pDropEntry) diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 52ae241f7e9e..b1d03a069bbf 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -1092,24 +1092,24 @@ IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem) OUString SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData ) { OUString sFileName; - sal_uLong nFmt; - if( rData.HasFormat( nFmt = FORMAT_FILE_LIST )) + SotClipboardFormatId nFmt; + if( rData.HasFormat( nFmt = SotClipboardFormatId::FILE_LIST )) { FileList aFileList; rData.GetFileList( nFmt, aFileList ); sFileName = aFileList.GetFile( 0 ); } - else if( rData.HasFormat( nFmt = FORMAT_STRING ) || - rData.HasFormat( nFmt = FORMAT_FILE ) || - rData.HasFormat( nFmt = SOT_FORMATSTR_ID_FILENAME )) + else if( rData.HasFormat( nFmt = SotClipboardFormatId::STRING ) || + rData.HasFormat( nFmt = SotClipboardFormatId::FILE ) || + rData.HasFormat( nFmt = SotClipboardFormatId::FILENAME )) { (void)rData.GetString(nFmt, sFileName); } - else if( rData.HasFormat( nFmt = SOT_FORMATSTR_ID_SOLK ) || - rData.HasFormat( nFmt = SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK )|| - rData.HasFormat( nFmt = SOT_FORMATSTR_ID_FILECONTENT ) || - rData.HasFormat( nFmt = SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ) || - rData.HasFormat( nFmt = SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR )) + else if( rData.HasFormat( nFmt = SotClipboardFormatId::SOLK ) || + rData.HasFormat( nFmt = SotClipboardFormatId::NETSCAPE_BOOKMARK )|| + rData.HasFormat( nFmt = SotClipboardFormatId::FILECONTENT ) || + rData.HasFormat( nFmt = SotClipboardFormatId::FILEGRPDESCRIPTOR ) || + rData.HasFormat( nFmt = SotClipboardFormatId::UNIFORMRESOURCELOCATOR )) { INetBookmark aBkmk( aEmptyOUStr, aEmptyOUStr ); if (rData.GetINetBookmark(nFmt, aBkmk)) @@ -1125,14 +1125,14 @@ OUString SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData ) sal_Int8 SwNavigationPI::AcceptDrop( const AcceptDropEvent& /*rEvt*/ ) { return ( !SwContentTree::IsInDrag() && - ( aContentTree.IsDropFormatSupported( FORMAT_FILE ) || - aContentTree.IsDropFormatSupported( FORMAT_STRING ) || - aContentTree.IsDropFormatSupported( SOT_FORMATSTR_ID_SOLK ) || - aContentTree.IsDropFormatSupported( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK )|| - aContentTree.IsDropFormatSupported( SOT_FORMATSTR_ID_FILECONTENT ) || - aContentTree.IsDropFormatSupported( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ) || - aContentTree.IsDropFormatSupported( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ) || - aContentTree.IsDropFormatSupported( SOT_FORMATSTR_ID_FILENAME ))) + ( aContentTree.IsDropFormatSupported( SotClipboardFormatId::FILE ) || + aContentTree.IsDropFormatSupported( SotClipboardFormatId::STRING ) || + aContentTree.IsDropFormatSupported( SotClipboardFormatId::SOLK ) || + aContentTree.IsDropFormatSupported( SotClipboardFormatId::NETSCAPE_BOOKMARK )|| + aContentTree.IsDropFormatSupported( SotClipboardFormatId::FILECONTENT ) || + aContentTree.IsDropFormatSupported( SotClipboardFormatId::FILEGRPDESCRIPTOR ) || + aContentTree.IsDropFormatSupported( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) || + aContentTree.IsDropFormatSupported( SotClipboardFormatId::FILENAME ))) ? DND_ACTION_COPY : DND_ACTION_NONE; } diff --git a/sw/source/uibase/web/wdocsh.cxx b/sw/source/uibase/web/wdocsh.cxx index 275fbb0b4617..66577679f04e 100644 --- a/sw/source/uibase/web/wdocsh.cxx +++ b/sw/source/uibase/web/wdocsh.cxx @@ -62,7 +62,7 @@ SwWebDocShell::~SwWebDocShell() } void SwWebDocShell::FillClass( SvGlobalName * pClassName, - sal_uInt32 * pClipFormat, + SotClipboardFormatId * pClipFormat, OUString * /*pAppName*/, OUString * pLongUserName, OUString * pUserName, @@ -75,13 +75,13 @@ void SwWebDocShell::FillClass( SvGlobalName * pClassName, if (nVersion == SOFFICE_FILEFORMAT_60) { *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 ); - *pClipFormat = SOT_FORMATSTR_ID_STARWRITERWEB_60; + *pClipFormat = SotClipboardFormatId::STARWRITERWEB_60; *pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE); } else if (nVersion == SOFFICE_FILEFORMAT_8) { *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 ); - *pClipFormat = SOT_FORMATSTR_ID_STARWRITERWEB_8; + *pClipFormat = SotClipboardFormatId::STARWRITERWEB_8; *pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE); } *pUserName = SW_RESSTR(STR_HUMAN_SWWEBDOC_NAME); diff --git a/unotest/source/cpp/filters-test.cxx b/unotest/source/cpp/filters-test.cxx index 035a9af46422..ac80a5be6144 100644 --- a/unotest/source/cpp/filters-test.cxx +++ b/unotest/source/cpp/filters-test.cxx @@ -53,7 +53,7 @@ void decode(const OUString& rIn, const OUString &rOut) void FiltersTest::recursiveScan(filterStatus nExpected, const OUString &rFilter, const OUString &rURL, const OUString &rUserData, unsigned int nFilterFlags, - unsigned int nClipboardID, unsigned int nFilterVersion, bool bExport) + SotClipboardFormatId nClipboardID, unsigned int nFilterVersion, bool bExport) { osl::Directory aDir(rURL); @@ -131,7 +131,7 @@ void FiltersTest::recursiveScan(filterStatus nExpected, void FiltersTest::testDir(const OUString &rFilter, const OUString &rURL, const OUString &rUserData, - unsigned int nFilterFlags, unsigned int nClipboardID, + unsigned int nFilterFlags, SotClipboardFormatId nClipboardID, unsigned int nFilterVersion, bool bExport) { fprintf(stderr, "File tested,Test Result,Execution tools::Time (ms)\n"); diff --git a/vcl/qa/cppunit/graphicfilter/filters-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-test.cxx index 128010854289..ae7a205e09bc 100644 --- a/vcl/qa/cppunit/graphicfilter/filters-test.cxx +++ b/vcl/qa/cppunit/graphicfilter/filters-test.cxx @@ -32,7 +32,7 @@ public: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; void checkExportImport(const OUString& aFilterShortName); @@ -53,7 +53,7 @@ public: bool VclFiltersTest::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { SvFileStream aFileStream(rURL, StreamMode::READ); Graphic aGraphic; diff --git a/vcl/source/app/unohelp2.cxx b/vcl/source/app/unohelp2.cxx index ff34ed41621b..2f2e3d66124f 100644 --- a/vcl/source/app/unohelp2.cxx +++ b/vcl/source/app/unohelp2.cxx @@ -74,8 +74,8 @@ namespace vcl { namespace unohelper { { uno::Any aAny; - sal_uLong nT = SotExchange::GetFormat( rFlavor ); - if ( nT == SOT_FORMAT_STRING ) + SotClipboardFormatId nT = SotExchange::GetFormat( rFlavor ); + if ( nT == SotClipboardFormatId::STRING ) { aAny <<= GetString(); } @@ -89,14 +89,14 @@ namespace vcl { namespace unohelper { uno::Sequence< datatransfer::DataFlavor > TextDataObject::getTransferDataFlavors( ) throw(uno::RuntimeException, std::exception) { uno::Sequence< datatransfer::DataFlavor > aDataFlavors(1); - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aDataFlavors.getArray()[0] ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aDataFlavors.getArray()[0] ); return aDataFlavors; } sal_Bool TextDataObject::isDataFlavorSupported( const datatransfer::DataFlavor& rFlavor ) throw(uno::RuntimeException, std::exception) { - sal_uLong nT = SotExchange::GetFormat( rFlavor ); - return ( nT == SOT_FORMAT_STRING ); + SotClipboardFormatId nT = SotExchange::GetFormat( rFlavor ); + return ( nT == SotClipboardFormatId::STRING ); } }} // namespace vcl::unohelper diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 1bd807c777d9..fb6dde7d307d 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1300,7 +1300,7 @@ void Edit::ImplPaste( uno::Reference< datatransfer::clipboard::XClipboard >& rxC if ( xDataObj.is() ) { datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor ); try { uno::Any aData = xDataObj->getTransferData( aFlavor ); @@ -1991,7 +1991,7 @@ void Edit::Command( const CommandEvent& rCEvt ) if ( xDataObj.is() ) { datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor ); bData = xDataObj->isDataFlavorSupported( aFlavor ); } } @@ -2933,7 +2933,7 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& if ( xDataObj.is() ) { datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor ); if ( xDataObj->isDataFlavorSupported( aFlavor ) ) { uno::Any aData = xDataObj->getTransferData( aFlavor ); diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index 0aa78887278e..5fc04a71313a 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -104,12 +104,12 @@ uno::Any TETextDataObject::getTransferData( const datatransfer::DataFlavor& rFla { uno::Any aAny; - sal_uLong nT = SotExchange::GetFormat( rFlavor ); - if ( nT == SOT_FORMAT_STRING ) + SotClipboardFormatId nT = SotExchange::GetFormat( rFlavor ); + if ( nT == SotClipboardFormatId::STRING ) { aAny <<= GetText(); } - else if ( nT == SOT_FORMATSTR_ID_HTML ) + else if ( nT == SotClipboardFormatId::HTML ) { GetHTMLStream().Seek( STREAM_SEEK_TO_END ); sal_uLong nLen = GetHTMLStream().Tell(); @@ -131,16 +131,16 @@ uno::Sequence< datatransfer::DataFlavor > TETextDataObject::getTransferDataFlavo GetHTMLStream().Seek( STREAM_SEEK_TO_END ); bool bHTML = GetHTMLStream().Tell() > 0; uno::Sequence< datatransfer::DataFlavor > aDataFlavors( bHTML ? 2 : 1 ); - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aDataFlavors.getArray()[0] ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aDataFlavors.getArray()[0] ); if ( bHTML ) - SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_HTML, aDataFlavors.getArray()[1] ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::HTML, aDataFlavors.getArray()[1] ); return aDataFlavors; } sal_Bool TETextDataObject::isDataFlavorSupported( const datatransfer::DataFlavor& rFlavor ) throw(uno::RuntimeException, std::exception) { - sal_uLong nT = SotExchange::GetFormat( rFlavor ); - return ( nT == SOT_FORMAT_STRING ); + SotClipboardFormatId nT = SotExchange::GetFormat( rFlavor ); + return ( nT == SotClipboardFormatId::STRING ); } struct ImpTextView @@ -1179,7 +1179,7 @@ void TextView::Paste( uno::Reference< datatransfer::clipboard::XClipboard >& rxC if ( xDataObj.is() ) { datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor ); if ( xDataObj->isDataFlavorSupported( aFlavor ) ) { try @@ -2062,7 +2062,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv if ( xDataObj.is() ) { datatransfer::DataFlavor aFlavor; - SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); + SotExchange::GetFormatDataFlavor( SotClipboardFormatId::STRING, aFlavor ); if ( xDataObj->isDataFlavorSupported( aFlavor ) ) { uno::Any aData = xDataObj->getTransferData( aFlavor ); diff --git a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx index 81de6f8d2384..6340f55f4fdd 100644 --- a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx +++ b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx @@ -35,7 +35,7 @@ public: virtual bool load(const OUString&, const OUString& rURL, const OUString&, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; void test(); @@ -55,7 +55,7 @@ void RtfTest::setUp() bool RtfTest::load(const OUString&, const OUString& rURL, const OUString&, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { uno::Sequence< beans::PropertyValue > aDescriptor = { diff --git a/writerperfect/qa/unit/WpftImportTestBase.cxx b/writerperfect/qa/unit/WpftImportTestBase.cxx index 697928953f82..740f55bdb61a 100644 --- a/writerperfect/qa/unit/WpftImportTestBase.cxx +++ b/writerperfect/qa/unit/WpftImportTestBase.cxx @@ -73,7 +73,7 @@ void WpftImportTestBase::tearDown() } bool WpftImportTestBase::load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) + unsigned int, SotClipboardFormatId, unsigned int) { // create an empty frame const uno::Reference<lang::XComponent> xDoc( diff --git a/writerperfect/qa/unit/WpftImportTestBase.hxx b/writerperfect/qa/unit/WpftImportTestBase.hxx index e6526a24da52..0f9010268d51 100644 --- a/writerperfect/qa/unit/WpftImportTestBase.hxx +++ b/writerperfect/qa/unit/WpftImportTestBase.hxx @@ -69,7 +69,7 @@ protected: private: virtual bool load(const OUString &, const OUString &rURL, const OUString &, - unsigned int, unsigned int, unsigned int) SAL_OVERRIDE; + unsigned int, SotClipboardFormatId, unsigned int) SAL_OVERRIDE; void impl_detectFilterName(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &rDescriptor, const rtl::OUString &rTypeName); |