diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-12 14:53:28 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-18 14:23:50 +0200 |
commit | fb14be5f8f74f83ba89e15f891ddf1f753dcc62f (patch) | |
tree | beaa4af08b0c3d75bf6e40b21b96c55e0ac1c60a /sw/source/uibase/utlui/navipi.cxx | |
parent | b8ce52aab9459773544f1696cfe6b7b6f171a389 (diff) |
create new 'enum class' SotClipboardFormatId to unify types
of which there are several.
There are some issues here I am unsure of
- the SW and SC and CHART2 modules essentially ignore the enum values and assign their own ids
Perhaps I should change them to use the common values and create new enum values where necessary?
- the sc/qa/ and sq/qa/ and starmath/qa/ code was doing some dodgy stuff. I translated the code to pass down the stuff
numeric values to the underlying code, but perhaps further fixing is necessary?
Change-Id: Ic06d723e404481e3f1bca67c43b70321b764d923
Diffstat (limited to 'sw/source/uibase/utlui/navipi.cxx')
-rw-r--r-- | sw/source/uibase/utlui/navipi.cxx | 36 |
1 files changed, 18 insertions, 18 deletions
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; } |