summaryrefslogtreecommitdiff
path: root/l10ntools/inc/l10ntools/vosapp.hxx
blob: e8e97fb71feff3c66dd883ea4b8a95225a23abf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef VOSAPP_HXX
#define VOSAPP_HXX

#include <sal/main.h>
#include <tools/solar.h>
#include <tools/string.hxx>

// Mininmal vcl/svapp compatibility without vcl dependence
class Application
{
public:
    sal_uInt16 GetCommandLineParamCount();
    XubString GetCommandLineParam( sal_uInt16 nParam );
    virtual void Main() = 0;
};

// Urg: Cut & Paste from svapp.cxx: we don't want to depend on vcl
sal_uInt16 Application::GetCommandLineParamCount()
{
    return osl_getCommandArgCount();
}

XubString Application::GetCommandLineParam( sal_uInt16 nParam )
{
    rtl::OUString aParam;
    osl_getCommandArg( nParam, &aParam.pData );
    return XubString( aParam );
}

#endif /* VOSAPP_HXX */

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */