2010-10-12 15:57:08 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-07-11 19:49:09 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2012-11-27 14:41:16 +02:00
|
|
|
#ifdef _MSC_VER
|
2006-09-25 12:30:32 +00:00
|
|
|
#pragma warning(disable : 4917 4555)
|
|
|
|
#endif
|
2003-03-05 14:50:11 +00:00
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
|
|
|
#include <com/sun/star/container/XNameAccess.hpp>
|
|
|
|
|
2016-10-14 16:56:18 +02:00
|
|
|
#include <guid.hxx>
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString getStorageTypeFromGUID_Impl( GUID* guid )
|
2003-04-02 14:44:52 +00:00
|
|
|
{
|
|
|
|
if ( *guid == OID_WriterTextServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "soffice.StarWriterDocument.6" );
|
2003-04-02 14:44:52 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_WriterOASISTextServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "LibreOffice.WriterDocument.1" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2003-04-02 14:44:52 +00:00
|
|
|
if ( *guid == OID_CalcServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "soffice.StarCalcDocument.6" );
|
2003-04-02 14:44:52 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_CalcOASISServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "LibreOffice.CalcDocument.1" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2003-04-02 14:44:52 +00:00
|
|
|
if ( *guid == OID_DrawingServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "soffice.StarDrawDocument.6" );
|
2003-04-02 14:44:52 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_DrawingOASISServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "LibreOffice.DrawDocument.1" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2003-04-02 14:44:52 +00:00
|
|
|
if ( *guid == OID_PresentationServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "soffice.StarImpressDocument.6" );
|
2003-04-02 14:44:52 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_PresentationOASISServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "LibreOffice.ImpressDocument.1" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2003-04-02 14:44:52 +00:00
|
|
|
if ( *guid == OID_MathServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "soffice.StarMathDocument.6" );
|
2003-04-02 14:44:52 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_MathOASISServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "LibreOffice.MathDocument.1" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString();
|
2003-04-02 14:44:52 +00:00
|
|
|
}
|
2003-03-05 14:50:11 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString getServiceNameFromGUID_Impl( GUID* guid )
|
2003-03-05 14:50:11 +00:00
|
|
|
{
|
|
|
|
if ( *guid == OID_WriterTextServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "com.sun.star.comp.Writer.TextDocument" );
|
2003-03-05 14:50:11 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_WriterOASISTextServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "com.sun.star.comp.Writer.TextDocument" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2003-03-05 14:50:11 +00:00
|
|
|
if ( *guid == OID_CalcServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "com.sun.star.comp.Calc.SpreadsheetDocument" );
|
2003-03-05 14:50:11 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_CalcOASISServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "com.sun.star.comp.Calc.SpreadsheetDocument" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2003-03-05 14:50:11 +00:00
|
|
|
if ( *guid == OID_DrawingServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "com.sun.star.comp.Draw.DrawingDocument" );
|
2003-03-05 14:50:11 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_DrawingOASISServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "com.sun.star.comp.Draw.DrawingDocument" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2003-03-05 14:50:11 +00:00
|
|
|
if ( *guid == OID_PresentationServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "com.sun.star.comp.Draw.PresentationDocument" );
|
2003-03-05 14:50:11 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_PresentationOASISServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "com.sun.star.comp.Draw.PresentationDocument" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2003-03-05 14:50:11 +00:00
|
|
|
if ( *guid == OID_MathServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "com.sun.star.comp.Math.FormulaDocument" );
|
2003-03-05 14:50:11 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_MathOASISServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "com.sun.star.comp.Math.FormulaDocument" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString();
|
2003-03-05 14:50:11 +00:00
|
|
|
}
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString getFilterNameFromGUID_Impl( GUID* guid )
|
2003-03-05 14:50:11 +00:00
|
|
|
{
|
|
|
|
if ( *guid == OID_WriterTextServer )
|
2013-11-14 13:13:19 +02:00
|
|
|
return OUString( "StarOffice XML (Writer)" );
|
2003-03-05 14:50:11 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_WriterOASISTextServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "writer8" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2003-03-05 14:50:11 +00:00
|
|
|
if ( *guid == OID_CalcServer )
|
2013-11-14 13:13:19 +02:00
|
|
|
return OUString( "StarOffice XML (Calc)" );
|
2003-03-05 14:50:11 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_CalcOASISServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "calc8" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2003-03-05 14:50:11 +00:00
|
|
|
if ( *guid == OID_DrawingServer )
|
2013-11-14 13:13:19 +02:00
|
|
|
return OUString( "StarOffice XML (Draw)" );
|
2003-03-05 14:50:11 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_DrawingOASISServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "draw8" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2003-03-05 14:50:11 +00:00
|
|
|
if ( *guid == OID_PresentationServer )
|
2013-11-14 13:13:19 +02:00
|
|
|
return OUString( "StarOffice XML (Impress)" );
|
2003-03-05 14:50:11 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_PresentationOASISServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "impress8" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2003-03-05 14:50:11 +00:00
|
|
|
if ( *guid == OID_MathServer )
|
2013-11-14 13:13:19 +02:00
|
|
|
return OUString( "StarOffice XML (Math)" );
|
2003-03-05 14:50:11 +00:00
|
|
|
|
2005-01-18 14:12:32 +00:00
|
|
|
if ( *guid == OID_MathOASISServer )
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString( "math8" );
|
2005-01-18 14:12:32 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString();
|
2003-03-05 14:50:11 +00:00
|
|
|
}
|
|
|
|
|
2010-10-12 15:57:08 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|