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

move remaining padmin dialogs into vcl

and so padmin is no more

Change-Id: I554cefa8b38581daad8a78bafa167448b0a0ef61
üst f6cd982a
...@@ -82,7 +82,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ ...@@ -82,7 +82,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
oovbaapi \ oovbaapi \
oox \ oox \
package \ package \
padmin \
postprocess \ postprocess \
psprint_config \ psprint_config \
$(call gb_Helper_optional,PYUNO,pyuno) \ $(call gb_Helper_optional,PYUNO,pyuno) \
......
...@@ -154,7 +154,7 @@ public: ...@@ -154,7 +154,7 @@ public:
// printer discovery to finish // printer discovery to finish
virtual bool checkPrintersChanged( bool bWait ); virtual bool checkPrintersChanged( bool bWait );
// members for administration (->padmin) // members for administration
// add a named printer // add a named printer
// addPrinter fails if a printer with the same name already exists // addPrinter fails if a printer with the same name already exists
...@@ -176,7 +176,7 @@ public: ...@@ -176,7 +176,7 @@ public:
// fails if the specified printer does not exist // fails if the specified printer does not exist
virtual bool setDefaultPrinter( const OUString& rPrinterName ); virtual bool setDefaultPrinter( const OUString& rPrinterName );
// primarily used internally but also by padmin // primarily used internally
// returns the printer queue names // returns the printer queue names
virtual const std::list< SystemPrintQueue >& getSystemPrintQueues(); virtual const std::list< SystemPrintQueue >& getSystemPrintQueues();
......
...@@ -289,7 +289,6 @@ bool includeProject(const OString& rProject) { ...@@ -289,7 +289,6 @@ bool includeProject(const OString& rProject) {
"mysqlc", "mysqlc",
"nlpsolver", "nlpsolver",
"officecfg", "officecfg",
"padmin",
"readlicense_oo", "readlicense_oo",
"reportbuilder", "reportbuilder",
"reportdesign", "reportdesign",
......
# -*- 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_AllLangResTarget_AllLangResTarget,spa))
$(eval $(call gb_AllLangResTarget_set_reslocation,spa,padmin))
$(eval $(call gb_AllLangResTarget_add_srs,spa,\
padmin/source \
))
$(eval $(call gb_SrsTarget_SrsTarget,padmin/source))
$(eval $(call gb_SrsTarget_add_files,padmin/source,\
padmin/source/rtsetup.src \
))
# vim: set noet sw=4 ts=4:
# -*- 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_Library_Library,spa))
$(eval $(call gb_Library_add_defs,spa,\
-DSPA_DLLIMPLEMENTATION \
))
$(eval $(call gb_Library_use_external,spa,boost_headers))
$(eval $(call gb_Library_use_custom_headers,spa,\
officecfg/registry \
))
$(eval $(call gb_Library_use_sdk_api,spa))
$(eval $(call gb_Library_use_libraries,spa,\
svt \
vcl \
utl \
tl \
basegfx \
comphelper \
i18nlangtag \
cppu \
sal \
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_add_exception_objects,spa,\
padmin/source/helper \
padmin/source/prtsetup \
))
ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS)))
$(eval $(call gb_Library_add_libs,spa,\
-lm \
-lpthread \
))
endif
ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,spa,\
-ldl \
))
endif
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
include $(module_directory)/../solenv/gbuild/partial_build.mk
# vim: set noet sw=4 ts=4:
# -*- 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_Module_Module,padmin))
ifeq ($(GUIBASE),unx)
$(eval $(call gb_Module_add_targets,padmin,\
Library_spa \
))
$(eval $(call gb_Module_add_l10n_targets,padmin,\
AllLangResTarget_spa \
UIConfig_spa \
))
endif
# vim: set noet sw=4 ts=4:
Printer administration dialog - used lpr - obsolete with CUPS and fontconfig, but still used for some things.
# -*- 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_UIConfig_UIConfig,spa))
$(eval $(call gb_UIConfig_add_uifiles,spa,\
padmin/uiconfig/ui/printerdevicepage \
padmin/uiconfig/ui/printerpaperpage \
padmin/uiconfig/ui/printerpropertiesdialog \
))
# vim: set noet sw=4 ts=4:
/* -*- 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 <unistd.h>
#include <helper.hxx>
#include <osl/file.hxx>
#include <tools/urlobj.hxx>
#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/settings.hxx>
#include <tools/config.hxx>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/ui/dialogs/XControlAccess.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <unotools/confignode.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <rtl/ustrbuf.hxx>
using namespace osl;
using namespace padmin;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::ui::dialogs;
/*
* PaResId
*/
ResId padmin::PaResId( sal_uInt32 nId )
{
static ResMgr* pPaResMgr = NULL;
if( ! pPaResMgr )
{
LanguageTag aLanguageTag( LANGUAGE_SYSTEM);
utl::OConfigurationNode aNode =
utl::OConfigurationTreeRoot::tryCreateWithComponentContext(
comphelper::getProcessComponentContext(),
OUString("org.openoffice.Setup/L10N") );
if ( aNode.isValid() )
{
OUString aLoc;
Any aValue = aNode.getNodeValue( OUString("ooLocale") );
if( aValue >>= aLoc )
{
aLanguageTag.reset( aLoc);
}
}
pPaResMgr = ResMgr::SearchCreateResMgr( "spa", aLanguageTag );
AllSettings aSettings = Application::GetSettings();
aSettings.SetUILanguageTag( aLanguageTag );
Application::SetSettings( aSettings );
}
return ResId( nId, *pPaResMgr );
}
/* 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_HELPER_HXX_
#define _PAD_HELPER_HXX_
#include <list>
#include <rtl/ustring.hxx>
#include <tools/resid.hxx>
#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/combobox.hxx>
#if defined SPA_DLLIMPLEMENTATION
#define SPA_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
#define SPA_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
namespace padmin
{
ResId PaResId( sal_uInt32 nId );
} // namespace padmin
#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_RTSETUP_HRC_
#define _PAD_RTSETUP_HRC_
#define RID_RTS_RTSDIALOG_INVALID_TXT 4001
#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 "rtsetup.hrc"
String RID_RTS_RTSDIALOG_INVALID_TXT
{
Text [ en-US ] = "<ignore>";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -56,7 +56,6 @@ Module gid_Module_Root_Brand ...@@ -56,7 +56,6 @@ Module gid_Module_Root_Brand
gid_Brand_File_Bin_Soffice, gid_Brand_File_Bin_Soffice,
gid_Brand_File_Bin_Soffice_Bin, gid_Brand_File_Bin_Soffice_Bin,
gid_Brand_File_Bin_Soffice_Bin_Manifest, gid_Brand_File_Bin_Soffice_Bin_Manifest,
gid_Brand_File_Bin_Spadmin,
gid_Brand_File_Bin_Unoinfo, gid_Brand_File_Bin_Unoinfo,
gid_Brand_File_Bin_Unopkgcom, gid_Brand_File_Bin_Unopkgcom,
gid_Brand_File_Bin_Unopkgexe, gid_Brand_File_Bin_Unopkgexe,
...@@ -525,15 +524,6 @@ End ...@@ -525,15 +524,6 @@ End
#endif #endif
#if defined(UNX) && !defined(MACOSX) && !defined(LIBO_HEADLESS)
File gid_Brand_File_Bin_Spadmin
BIN_FILE_BODY;
Dir = FILELIST_DIR;
Name = "padmin.filelist";
Styles = (PACKED, FILELIST);
End
#endif
#ifndef MACOSX #ifndef MACOSX
File gid_Brand_File_Bin_Soffice_Bin File gid_Brand_File_Bin_Soffice_Bin
BIN_FILE_BODY; BIN_FILE_BODY;
......
...@@ -564,9 +564,6 @@ UI_FILELIST(sfx, "UIConfig/sfx.filelist") ...@@ -564,9 +564,6 @@ UI_FILELIST(sfx, "UIConfig/sfx.filelist")
UI_FILELIST(sglobal, "UIConfig/modules/sglobal.filelist") UI_FILELIST(sglobal, "UIConfig/modules/sglobal.filelist")
UI_FILELIST(simpress, "UIConfig/modules/simpress.filelist") UI_FILELIST(simpress, "UIConfig/modules/simpress.filelist")
UI_FILELIST(smath, "UIConfig/modules/smath.filelist") UI_FILELIST(smath, "UIConfig/modules/smath.filelist")
#ifdef GUIBASE_UNX
UI_FILELIST(spa, "UIConfig/spa.filelist")
#endif
UI_FILELIST(startmodule, "UIConfig/modules/StartModule.filelist") UI_FILELIST(startmodule, "UIConfig/modules/StartModule.filelist")
UI_FILELIST(svt, "UIConfig/svt.filelist") UI_FILELIST(svt, "UIConfig/svt.filelist")
UI_FILELIST(svx, "UIConfig/svx.filelist") UI_FILELIST(svx, "UIConfig/svx.filelist")
...@@ -595,9 +592,6 @@ UI_FILELIST_ALL_LANG(sdraw, modules/sdraw) ...@@ -595,9 +592,6 @@ UI_FILELIST_ALL_LANG(sdraw, modules/sdraw)
UI_FILELIST_ALL_LANG(sfx, sfx) UI_FILELIST_ALL_LANG(sfx, sfx)
UI_FILELIST_ALL_LANG(simpress, modules/simpress) UI_FILELIST_ALL_LANG(simpress, modules/simpress)
UI_FILELIST_ALL_LANG(smath, modules/smath) UI_FILELIST_ALL_LANG(smath, modules/smath)
#ifdef GUIBASE_UNX
UI_FILELIST_ALL_LANG(spa, spa)
#endif
UI_FILELIST_ALL_LANG(svt, svt) UI_FILELIST_ALL_LANG(svt, svt)
UI_FILELIST_ALL_LANG(svx, svx) UI_FILELIST_ALL_LANG(svx, svx)
UI_FILELIST_ALL_LANG(swriter, modules/swriter) UI_FILELIST_ALL_LANG(swriter, modules/swriter)
......
...@@ -69,12 +69,6 @@ STD_RES_FILE( gid_File_Res_Sd, sd ) ...@@ -69,12 +69,6 @@ STD_RES_FILE( gid_File_Res_Sd, sd )
STD_RES_FILE( gid_File_Res_Sfx, sfx ) STD_RES_FILE( gid_File_Res_Sfx, sfx )
#if defined(UNX) && !defined(MACOSX) && !defined(LIBO_HEADLESS)
STD_RES_FILE( gid_File_Res_Spa, spa )
#endif
STD_RES_FILE( gid_File_Res_Sb, sb ) STD_RES_FILE( gid_File_Res_Sb, sb )
STD_RES_FILE( gid_File_Res_Svl, svl ) STD_RES_FILE( gid_File_Res_Svl, svl )
......
...@@ -262,9 +262,6 @@ Module gid_Module_Root_Files_6 ...@@ -262,9 +262,6 @@ Module gid_Module_Root_Files_6
gid_File_Share_Config_Sofficecfg_uiconfig_sglobal, gid_File_Share_Config_Sofficecfg_uiconfig_sglobal,
gid_File_Share_Config_Sofficecfg_uiconfig_simpress, gid_File_Share_Config_Sofficecfg_uiconfig_simpress,
gid_File_Share_Config_Sofficecfg_uiconfig_smath, gid_File_Share_Config_Sofficecfg_uiconfig_smath,
#ifdef GUIBASE_UNX
gid_File_Share_Config_Sofficecfg_uiconfig_spa,
#endif
gid_File_Share_Config_Sofficecfg_uiconfig_startmodule, gid_File_Share_Config_Sofficecfg_uiconfig_startmodule,
gid_File_Share_Config_Sofficecfg_uiconfig_svt, gid_File_Share_Config_Sofficecfg_uiconfig_svt,
gid_File_Share_Config_Sofficecfg_uiconfig_svx, gid_File_Share_Config_Sofficecfg_uiconfig_svx,
......
...@@ -35,9 +35,6 @@ Module gid_Module_Langpack_Basis_Template ...@@ -35,9 +35,6 @@ Module gid_Module_Langpack_Basis_Template
gid_File_Share_Config_Sofficecfg_uiconfig_sfx_Lang, gid_File_Share_Config_Sofficecfg_uiconfig_sfx_Lang,
gid_File_Share_Config_Sofficecfg_uiconfig_simpress_Lang, gid_File_Share_Config_Sofficecfg_uiconfig_simpress_Lang,
gid_File_Share_Config_Sofficecfg_uiconfig_smath_Lang, gid_File_Share_Config_Sofficecfg_uiconfig_smath_Lang,
#ifdef GUIBASE_UNX
gid_File_Share_Config_Sofficecfg_uiconfig_spa_Lang,
#endif
gid_File_Share_Config_Sofficecfg_uiconfig_svt_Lang, gid_File_Share_Config_Sofficecfg_uiconfig_svt_Lang,
gid_File_Share_Config_Sofficecfg_uiconfig_svx_Lang, gid_File_Share_Config_Sofficecfg_uiconfig_svx_Lang,
gid_File_Share_Config_Sofficecfg_uiconfig_swriter_Lang, gid_File_Share_Config_Sofficecfg_uiconfig_swriter_Lang,
......
...@@ -463,6 +463,7 @@ vcl_generic_code= \ ...@@ -463,6 +463,7 @@ vcl_generic_code= \
vcl/generic/print/psputil \ vcl/generic/print/psputil \
vcl/generic/print/genpspgraphics \ vcl/generic/print/genpspgraphics \
vcl/generic/print/genprnpsp \ vcl/generic/print/genprnpsp \
vcl/generic/print/prtsetup \
vcl/generic/print/text_gfx \ vcl/generic/print/text_gfx \
vcl/generic/fontmanager/fontsubst \ vcl/generic/fontmanager/fontsubst \
vcl/generic/glyphs/gcach_ftyp \ vcl/generic/glyphs/gcach_ftyp \
...@@ -490,9 +491,6 @@ vcl_headless_freetype_code=\ ...@@ -490,9 +491,6 @@ vcl_headless_freetype_code=\
vcl/headless/svptext \ vcl/headless/svptext \
ifeq ($(GUIBASE),unx) ifeq ($(GUIBASE),unx)
$(eval $(call gb_Library_add_defs,vcl,\
-D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
))
$(eval $(call gb_Library_add_exception_objects,vcl,\ $(eval $(call gb_Library_add_exception_objects,vcl,\
$(vcl_generic_code) \ $(vcl_generic_code) \
vcl/unx/generic/plugadapt/salplug \ vcl/unx/generic/plugadapt/salplug \
...@@ -515,9 +513,6 @@ $(eval $(call gb_Library_use_externals,vcl,\ ...@@ -515,9 +513,6 @@ $(eval $(call gb_Library_use_externals,vcl,\
endif endif
ifeq ($(ENABLE_HEADLESS),TRUE) ifeq ($(ENABLE_HEADLESS),TRUE)
$(eval $(call gb_Library_add_defs,vcl,\
-D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
))
$(eval $(call gb_Library_add_exception_objects,vcl,\ $(eval $(call gb_Library_add_exception_objects,vcl,\
$(vcl_generic_code) \ $(vcl_generic_code) \
vcl/unx/generic/printer/jobdata \ vcl/unx/generic/printer/jobdata \
...@@ -544,9 +539,6 @@ $(eval $(call gb_Library_add_libs,vcl,\ ...@@ -544,9 +539,6 @@ $(eval $(call gb_Library_add_libs,vcl,\
-landroid \ -landroid \
-llo-bootstrap \ -llo-bootstrap \
)) ))
$(eval $(call gb_Library_add_defs,vcl,\
-D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
))
$(eval $(call gb_Library_add_exception_objects,vcl,\ $(eval $(call gb_Library_add_exception_objects,vcl,\
$(vcl_generic_code) \ $(vcl_generic_code) \
vcl/unx/generic/printer/jobdata \ vcl/unx/generic/printer/jobdata \
......
...@@ -101,7 +101,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\ ...@@ -101,7 +101,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\
# into their own library I think. # into their own library I think.
$(eval $(call gb_Library_add_defs,vclplug_gen,\ $(eval $(call gb_Library_add_defs,vclplug_gen,\
-D_XSALSET_LIBNAME=\"$(call gb_Library_get_runtime_filename,spa)\" \
-DVCLPLUG_GEN_IMPLEMENTATION \ -DVCLPLUG_GEN_IMPLEMENTATION \
)) ))
......
...@@ -14,6 +14,9 @@ $(eval $(call gb_UIConfig_add_uifiles,vcl,\ ...@@ -14,6 +14,9 @@ $(eval $(call gb_UIConfig_add_uifiles,vcl,\
vcl/uiconfig/ui/errornocontentdialog \ vcl/uiconfig/ui/errornocontentdialog \
vcl/uiconfig/ui/errornoprinterdialog \ vcl/uiconfig/ui/errornoprinterdialog \
vcl/uiconfig/ui/printdialog \ vcl/uiconfig/ui/printdialog \
vcl/uiconfig/ui/printerdevicepage \
vcl/uiconfig/ui/printerpaperpage \
vcl/uiconfig/ui/printerpropertiesdialog \
vcl/uiconfig/ui/printprogressdialog \ vcl/uiconfig/ui/printprogressdialog \
vcl/uiconfig/ui/querydialog \ vcl/uiconfig/ui/querydialog \
)) ))
......
...@@ -39,8 +39,6 @@ ...@@ -39,8 +39,6 @@
#include "rtl/ustring.hxx" #include "rtl/ustring.hxx"
#include "osl/module.h"
#include "vcl/button.hxx" #include "vcl/button.hxx"
#include "vcl/dialog.hxx" #include "vcl/dialog.hxx"
#include "vcl/edit.hxx" #include "vcl/edit.hxx"
...@@ -58,6 +56,7 @@ ...@@ -58,6 +56,7 @@
#include "jobset.h" #include "jobset.h"
#include "print.h" #include "print.h"
#include "prtsetup.hxx"
#include "salptype.hxx" #include "salptype.hxx"
#include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/PropertyValue.hpp>
...@@ -69,16 +68,6 @@ using namespace com::sun::star; ...@@ -69,16 +68,6 @@ using namespace com::sun::star;
/* /*
* static helpers * static helpers
*/ */
#if defined( UNX ) && !( defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) )
static oslModule driverLib = NULL;
#endif
extern "C"
{
typedef int(*setupFunction)(PrinterInfo&);
static setupFunction pSetupFunction = NULL;
}
static OUString getPdfDir( const PrinterInfo& rInfo ) static OUString getPdfDir( const PrinterInfo& rInfo )
{ {
OUString aDir; OUString aDir;
...@@ -153,24 +142,6 @@ namespace ...@@ -153,24 +142,6 @@ namespace
} }
} }
static void getPaLib()
{
#if defined( UNX ) && !( defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) )
if( ! driverLib )
{
driverLib = osl_loadModuleRelativeAscii( (oslGenericFunction)getPaLib,
_XSALSET_LIBNAME,
SAL_LOADMODULE_DEFAULT );
if ( !driverLib )
return;
pSetupFunction = (setupFunction)osl_getAsciiFunctionSymbol( driverLib, "Sal_SetupPrinterDriver" );
if ( !pSetupFunction )
fprintf( stderr, "could not resolve Sal_SetupPrinterDriver\n" );
}
#endif
}
inline int PtTo10Mu( int nPoints ) { return (int)((((double)nPoints)*35.27777778)+0.5); } inline int PtTo10Mu( int nPoints ) { return (int)((((double)nPoints)*35.27777778)+0.5); }
inline int TenMuToPt( int nUnits ) { return (int)((((double)nUnits)/35.27777778)+0.5); } inline int TenMuToPt( int nUnits ) { return (int)((((double)nUnits)/35.27777778)+0.5); }
...@@ -572,11 +543,6 @@ bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) ...@@ -572,11 +543,6 @@ bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
if( ! pFrame || ! pJobSetup ) if( ! pFrame || ! pJobSetup )
return false; return false;
getPaLib();
if( ! pSetupFunction )
return false;
PrinterInfoManager& rManager = PrinterInfoManager::get(); PrinterInfoManager& rManager = PrinterInfoManager::get();
PrinterInfo aInfo( rManager.getPrinterInfo( pJobSetup->maPrinterName ) ); PrinterInfo aInfo( rManager.getPrinterInfo( pJobSetup->maPrinterName ) );
...@@ -586,7 +552,7 @@ bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) ...@@ -586,7 +552,7 @@ bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo ); JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aInfo );
} }
if( pSetupFunction( aInfo ) ) if (SetupPrinterDriver(aInfo))
{ {
aInfo.resolveDefaultBackend(); aInfo.resolveDefaultBackend();
rtl_freeMemory( pJobSetup->mpDriverData ); rtl_freeMemory( pJobSetup->mpDriverData );
......
...@@ -18,16 +18,14 @@ ...@@ -18,16 +18,14 @@
*/ */
#include "prtsetup.hxx" #include "prtsetup.hxx"
#include "helper.hxx" #include "svdata.hxx"
#include "rtsetup.hrc" #include "svids.hrc"
#include "osl/thread.h" #include "osl/thread.h"
#include <officecfg/Office/Common.hxx> #include <officecfg/Office/Common.hxx>
using namespace psp; using namespace psp;
using namespace padmin;
void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, const PPDKey* pKey ) void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, const PPDKey* pKey )
{ {
...@@ -74,12 +72,12 @@ void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, con ...@@ -74,12 +72,12 @@ void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, con
*/ */
RTSDialog::RTSDialog(const PrinterInfo& rJobData, const OUString& rPrinter, Window* pParent) RTSDialog::RTSDialog(const PrinterInfo& rJobData, const OUString& rPrinter, Window* pParent)
: TabDialog(pParent, "PrinterPropertiesDialog", "spa/ui/printerpropertiesdialog.ui") : TabDialog(pParent, "PrinterPropertiesDialog", "vcl/ui/printerpropertiesdialog.ui")
, m_aJobData(rJobData) , m_aJobData(rJobData)
, m_aPrinter(rPrinter) , m_aPrinter(rPrinter)
, m_pPaperPage(NULL) , m_pPaperPage(NULL)
, m_pDevicePage(NULL) , m_pDevicePage(NULL)
, m_aInvalidString(PaResId(RID_RTS_RTSDIALOG_INVALID_TXT).toString()) , m_aInvalidString(VclResId(SV_PRINT_INVALID_TXT))
{ {
get(m_pOKButton, "ok"); get(m_pOKButton, "ok");
get(m_pCancelButton, "cancel"); get(m_pCancelButton, "cancel");
...@@ -163,7 +161,7 @@ IMPL_LINK( RTSDialog, ClickButton, Button*, pButton ) ...@@ -163,7 +161,7 @@ IMPL_LINK( RTSDialog, ClickButton, Button*, pButton )
*/ */
RTSPaperPage::RTSPaperPage(RTSDialog* pParent) RTSPaperPage::RTSPaperPage(RTSDialog* pParent)
: TabPage(pParent->m_pTabControl, "PrinterPaperPage", "spa/ui/printerpaperpage.ui") : TabPage(pParent->m_pTabControl, "PrinterPaperPage", "vcl/ui/printerpaperpage.ui")
, m_pParent( pParent ) , m_pParent( pParent )
{ {
get(m_pPaperText, "paperft"); get(m_pPaperText, "paperft");
...@@ -288,7 +286,7 @@ IMPL_LINK( RTSPaperPage, SelectHdl, ListBox*, pBox ) ...@@ -288,7 +286,7 @@ IMPL_LINK( RTSPaperPage, SelectHdl, ListBox*, pBox )
*/ */
RTSDevicePage::RTSDevicePage( RTSDialog* pParent ) RTSDevicePage::RTSDevicePage( RTSDialog* pParent )
: TabPage(pParent->m_pTabControl, "PrinterDevicePage", "spa/ui/printerdevicepage.ui" ) : TabPage(pParent->m_pTabControl, "PrinterDevicePage", "vcl/ui/printerdevicepage.ui" )
, m_pParent( pParent ) , m_pParent( pParent )
{ {
get(m_pPPDKeyBox, "options"); get(m_pPPDKeyBox, "options");
...@@ -472,21 +470,18 @@ void RTSDevicePage::FillValueBox( const PPDKey* pKey ) ...@@ -472,21 +470,18 @@ void RTSDevicePage::FillValueBox( const PPDKey* pKey )
m_pPPDValueBox->SelectEntryPos( m_pPPDValueBox->GetEntryPos( (void*)pValue ) ); m_pPPDValueBox->SelectEntryPos( m_pPPDValueBox->GetEntryPos( (void*)pValue ) );
} }
extern "C" { int SetupPrinterDriver(::psp::PrinterInfo& rJobData)
{
int nRet = 0;
RTSDialog aDialog( rJobData, rJobData.m_aPrinterName, false );
int SPA_DLLPUBLIC Sal_SetupPrinterDriver( ::psp::PrinterInfo& rJobData ) if( aDialog.Execute() )
{ {
int nRet = 0; rJobData = aDialog.getSetup();
RTSDialog aDialog( rJobData, rJobData.m_aPrinterName, false ); nRet = 1;
if( aDialog.Execute() )
{
rJobData = aDialog.getSetup();
nRet = 1;
}
return nRet;
} }
} // extern "C"
return nRet;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#ifndef _PAD_PRTSETUP_HXX_ #ifndef _PAD_PRTSETUP_HXX_
#define _PAD_PRTSETUP_HXX_ #define _PAD_PRTSETUP_HXX_
#include "helper.hxx"
#include "tools/link.hxx" #include "tools/link.hxx"
#include "vcl/tabdlg.hxx" #include "vcl/tabdlg.hxx"
...@@ -35,8 +33,6 @@ ...@@ -35,8 +33,6 @@
#include "vcl/ppdparser.hxx" #include "vcl/ppdparser.hxx"
#include "vcl/printerinfomanager.hxx" #include "vcl/printerinfomanager.hxx"
namespace padmin {
class RTSPaperPage; class RTSPaperPage;
class RTSDevicePage; class RTSDevicePage;
...@@ -126,7 +122,7 @@ public: ...@@ -126,7 +122,7 @@ public:
sal_uLong getColorDevice(); sal_uLong getColorDevice();
}; };
} // namespace int SetupPrinterDriver(::psp::PrinterInfo& rJobData);
#endif // _PAD_PRTSETUP_HXX #endif // _PAD_PRTSETUP_HXX
......
...@@ -86,7 +86,7 @@ public: ...@@ -86,7 +86,7 @@ public:
/// check if the printer configuration has changed /// check if the printer configuration has changed
virtual bool checkPrintersChanged( bool bWait ); virtual bool checkPrintersChanged( bool bWait );
// members for administration (->padmin) // members for administration
// disable for CUPS // disable for CUPS
virtual bool addPrinter( const OUString& rPrinterName, const OUString& rDriverName ); virtual bool addPrinter( const OUString& rPrinterName, const OUString& rDriverName );
virtual bool removePrinter( const OUString& rPrinterName, bool bCheckOnly = false ); virtual bool removePrinter( const OUString& rPrinterName, bool bCheckOnly = false );
......
...@@ -213,6 +213,7 @@ ...@@ -213,6 +213,7 @@
#define SV_PRINT_COLLATE_IMG 10613 #define SV_PRINT_COLLATE_IMG 10613
#define SV_PRINT_NOCOLLATE_IMG 10614 #define SV_PRINT_NOCOLLATE_IMG 10614
#define SV_PRINT_QUERYFAXNUMBER_TXT 10615 #define SV_PRINT_QUERYFAXNUMBER_TXT 10615
#define SV_PRINT_INVALID_TXT 10616
#define SV_EDIT_WARNING_BOX 10650 #define SV_EDIT_WARNING_BOX 10650
......
...@@ -110,4 +110,9 @@ String SV_PRINT_QUERYFAXNUMBER_TXT ...@@ -110,4 +110,9 @@ String SV_PRINT_QUERYFAXNUMBER_TXT
Text [ en-US ] = "Please enter the fax number."; Text [ en-US ] = "Please enter the fax number.";
}; };
String SV_PRINT_INVALID_TXT
{
Text [ en-US ] = "<ignore>";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -529,7 +529,7 @@ void PrinterInfoManager::initialize() ...@@ -529,7 +529,7 @@ void PrinterInfoManager::initialize()
aPrinterName += ">"; aPrinterName += ">";
if( m_aPrinters.find( aPrinterName ) != m_aPrinters.end() ) if( m_aPrinters.find( aPrinterName ) != m_aPrinters.end() )
// probably user made this one permanent in padmin // probably user made this one permanent
continue; continue;
OUString aCmd( m_aSystemPrintCommand ); OUString aCmd( m_aSystemPrintCommand );
...@@ -544,7 +544,7 @@ void PrinterInfoManager::initialize() ...@@ -544,7 +544,7 @@ void PrinterInfoManager::initialize()
aPrinter.m_aInfo.m_aComment = it->m_aComment; aPrinter.m_aInfo.m_aComment = it->m_aComment;
aPrinter.m_aInfo.m_aLocation = it->m_aLocation; aPrinter.m_aInfo.m_aLocation = it->m_aLocation;
aPrinter.m_bModified = false; aPrinter.m_bModified = false;
aPrinter.m_aGroup = OUStringToOString(aPrinterName, aEncoding); //provide group name in case user makes this one permanent in padmin aPrinter.m_aGroup = OUStringToOString(aPrinterName, aEncoding); //provide group name in case user makes this one permanent
m_aPrinters[ aPrinterName ] = aPrinter; m_aPrinters[ aPrinterName ] = aPrinter;
} }
...@@ -787,8 +787,8 @@ bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUStrin ...@@ -787,8 +787,8 @@ bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUStrin
#endif #endif
// comment: logically one should writePrinterConfig() here // comment: logically one should writePrinterConfig() here
// but immediately after addPrinter() a changePrinterInfo() // but immediately after addPrinter() a changePrinterInfo()
// will follow (see padmin code), which writes it again, // will follow which writes it again, so we can currently save some
// so we can currently save some performance here // performance here
} }
return bSuccess; return bSuccess;
} }
......
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