From 275443f052887f67a6d459d443293690daa3ae24 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 10 Mar 2016 15:04:25 +0100 Subject: sfx2 classification: merge common code from sw and writerfilter The two versions were almost a duplicate. Change-Id: I3148150d62484a55fc8d59ca354998f211435c0b --- sw/source/uibase/dochdl/swdtflvr.cxx | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'sw/source/uibase/dochdl') 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::Create(nullptr, SfxResId(STR_TARGET_DOC_NOT_CLASSIFIED), VCL_MESSAGE_INFO)->Execute(); - return false; - } - break; - case SfxClassificationCheckPasteResult::DocClassificationTooLow: - { - ScopedVclPtrInstance::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); } } -- cgit