summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/filters-test.cxx4
-rw-r--r--sd/qa/unit/sdmodeltestbase.hxx12
-rw-r--r--sd/source/core/pglink.cxx2
-rw-r--r--sd/source/filter/eppt/eppt.cxx2
-rw-r--r--sd/source/ui/app/sdxfer.cxx66
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx20
-rw-r--r--sd/source/ui/docshell/docshel4.cxx10
-rw-r--r--sd/source/ui/func/fuinsert.cxx38
-rw-r--r--sd/source/ui/func/fuinsfil.cxx24
-rw-r--r--sd/source/ui/func/fuoltext.cxx2
-rw-r--r--sd/source/ui/func/fupoor.cxx2
-rw-r--r--sd/source/ui/inc/DrawDocShell.hxx2
-rw-r--r--sd/source/ui/inc/View.hxx3
-rw-r--r--sd/source/ui/inc/sdtreelb.hxx4
-rw-r--r--sd/source/ui/inc/sdxfer.hxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsClipboard.cxx2
-rw-r--r--sd/source/ui/view/drviews4.cxx12
-rw-r--r--sd/source/ui/view/drviews7.cxx29
-rw-r--r--sd/source/ui/view/drviewse.cxx20
-rw-r--r--sd/source/ui/view/outlnvsh.cxx14
-rw-r--r--sd/source/ui/view/sdview2.cxx48
-rw-r--r--sd/source/ui/view/sdview3.cxx128
-rw-r--r--sd/source/ui/view/tabcontr.cxx2
23 files changed, 225 insertions, 223 deletions
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*/ )