summaryrefslogtreecommitdiff
path: root/sw/source/uibase/dochdl
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-03-10 15:04:25 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-03-10 17:43:23 +0100
commit275443f052887f67a6d459d443293690daa3ae24 (patch)
tree88bc19dba48f4981fbfca98a7741d5381800a01c /sw/source/uibase/dochdl
parentac8e83cfb41265c6d8a3f05000e2593bc01494e7 (diff)
sfx2 classification: merge common code from sw and writerfilter
The two versions were almost a duplicate. Change-Id: I3148150d62484a55fc8d59ca354998f211435c0b
Diffstat (limited to 'sw/source/uibase/dochdl')
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx24
1 files changed, 2 insertions, 22 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 6d47e8f50873..5dc3dfd68b91 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -3226,28 +3226,8 @@ bool lcl_checkClassification(SwDoc* pSourceDoc, SwDoc* pDestinationDoc)
if (!pSourceShell || !pDestinationShell)
return true;
- switch (SfxClassificationHelper::CheckPaste(pSourceShell->getDocProperties(), pDestinationShell->getDocProperties()))
- {
- case SfxClassificationCheckPasteResult::None:
- {
- return true;
- }
- break;
- case SfxClassificationCheckPasteResult::TargetDocNotClassified:
- {
- ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_TARGET_DOC_NOT_CLASSIFIED), VCL_MESSAGE_INFO)->Execute();
- return false;
- }
- break;
- case SfxClassificationCheckPasteResult::DocClassificationTooLow:
- {
- ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SfxResId(STR_DOC_CLASSIFICATION_TOO_LOW), VCL_MESSAGE_INFO)->Execute();
- return false;
- }
- break;
- }
-
- return true;
+ SfxClassificationCheckPasteResult eResult = SfxClassificationHelper::CheckPaste(pSourceShell->getDocProperties(), pDestinationShell->getDocProperties());
+ return SfxClassificationHelper::ShowPasteInfo(eResult);
}
}