summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-20 15:51:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-20 16:25:52 +0000
commitaa4e31ab274cdcc53d715d923823adcdadb6be22 (patch)
tree16d5a662aae6b28f59e80ca7fee407a19c2eee5b /vcl/unx
parenta475c6963e639bbc575d3591c804fbb1ef980183 (diff)
disallow disabling cups
which means that there is only one option left in "add a printer" in spadmin, that to add a pdf so remove the intermediate page Change-Id: I5f19b526b5da9307bec77c731f305280b0ebecc3
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/printer/cupsmgr.cxx10
-rw-r--r--vcl/unx/generic/printer/printerinfomanager.cxx44
2 files changed, 2 insertions, 52 deletions
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index 3627cd7670d0..9c7af07c020e 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -256,9 +256,6 @@ void CUPSManager::initialize()
if( ! (m_nDests && m_pDests ) )
return;
- if( isCUPSDisabled() )
- return;
-
// check for CUPS server(?) > 1.2
// since there is no API to query, check for options that were
// introduced in dests with 1.2
@@ -424,7 +421,7 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
if( m_aCUPSMutex.tryToAcquire() )
{
- if( m_nDests && m_pDests && ! isCUPSDisabled() )
+ if (m_nDests && m_pDests)
{
boost::unordered_map< OUString, int, OUStringHash >::iterator dest_it =
m_aCUPSDestMap.find( aPrinter );
@@ -830,11 +827,6 @@ bool CUPSManager::writePrinterConfig()
return PrinterInfoManager::writePrinterConfig();
}
-bool CUPSManager::addOrRemovePossible() const
-{
- return (m_nDests && m_pDests && ! isCUPSDisabled())? false : PrinterInfoManager::addOrRemovePossible();
-}
-
const char* CUPSManager::authenticateUser( const char* /*pIn*/ )
{
const char* pRet = NULL;
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 01d6ce62a7dd..35116c1e8348 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -117,16 +117,13 @@ PrinterInfoManager::PrinterInfoManager( Type eType ) :
m_eType( eType ),
m_bUseIncludeFeature( false ),
m_bUseJobPatch( true ),
- m_aSystemDefaultPaper( "A4" ),
- m_bDisableCUPS( false )
+ m_aSystemDefaultPaper( "A4" )
{
if( eType == Default )
m_pQueueInfo = new SystemQueueInfo();
initSystemDefaultPaper();
}
-
-
PrinterInfoManager::~PrinterInfoManager()
{
delete m_pQueueInfo;
@@ -135,26 +132,6 @@ PrinterInfoManager::~PrinterInfoManager()
#endif
}
-
-
-bool PrinterInfoManager::isCUPSDisabled() const
-{
- return m_bDisableCUPS;
-}
-
-
-
-void PrinterInfoManager::setCUPSDisabled( bool bDisable )
-{
- m_bDisableCUPS = bDisable;
- writePrinterConfig();
- // actually we know the printers changed
- // however this triggers reinitialization the right way
- checkPrintersChanged( true );
-}
-
-
-
void PrinterInfoManager::initSystemDefaultPaper()
{
m_aSystemDefaultPaper = OStringToOUString(
@@ -231,7 +208,6 @@ void PrinterInfoManager::initialize()
// need a parser for the PPDContext. generic printer should do.
m_aGlobalDefaults.m_pParser = PPDParser::getParser( OUString( "SGENPRT" ) );
m_aGlobalDefaults.m_aContext.setParser( m_aGlobalDefaults.m_pParser );
- m_bDisableCUPS = false;
if( ! m_aGlobalDefaults.m_pParser )
{
@@ -291,15 +267,6 @@ void PrinterInfoManager::initialize()
if (!aValue.isEmpty())
m_aGlobalDefaults.m_nPDFDevice = aValue.toInt32();
- aValue = aConfig.ReadKey( "DisableCUPS" );
- if (!aValue.isEmpty())
- {
- if (aValue.equals("1") || aValue.equalsIgnoreAsciiCase("true"))
- m_bDisableCUPS = true;
- else
- m_bDisableCUPS = false;
- }
-
// get the PPDContext of global JobData
for( int nKey = 0; nKey < aConfig.GetKeyCount(); ++nKey )
{
@@ -656,7 +623,6 @@ bool PrinterInfoManager::writePrinterConfig()
Config* pGlobal = files.begin()->second;
pGlobal->SetGroup( GLOBAL_DEFAULTS_GROUP );
- pGlobal->WriteKey( "DisableCUPS", m_bDisableCUPS ? "true" : "false" );
::boost::unordered_map< OUString, Printer, OUStringHash >::iterator it;
for( it = m_aPrinters.begin(); it != m_aPrinters.end(); ++it )
@@ -900,14 +866,6 @@ bool PrinterInfoManager::setDefaultPrinter( const OUString& rPrinterName )
return bSuccess;
}
-
-bool PrinterInfoManager::addOrRemovePossible() const
-{
- return true;
-}
-
-
-
void PrinterInfoManager::getSystemPrintCommands( std::list< OUString >& rCommands )
{
if( m_pQueueInfo && m_pQueueInfo->hasChanged() )