1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SVX_SOURCE_INC_FMDOCUMENTCLASSIFICATION_HXX
29 #define SVX_SOURCE_INC_FMDOCUMENTCLASSIFICATION_HXX
30 
31 /** === begin UNO includes === **/
32 #include <com/sun/star/frame/XModel.hpp>
33 /** === end UNO includes === **/
34 
35 //........................................................................
36 namespace svxform
37 {
38 //........................................................................
39 
40 	//====================================================================
41 	//= DocumentType
42 	//====================================================================
43     enum DocumentType
44     {
45         eTextDocument,
46         eWebDocument,
47         eSpreadsheetDocument,
48         eDrawingDocument,
49         ePresentationDocument,
50         eEnhancedForm,
51         eDatabaseForm,
52         eDatabaseReport,
53 
54         eUnknownDocumentType
55     };
56 
57 	//====================================================================
58 	//= DocumentClassification
59 	//====================================================================
60 	class DocumentClassification
61 	{
62     public:
63         /** classifies a document model
64         */
65         static DocumentType classifyDocument(
66                                 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxDocumentModel
67                             ) SAL_THROW(());
68 
69         static DocumentType classifyHostDocument(
70                                 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxFormComponent
71                             ) SAL_THROW(());
72 
73         static  DocumentType getDocumentTypeForModuleIdentifier(
74                                 const ::rtl::OUString& _rModuleIdentifier
75                             );
76 
77         static  ::rtl::OUString getModuleIdentifierForDocumentType(
78                                 DocumentType _eType
79                             );
80 	};
81 
82 //........................................................................
83 } // namespace svxform
84 //........................................................................
85 
86 #endif // SVX_SOURCE_INC_FMDOCUMENTCLASSIFICATION_HXX
87 
88