1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma warning(disable : 4917 4555)
24 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
25 #include <com/sun/star/container/XNameAccess.hpp>
27 OUString
getStorageTypeFromGUID_Impl( GUID
* guid
)
29 if ( *guid
== OID_WriterTextServer
)
30 return OUString( "soffice.StarWriterDocument.6" );
32 if ( *guid
== OID_WriterOASISTextServer
)
33 return OUString( "LibreOffice.WriterDocument.1" );
35 if ( *guid
== OID_CalcServer
)
36 return OUString( "soffice.StarCalcDocument.6" );
38 if ( *guid
== OID_CalcOASISServer
)
39 return OUString( "LibreOffice.CalcDocument.1" );
41 if ( *guid
== OID_DrawingServer
)
42 return OUString( "soffice.StarDrawDocument.6" );
44 if ( *guid
== OID_DrawingOASISServer
)
45 return OUString( "LibreOffice.DrawDocument.1" );
47 if ( *guid
== OID_PresentationServer
)
48 return OUString( "soffice.StarImpressDocument.6" );
50 if ( *guid
== OID_PresentationOASISServer
)
51 return OUString( "LibreOffice.ImpressDocument.1" );
53 if ( *guid
== OID_MathServer
)
54 return OUString( "soffice.StarMathDocument.6" );
56 if ( *guid
== OID_MathOASISServer
)
57 return OUString( "LibreOffice.MathDocument.1" );
62 OUString
getServiceNameFromGUID_Impl( GUID
* guid
)
64 if ( *guid
== OID_WriterTextServer
)
65 return OUString( "com.sun.star.comp.Writer.TextDocument" );
67 if ( *guid
== OID_WriterOASISTextServer
)
68 return OUString( "com.sun.star.comp.Writer.TextDocument" );
70 if ( *guid
== OID_CalcServer
)
71 return OUString( "com.sun.star.comp.Calc.SpreadsheetDocument" );
73 if ( *guid
== OID_CalcOASISServer
)
74 return OUString( "com.sun.star.comp.Calc.SpreadsheetDocument" );
76 if ( *guid
== OID_DrawingServer
)
77 return OUString( "com.sun.star.comp.Draw.DrawingDocument" );
79 if ( *guid
== OID_DrawingOASISServer
)
80 return OUString( "com.sun.star.comp.Draw.DrawingDocument" );
82 if ( *guid
== OID_PresentationServer
)
83 return OUString( "com.sun.star.comp.Draw.PresentationDocument" );
85 if ( *guid
== OID_PresentationOASISServer
)
86 return OUString( "com.sun.star.comp.Draw.PresentationDocument" );
88 if ( *guid
== OID_MathServer
)
89 return OUString( "com.sun.star.comp.Math.FormulaDocument" );
91 if ( *guid
== OID_MathOASISServer
)
92 return OUString( "com.sun.star.comp.Math.FormulaDocument" );
97 OUString
getFilterNameFromGUID_Impl( GUID
* guid
)
99 if ( *guid
== OID_WriterTextServer
)
100 return OUString( "StarOffice XML (Writer)" );
102 if ( *guid
== OID_WriterOASISTextServer
)
103 return OUString( "writer8" );
105 if ( *guid
== OID_CalcServer
)
106 return OUString( "StarOffice XML (Calc)" );
108 if ( *guid
== OID_CalcOASISServer
)
109 return OUString( "calc8" );
111 if ( *guid
== OID_DrawingServer
)
112 return OUString( "StarOffice XML (Draw)" );
114 if ( *guid
== OID_DrawingOASISServer
)
115 return OUString( "draw8" );
117 if ( *guid
== OID_PresentationServer
)
118 return OUString( "StarOffice XML (Impress)" );
120 if ( *guid
== OID_PresentationOASISServer
)
121 return OUString( "impress8" );
123 if ( *guid
== OID_MathServer
)
124 return OUString( "StarOffice XML (Math)" );
126 if ( *guid
== OID_MathOASISServer
)
127 return OUString( "math8" );
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */