summaryrefslogtreecommitdiff
path: root/psprint
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-09 11:16:45 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-09 11:16:45 +0000
commit20af5ad605aa3c3a3d73fd076f781d7464e3180c (patch)
treed62a7d5c5a2b18fd22cffd0ecaf5bfb479dd22ef /psprint
parente067c2aa6f19c66e409aac514e781238868ebfed (diff)
INTEGRATION: CWS vcl59 (1.32.42); FILE MERGED
2006/05/30 16:48:46 pl 1.32.42.2: RESYNC: (1.32-1.33); FILE MERGED 2006/05/30 16:31:45 pl 1.32.42.1: #b6425685# modification of existing printer sometimes failed
Diffstat (limited to 'psprint')
-rw-r--r--psprint/source/printer/printerinfomanager.cxx30
1 files changed, 18 insertions, 12 deletions
diff --git a/psprint/source/printer/printerinfomanager.cxx b/psprint/source/printer/printerinfomanager.cxx
index acc02bd1050f..f83fab418056 100644
--- a/psprint/source/printer/printerinfomanager.cxx
+++ b/psprint/source/printer/printerinfomanager.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: printerinfomanager.cxx,v $
*
- * $Revision: 1.33 $
+ * $Revision: 1.34 $
*
- * last change: $Author: vg $ $Date: 2006-05-24 12:02:50 $
+ * last change: $Author: hr $ $Date: 2006-06-09 12:16:45 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -651,22 +651,28 @@ bool PrinterInfoManager::writePrinterConfig()
// check if file is writable
if( files.find( it->second.m_aFile ) == files.end() )
{
+ bool bInsertToNewFile = false;
// maybe it is simply not inserted yet
if( rofiles.find( it->second.m_aFile ) == rofiles.end() )
{
if( checkWriteability( it->second.m_aFile ) )
files[ it->second.m_aFile ] = new Config( it->second.m_aFile );
else
- {
- rofiles[ it->second.m_aFile ] = 1;
- // update alternate file list
- // the remove operation ensures singularity of each alternate
- it->second.m_aAlternateFiles.remove( it->second.m_aFile );
- it->second.m_aAlternateFiles.remove( files.begin()->first );
- it->second.m_aAlternateFiles.push_front( it->second.m_aFile );
- // update file
- it->second.m_aFile = files.begin()->first;
- }
+ bInsertToNewFile = true;
+ }
+ else
+ bInsertToNewFile = true;
+ // original file is read only, insert printer in a new writeable file
+ if( bInsertToNewFile )
+ {
+ rofiles[ it->second.m_aFile ] = 1;
+ // update alternate file list
+ // the remove operation ensures uniqueness of each alternate
+ it->second.m_aAlternateFiles.remove( it->second.m_aFile );
+ it->second.m_aAlternateFiles.remove( files.begin()->first );
+ it->second.m_aAlternateFiles.push_front( it->second.m_aFile );
+ // update file
+ it->second.m_aFile = files.begin()->first;
}
}
}