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 /starmath/source/view.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 'starmath/source/view.cxx')
-rw-r--r-- | starmath/source/view.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
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 ); |