summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/view/editsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/editsh.cxx')
-rw-r--r--sc/source/ui/view/editsh.cxx30
1 files changed, 15 insertions, 15 deletions
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 );
}