From 1bee6c0e9121cf1d3d246a7e49f5e0d89aad6682 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 16 Aug 2010 20:31:58 +0200 Subject: pdfprint: #i94173# #i113802# send print jobs in PDF instead of PostScript --- padmin/source/prtsetup.cxx | 39 +++++++++++++++++++++++++++++++-------- padmin/source/prtsetup.hxx | 3 ++- padmin/source/rtsetup.hrc | 10 +++++----- padmin/source/rtsetup.src | 14 +++++++++++--- 4 files changed, 49 insertions(+), 17 deletions(-) (limited to 'padmin') 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 { -- cgit v1.2.3 From 240bb1f07083839b69767fa68603999d5c5aaba7 Mon Sep 17 00:00:00 2001 From: sb Date: Thu, 9 Sep 2010 10:48:03 +0200 Subject: hb22: #b6982587# treat null LD_LIBRARY_PATH like unset one --- padmin/source/spadmin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'padmin') diff --git a/padmin/source/spadmin.sh b/padmin/source/spadmin.sh index 31ab4382fe52..c831ab7f0919 100644 --- a/padmin/source/spadmin.sh +++ b/padmin/source/spadmin.sh @@ -57,7 +57,7 @@ if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \ "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"` if [ -n "$my_path" ] ; then - LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} + LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export LD_LIBRARY_PATH fi fi -- cgit v1.2.3