summaryrefslogtreecommitdiff
path: root/sw
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-07-07 17:42:46 +0200
commit85686bc2f4dd29923e83f386d2b0b52bc7ee4255 (patch)
tree6493c5a1e5eaabb60166dc59de143d1242794ca2 /sw
parentb83154a889573eb31067be15657cbd18e6aa7ab7 (diff)
sfx2 classification: merge common code from sw and writerfilter
The two versions were almost a duplicate. Change-Id: I3148150d62484a55fc8d59ca354998f211435c0b (cherry picked from commit 275443f052887f67a6d459d443293690daa3ae24)
Diffstat (limited to 'sw')
-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 724a99f1a040..083a0d5cbf7a 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -3242,28 +3242,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);
}
}