summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/view.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uiview/view.cxx')
-rw-r--r--sw/source/uibase/uiview/view.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 58c7d77349b3..25d394f1f364 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -594,7 +594,7 @@ void SwView::CheckReadonlyState()
SID_DELETE, FN_BACKSPACE, FN_SHIFT_BACKSPACE,
SID_UNDO,
SID_REDO, SID_REPEAT, SID_PASTE,
- SID_PASTE_UNFORMATTED,
+ SID_PASTE_UNFORMATTED, FN_PASTE_NESTED_TABLE,
SID_PASTE_SPECIAL, SID_SBA_BRW_INSERT,
SID_BACKGROUND_COLOR, FN_INSERT_BOOKMARK, SID_CHARMAP_CONTROL,
SID_CHARMAP, SID_EMOJI_CONTROL, FN_INSERT_SOFT_HYPHEN,
@@ -1848,6 +1848,20 @@ bool SwView::IsPasteSpecialAllowed()
return m_bPasteSpecialState;
}
+bool SwView::IsPasteSpreadsheet(bool bHasOwnTableCopied)
+{
+ TransferableDataHelper aDataHelper(
+ TransferableDataHelper::CreateFromSystemClipboard(
+ &GetEditWin()) );
+ if( aDataHelper.GetXTransferable().is() )
+ {
+ if (bHasOwnTableCopied && SwTransferable::IsPasteOwnFormat( aDataHelper ))
+ return true;
+ return aDataHelper.HasFormat( SotClipboardFormatId::SYLK ) || aDataHelper.HasFormat( SotClipboardFormatId::SYLK_BIGCAPS );
+ }
+ return false;
+}
+
void SwView::NotifyDBChanged()
{
GetViewImpl()->GetUNOObject_Impl()->NotifyDBChanged();