Files
libreoffice/embedserv/source/embed/guid.cxx

135 lines
4.3 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 .
*/
#ifdef _MSC_VER
#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>
#include <guid.hxx>
OUString getStorageTypeFromGUID_Impl( GUID* guid )
2003-04-02 14:44:52 +00:00
{
if ( *guid == OID_WriterTextServer )
return OUString( "soffice.StarWriterDocument.6" );
2003-04-02 14:44:52 +00:00
if ( *guid == OID_WriterOASISTextServer )
return OUString( "LibreOffice.WriterDocument.1" );
2003-04-02 14:44:52 +00:00
if ( *guid == OID_CalcServer )
return OUString( "soffice.StarCalcDocument.6" );
2003-04-02 14:44:52 +00:00
if ( *guid == OID_CalcOASISServer )
return OUString( "LibreOffice.CalcDocument.1" );
2003-04-02 14:44:52 +00:00
if ( *guid == OID_DrawingServer )
return OUString( "soffice.StarDrawDocument.6" );
2003-04-02 14:44:52 +00:00
if ( *guid == OID_DrawingOASISServer )
return OUString( "LibreOffice.DrawDocument.1" );
2003-04-02 14:44:52 +00:00
if ( *guid == OID_PresentationServer )
return OUString( "soffice.StarImpressDocument.6" );
2003-04-02 14:44:52 +00:00
if ( *guid == OID_PresentationOASISServer )
return OUString( "LibreOffice.ImpressDocument.1" );
2003-04-02 14:44:52 +00:00
if ( *guid == OID_MathServer )
return OUString( "soffice.StarMathDocument.6" );
2003-04-02 14:44:52 +00:00
if ( *guid == OID_MathOASISServer )
return OUString( "LibreOffice.MathDocument.1" );
return OUString();
2003-04-02 14:44:52 +00:00
}
2003-03-05 14:50:11 +00:00
OUString getServiceNameFromGUID_Impl( GUID* guid )
2003-03-05 14:50:11 +00:00
{
if ( *guid == OID_WriterTextServer )
return OUString( "com.sun.star.comp.Writer.TextDocument" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_WriterOASISTextServer )
return OUString( "com.sun.star.comp.Writer.TextDocument" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_CalcServer )
return OUString( "com.sun.star.comp.Calc.SpreadsheetDocument" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_CalcOASISServer )
return OUString( "com.sun.star.comp.Calc.SpreadsheetDocument" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_DrawingServer )
return OUString( "com.sun.star.comp.Draw.DrawingDocument" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_DrawingOASISServer )
return OUString( "com.sun.star.comp.Draw.DrawingDocument" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_PresentationServer )
return OUString( "com.sun.star.comp.Draw.PresentationDocument" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_PresentationOASISServer )
return OUString( "com.sun.star.comp.Draw.PresentationDocument" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_MathServer )
return OUString( "com.sun.star.comp.Math.FormulaDocument" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_MathOASISServer )
return OUString( "com.sun.star.comp.Math.FormulaDocument" );
return OUString();
2003-03-05 14:50:11 +00:00
}
OUString getFilterNameFromGUID_Impl( GUID* guid )
2003-03-05 14:50:11 +00:00
{
if ( *guid == OID_WriterTextServer )
return OUString( "StarOffice XML (Writer)" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_WriterOASISTextServer )
return OUString( "writer8" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_CalcServer )
return OUString( "StarOffice XML (Calc)" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_CalcOASISServer )
return OUString( "calc8" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_DrawingServer )
return OUString( "StarOffice XML (Draw)" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_DrawingOASISServer )
return OUString( "draw8" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_PresentationServer )
return OUString( "StarOffice XML (Impress)" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_PresentationOASISServer )
return OUString( "impress8" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_MathServer )
return OUString( "StarOffice XML (Math)" );
2003-03-05 14:50:11 +00:00
if ( *guid == OID_MathOASISServer )
return OUString( "math8" );
return OUString();
2003-03-05 14:50:11 +00:00
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */