Kaydet (Commit) 6c759da0 authored tarafından Caolán McNamara's avatar Caolán McNamara

delete workben

Change-Id: Ib07874e03c2a0082ddf9f851e717ac5761b4839d
üst 91d95fa9
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <osl/module.h>
#include <rtl/ustring.hxx>
using ::rtl::OUString;
extern "C" {
struct VersionInfo
{
const char* pTime;
const char* pDate;
const char* pUpd;
const char* pMinor;
const char* pBuild;
const char* pInpath;
};
typedef VersionInfo*(__LOADONCALLAPI *GetVersionInfo)(void);
}
int __LOADONCALLAPI main( int argc, char **argv )
{
VersionInfo *pInfo = NULL;
if ( argc != 2 )
{
fprintf( stderr, "USAGE: %s DllName \n", argv[0] );
exit(0);
}
OUString aLib = OUString::createFromAscii(argv[1]);
oslModule aLibrary = osl_loadModule( aLib.pData, SAL_LOADMODULE_DEFAULT );
if ( aLibrary )
{
void* pFunc = osl_getSymbol( aLibrary, OUString( RTL_CONSTASCII_USTRINGPARAM( "GetVersionInfo" )).pData );
if ( pFunc )
pInfo = (*(GetVersionInfo)pFunc)();
}
if ( pInfo )
{
fprintf( stdout, "Date : %s\n", pInfo->pDate );
fprintf( stdout, "Time : %s\n", pInfo->pTime );
fprintf( stdout, "UPD : %s\n", pInfo->pUpd );
fprintf( stdout, "Minor : %s\n", pInfo->pMinor );
fprintf( stdout, "Build : %s\n", pInfo->pBuild );
fprintf( stdout, "Inpath : %s\n", pInfo->pInpath );
}
else
fprintf( stderr, "VersionInfo not Found !\n" );
if ( aLibrary )
osl_unloadModule( aLibrary );
return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
This diff is collapsed.
/* -*- 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 .
*/
#include "udlg_module.hxx"
#include "udlg_global.hrc"
#include "roadmapskeleton.hrc"
#include "roadmapskeleton.hxx"
#include "roadmapskeletonpages.hxx"
//........................................................................
namespace udlg
{
//........................................................................
#define STATE_WELCOME 0
#define STATE_PREPARE 1
#define STATE_SETUP 2
#define STATE_FINISH 3
#define PATH_DEFAULT 1
//====================================================================
//= RoadmapSkeletonDialog
//====================================================================
//--------------------------------------------------------------------
RoadmapSkeletonDialog::RoadmapSkeletonDialog( const ::comphelper::ComponentContext& _rContext, Window* _pParent )
:RoadmapSkeletonDialog_Base( _pParent, UdlgResId( DLG_ROADMAP_SKELETON ) )
,m_aContext( _rContext )
{
String sTitlePrepare( UdlgResId( STR_STATE_WELCOME ) );
String sTitleStoreAs( UdlgResId( STR_STATE_PREPARE ) );
String sTitleMigrate( UdlgResId( STR_STATE_SETUP ) );
String sTitleSummary( UdlgResId( STR_STATE_FINISH ) );
FreeResource();
describeState( STATE_WELCOME, sTitlePrepare, &WelcomePage::Create );
describeState( STATE_PREPARE, sTitleStoreAs, &PreparationPage::Create );
describeState( STATE_SETUP, sTitleMigrate, &SetupPage::Create );
describeState( STATE_FINISH, sTitleSummary, &FinishPage::Create );
declarePath( PATH_DEFAULT, STATE_WELCOME, STATE_PREPARE, STATE_SETUP, STATE_FINISH, WZS_INVALID_STATE );
SetPageSizePixel( LogicToPixel( ::Size( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ), MAP_APPFONT ) );
ShowButtonFixedLine( true );
SetRoadmapInteractive( true );
enableAutomaticNextButtonState();
defaultButton( WZB_NEXT );
enableButtons( WZB_FINISH, true );
ActivatePage();
}
//--------------------------------------------------------------------
RoadmapSkeletonDialog::~RoadmapSkeletonDialog()
{
}
//--------------------------------------------------------------------
void RoadmapSkeletonDialog::enterState( WizardState _nState )
{
RoadmapSkeletonDialog_Base::enterState( _nState );
}
//--------------------------------------------------------------------
sal_Bool RoadmapSkeletonDialog::prepareLeaveCurrentState( CommitPageReason _eReason )
{
return RoadmapSkeletonDialog_Base::prepareLeaveCurrentState( _eReason );
}
//--------------------------------------------------------------------
sal_Bool RoadmapSkeletonDialog::leaveState( WizardState _nState )
{
return RoadmapSkeletonDialog_Base::leaveState( _nState );
}
//--------------------------------------------------------------------
RoadmapSkeletonDialog::WizardState RoadmapSkeletonDialog::determineNextState( WizardState _nCurrentState ) const
{
return RoadmapSkeletonDialog_Base::determineNextState( _nCurrentState );
}
//--------------------------------------------------------------------
sal_Bool RoadmapSkeletonDialog::onFinish()
{
return RoadmapSkeletonDialog_Base::onFinish();
}
//........................................................................
} // namespace udlg
//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/*
* 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 .
*/
#ifndef SVTOOLS_ROADMAPSKELETON_HRC
#define SVTOOLS_ROADMAPSKELETON_HRC
#define TAB_PAGE_WIDTH 280
#define TAB_PAGE_HEIGHT 185
//... strings ............................................................
#define STR_STATE_WELCOME 1
#define STR_STATE_PREPARE 2
#define STR_STATE_SETUP 3
#define STR_STATE_FINISH 4
#endif // SVTOOLS_ROADMAPSKELETON_HRC
/* -*- 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 .
*/
#ifndef SVTOOLS_ROADMAPSKELETONDIALOG_HXX
#define SVTOOLS_ROADMAPSKELETONDIALOG_HXX
#include <comphelper/componentcontext.hxx>
#include <svtools/roadmapwizard.hxx>
//........................................................................
namespace udlg
{
//........................................................................
//====================================================================
//= RoadmapSkeletonDialog
//====================================================================
typedef ::svt::RoadmapWizard RoadmapSkeletonDialog_Base;
class RoadmapSkeletonDialog : public RoadmapSkeletonDialog_Base
{
public:
RoadmapSkeletonDialog( const ::comphelper::ComponentContext& _rContext, Window* _pParent );
virtual ~RoadmapSkeletonDialog();
protected:
// OWizardMachine overridables
virtual void enterState( WizardState _nState );
virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
virtual sal_Bool leaveState( WizardState _nState );
virtual WizardState determineNextState( WizardState _nCurrentState ) const;
virtual sal_Bool onFinish();
private:
::comphelper::ComponentContext m_aContext;
};
//........................................................................
} // namespace udlg
//........................................................................
#endif // SVTOOLS_ROADMAPSKELETONDIALOG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/*
* 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 .
*/
#include "udlg_global.hrc"
#include "roadmapskeleton.hrc"
// -----------------------------------------------------------------------------
ModalDialog DLG_ROADMAP_SKELETON
{
HelpID = "svtools:ModalDialog:DLG_ROADMAP_SKELETON";
OutputSize = TRUE ;
Moveable = TRUE;
Closeable = TRUE ;
Hide = TRUE;
Text[ en-US ] = "Roadmap Skeleton Demo" ;
String STR_STATE_WELCOME
{
Text [ en-US ] = "Welcome";
};
String STR_STATE_PREPARE
{
Text [ en-US ] = "Prepare";
};
String STR_STATE_SETUP
{
Text [ en-US ] = "Setup";
};
String STR_STATE_FINISH
{
Text [ en-US ] = "Finish";
};
};
TabPage TP_WELCOME
{
HelpID = "svtools:TabPage:TP_WELCOME";
Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT );
Hide = TRUE;
};
TabPage TP_PREPARE
{
HelpID = "svtools:TabPage:TP_PREPARE";
Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT );
Hide = TRUE;
};
TabPage TP_SETUP
{
HelpID = "svtools:TabPage:TP_SETUP";
Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT );
Hide = TRUE;
};
TabPage TP_FINISH
{
HelpID = "svtools:TabPage:TP_FINISH";
Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT );
Hide = TRUE;
};
/* -*- 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 .
*/
#include "udlg_module.hxx"
#include "udlg_global.hrc"
#include "roadmapskeletonpages.hxx"
#include "roadmapskeleton.hxx"
//........................................................................
namespace udlg
{
//........................................................................
//====================================================================
//= RoadmapSkeletonPage
//====================================================================
//--------------------------------------------------------------------
RoadmapSkeletonPage::RoadmapSkeletonPage( RoadmapSkeletonDialog& _rParentDialog, const ResId& _rRes )
:RoadmapSkeletonPage_Base( &_rParentDialog, _rRes )
{
}
//--------------------------------------------------------------------
RoadmapSkeletonPage::~RoadmapSkeletonPage()
{
}
//====================================================================
//= WelcomePage
//====================================================================
//--------------------------------------------------------------------
WelcomePage::WelcomePage( RoadmapSkeletonDialog& _rParentDialog )
:RoadmapSkeletonPage( _rParentDialog, UdlgResId( TP_WELCOME ) )
{
}
//--------------------------------------------------------------------
TabPage* WelcomePage::Create( ::svt::RoadmapWizard& _rParentDialog )
{
return new WelcomePage( dynamic_cast< RoadmapSkeletonDialog& >( _rParentDialog ) );
}
//====================================================================
//= PreparationPage
//====================================================================
//--------------------------------------------------------------------
PreparationPage::PreparationPage( RoadmapSkeletonDialog& _rParentDialog )
:RoadmapSkeletonPage( _rParentDialog, UdlgResId( TP_PREPARE ) )
{
}
//--------------------------------------------------------------------
TabPage* PreparationPage::Create( ::svt::RoadmapWizard& _rParentDialog )
{
return new PreparationPage( dynamic_cast< RoadmapSkeletonDialog& >( _rParentDialog ) );
}
//====================================================================
//= SetupPage
//====================================================================
//--------------------------------------------------------------------
SetupPage::SetupPage( RoadmapSkeletonDialog& _rParentDialog )
:RoadmapSkeletonPage( _rParentDialog, UdlgResId( TP_SETUP ) )
{
}
//--------------------------------------------------------------------
TabPage* SetupPage::Create( ::svt::RoadmapWizard& _rParentDialog )
{
return new SetupPage( dynamic_cast< RoadmapSkeletonDialog& >( _rParentDialog ) );
}
//====================================================================
//= FinishPage
//====================================================================
//--------------------------------------------------------------------
FinishPage::FinishPage( RoadmapSkeletonDialog& _rParentDialog )
:RoadmapSkeletonPage( _rParentDialog, UdlgResId( TP_FINISH ) )
{
}
//--------------------------------------------------------------------
TabPage* FinishPage::Create( ::svt::RoadmapWizard& _rParentDialog )
{
return new FinishPage( dynamic_cast< RoadmapSkeletonDialog& >( _rParentDialog ) );
}
//........................................................................
} // namespace udlg
//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 .
*/
#ifndef SVTOOLS_ROADMAPSKELETONPAGES_HXX
#define SVTOOLS_ROADMAPSKELETONPAGES_HXX
#include <svtools/wizardmachine.hxx>
namespace svt
{
class RoadmapWizard;
}
//........................................................................
namespace udlg
{
//........................................................................
class RoadmapSkeletonDialog;
//====================================================================
//= RoadmapSkeletonPage
//====================================================================
typedef ::svt::OWizardPage RoadmapSkeletonPage_Base;
class RoadmapSkeletonPage : public RoadmapSkeletonPage_Base
{
public:
RoadmapSkeletonPage( RoadmapSkeletonDialog& _rParentDialog, const ResId& _rRes );
~RoadmapSkeletonPage();
};
//====================================================================
//= WelcomePage
//====================================================================
class WelcomePage : public RoadmapSkeletonPage
{
public:
WelcomePage( RoadmapSkeletonDialog& _rParentDialog );
static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
};
//====================================================================
//= PreparationPage
//====================================================================
class PreparationPage : public RoadmapSkeletonPage
{
public:
PreparationPage( RoadmapSkeletonDialog& _rParentDialog );
static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
};
//====================================================================
//= SetupPage
//====================================================================
class SetupPage : public RoadmapSkeletonPage
{
public:
SetupPage( RoadmapSkeletonDialog& _rParentDialog );
static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
};
//====================================================================
//= FinishPage
//====================================================================
class FinishPage : public RoadmapSkeletonPage
{
public:
FinishPage( RoadmapSkeletonDialog& _rParentDialog );
static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
};
//........................................................................
} // namespace udlg
//........................................................................
#endif // SVTOOLS_ROADMAPSKELETONPAGES_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/*
* 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 .
*/
#ifndef SVTOOLS_UDLG_GLOBAL_HRC
#define SVTOOLS_UDLG_GLOBAL_HRC
#include <svl/solar.hrc>
//=====================================================================
//= bases
//=====================================================================
#define RID_UDLG_DIALOG_START RID_SVTOOLS_START + 0
#define RID_UDLG_TAPPAGE_START RID_SVTOOLS_START + 0
//=====================================================================
//= dialogs
//=====================================================================
#define DLG_ROADMAP_SKELETON RID_UDLG_DIALOG_START + 0
//=====================================================================
//= tab pages
//=====================================================================
#define TP_WELCOME ( RID_UDLG_TAPPAGE_START + 0 )
#define TP_PREPARE ( RID_UDLG_TAPPAGE_START + 1 )
#define TP_SETUP ( RID_UDLG_TAPPAGE_START + 2 )
#define TP_FINISH ( RID_UDLG_TAPPAGE_START + 3 )
#endif // SVTOOLS_UDLG_GLOBAL_HRC
/* -*- 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 .
*/
#include "udlg_module.hxx"
#include <rtl/instance.hxx>
//........................................................................
namespace udlg
{
//........................................................................
IMPLEMENT_MODULE( UdlgModule, "udlg" );
//........................................................................
} // namespace udlg
//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 .
*/
#ifndef SVTOOLS_WORKBEN_UNODIALOG_MODULE_HXX
#define SVTOOLS_WORKBEN_UNODIALOG_MODULE_HXX
#include <unotools/componentresmodule.hxx>
//........................................................................
namespace udlg
{
//........................................................................
DEFINE_MODULE( UdlgModule, UdlgClient, UdlgResId )
//........................................................................
} // namespace udlg
//........................................................................
#endif // SVTOOLS_WORKBEN_UNODIALOG_MODULE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "udlg_module.hxx"
//........................................................................
namespace udlg
{
//........................................................................
//--------------------------------------------------------------------
extern void createRegistryInfo_UnoDialogSkeleton();
static void initializeModule()
{
static bool bInitialized( false );
if ( !bInitialized )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !bInitialized )
{
createRegistryInfo_UnoDialogSkeleton();
}
}
}
//........................................................................
} // namespace udlg
//........................................................................
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey )
{
::udlg::initializeModule();
return ::udlg::UdlgModule::getInstance().getComponentFactory( pImplementationName, pServiceManager, pRegistryKey );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 .
*/
#include "udlg_module.hxx"
#include "roadmapskeleton.hxx"
#include <comphelper/componentcontext.hxx>
#include "svtools/genericunodialog.hxx"
//........................................................................
namespace udlg
{
//........................................................................
/** === begin UNO using === **/
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::uno::UNO_QUERY_THROW;
using ::com::sun::star::uno::UNO_SET_THROW;
using ::com::sun::star::uno::Exception;
using ::com::sun::star::uno::RuntimeException;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::beans::XPropertySetInfo;
using ::com::sun::star::beans::Property;
/** === end UNO using === **/
//====================================================================
//= UnoDialogSkeleton
//====================================================================
class UnoDialogSkeleton;
typedef ::svt::OGenericUnoDialog UnoDialogSkeleton_Base;
typedef ::comphelper::OPropertyArrayUsageHelper< UnoDialogSkeleton > UnoDialogSkeleton_PBase;
class UnoDialogSkeleton
:public UnoDialogSkeleton_Base
,public UnoDialogSkeleton_PBase
,public UdlgClient
{
public:
UnoDialogSkeleton( const Reference< XComponentContext >& _rxContext );
// XTypeProvider
virtual Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(RuntimeException);
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName() throw(RuntimeException);
virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
// XPropertySet
virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(RuntimeException);
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
// OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
// helper for factories
static Reference< XInterface > SAL_CALL Create( const Reference< XComponentContext >& _rxContext );
static ::rtl::OUString SAL_CALL getImplementationName_static() throw(RuntimeException);
static Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static() throw(RuntimeException);
protected:
~UnoDialogSkeleton();
protected:
virtual Dialog* createDialog( Window* _pParent );
virtual void destroyDialog();
private:
::comphelper::ComponentContext m_aContext;
};
//====================================================================
//= UnoDialogSkeleton
//====================================================================
//--------------------------------------------------------------------
UnoDialogSkeleton::UnoDialogSkeleton( const Reference< XComponentContext >& _rxContext )
:UnoDialogSkeleton_Base( _rxContext )
,m_aContext( _rxContext )
{
}
//--------------------------------------------------------------------
UnoDialogSkeleton::~UnoDialogSkeleton()
{
// we do this here cause the base class' call to destroyDialog won't reach us anymore : we're within an dtor,
// so this virtual-method-call the base class does does not work, we're already dead then ...
if ( m_pDialog )
{
::osl::MutexGuard aGuard( m_aMutex );
if ( m_pDialog )
destroyDialog();
}
}
//--------------------------------------------------------------------
Reference< XInterface > SAL_CALL UnoDialogSkeleton::Create( const Reference< XComponentContext >& _rxContext )
{
return *(new UnoDialogSkeleton( _rxContext ) );
}
//--------------------------------------------------------------------
Dialog* UnoDialogSkeleton::createDialog( Window* _pParent )
{
return new RoadmapSkeletonDialog( m_aContext, _pParent );
}
//--------------------------------------------------------------------
void UnoDialogSkeleton::destroyDialog()
{
UnoDialogSkeleton_Base::destroyDialog();
}
//--------------------------------------------------------------------
Sequence< sal_Int8 > SAL_CALL UnoDialogSkeleton::getImplementationId() throw(RuntimeException)
{
static ::cppu::OImplementationId* pId = NULL;
if ( !pId )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if ( !pId )
{
static ::cppu::OImplementationId aId;
pId = &aId;
}
}
return pId->getImplementationId();
}
//--------------------------------------------------------------------
::rtl::OUString SAL_CALL UnoDialogSkeleton::getImplementationName_static() throw(RuntimeException)
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.workben.UnoDialogSkeleton" ) );
}
//--------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL UnoDialogSkeleton::getSupportedServiceNames_static() throw(RuntimeException)
{
Sequence< ::rtl::OUString > aServices(1);
aServices[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.example.UnoDialogSample" ) );
return aServices;
}
//--------------------------------------------------------------------
::rtl::OUString SAL_CALL UnoDialogSkeleton::getImplementationName() throw(RuntimeException)
{
return getImplementationName_static();
}
//--------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL UnoDialogSkeleton::getSupportedServiceNames() throw(RuntimeException)
{
return getSupportedServiceNames_static();
}
//--------------------------------------------------------------------
Reference< XPropertySetInfo > SAL_CALL UnoDialogSkeleton::getPropertySetInfo() throw(RuntimeException)
{
return createPropertySetInfo( getInfoHelper() );
}
//--------------------------------------------------------------------
::cppu::IPropertyArrayHelper& SAL_CALL UnoDialogSkeleton::getInfoHelper()
{
return *const_cast< UnoDialogSkeleton* >( this )->getArrayHelper();
}
//--------------------------------------------------------------------
::cppu::IPropertyArrayHelper* UnoDialogSkeleton::createArrayHelper( ) const
{
Sequence< Property > aProps;
describeProperties( aProps );
return new ::cppu::OPropertyArrayHelper( aProps );
}
//--------------------------------------------------------------------
void createRegistryInfo_UnoDialogSkeleton()
{
static OAutoRegistration< UnoDialogSkeleton > aAutoRegistration;
}
//........................................................................
} // namespace udlg
//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment