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

drop spadmin

Change-Id: Ie10ee80f1d35b40c0baf9d7ba5c1181b52405b5f
üst 52cc0c8f
......@@ -86,7 +86,6 @@ $(eval $(call gb_Helper_register_executables,OOO, \
$(if $(filter-out ANDROID IOS MACOSX WNT,$(OS)),oosplash) \
$(if $(ENABLE_NPAPI_FROM_BROWSER),pluginapp.bin) \
soffice_bin \
spadmin.bin \
$(if $(filter $(GUIBASE)$(ENABLE_GTK),unxTRUE), \
xid-fullscreen-on-all-monitors \
) \
......
......@@ -121,8 +121,6 @@ cd -
rm -rf $sysui_temp
# we do not want some stuff from the plain packages
rm -f $DESTDIR/$PREFIXDIR/bin/$INSTALLDIRNAME-printeradmin
rm -f $DESTDIR$PREFIXDIR/share/applications/libreoffice-printeradmin.desktop
if test -d $DESTDIR/opt ; then
rm -f $DESTDIR/opt/$INSTALLDIRNAME
rmdir --ignore-fail-on-non-empty $DESTDIR/opt
......
......@@ -343,7 +343,6 @@ if test "z$OOO_VENDOR" != "zDebian" ; then
program/pluginapp.bin \
program/setofficelang.bin \
program/soffice.bin \
program/spadmin.bin \
program/uno.bin \
program/unopkg.bin \
program/uri-encode
......
......@@ -14,7 +14,6 @@ $(eval $(call gb_Module_add_targets,extras,\
CustomTarget_glade \
Package_autocorr \
Package_autotextuser \
Package_cfgsrvbitmapunx \
Package_cfgsrvnolang \
Package_cfgusr \
Package_database \
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
#
$(eval $(call gb_Package_Package,extras_cfgsrvbitmapunx,$(SRCDIR)/extras/unx/source/bitmaps))
$(eval $(call gb_Package_add_files,extras_cfgsrvbitmapunx,$(LIBO_SHARE_FOLDER)/config,\
psetupl.xpm \
psetup.xpm \
))
# vim: set noet sw=4 ts=4:
/* XPM */
static char * L3PSetup_t_pm[] = {
/* width height ncolors cpp [x_hot y_hot] */
"16 16 9 1 0 0",
/* colors */
" s none m none c none",
". c #861782078617",
"X s iconColor1 m black c black",
"o c #000000008617",
"O s iconColor2 m white c white",
"+ c #C71BC30BC71B",
"@ s iconColor6 m white c yellow",
"# c #00000000FFFF",
"$ c #861700000000",
/* pixels */
" ",
" .. XXXXX o",
" ..OO+XO.OO@Xo",
" ..OOOOX@.@.OOOo",
"XXOOOOXOXO.O.@Oo",
" XOOX@XOX@.OXXo",
" XOOXOO+XXX o",
" XX+XOO..+++O+. ",
"X.++X..+++##++O.",
"X...++++$$++OOO.",
"X.....++++OO++O.",
"X.......OO++++..",
"XX......+++++.X.",
" XX....+++.XX ",
" XX..+.XX ",
" XXXX "};
/* XPM */
static char * L3PSetup_m_pm[] = {
/* width height ncolors cpp [x_hot y_hot] */
"32 32 11 1 0 0",
/* colors */
" s none m none c none",
". s iconColor1 m black c black",
"X c #000000008617",
"o c #861782078617",
"O s iconColor2 m white c white",
"+ c #C71BC30BC71B",
"@ s iconColor6 m white c yellow",
"# c #00000000FFFF",
"$ c #861782070000",
"% c #000082078617",
"& c #861700000000",
/* pixels */
" ",
" ........ XXXX",
" .o..oo.OOOOOOO+..X+OX",
" .+ooOO.@OO@OOOO@OOXOOX",
" .+oo+O.OO.OOOOOOOOOXXXX",
" .+oo+O.O@.OOO@OOOO@OXXXX",
" .+oo+O.@O.O@O.OO@OOOOXXXX",
" .+oo+O.OO.+.O.OOOOOOOOXXXX",
" .+oo+O.O@.+O+.O@O.OOO..X.X.",
" .+oo+O+...+O++o.O.OO@. .X. ",
" .+oo+O+O+O+O++++o.@O..o ... ",
" .ooo+O+O+O+O++++ooo.. ",
" .ooo+O+O+O+O++++o..+Oo ",
" .oo+O+O+O+O++++o....OO. ",
" ..+O+O+O+O++++o......OO. ",
" .o+OO+O+O++#+o....$o..OO. ",
" .oo+OO+O++%+o....$$$...Oo. ",
" .ooo+OO++&+o...$$$+$+...o. ",
" .oooo+O+++o...$$$+$+++..o. ",
" .oooooOO+o.o.$$++$+OoOO..o ",
" .ooooo+Oo..O.$++$OOoOO$O.o ",
"o.ooooooO.o.OO.+$OOoOOoOOO. ",
"oo.ooooo.O.O.OO.OOoOO$OOoOO. ",
" oo.oooo+O.OO.OO.OOOoOOoOO.o ",
" oo.ooo+O.oOo.Oo.O$OO$OO.o ",
" oo.oo+O.o+o.+o.OOOoOO.o ",
" oo.o+O.o+o.+o.OOoOO.o ",
" oo.+..o+o.+o..OOO.o ",
" oo.oo.+..+o.o.O.o ",
" ooooo.o.o.ooo.o ",
" oooo.o oo ",
" oo "};
......@@ -53,7 +53,6 @@ public:
bool HasGroup(const OString& rGroup) const;
OString ReadKey(const OString& rKey) const;
OUString ReadKey(const OString& rKey, rtl_TextEncoding eEncoding) const;
OString ReadKey(const OString& rKey, const OString& rDefault) const;
void WriteKey(const OString& rKey, const OString& rValue);
void DeleteKey(const OString& rKey);
......
......@@ -190,9 +190,7 @@ private:
static OUString getPPDFile( const OUString& rFile );
public:
static const PPDParser* getParser( const OUString& rFile );
static OUString getPPDPrinterName( const OUString& rFile );
static void freeAll();
static void getKnownPPDDrivers( std::list< OUString >& o_rDrivers, bool bRefresh = false );
const OUString& getFilename() const { return m_aFile; }
......
......@@ -28,7 +28,6 @@ $(eval $(call gb_AllLangResTarget_add_srs,spa,\
$(eval $(call gb_SrsTarget_SrsTarget,padmin/source))
$(eval $(call gb_SrsTarget_add_files,padmin/source,\
padmin/source/padialog.src \
padmin/source/rtsetup.src \
))
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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 .
#
$(eval $(call gb_Executable_Executable,spadmin.bin))
$(eval $(call gb_Executable_use_external,spadmin.bin,boost_headers))
$(eval $(call gb_Executable_use_static_libraries,spadmin.bin,\
vclmain \
))
$(eval $(call gb_Executable_use_sdk_api,spadmin.bin))
$(eval $(call gb_Executable_use_libraries,spadmin.bin,\
spa \
svt \
vcl \
utl \
ucbhelper \
comphelper \
tl \
cppuhelper \
cppu \
sal \
$(gb_UWINAPI) \
))
$(eval $(call gb_Executable_add_exception_objects,spadmin.bin,\
padmin/source/desktopcontext \
padmin/source/pamain \
))
ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS)))
$(eval $(call gb_Executable_add_libs,spadmin.bin,\
-lpthread \
))
endif
ifeq ($(OS),LINUX)
$(eval $(call gb_Executable_add_libs,spadmin.bin,\
-ldl \
))
endif
# vim: set noet sw=4 ts=4:
......@@ -45,14 +45,8 @@ $(eval $(call gb_Library_use_libraries,spa,\
))
$(eval $(call gb_Library_add_exception_objects,spa,\
padmin/source/adddlg \
padmin/source/cmddlg \
padmin/source/helper \
padmin/source/newppdlg \
padmin/source/padialog \
padmin/source/progress \
padmin/source/prtsetup \
padmin/source/titlectrl \
))
ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS)))
......
......@@ -23,9 +23,7 @@ $(eval $(call gb_Module_Module,padmin))
ifeq ($(GUIBASE),unx)
$(eval $(call gb_Module_add_targets,padmin,\
Executable_spadmin.bin \
Library_spa \
Package_padmin \
))
$(eval $(call gb_Module_add_l10n_targets,padmin,\
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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 .
#
$(eval $(call gb_Package_Package,padmin,$(SRCDIR)/padmin/source))
$(eval $(call gb_Package_add_file,padmin,$(LIBO_BIN_FOLDER)/spadmin,spadmin.sh))
# vim: set noet sw=4 ts=4:
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 .
*/
#ifndef _PAD_ADDDLG_HXX_
#define _PAD_ADDDLG_HXX_
#include "helper.hxx"
#include "titlectrl.hxx"
#include "vcl/dialog.hxx"
#include "vcl/tabpage.hxx"
#include "vcl/button.hxx"
#include "vcl/fixed.hxx"
#include "vcl/combobox.hxx"
#include "vcl/printerinfomanager.hxx"
namespace padmin
{
class AddPrinterDialog;
namespace DeviceKind { enum type { Printer, Pdf }; }
class APTabPage : public TabPage
{
OUString m_aTitle;
protected:
AddPrinterDialog* m_pParent;
public:
APTabPage( AddPrinterDialog* pParent, const ResId& rResId );
// returns false if information is incomplete or invalid
virtual bool check() = 0;
virtual void fill( ::psp::PrinterInfo& rInfo ) = 0;
const OUString& getTitle() const { return m_aTitle; }
};
class APChooseDevicePage : public APTabPage
{
RadioButton m_aPDFBtn;
FixedText m_aOverTxt;
public:
APChooseDevicePage( AddPrinterDialog* pParent );
~APChooseDevicePage();
virtual bool check();
virtual void fill( ::psp::PrinterInfo& rInfo );
};
class APChooseDriverPage : public APTabPage
{
FixedText m_aDriverTxt;
DelListBox m_aDriverBox;
PushButton m_aAddBtn;
PushButton m_aRemBtn;
OUString m_aRemStr;
OUString m_aLastPrinterName;
DECL_LINK( ClickBtnHdl, PushButton* );
DECL_LINK( DelPressedHdl, ListBox* );
void updateDrivers( bool bRefresh = false, const OUString& rSelectDriver = OUString( "SGENPRT" ) );
public:
APChooseDriverPage( AddPrinterDialog* pParent );
~APChooseDriverPage();
virtual bool check();
virtual void fill( ::psp::PrinterInfo& rInfo );
};
class APNamePage : public APTabPage
{
FixedText m_aNameTxt;
Edit m_aNameEdt;
CheckBox m_aDefaultBox;
public:
APNamePage( AddPrinterDialog* pParent, const OUString& rInitName, DeviceKind::type eKind );
~APNamePage();
bool isDefault() { return m_aDefaultBox.IsChecked(); }
void setText( const OUString& rText ) { m_aNameEdt.SetText( rText ); }
virtual bool check();
virtual void fill( ::psp::PrinterInfo& rInfo );
};
class APCommandPage : public APTabPage
{
FixedText m_aCommandTxt;
ComboBox m_aCommandBox;
PushButton m_aHelpBtn;
OUString m_aHelpTxt;
FixedText m_aPdfDirTxt;
Edit m_aPdfDirEdt;
PushButton m_aPdfDirBtn;
DeviceKind::type m_eKind;
DECL_LINK( ClickBtnHdl, PushButton* );
DECL_LINK( ModifyHdl, ComboBox* );
public:
APCommandPage( AddPrinterDialog* pParent, DeviceKind::type eKind );
~APCommandPage();
virtual bool check();
virtual void fill( ::psp::PrinterInfo& rInfo );
OUString getPdfDir() { return m_aPdfDirEdt.GetText(); }
};
class APOldPrinterPage : public APTabPage
{
FixedText m_aOldPrinterTxt;
MultiListBox m_aOldPrinterBox;
PushButton m_aSelectAllBtn;
::std::list< ::psp::PrinterInfo > m_aOldPrinters;
DECL_LINK( ClickBtnHdl, PushButton* );
public:
APOldPrinterPage( AddPrinterDialog* pParent );
~APOldPrinterPage();
virtual bool check();
virtual void fill( ::psp::PrinterInfo& rInfo );
void addOldPrinters();
};
class APPdfDriverPage : public APTabPage
{
FixedText m_aPdfTxt;
RadioButton m_aDefBtn;
RadioButton m_aDistBtn;
RadioButton m_aSelectBtn;
public:
APPdfDriverPage( AddPrinterDialog* pParent );
~APPdfDriverPage();
virtual bool check();
virtual void fill( ::psp::PrinterInfo& rInfo );
bool isDefault() { return m_aDefBtn.IsChecked(); }
bool isDist() { return m_aDistBtn.IsChecked(); }
};
class AddPrinterDialog : public ModalDialog
{
CancelButton m_aCancelPB;
PushButton m_aPrevPB;
PushButton m_aNextPB;
OKButton m_aFinishPB;
FixedLine m_aLine;
TitleImage m_aTitleImage;
::psp::PrinterInfo m_aPrinter;
APTabPage* m_pCurrentPage;
APCommandPage* m_pCommandPage;
APChooseDriverPage* m_pChooseDriverPage;
APNamePage* m_pNamePage;
APPdfDriverPage* m_pPdfDriverPage;
APChooseDriverPage* m_pPdfSelectDriverPage;
APNamePage* m_pPdfNamePage;
APCommandPage* m_pPdfCommandPage;
DECL_LINK( ClickBtnHdl, PushButton* );
void advance();
void back();
void addPrinter();
void updateSettings();
virtual void DataChanged( const DataChangedEvent& rEv );
public:
AddPrinterDialog( Window* pParent );
~AddPrinterDialog();
static OUString uniquePrinterName( const OUString& rString );
void enableNext( bool bEnable ) { m_aNextPB.Enable( bEnable ); }
};
} // namespace
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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 .
*/
#ifndef _PAD_COMMANDDLG_HXX_
#define _PAD_COMMANDDLG_HXX_
#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include <vcl/group.hxx>
#include <vcl/combobox.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/field.hxx>
#include <vcl/tabpage.hxx>
#include <list>
namespace padmin {
class RTSDialog;
class CommandStore
{
static void getStoredCommands( const char* pGroup, ::std::list< OUString >& rCommands );
static void getSystemPrintCommands( ::std::list< OUString >& rCommands );
static void getSystemPdfCommands( ::std::list< OUString >& rCommands );
static void setCommands( const char* pGroup, const ::std::list< OUString >& rCommands, const ::std::list< OUString >& rSysCommands );
public:
static void getPrintCommands( ::std::list< OUString >& rCommands );
static void getPdfCommands( ::std::list< OUString >& rCommands );
static void setPrintCommands( const ::std::list< OUString >& rCommands );
static void setPdfCommands( const ::std::list< OUString >& rCommands );
};
class RTSCommandPage : public TabPage
{
private:
RTSDialog* m_pParent;
ComboBox m_aCommandsCB;
CheckBox m_aExternalCB;
FixedText m_aQuickFT;
ComboBox m_aQuickCB;
FixedLine m_aCommandTitle;
FixedText m_aPrinterName;
FixedText m_aConnectedTo;
FixedLine m_aPrinterFL;
FixedText m_aConfigureText;
ListBox m_aConfigureBox;
sal_uInt16 m_nPrinterEntry;
sal_uInt16 m_nPdfEntry;
FixedText m_aPdfDirectoryText;
PushButton m_aPdfDirectoryButton;
Edit m_aPdfDirectoryEdit;
PushButton m_aHelpButton;
PushButton m_aRemovePB;
::std::list< OUString > m_aPrinterCommands;
::std::list< OUString > m_aPdfCommands;
OUString m_aPrinterHelp;
OUString m_aPdfHelp;
bool m_bWasPdf;
bool m_bWasExternalDialog;
DECL_LINK( DoubleClickHdl, ComboBox* );
DECL_LINK( ClickBtnHdl, Button* );
DECL_LINK( SelectHdl, Control* );
DECL_LINK( ModifyHdl, Edit* );
void ConnectCommand();
void UpdateCommands();
public:
RTSCommandPage( RTSDialog* );
~RTSCommandPage();
void save();
};
} // namespace
#endif
/* 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 "desktopcontext.hxx"
#include <vcl/svapp.hxx>
using namespace com::sun::star::uno;
namespace padmin
{
DesktopContext::DesktopContext( const Reference< XCurrentContext > & ctx )
: m_xNextContext( ctx )
{
}
Any SAL_CALL DesktopContext::getValueByName( const OUString& Name) throw (RuntimeException, std::exception)
{
Any retVal;
if ( Name.equalsAscii( DESKTOP_ENVIRONMENT_NAME ) )
{
retVal = makeAny( Application::GetDesktopEnvironment() );
}
else if( m_xNextContext.is() )
{
// Call next context in chain if found
retVal = m_xNextContext->getValueByName( Name );
}
return retVal;
}
}
/* 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 _PADMIN_DESKTOPCONTEXT_HXX_
#define _PADMIN_DESKTOPCONTEXT_HXX_
#include <cppuhelper/implbase1.hxx>
#include <uno/current_context.hxx>
#define DESKTOP_ENVIRONMENT_NAME "system.desktop-environment"
namespace padmin
{
class DesktopContext: public cppu::WeakImplHelper1< com::sun::star::uno::XCurrentContext >
{
public:
DesktopContext( const com::sun::star::uno::Reference< com::sun::star::uno::XCurrentContext > & ctx);
// XCurrentContext
virtual com::sun::star::uno::Any SAL_CALL getValueByName( const OUString& Name )
throw (com::sun::star::uno::RuntimeException, std::exception);
private:
com::sun::star::uno::Reference< com::sun::star::uno::XCurrentContext > m_xNextContext;
};
}
#endif // _PADMIN_DESKTOPCONTEXT_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -19,7 +19,6 @@
#include <unistd.h>
#include <helper.hxx>
#include <padialog.hrc>
#include <osl/file.hxx>
#include <tools/urlobj.hxx>
#include <vcl/svapp.hxx>
......@@ -76,111 +75,9 @@ ResId padmin::PaResId( sal_uInt32 nId )
return ResId( nId, *pPaResMgr );
}
/*
* FindFiles
*/
void padmin::FindFiles( const OUString& rDirectory, ::std::list< OUString >& rResult, const OUString& rSuffixes, bool bRecursive )
{
rResult.clear();
OUString aDirPath;
::osl::FileBase::getFileURLFromSystemPath( rDirectory, aDirPath );
Directory aDir( aDirPath );
if( aDir.open() != FileBase::E_None )
return;
DirectoryItem aItem;
while( aDir.getNextItem( aItem ) == FileBase::E_None )
{
FileStatus aStatus( osl_FileStatus_Mask_FileName |
osl_FileStatus_Mask_Type
);
if( aItem.getFileStatus( aStatus ) == FileBase::E_None )
{
if( aStatus.getFileType() == FileStatus::Regular ||
aStatus.getFileType() == FileStatus::Link )
{
OUString aFileName = aStatus.getFileName();
int nToken = comphelper::string::getTokenCount(rSuffixes, ';');
while( nToken-- )
{
OUString aSuffix = rSuffixes.getToken( nToken, ';' );
if( aFileName.getLength() > aSuffix.getLength()+1 )
{
OUString aExtension = aFileName.copy( aFileName.getLength()-aSuffix.getLength() );
if( aFileName[ aFileName.getLength()-aSuffix.getLength()-1 ] == '.' &&
aExtension.equalsIgnoreAsciiCase( aSuffix ) )
{
rResult.push_back( aFileName );
break;
}
}
}
}
else if( bRecursive && aStatus.getFileType() == FileStatus::Directory )
{
OUStringBuffer aSubDir( rDirectory );
aSubDir.appendAscii( "/", 1 );
aSubDir.append( aStatus.getFileName() );
std::list< OUString > subfiles;
FindFiles( aSubDir.makeStringAndClear(), subfiles, rSuffixes, bRecursive );
for( std::list< OUString >::const_iterator it = subfiles.begin(); it != subfiles.end(); ++it )
{
OUStringBuffer aSubFile( aStatus.getFileName() );
aSubFile.appendAscii( "/", 1 );
aSubFile.append( *it );
rResult.push_back( aSubFile.makeStringAndClear() );
}
}
}
}
aDir.close();
}
/*
* DelMultiListBox
*/
bool DelMultiListBox::Notify( NotifyEvent& rEvent )
{
bool nRet = false;
if( rEvent.GetType() == EVENT_KEYINPUT &&
rEvent.GetKeyEvent()->GetKeyCode().GetCode() == KEY_DELETE )
{
m_aDelPressedLink.Call( this );
nRet = true;
}
else
nRet = MultiListBox::Notify( rEvent );
return nRet;
}
/*
* DelListBox
*/
bool DelListBox::Notify( NotifyEvent& rEvent )
{
bool nRet = false;
if( rEvent.GetType() == EVENT_KEYINPUT &&
rEvent.GetKeyEvent()->GetKeyCode().GetCode() == KEY_DELETE )
{
m_aDelPressedLink.Call( this );
nRet = true;
}
else
nRet = ListBox::Notify( rEvent );
return nRet;
}
/*
* QueryString
*/
QueryString::QueryString(Window* pParent, OUString& rQuery, OUString& rRet)
: ModalDialog(pParent, "QueryDialog",
"spa/ui/querydialog.ui" )
......@@ -212,81 +109,4 @@ IMPL_LINK( QueryString, ClickBtnHdl, Button*, pButton )
return 0;
}
/*
* AreYouSure
*/
sal_Bool padmin::AreYouSure( Window* pParent, int nRid )
{
if( nRid == -1 )
nRid = RID_YOU_SURE;
QueryBox aQueryBox( pParent, WB_YES_NO | WB_DEF_NO,
OUString( PaResId( nRid ) ) );
return aQueryBox.Execute() == RET_NO ? sal_False : sal_True;
}
/*
* getPadminRC
*/
static Config* pRC = NULL;
Config& padmin::getPadminRC()
{
if( ! pRC )
{
static const char* pEnv = getenv( "HOME" );
OUString aFileName;
if( pEnv )
aFileName = OUString::createFromAscii( pEnv ) + "/.padminrc";
else
aFileName += OStringToOUString( "", osl_getThreadTextEncoding() ) + "/.padminrc";
pRC = new Config( aFileName );
}
return *pRC;
}
void padmin::freePadminRC()
{
if( pRC )
delete pRC, pRC = NULL;
}
bool padmin::chooseDirectory( OUString& rInOutPath )
{
bool bRet = false;
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference< XFolderPicker2 > xFolderPicker = FolderPicker::create(xContext);;
Reference< XControlAccess > xCA( xFolderPicker, UNO_QUERY );
if( xCA.is() )
{
try
{
Any aState;
aState <<= sal_False;
xCA->setControlProperty( OUString( "HelpButton" ),
OUString( "Visible" ),
aState );
}
catch( ... )
{
}
}
INetURLObject aObj( rInOutPath, INET_PROT_FILE, INetURLObject::ENCODE_ALL );
xFolderPicker->setDisplayDirectory( aObj.GetMainURL(INetURLObject::DECODE_TO_IURI) );
if( xFolderPicker->execute() == ExecutableDialogResults::OK )
{
aObj = INetURLObject( xFolderPicker->getDirectory() );
rInOutPath = aObj.PathToFileName();
bRet = true;
}
#if OSL_DEBUG_LEVEL > 1
else
fprintf( stderr, "could not get FolderPicker service\n" );
#endif
return bRet;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -36,49 +36,8 @@
#define SPA_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
class Config;
namespace padmin
{
class DelMultiListBox : public MultiListBox
{
Link m_aDelPressedLink;
public:
DelMultiListBox( Window* pParent, const ResId& rResId ) :
MultiListBox( pParent, rResId ) {}
~DelMultiListBox() {}
virtual bool Notify( NotifyEvent& rEvent );
Link setDelPressedLink( const Link& rLink )
{
Link aOldLink( m_aDelPressedLink );
m_aDelPressedLink = rLink;
return aOldLink;
}
const Link& getDelPressedLink() const { return m_aDelPressedLink; }
};
class DelListBox : public ListBox
{
Link m_aDelPressedLink;
public:
DelListBox( Window* pParent, const ResId& rResId ) :
ListBox( pParent, rResId ) {}
~DelListBox() {}
virtual bool Notify( NotifyEvent& rEvent );
Link setDelPressedLink( const Link& rLink )
{
Link aOldLink( m_aDelPressedLink );
m_aDelPressedLink = rLink;
return aOldLink;
}
const Link& getDelPressedLink() const { return m_aDelPressedLink; }
};
class QueryString : public ModalDialog
{
private:
......@@ -95,16 +54,8 @@ public:
~QueryString();
};
sal_Bool AreYouSure( Window*, int nRid = -1 );
ResId PaResId( sal_uInt32 nId );
void FindFiles( const OUString& rDirectory, ::std::list< OUString >& rResult, const OUString& rSuffixes, bool bRecursive = false );
Config& getPadminRC();
void freePadminRC();
bool chooseDirectory( OUString& rInOutPath );
} // namespace padmin
#endif
......
/* -*- 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 <stdio.h>
#include <unistd.h>
#include "helper.hxx"
#include "padialog.hrc"
#include "newppdlg.hxx"
#include "padialog.hxx"
#include "progress.hxx"
#include "vcl/ppdparser.hxx"
#include "vcl/helper.hxx"
#include "vcl/svapp.hxx"
#include "vcl/mnemonic.hxx"
#include "tools/config.hxx"
#include "tools/urlobj.hxx"
#include "osl/file.hxx"
#include <list>
#define PPDIMPORT_GROUP "PPDImport"
using namespace padmin;
using namespace psp;
using namespace osl;
PPDImportDialog::PPDImportDialog( Window* pParent ) :
ModalDialog( pParent, PaResId( RID_PPDIMPORT_DLG ) ),
m_aOKBtn( this, PaResId( RID_PPDIMP_BTN_OK ) ),
m_aCancelBtn( this, PaResId( RID_PPDIMP_BTN_CANCEL ) ),
m_aPathTxt( this, PaResId( RID_PPDIMP_TXT_PATH ) ),
m_aPathBox( this, PaResId( RID_PPDIMP_LB_PATH ) ),
m_aSearchBtn( this, PaResId( RID_PPDIMP_BTN_SEARCH ) ),
m_aDriverTxt( this, PaResId( RID_PPDIMP_TXT_DRIVER ) ),
m_aDriverLB( this, PaResId( RID_PPDIMP_LB_DRIVER ) ),
m_aPathGroup( this, PaResId( RID_PPDIMP_GROUP_PATH ) ),
m_aDriverGroup( this, PaResId( RID_PPDIMP_GROUP_DRIVER ) ),
m_aLoadingPPD( PaResId( RID_PPDIMP_STR_LOADINGPPD ) )
{
FreeResource();
OUString aText( m_aDriverTxt.GetText() );
aText = aText.replaceFirst( "%s", Button::GetStandardText( BUTTON_OK ) );
m_aDriverTxt.SetText( MnemonicGenerator::EraseAllMnemonicChars( aText ) );
Config& rConfig = getPadminRC();
rConfig.SetGroup( PPDIMPORT_GROUP );
m_aPathBox.SetText( OStringToOUString(rConfig.ReadKey("LastDir"), RTL_TEXTENCODING_UTF8) );
for (sal_Int32 i = 0; i < 11; ++i)
{
OString aEntry(rConfig.ReadKey(OString::number(i)));
if (!aEntry.isEmpty())
m_aPathBox.InsertEntry(OStringToOUString(aEntry, RTL_TEXTENCODING_UTF8));
}
m_aOKBtn.SetClickHdl( LINK( this, PPDImportDialog, ClickBtnHdl ) );
m_aCancelBtn.SetClickHdl( LINK( this, PPDImportDialog, ClickBtnHdl ) );
m_aSearchBtn.SetClickHdl( LINK( this, PPDImportDialog, ClickBtnHdl ) );
m_aPathBox.SetSelectHdl( LINK( this, PPDImportDialog, SelectHdl ) );
m_aPathBox.SetModifyHdl( LINK( this, PPDImportDialog, ModifyHdl ) );
if( !m_aPathBox.GetText().isEmpty() )
Import();
}
PPDImportDialog::~PPDImportDialog()
{
while( m_aDriverLB.GetEntryCount() )
{
delete (OUString*)m_aDriverLB.GetEntryData( 0 );
m_aDriverLB.RemoveEntry( 0 );
}
}
void PPDImportDialog::Import()
{
OUString aImportPath( m_aPathBox.GetText() );
Config& rConfig = getPadminRC();
rConfig.SetGroup( PPDIMPORT_GROUP );
rConfig.WriteKey( "LastDir", OUStringToOString(aImportPath, RTL_TEXTENCODING_UTF8) );
int nEntries = m_aPathBox.GetEntryCount();
while( nEntries-- )
if( aImportPath == m_aPathBox.GetEntry( nEntries ) )
break;
if( nEntries < 0 )
{
sal_Int32 nNextEntry = rConfig.ReadKey("NextEntry").toInt32();
rConfig.WriteKey( OString::number(nNextEntry), OUStringToOString(aImportPath, RTL_TEXTENCODING_UTF8) );
nNextEntry = nNextEntry < 10 ? nNextEntry+1 : 0;
rConfig.WriteKey( "NextEntry", OString::number(nNextEntry) );
m_aPathBox.InsertEntry( aImportPath );
}
while( m_aDriverLB.GetEntryCount() )
{
delete (OUString*)m_aDriverLB.GetEntryData( 0 );
m_aDriverLB.RemoveEntry( 0 );
}
ProgressDialog aProgress( Application::GetFocusWindow() );
aProgress.startOperation( m_aLoadingPPD );
::std::list< OUString > aFiles;
FindFiles( aImportPath, aFiles, OUString( "PS;PPD;PS.GZ;PPD.GZ" ), true );
int i = 0;
aProgress.setRange( 0, aFiles.size() );
while( !aFiles.empty() )
{
aProgress.setValue( ++i );
aProgress.setFilename( aFiles.front() );
INetURLObject aPath( aImportPath, INET_PROT_FILE, INetURLObject::ENCODE_ALL );
aPath.Append( aFiles.front() );
OUString aPrinterName = PPDParser::getPPDPrinterName( aPath.PathToFileName() );
aFiles.pop_front();
if( aPrinterName.isEmpty() )
{
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "Warning: File %s has empty printer name.\n",
OUStringToOString( aPath.PathToFileName(), osl_getThreadTextEncoding() ).getStr() );
#endif
continue;
}
sal_uInt16 nPos = m_aDriverLB.InsertEntry( aPrinterName );
m_aDriverLB.SetEntryData( nPos, new OUString( aPath.PathToFileName() ) );
}
}
IMPL_LINK( PPDImportDialog, ClickBtnHdl, PushButton*, pButton )
{
if( pButton == &m_aCancelBtn )
{
EndDialog( 0 );
}
else if( pButton == &m_aOKBtn )
{
// copy the files
::std::list< OUString > aToDirs;
psp::getPrinterPathList( aToDirs, PRINTER_PPDDIR );
::std::list< OUString >::iterator writeDir = aToDirs.begin();
m_aImportedFiles.clear();
for( int i = 0; i < m_aDriverLB.GetSelectEntryCount(); i++ )
{
INetURLObject aFile( *(OUString*)m_aDriverLB.GetEntryData(
m_aDriverLB.GetSelectEntryPos( i )
), INET_PROT_FILE, INetURLObject::ENCODE_ALL );
OUString aFromUni( aFile.GetMainURL(INetURLObject::DECODE_TO_IURI) );
do
{
INetURLObject aToFile( *writeDir, INET_PROT_FILE, INetURLObject::ENCODE_ALL );
aToFile.Append( aFile.GetName() );
OUString aToUni( aToFile.GetMainURL(INetURLObject::DECODE_TO_IURI) );
if( ! File::copy( aFromUni, aToUni ) )
{
m_aImportedFiles.push_back( aToUni );
break;
}
++writeDir;
} while( writeDir != aToDirs.end() );
}
EndDialog( 1 );
}
else if( pButton == &m_aSearchBtn )
{
OUString aPath( m_aPathBox.GetText() );
if( chooseDirectory( aPath ) )
{
m_aPathBox.SetText( aPath );
Import();
}
}
return 0;
}
IMPL_LINK( PPDImportDialog, SelectHdl, ComboBox*, pListBox )
{
if( pListBox == &m_aPathBox )
{
Import();
}
return 0;
}
IMPL_LINK( PPDImportDialog, ModifyHdl, ComboBox*, pListBox )
{
if( pListBox == &m_aPathBox )
{
OString aDir(OUStringToOString(m_aPathBox.GetText(), osl_getThreadTextEncoding()));
if (!access( aDir.getStr(), F_OK))
Import();
}
return 0;
}
/* 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 _PAD_NEWPPDLG_HXX_
#define _PAD_NEWPPDLG_HXX_
#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
#include <vcl/combobox.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/fixed.hxx>
#include <vcl/group.hxx>
namespace psp { class PPDParser; }
namespace padmin {
class PPDImportDialog : public ModalDialog
{
OKButton m_aOKBtn;
CancelButton m_aCancelBtn;
FixedText m_aPathTxt;
ComboBox m_aPathBox;
PushButton m_aSearchBtn;
FixedText m_aDriverTxt;
MultiListBox m_aDriverLB;
FixedLine m_aPathGroup;
FixedLine m_aDriverGroup;
OUString m_aLoadingPPD;
DECL_LINK( ClickBtnHdl, PushButton* );
DECL_LINK( SelectHdl, ComboBox* );
DECL_LINK( ModifyHdl, ComboBox* );
void Import();
std::list< OUString > m_aImportedFiles;
public:
PPDImportDialog( Window* pParent );
~PPDImportDialog();
const std::list< OUString >& getImportedFiles() const
{ return m_aImportedFiles; }
};
} // namespace
#endif // _NEWPPDLG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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 .
*/
#ifndef _PAD_PADIALOG_HRC_
#define _PAD_PADIALOG_HRC_
#define RID_PADIALOG 1000
#define RID_PA_BTN_CANCEL 1
#define RID_PA_BTN_STD 2
#define RID_PA_BTN_DEL 3
#define RID_PA_LB_DEV 4
#define RID_PA_FL_PRINTERS 5
#define RID_PA_BTN_CONF 6
#define RID_PA_BTN_RENAME 7
#define RID_PA_TESTPAGE 8
#define RID_PA_TXT_DRIVER 10
#define RID_PA_TXT_DRIVER_STRING 11
#define RID_PA_TXT_LOCATION 12
#define RID_PA_TXT_LOCATION_STRING 13
#define RID_PA_TXT_COMMAND 14
#define RID_PA_TXT_COMMAND_STRING 15
#define RID_PA_TXT_COMMENT 16
#define RID_PA_TXT_COMMENT_STRING 17
#define RID_PA_STR_DEFPRT 18
#define RID_PA_BTN_ADD 19
#define RID_PA_STR_RENAME 21
#define RID_PA_FL_SEPBUTTON 22
#define RID_PPDIMPORT_DLG 1004
#define RID_PPDIMP_BTN_OK 1
#define RID_PPDIMP_BTN_CANCEL 2
#define RID_PPDIMP_BTN_SEARCH 3
#define RID_PPDIMP_TXT_DRIVER 4
#define RID_PPDIMP_LB_DRIVER 5
#define RID_PPDIMP_LB_PATH 6
#define RID_PPDIMP_GROUP_PATH 7
#define RID_PPDIMP_GROUP_DRIVER 8
#define RID_PPDIMP_TXT_PATH 9
#define RID_PPDIMP_STR_LOADINGPPD 10
#define RID_PA_TXT_TESTPAGE_PRINTED 1005
#define RID_ERR_PRINTERNOTREMOVABLE 1006
#define RID_ERR_NOWRITE 1009
#define RID_ERR_NOPRINTER 1013
#define RID_QRY_PRTNAME 1022
#define RID_BXT_TESTPAGE 1034
#define RID_BXT_ENVIRONMENT 1035
#define RID_YOU_SURE 1040
#define RID_ERR_REMOVEDRIVERFAILED 1041
#define RID_BUTTERFLY 1047
#define RID_ERR_REMOVESGENPRT 1051
#define RID_QUERY_REMOVEDRIVER 1058
#define RID_QUERY_REMOVEPRINTER 1059
#define RID_QUERY_DRIVERUSED 1062
#define RID_ERR_REMOVEDEFAULTDRIVER 1063
#define RID_TXT_TESTPAGE_MODEL 1068
#define RID_TXT_TESTPAGE_QUEUE 1069
#define RID_TXT_TESTPAGE_DATE 1070
#define RID_TXT_TESTPAGE_TIME 1071
#define RID_TXT_PRINTERALREADYEXISTS 1072
#define RID_TXT_TESTPAGE_COMMENT 1076
#define RID_TXT_TESTPAGE_NAME 1077
#define RID_BMP_SMALL_PRINTER 1096
#define RID_BMP_SMALL_PDF 1100
#define RID_BMP_PRINTER 1102
#define RID_PROGRESS_DLG 1400
#define RID_PROGRESS_BTN_CANCEL 1
#define RID_PROGRESS_OPERATION_TXT 2
#define RID_PROGRESS_PROGRESS_TXT 3
#define RID_PROGRESS_STATUSBAR 5
#define RID_PROGRESS_FILENAME_TXT 6
#define RID_ADD_PRINTER_DIALOG 2000
#define RID_ADDP_BTN_FINISH 1
#define RID_ADDP_BTN_CANCEL 2
#define RID_ADDP_BTN_NEXT 3
#define RID_ADDP_BTN_PREV 4
#define RID_ADDP_LINE 5
#define RID_ADDP_CTRL_TITLE 6
#define RID_ADDP_STR_TITLE 127
#define RID_ADDP_PAGE_CHOOSEDRIVER 2002
#define RID_ADDP_CHDRV_TXT_DRIVER 1
#define RID_ADDP_CHDRV_BOX_DRIVER 2
#define RID_ADDP_CHDRV_BTN_ADD 3
#define RID_ADDP_CHDRV_BTN_REMOVE 4
#define RID_ADDP_CHDRV_STR_REMOVE 5
#define RID_ADDP_PAGE_NAME 2003
#define RID_ADDP_NAME_TXT_NAME 1
#define RID_ADDP_NAME_TXT_PDFNAME 3
#define RID_ADDP_NAME_EDT_NAME 4
#define RID_ADDP_NAME_EDT_PDFNAME 6
#define RID_ADDP_NAME_BOX_DEFAULT 7
#define RID_ADDP_PAGE_COMMAND 2004
#define RID_ADDP_CMD_TXT_COMMAND 1
#define RID_ADDP_CMD_BOX_COMMAND 2
#define RID_ADDP_CMD_BTN_HELP 3
#define RID_ADDP_CMD_STR_PDFHELP 5
#define RID_ADDP_CMD_TXT_PDFDIR 6
#define RID_ADDP_CMD_EDT_PDFDIR 7
#define RID_ADDP_CMD_BTN_PDFDIR 8
#define RID_ADDP_CMD_BOX_PDFCOMMAND 9
#define RID_ADDP_PAGE_PDFDRIVER 2007
#define RID_ADDP_PDFDRV_TXT_DRIVER 1
#define RID_ADDP_PDFDRV_BTN_DEFAULT 2
#define RID_ADDP_PDFDRV_BTN_DIST 3
#define RID_ADDP_PDFDRV_BTN_SELECT 4
#endif
/* 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 _PAD_PADIALOG_HXX_
#define _PAD_PADIALOG_HXX_
#include <list>
#include <rtl/ustring.hxx>
#include <vcl/dialog.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include <vcl/group.hxx>
#include <vcl/edit.hxx>
#include <helper.hxx>
// forward declaration
namespace psp { class PrinterInfoManager; }
namespace padmin {
class SPA_DLLPUBLIC PADialog : public ModalDialog
{
private:
DelListBox m_aDevicesLB;
PushButton m_aConfPB;
PushButton m_aRenamePB;
PushButton m_aStdPB;
PushButton m_aRemPB;
PushButton m_aTestPagePB;
FixedLine m_aPrintersFL;
FixedText m_aDriverTxt;
FixedText m_aDriver;
FixedText m_aLocationTxt;
FixedText m_aLocation;
FixedText m_aCommandTxt;
FixedText m_aCommand;
FixedText m_aCommentTxt;
FixedText m_aComment;
FixedLine m_aSepButtonFL;
PushButton m_aAddPB;
CancelButton m_aCancelButton;
OUString m_aDefPrt;
OUString m_aRenameStr;
::psp::PrinterInfoManager& m_rPIManager;
::std::list< OUString > m_aPrinters;
Image m_aPrinterImg;
Image m_aPdfImg;
DECL_LINK( ClickBtnHdl, PushButton* );
DECL_LINK( DoubleClickHdl, ListBox* );
DECL_LINK( SelectHdl, ListBox* );
DECL_LINK( DelPressedHdl, ListBox* );
PADialog( Window*, sal_Bool );
void Init();
void UpdateDefPrt();
void UpdateText();
void UpdateDevice();
void AddDevice();
void RemDevice();
void ConfigureDevice();
void RenameDevice();
void PrintTestPage();
void updateSettings();
virtual bool Notify( NotifyEvent& rEv );
virtual void DataChanged( const DataChangedEvent& rEv );
OUString getSelectedDevice();
public:
~PADialog();
static PADialog* Create( Window*, sal_Bool );
};
} // namespace
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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 <stdio.h>
#include <unistd.h>
#include "vcl/svapp.hxx"
#include "vcl/vclmain.hxx"
#include "vcl/wrkwin.hxx"
#include "vcl/unowrap.hxx"
#include <vcl/settings.hxx>
#include "padialog.hxx"
#include "helper.hxx"
#include "desktopcontext.hxx"
#include "cppuhelper/bootstrap.hxx"
#include "comphelper/processfactory.hxx"
#include "unotools/configmgr.hxx"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/lang/XComponent.hpp"
#include "com/sun/star/ucb/UniversalContentBroker.hpp"
using namespace padmin;
using namespace cppu;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace comphelper;
class MyApp : public Application
{
public:
int Main();
virtual sal_uInt16 Exception( sal_uInt16 nError );
static OUString ReadStringHook( const OUString& );
private:
virtual void Init() SAL_OVERRIDE;
Reference< XComponentContext > xCtx_;
};
void vclmain::createApplication()
{
static MyApp aMyApp;
}
OUString MyApp::ReadStringHook( const OUString& rStr )
{
return rStr.replaceAll(
OUString("%PRODUCTNAME"), utl::ConfigManager::getProductName() );
};
sal_uInt16 MyApp::Exception( sal_uInt16 nError )
{
switch( nError & EXC_MAJORTYPE )
{
case EXC_RSCNOTLOADED:
Abort( OUString( "Error: could not load language resources.\nPlease check your installation.\n" ) );
break;
}
return 0;
}
int MyApp::Main()
{
PADialog* pPADialog;
EnableAutoHelpId();
// Detect desktop environment - need to do this as early as possible
com::sun::star::uno::setCurrentContext(
new DesktopContext( com::sun::star::uno::getCurrentContext() ) );
// Create UCB (for backwards compatibility, in case some code still uses
// plain createInstance w/o args directly to obtain an instance):
com::sun::star::ucb::UniversalContentBroker::create(xCtx_);
/*
* Initialize the MSAA UNO AccessBridge if accessibility is turned on
*/
if( Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() )
{
if( !InitAccessBridge() )
return EXIT_FAILURE;
}
ResMgr::SetReadStringHook( MyApp::ReadStringHook );
pPADialog = PADialog::Create( NULL , sal_False );
Application::SetDisplayName( pPADialog->GetText() );
pPADialog->SetIcon(501);
pPADialog->Execute();
delete pPADialog;
/*
* clean up UNO
*/
try
{
Reference<XComponent> xComp(xCtx_, UNO_QUERY_THROW);
xComp->dispose();
}
catch(...)
{
}
return EXIT_SUCCESS;
}
void MyApp::Init()
{
// create the global service-manager
Reference< XMultiServiceFactory > xFactory;
try
{
xCtx_ = defaultBootstrap_InitialComponentContext();
xFactory = Reference< XMultiServiceFactory >( xCtx_->getServiceManager(), UNO_QUERY );
if( xFactory.is() )
setProcessServiceFactory( xFactory );
}
catch( const com::sun::star::uno::Exception& )
{
}
if( ! xFactory.is() )
{
fprintf( stderr, "Could not bootstrap UNO, installation must be in disorder. Exiting.\n" );
exit( 1 );
}
}
/* 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 <ctype.h>
#include <stdio.h>
#include <rtl/ustring.hxx>
#include <tools/stream.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/svapp.hxx>
#include <progress.hxx>
#include <helper.hxx>
#include <padialog.hrc>
using namespace padmin;
ProgressDialog::ProgressDialog( Window* pParent,
sal_Bool bCancelable,
int nMin, int nMax ) :
ModelessDialog( pParent, PaResId( RID_PROGRESS_DLG ) ),
maOperation( this, PaResId( RID_PROGRESS_OPERATION_TXT ) ),
maFilename( this, PaResId( RID_PROGRESS_FILENAME_TXT ) ),
maProgressTxt( this, PaResId( RID_PROGRESS_PROGRESS_TXT ) ),
maCancelButton( this, PaResId( RID_PROGRESS_BTN_CANCEL ) ),
maProgressBar( this, PaResId( RID_PROGRESS_STATUSBAR ) ),
mnMax( nMax ),
mnMin( nMin ),
mbCanceled( false )
{
maFilename.SetStyle( maFilename.GetStyle() | WB_PATHELLIPSIS );
if( ! bCancelable )
{
Point aPos = maProgressBar.GetPosPixel();
Size aSize = maProgressBar.GetSizePixel();
Size aMySize = GetOutputSizePixel();
aMySize.Height() = aPos.Y() + aSize.Height() + 5;
SetOutputSizePixel( aMySize );
}
else
maCancelButton.SetClickHdl( LINK( this, ProgressDialog, ClickBtnHdl ) );
FreeResource();
}
ProgressDialog::~ProgressDialog()
{
}
void ProgressDialog::startOperation( const OUString& rOperation )
{
maOperation.SetText( rOperation );
maProgressBar.SetValue( 0 );
mbCanceled = false;
if( ! IsVisible() )
Show( true );
}
void ProgressDialog::setValue( int nValue )
{
maProgressBar.SetValue( nValue * 100 / ( mnMax - mnMin ) );
Application::Reschedule();
}
void ProgressDialog::setFilename( const OUString& rFilename )
{
maFilename.SetText( rFilename );
maFilename.Update();
Flush();
}
IMPL_LINK( ProgressDialog, ClickBtnHdl, Button*, pButton )
{
if( pButton == &maCancelButton )
{
mbCanceled = true;
}
return 0;
}
/* 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 _PAD_PROGRESS_HXX_
#define _PAD_PROGRESS_HXX_
#include "vcl/dialog.hxx"
#include "vcl/fixed.hxx"
#include "vcl/button.hxx"
#include "vcl/prgsbar.hxx"
namespace padmin {
class ProgressDialog : public ModelessDialog
{
FixedText maOperation;
FixedText maFilename;
FixedText maProgressTxt;
CancelButton maCancelButton;
ProgressBar maProgressBar;
int mnMax, mnMin;
bool mbCanceled;
public:
ProgressDialog( Window*, sal_Bool bCancelable = sal_True, int nMin = 0, int nMax = 100 );
~ProgressDialog();
DECL_LINK( ClickBtnHdl, Button* );
void setValue( int nValue );
void setRange( int nMin, int nMax ) { mnMin = nMin; mnMax = nMax; }
void startOperation( const OUString& );
void setFilename( const OUString& );
bool isCanceled() { return mbCanceled; }
};
} // namespace
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -20,7 +20,6 @@
#include "prtsetup.hxx"
#include "helper.hxx"
#include "rtsetup.hrc"
#include "cmddlg.hxx"
#include "osl/thread.h"
......@@ -74,14 +73,12 @@ void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, con
* RTSDialog
*/
RTSDialog::RTSDialog( const PrinterInfo& rJobData, const OUString& rPrinter, bool bAllPages, Window* pParent )
: TabDialog(pParent, "PrinterPropertiesDialog", "spa/ui/printerpropertiesdialog.ui" )
RTSDialog::RTSDialog(const PrinterInfo& rJobData, const OUString& rPrinter, Window* pParent)
: TabDialog(pParent, "PrinterPropertiesDialog", "spa/ui/printerpropertiesdialog.ui")
, m_aJobData(rJobData)
, m_aPrinter(rPrinter)
, m_pPaperPage(NULL)
, m_pDevicePage(NULL)
, m_pOtherPage(NULL)
, m_pCommandPage(NULL)
, m_aInvalidString(PaResId(RID_RTS_RTSDIALOG_INVALID_TXT).toString())
{
get(m_pOKButton, "ok");
......@@ -91,35 +88,18 @@ RTSDialog::RTSDialog( const PrinterInfo& rJobData, const OUString& rPrinter, boo
OUString aTitle(GetText());
SetText(aTitle.replaceAll("%s", m_aJobData.m_aPrinterName));
if( ! bAllPages )
{
m_pTabControl->RemovePage(m_pTabControl->GetPageId("other"));
m_pTabControl->RemovePage(m_pTabControl->GetPageId("command"));
}
else if (m_aJobData.m_aDriverName.startsWith("CUPS:"))
{
// command page makes no sense for CUPS printers
m_pTabControl->RemovePage(m_pTabControl->GetPageId("command"));
}
m_pTabControl->SetActivatePageHdl( LINK( this, RTSDialog, ActivatePage ) );
m_pOKButton->SetClickHdl( LINK( this, RTSDialog, ClickButton ) );
m_pCancelButton->SetClickHdl( LINK( this, RTSDialog, ClickButton ) );
ActivatePage(m_pTabControl);
}
RTSDialog::~RTSDialog()
{
delete m_pPaperPage;
delete m_pDevicePage;
delete m_pOtherPage;
delete m_pCommandPage;
}
IMPL_LINK( RTSDialog, ActivatePage, TabControl*, pTabCtrl )
{
if( pTabCtrl != m_pTabControl )
......@@ -134,10 +114,6 @@ IMPL_LINK( RTSDialog, ActivatePage, TabControl*, pTabCtrl )
pPage = m_pPaperPage = new RTSPaperPage( this );
else if (sPage == "device")
pPage = m_pDevicePage = new RTSDevicePage( this );
else if (sPage == "other")
pPage = m_pOtherPage = new RTSOtherPage( this );
else if (sPage == "command")
pPage = m_pCommandPage = new RTSCommandPage( this );
if( pPage )
m_pTabControl->SetTabPage( nId, pPage );
}
......@@ -172,13 +148,6 @@ IMPL_LINK( RTSDialog, ClickButton, Button*, pButton )
m_aJobData.m_nPSLevel = m_pDevicePage->getLevel();
m_aJobData.m_nPDFDevice = m_pDevicePage->getPDFDevice();
}
if( m_pOtherPage )
// write other settings
m_pOtherPage->save();
if( m_pCommandPage )
// write command settings
m_pCommandPage->save();
EndDialog( 1 );
}
else if( pButton == m_pCancelButton )
......@@ -194,7 +163,7 @@ IMPL_LINK( RTSDialog, ClickButton, Button*, pButton )
*/
RTSPaperPage::RTSPaperPage(RTSDialog* pParent)
: TabPage(pParent->m_pTabControl, "PrinterPaperPage", "spa/ui/printerpaperpage.ui" )
: TabPage(pParent->m_pTabControl, "PrinterPaperPage", "spa/ui/printerpaperpage.ui")
, m_pParent( pParent )
{
get(m_pPaperText, "paperft");
......@@ -503,119 +472,6 @@ void RTSDevicePage::FillValueBox( const PPDKey* pKey )
m_pPPDValueBox->SelectEntryPos( m_pPPDValueBox->GetEntryPos( (void*)pValue ) );
}
/*
* RTSOtherPage
*/
RTSOtherPage::RTSOtherPage( RTSDialog* pParent ) :
TabPage( pParent->m_pTabControl, PaResId( RID_RTS_OTHERPAGE ) ),
m_pParent( pParent ),
m_aLeftTxt( this, PaResId( RID_RTS_OTHER_LEFTMARGIN_TXT ) ),
m_aLeftLB( this, PaResId( RID_RTS_OTHER_LEFTMARGIN_BOX ) ),
m_aTopTxt( this, PaResId( RID_RTS_OTHER_TOPMARGIN_TXT ) ),
m_aTopLB( this, PaResId( RID_RTS_OTHER_TOPMARGIN_BOX ) ),
m_aRightTxt( this, PaResId( RID_RTS_OTHER_RIGHTMARGIN_TXT ) ),
m_aRightLB( this, PaResId( RID_RTS_OTHER_RIGHTMARGIN_BOX ) ),
m_aBottomTxt( this, PaResId( RID_RTS_OTHER_BOTTOMMARGIN_TXT ) ),
m_aBottomLB( this, PaResId( RID_RTS_OTHER_BOTTOMMARGIN_BOX ) ),
m_aCommentTxt( this, PaResId( RID_RTS_OTHER_COMMENT_TXT ) ),
m_aCommentEdt( this, PaResId( RID_RTS_OTHER_COMMENT_EDT ) ),
m_aDefaultBtn( this, PaResId( RID_RTS_OTHER_DEFAULT_BTN ) )
{
FreeResource();
m_aTopLB.EnableEmptyFieldValue( true );
m_aBottomLB.EnableEmptyFieldValue( true );
m_aLeftLB.EnableEmptyFieldValue( true );
m_aRightLB.EnableEmptyFieldValue( true );
m_aDefaultBtn.SetClickHdl( LINK( this, RTSOtherPage, ClickBtnHdl ) );
initValues();
}
RTSOtherPage::~RTSOtherPage()
{
}
void RTSOtherPage::initValues()
{
int nMarginLeft = 0;
int nMarginTop = 0;
int nMarginRight = 0;
int nMarginBottom = 0;
if( m_pParent->m_aJobData.m_pParser )
{
m_pParent->m_aJobData.m_pParser->
getMargins( m_pParent->m_aJobData.m_pParser->getDefaultPaperDimension(),
nMarginLeft,
nMarginRight,
nMarginTop,
nMarginBottom );
}
nMarginLeft += m_pParent->m_aJobData.m_nLeftMarginAdjust;
nMarginRight += m_pParent->m_aJobData.m_nRightMarginAdjust;
nMarginTop += m_pParent->m_aJobData.m_nTopMarginAdjust;
nMarginBottom += m_pParent->m_aJobData.m_nBottomMarginAdjust;
m_aLeftLB.SetValue( nMarginLeft, FUNIT_POINT );
m_aRightLB.SetValue( nMarginRight, FUNIT_POINT );
m_aTopLB.SetValue( nMarginTop, FUNIT_POINT );
m_aBottomLB.SetValue( nMarginBottom, FUNIT_POINT );
m_aCommentEdt.SetText( m_pParent->m_aJobData.m_aComment );
}
void RTSOtherPage::save()
{
int nMarginLeft = 0;
int nMarginTop = 0;
int nMarginRight = 0;
int nMarginBottom = 0;
if( m_pParent->m_aJobData.m_pParser )
{
m_pParent->m_aJobData.m_pParser->
getMargins( m_pParent->m_aJobData.m_pParser->getDefaultPaperDimension(),
nMarginLeft,
nMarginRight,
nMarginTop,
nMarginBottom );
}
m_pParent->m_aJobData.m_nLeftMarginAdjust = m_aLeftLB.GetValue( FUNIT_POINT ) - nMarginLeft;
m_pParent->m_aJobData.m_nRightMarginAdjust = m_aRightLB.GetValue( FUNIT_POINT ) - nMarginRight;
m_pParent->m_aJobData.m_nTopMarginAdjust = m_aTopLB.GetValue( FUNIT_POINT ) - nMarginTop;
m_pParent->m_aJobData.m_nBottomMarginAdjust = m_aBottomLB.GetValue( FUNIT_POINT ) - nMarginBottom;
m_pParent->m_aJobData.m_aComment = m_aCommentEdt.GetText();
}
IMPL_LINK( RTSOtherPage, ClickBtnHdl, Button*, pButton )
{
if( pButton == &m_aDefaultBtn )
{
m_pParent->m_aJobData.m_nLeftMarginAdjust =
m_pParent->m_aJobData.m_nRightMarginAdjust =
m_pParent->m_aJobData.m_nTopMarginAdjust =
m_pParent->m_aJobData.m_nBottomMarginAdjust = 0;
initValues();
}
return 0;
}
class RTSPWDialog : public ModalDialog
{
FixedText m_aText;
......
......@@ -39,15 +39,11 @@ namespace padmin {
class RTSPaperPage;
class RTSDevicePage;
class RTSOtherPage;
class RTSCommandPage;
class RTSDialog : public TabDialog
{
friend class RTSPaperPage;
friend class RTSDevicePage;
friend class RTSOtherPage;
friend class RTSCommandPage;
::psp::PrinterInfo m_aJobData;
OUString m_aPrinter;
......@@ -60,8 +56,6 @@ class RTSDialog : public TabDialog
// pages
RTSPaperPage* m_pPaperPage;
RTSDevicePage* m_pDevicePage;
RTSOtherPage* m_pOtherPage;
RTSCommandPage* m_pCommandPage;
// some resources
OUString m_aInvalidString;
......@@ -72,7 +66,7 @@ class RTSDialog : public TabDialog
// helper functions
void insertAllPPDValues( ListBox&, const psp::PPDParser*, const psp::PPDKey* );
public:
RTSDialog( const ::psp::PrinterInfo& rJobData, const OUString& rPrinter, bool bAllPages, Window* pParent = NULL );
RTSDialog(const ::psp::PrinterInfo& rJobData, const OUString& rPrinter, Window* pParent = NULL);
~RTSDialog();
const ::psp::PrinterInfo& getSetup() const { return m_aJobData; }
......@@ -132,33 +126,6 @@ public:
sal_uLong getColorDevice();
};
class RTSOtherPage : public TabPage
{
RTSDialog* m_pParent;
FixedText m_aLeftTxt;
MetricField m_aLeftLB;
FixedText m_aTopTxt;
MetricField m_aTopLB;
FixedText m_aRightTxt;
MetricField m_aRightLB;
FixedText m_aBottomTxt;
MetricField m_aBottomLB;
FixedText m_aCommentTxt;
Edit m_aCommentEdt;
PushButton m_aDefaultBtn;
void initValues();
DECL_LINK( ClickBtnHdl, Button *);
public:
RTSOtherPage( RTSDialog* );
~RTSOtherPage();
void save();
};
} // namespace
#endif // _PAD_PRTSETUP_HXX
......
/* XPM */
/*
* 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 .
*/
static char * L3PSetup_m_pm[] = {
/* width height ncolors cpp [x_hot y_hot] */
"32 32 11 1 0 0",
/* colors */
" s none m none c none",
". s iconColor1 m black c black",
"X c #000000008617",
"o c #861782078617",
"O s iconColor2 m white c white",
"+ c #C71BC30BC71B",
"@ s iconColor6 m white c yellow",
"# c #00000000FFFF",
"$ c #861782070000",
"% c #000082078617",
"& c #861700000000",
/* pixels */
" ",
" ........ XXXX",
" .o..oo.OOOOOOO+..X+OX",
" .+ooOO.@OO@OOOO@OOXOOX",
" .+oo+O.OO.OOOOOOOOOXXXX",
" .+oo+O.O@.OOO@OOOO@OXXXX",
" .+oo+O.@O.O@O.OO@OOOOXXXX",
" .+oo+O.OO.+.O.OOOOOOOOXXXX",
" .+oo+O.O@.+O+.O@O.OOO..X.X.",
" .+oo+O+...+O++o.O.OO@. .X. ",
" .+oo+O+O+O+O++++o.@O..o ... ",
" .ooo+O+O+O+O++++ooo.. ",
" .ooo+O+O+O+O++++o..+Oo ",
" .oo+O+O+O+O++++o....OO. ",
" ..+O+O+O+O++++o......OO. ",
" .o+OO+O+O++#+o....$o..OO. ",
" .oo+OO+O++%+o....$$$...Oo. ",
" .ooo+OO++&+o...$$$+$+...o. ",
" .oooo+O+++o...$$$+$+++..o. ",
" .oooooOO+o.o.$$++$+OoOO..o ",
" .ooooo+Oo..O.$++$OOoOO$O.o ",
"o.ooooooO.o.OO.+$OOoOOoOOO. ",
"oo.ooooo.O.O.OO.OOoOO$OOoOO. ",
" oo.oooo+O.OO.OO.OOOoOOoOO.o ",
" oo.ooo+O.oOo.Oo.O$OO$OO.o ",
" oo.oo+O.o+o.+o.OOOoOO.o ",
" oo.o+O.o+o.+o.OOoOO.o ",
" oo.+..o+o.+o..OOO.o ",
" oo.oo.+..+o.o.O.o ",
" ooooo.o.o.ooo.o ",
" oooo.o oo ",
" oo "};
......@@ -22,40 +22,6 @@
#define RID_RTS_RTSDIALOG_INVALID_TXT 4001
#define RID_RTS_OTHERPAGE 4002
#define RID_RTS_OTHER_LEFTMARGIN_TXT 1
#define RID_RTS_OTHER_LEFTMARGIN_BOX 2
#define RID_RTS_OTHER_TOPMARGIN_TXT 3
#define RID_RTS_OTHER_TOPMARGIN_BOX 4
#define RID_RTS_OTHER_RIGHTMARGIN_TXT 5
#define RID_RTS_OTHER_RIGHTMARGIN_BOX 6
#define RID_RTS_OTHER_BOTTOMMARGIN_TXT 7
#define RID_RTS_OTHER_BOTTOMMARGIN_BOX 8
#define RID_RTS_OTHER_COMMENT_TXT 9
#define RID_RTS_OTHER_COMMENT_EDT 10
#define RID_RTS_OTHER_DEFAULT_BTN 11
#define RID_RTS_COMMANDPAGE 4006
#define RID_RTS_CMD_TXT_PRTNAME 1
#define RID_RTS_CMD_TXT_CONNECT 2
#define RID_RTS_CMD_FL_DEFAULT 3
#define RID_RTS_CMD_BTN_HELP 4
#define RID_RTS_CMD_CB_COMMANDS 5
#define RID_RTS_CMD_FL_INSTALL 6
#define RID_RTS_CMD_TXT_CONFIGURE 7
#define RID_RTS_CMD_LB_CONFIGURE 8
#define RID_RTS_CMD_STR_CONFIGURE_PRINTER 9
#define RID_RTS_CMD_STR_CONFIGURE_PDF 11
#define RID_RTS_CMD_STR_PRINTERHELP 12
#define RID_RTS_CMD_STR_PDFHELP 14
#define RID_RTS_CMD_BTN_REMOVE 15
#define RID_RTS_CMD_EDT_PDFDIR 16
#define RID_RTS_CMD_BTN_PDFDIR 17
#define RID_RTS_CMD_TXT_PDFDIR 18
#define RID_RTS_CMD_CB_EXTERNAL 20
#define RID_RTS_CMD_FT_QUICKCMD 21
#define RIT_RTS_CMD_CB_QUICKCMD 22
#define RID_TXT_QUERYFAXNUMBER 4007
#define RID_RTS_PWDIALOG 4008
......
......@@ -24,231 +24,6 @@ String RID_RTS_RTSDIALOG_INVALID_TXT
Text [ en-US ] = "<ignore>";
};
TabPage RID_RTS_COMMANDPAGE
{
HelpID = "padmin:TabPage:RID_RTS_COMMANDPAGE";
Hide = TRUE;
Size = MAP_APPFONT( 230, 175 );
ComboBox RID_RTS_CMD_CB_COMMANDS
{
HelpID = "padmin:ComboBox:RID_RTS_COMMANDPAGE:RID_RTS_CMD_CB_COMMANDS";
Border = TRUE ;
Sort = TRUE ;
Dropdown = TRUE;
Pos = MAP_APPFONT ( 11 , 75 ) ;
Size = MAP_APPFONT ( 150 , 65 ) ;
};
CheckBox RID_RTS_CMD_CB_EXTERNAL
{
HelpID = "padmin:CheckBox:RID_RTS_COMMANDPAGE:RID_RTS_CMD_CB_EXTERNAL";
Pos = MAP_APPFONT( 11, 95 );
Size = MAP_APPFONT( 220, 10 );
Text [ en-US ] = "~Use system print dialog, disable %PRODUCTNAME's print dialog";
};
FixedText RID_RTS_CMD_FT_QUICKCMD
{
Pos = MAP_APPFONT( 11, 110 );
Size = MAP_APPFONT( 150, 20 );
WordBreak = TRUE;
Text [ en-US ] = "Command for quick printing without dialog (optional)";
};
ComboBox RIT_RTS_CMD_CB_QUICKCMD
{
HelpID = "padmin:ComboBox:RID_RTS_COMMANDPAGE:RIT_RTS_CMD_CB_QUICKCMD";
Border = TRUE;
Sort = TRUE;
Dropdown = TRUE;
Pos = MAP_APPFONT( 11, 130 );
Size = MAP_APPFONT( 150, 65 );
};
FixedLine RID_RTS_CMD_FL_INSTALL
{
Pos = MAP_APPFONT ( 6 , 44 ) ;
Size = MAP_APPFONT ( 220 , 8 ) ;
Text [ en-US ] = "Select command";
};
String RID_RTS_CMD_STR_CONFIGURE_PRINTER
{
Text [ en-US ] = "Printer";
};
String RID_RTS_CMD_STR_CONFIGURE_PDF
{
Text [ en-US ] = "PDF converter";
};
ListBox RID_RTS_CMD_LB_CONFIGURE
{
HelpID = "padmin:ListBox:RID_RTS_COMMANDPAGE:RID_RTS_CMD_LB_CONFIGURE";
DropDown = true;
Border = true;
Pos = MAP_APPFONT( 101, 56 );
Size = MAP_APPFONT( 60, 200 );
};
FixedText RID_RTS_CMD_TXT_CONFIGURE
{
Pos = MAP_APPFONT( 11, 56 );
Size = MAP_APPFONT( 85, 10 );
Text [ en-US ] = "~Configure as";
};
FixedText RID_RTS_CMD_TXT_PDFDIR
{
Pos = MAP_APPFONT( 11, 146 );
Size = MAP_APPFONT( 130, 8 );
Text [ en-US ] = "PDF target directory :";
};
Edit RID_RTS_CMD_EDT_PDFDIR
{
HelpID = "padmin:Edit:RID_RTS_COMMANDPAGE:RID_RTS_CMD_EDT_PDFDIR";
Border = TRUE;
Pos = MAP_APPFONT( 11, 155 );
Size = MAP_APPFONT( 130, 12 );
};
PushButton RID_RTS_CMD_BTN_PDFDIR
{
HelpID = "padmin:PushButton:RID_RTS_COMMANDPAGE:RID_RTS_CMD_BTN_PDFDIR";
Pos = MAP_APPFONT( 146, 155 );
Size = MAP_APPFONT( 15, 12 );
Text = "...";
};
FixedText RID_RTS_CMD_TXT_PRTNAME
{
Pos = MAP_APPFONT ( 11 , 16 ) ;
Size = MAP_APPFONT ( 210 , 8 ) ;
};
FixedText RID_RTS_CMD_TXT_CONNECT
{
Pos = MAP_APPFONT ( 11 , 26 ) ;
Size = MAP_APPFONT ( 210 , 8 ) ;
Text [ en-US ] = "Command: ";
};
FixedLine RID_RTS_CMD_FL_DEFAULT
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 220 , 8 ) ;
Text [ en-US ] = "Printer";
};
PushButton RID_RTS_CMD_BTN_HELP
{
HelpID = "padmin:PushButton:RID_RTS_COMMANDPAGE:RID_RTS_CMD_BTN_HELP";
Pos = MAP_APPFONT( 170, 55 );
Size = MAP_APPFONT( 50, 12 );
Text [ en-US ] = "~Help";
};
PushButton RID_RTS_CMD_BTN_REMOVE
{
HelpID = "padmin:PushButton:RID_RTS_COMMANDPAGE:RID_RTS_CMD_BTN_REMOVE";
Pos = MAP_APPFONT( 170, 72 );
Size = MAP_APPFONT( 50, 12 );
Text [ en-US ] = "~Remove";
};
String RID_RTS_CMD_STR_PDFHELP
{
Text [ en-US ] = "The command line for PDF converters is executed as follows: for each document printed, \"(TMP)\" in the command line is replaced by a temporary file and \"(OUTFILE)\" in the command line is replaced by the target PDF file name. If \"(TMP)\" is in the command line, the PostScript code will be supplied via a file, otherwise via standard input (i.e. as a pipe).";
};
String RID_RTS_CMD_STR_PRINTERHELP
{
Text [ en-US ] = "The command line for printer devices is executed as follows: the generated PostScript code is supplied as standard input (i.e. as a pipe) to the command line.";
};
};
TabPage RID_RTS_OTHERPAGE
{
HelpID = "padmin:TabPage:RID_RTS_OTHERPAGE";
Hide = TRUE;
Size = MAP_APPFONT( 230, 175 );
FixedText RID_RTS_OTHER_LEFTMARGIN_TXT
{
Pos = MAP_APPFONT( 5, 5 );
Size = MAP_APPFONT( 85, 8 );
Text [ en-US ] = "~Left margin";
};
MetricField RID_RTS_OTHER_LEFTMARGIN_BOX
{
HelpID = "padmin:MetricField:RID_RTS_OTHERPAGE:RID_RTS_OTHER_LEFTMARGIN_BOX";
Border = TRUE ;
Pos = MAP_APPFONT ( 100 , 5 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
StrictFormat = TRUE ;
Spin = TRUE;
Repeat = TRUE;
Unit = FUNIT_MM;
};
FixedText RID_RTS_OTHER_TOPMARGIN_TXT
{
Pos = MAP_APPFONT( 5, 20 );
Size = MAP_APPFONT( 85, 8 );
Text [ en-US ] = "~Top margin";
};
MetricField RID_RTS_OTHER_TOPMARGIN_BOX
{
HelpID = "padmin:MetricField:RID_RTS_OTHERPAGE:RID_RTS_OTHER_TOPMARGIN_BOX";
Border = TRUE ;
Pos = MAP_APPFONT ( 100 , 20 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
StrictFormat = TRUE ;
Spin = TRUE;
Repeat = TRUE;
Unit = FUNIT_MM;
};
FixedText RID_RTS_OTHER_RIGHTMARGIN_TXT
{
Pos = MAP_APPFONT( 5, 35 );
Size = MAP_APPFONT( 85, 8 );
Text [ en-US ] = "~Right margin";
};
MetricField RID_RTS_OTHER_RIGHTMARGIN_BOX
{
HelpID = "padmin:MetricField:RID_RTS_OTHERPAGE:RID_RTS_OTHER_RIGHTMARGIN_BOX";
Border = TRUE ;
Pos = MAP_APPFONT ( 100 , 35 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
StrictFormat = TRUE ;
Spin = TRUE;
Repeat = TRUE;
Unit = FUNIT_MM;
};
FixedText RID_RTS_OTHER_BOTTOMMARGIN_TXT
{
Pos = MAP_APPFONT( 5, 50 );
Size = MAP_APPFONT( 85, 8 );
Text [ en-US ] = "~Bottom margin";
};
MetricField RID_RTS_OTHER_BOTTOMMARGIN_BOX
{
HelpID = "padmin:MetricField:RID_RTS_OTHERPAGE:RID_RTS_OTHER_BOTTOMMARGIN_BOX";
Border = TRUE ;
Pos = MAP_APPFONT ( 100 , 50 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
StrictFormat = TRUE ;
Spin = TRUE;
Repeat = TRUE;
Unit = FUNIT_MM;
};
FixedText RID_RTS_OTHER_COMMENT_TXT
{
Pos = MAP_APPFONT( 5, 65 );
Size = MAP_APPFONT( 85, 8 );
Text [ en-US ] = "~Comment";
};
Edit RID_RTS_OTHER_COMMENT_EDT
{
HelpID = "padmin:Edit:RID_RTS_OTHERPAGE:RID_RTS_OTHER_COMMENT_EDT";
Border = TRUE ;
Pos = MAP_APPFONT ( 5 , 75 ) ;
Size = MAP_APPFONT ( 220 , 12 ) ;
};
PushButton RID_RTS_OTHER_DEFAULT_BTN
{
HelpID = "padmin:PushButton:RID_RTS_OTHERPAGE:RID_RTS_OTHER_DEFAULT_BTN";
Pos = MAP_APPFONT( 175, 5 );
Size = MAP_APPFONT( 50, 12 );
Text [ en-US ] = "~Default";
};
};
String RID_TXT_QUERYFAXNUMBER
{
Text [ en-US ] = "Please enter the fax number.";
......
#!/bin/sh
#
# 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 .
#
# enable file locking
SAL_ENABLE_FILE_LOCKING=1
export SAL_ENABLE_FILE_LOCKING
# resolve installation directory
sd_cwd="`pwd`"
if [ -h "$0" ] ; then
sd_basename=`basename "$0"`
sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"`
cd "`dirname "$0"`"
cd "`dirname "$sd_script"`"
else
cd "`dirname "$0"`"
fi
sd_prog=`pwd`
cd "$sd_cwd"
case "`uname -s`" in
FreeBSD)
sd_prog1="$sd_prog"
sd_prog2="$sd_prog/../ure-link/lib"
LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
;;
AIX)
sd_prog1="$sd_prog"
sd_prog2="$sd_prog/../ure-link/lib"
LIBPATH=$sd_prog1:$sd_prog2${LIBPATH:+:$LIBPATH}
export LIBPATH
;;
esac
#collect all bootstrap variables specified on the command line
#so that they can be passed as arguments to javaldx later on
for arg in $@
do
case "$arg" in
-env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";;
esac
done
# extend the ld_library_path for java: javaldx checks the sofficerc for us
if [ -x "$sd_prog/../ure-link/bin/javaldx" ] ; then
my_path=`"$sd_prog/../ure-link/bin/javaldx" $BOOTSTRAPVARS \
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
if [ -n "$my_path" ] ; then
sd_platform=`uname -s`
case $sd_platform in
AIX)
LIBPATH=$my_path${LIBPATH:+:$LIBPATH}
export LIBPATH
;;
*)
LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
;;
esac
fi
fi
# uncomment line below to disable anti aliasing of fonts
# SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE
# Set PATH so that crash_report is found:
PATH=$sd_prog${PATH+:$PATH}
export PATH
# execute binary
exec "$sd_prog/spadmin.bin" "$@" \
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"
This diff is collapsed.
This diff is collapsed.
......@@ -62,19 +62,6 @@
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="command">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Command</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="paper">
<property name="visible">True</property>
......@@ -100,20 +87,6 @@
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="other">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Other Settings</property>
</object>
<packing>
<property name="position">4</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/sh
exec /opt/%PREFIX/program/spadmin
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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