summaryrefslogtreecommitdiff
path: root/padmin/source
diff options
context:
space:
mode:
Diffstat (limited to 'padmin/source')
-rw-r--r--padmin/source/prtsetup.cxx39
-rw-r--r--padmin/source/prtsetup.hxx3
-rw-r--r--padmin/source/rtsetup.hrc10
-rw-r--r--padmin/source/rtsetup.src14
4 files changed, 49 insertions, 17 deletions
diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index 17d28515e540..8165b8015403 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -198,6 +198,7 @@ IMPL_LINK( RTSDialog, ClickButton, Button*, pButton )
m_aJobData.m_nColorDepth = m_pDevicePage->getDepth();
m_aJobData.m_nColorDevice = m_pDevicePage->getColorDevice();
m_aJobData.m_nPSLevel = m_pDevicePage->getLevel();
+ m_aJobData.m_nPDFDevice = m_pDevicePage->getPDFDevice();
}
if( m_pOtherPage )
// write other settings
@@ -363,8 +364,8 @@ RTSDevicePage::RTSDevicePage( RTSDialog* pParent ) :
m_aPPDKeyBox( this, PaResId( RID_RTS_DEVICE_PPDKEY_BOX ) ),
m_aPPDValueText( this, PaResId( RID_RTS_DEVICE_PPDVALUE_TXT ) ),
m_aPPDValueBox( this, PaResId( RID_RTS_DEVICE_PPDVALUE_BOX ) ),
- m_aLevelText( this, PaResId( RID_RTS_DEVICE_LEVEL_TXT ) ),
- m_aLevelBox( this, PaResId( RID_RTS_DEVICE_LEVEL_BOX ) ),
+ m_aLevelText( this, PaResId( RID_RTS_DEVICE_PRINTLANG_TXT ) ),
+ m_aLevelBox( this, PaResId( RID_RTS_DEVICE_PRINTLANG_BOX ) ),
m_aSpaceText( this, PaResId( RID_RTS_DEVICE_SPACE_TXT ) ),
m_aSpaceBox( this, PaResId( RID_RTS_DEVICE_SPACE_BOX ) ),
m_aDepthText( this, PaResId( RID_RTS_DEVICE_DEPTH_TXT ) ),
@@ -385,13 +386,19 @@ RTSDevicePage::RTSDevicePage( RTSDialog* pParent ) :
case 1: m_aSpaceBox.SelectEntry( m_aSpaceColor );break;
}
- m_aLevelBox.InsertEntry( m_pParent->m_aFromDriverString );
- m_aLevelBox.InsertEntry( String( RTL_CONSTASCII_USTRINGPARAM( "1" ) ) );
- m_aLevelBox.InsertEntry( String( RTL_CONSTASCII_USTRINGPARAM( "2" ) ) );
- if( m_pParent->m_aJobData.m_nPSLevel == 0 )
- m_aLevelBox.SelectEntry( m_pParent->m_aFromDriverString );
+ ULONG nLevelEntryData = 0;
+ if( m_pParent->m_aJobData.m_nPDFDevice > 0 )
+ nLevelEntryData = 10;
else
- m_aLevelBox.SelectEntry( String::CreateFromInt32( m_pParent->m_aJobData.m_nPSLevel ) );
+ nLevelEntryData = m_pParent->m_aJobData.m_nPSLevel+1;
+ for( USHORT i = 0; i < m_aLevelBox.GetEntryCount(); i++ )
+ {
+ if( (ULONG)m_aLevelBox.GetEntryData( i ) == nLevelEntryData )
+ {
+ m_aLevelBox.SelectEntryPos( i );
+ break;
+ }
+ }
m_aDepthBox.SelectEntry( String::CreateFromInt32( m_pParent->m_aJobData.m_nColorDepth ).AppendAscii( " Bit" ) );
@@ -430,6 +437,22 @@ void RTSDevicePage::update()
// ------------------------------------------------------------------
+ULONG RTSDevicePage::getLevel()
+{
+ ULONG nLevel = (ULONG)m_aLevelBox.GetEntryData( m_aLevelBox.GetSelectEntryPos() );
+ return nLevel < 10 ? nLevel-1 : 0;
+}
+
+// ------------------------------------------------------------------
+
+ULONG RTSDevicePage::getPDFDevice()
+{
+ ULONG nLevel = (ULONG)m_aLevelBox.GetEntryData( m_aLevelBox.GetSelectEntryPos() );
+ return nLevel > 9 ? 1 : 0;
+}
+
+// ------------------------------------------------------------------
+
IMPL_LINK( RTSDevicePage, SelectHdl, ListBox*, pBox )
{
if( pBox == &m_aPPDKeyBox )
diff --git a/padmin/source/prtsetup.hxx b/padmin/source/prtsetup.hxx
index 65288f738482..72e3d81ee8d7 100644
--- a/padmin/source/prtsetup.hxx
+++ b/padmin/source/prtsetup.hxx
@@ -147,7 +147,8 @@ public:
void update();
- ULONG getLevel() { return m_aLevelBox.GetSelectEntry().ToInt32(); }
+ ULONG getLevel();
+ ULONG getPDFDevice();
ULONG getDepth() { return m_aDepthBox.GetSelectEntry().ToInt32(); }
ULONG getColorDevice()
{
diff --git a/padmin/source/rtsetup.hrc b/padmin/source/rtsetup.hrc
index 30439088de8e..7b6677de7ec4 100644
--- a/padmin/source/rtsetup.hrc
+++ b/padmin/source/rtsetup.hrc
@@ -48,13 +48,13 @@
#define RID_RTS_DEVICEPAGE 4003
#define RID_RTS_DEVICE_COLOR_TXT 1
-#define RID_RTS_DEVICE_GRAY_TXT 2
+#define RID_RTS_DEVICE_GRAY_TXT 2
#define RID_RTS_DEVICE_PPDKEY_TXT 3
#define RID_RTS_DEVICE_PPDKEY_BOX 4
-#define RID_RTS_DEVICE_PPDVALUE_TXT 5
-#define RID_RTS_DEVICE_PPDVALUE_BOX 6
-#define RID_RTS_DEVICE_LEVEL_TXT 7
-#define RID_RTS_DEVICE_LEVEL_BOX 8
+#define RID_RTS_DEVICE_PPDVALUE_TXT 5
+#define RID_RTS_DEVICE_PPDVALUE_BOX 6
+#define RID_RTS_DEVICE_PRINTLANG_TXT 7
+#define RID_RTS_DEVICE_PRINTLANG_BOX 8
#define RID_RTS_DEVICE_SPACE_TXT 9
#define RID_RTS_DEVICE_SPACE_BOX 10
#define RID_RTS_DEVICE_DEPTH_TXT 11
diff --git a/padmin/source/rtsetup.src b/padmin/source/rtsetup.src
index e04374a72245..e2e9a4c8aea3 100644
--- a/padmin/source/rtsetup.src
+++ b/padmin/source/rtsetup.src
@@ -173,17 +173,25 @@ TabPage RID_RTS_DEVICEPAGE
Size = MAP_APPFONT( 105, 111 );
};
- FixedText RID_RTS_DEVICE_LEVEL_TXT
+ FixedText RID_RTS_DEVICE_PRINTLANG_TXT
{
Pos = MAP_APPFONT( 5, 130 );
Size = MAP_APPFONT( 80, 8 );
- Text [ en-US ] = "PostScript ~Level";
+ Text [ en-US ] = "Printer ~Language type";
};
- ListBox RID_RTS_DEVICE_LEVEL_BOX
+ ListBox RID_RTS_DEVICE_PRINTLANG_BOX
{
DropDown = TRUE;
Pos = MAP_APPFONT( 120, 130 );
Size = MAP_APPFONT( 105, 200 );
+ StringList [en-US] =
+ {
+ < "PostScript (Level from driver)" ; 1; > ;
+ < "PostScript Level 1" ; 2; > ;
+ < "PostScript Level 2"; 3; > ;
+ < "PostScript Level 3"; 3; > ;
+ < "PDF"; 10; > ;
+ };
};
FixedText RID_RTS_DEVICE_SPACE_TXT
{