View | Details | Raw Unified | Return to issue 65491
Collapse All | Expand All

(-)file_not_specified_in_diff (-25 / +26 lines)
Line  Link Here
0
-- vcl/inc/vcl/printerjob.hxx
0
++ vcl/inc/vcl/printerjob.hxx
Lines 99-105 private: // private methods Link Here
99
99
100
    bool			writeFeatureList( osl::File* pFile, const JobData&, bool bDocumentSetup );
100
    bool			writeFeatureList( osl::File* pFile, const JobData&, bool bDocumentSetup );
101
    bool            writeSetup( osl::File* pFile, const JobData& );
101
    bool            writeSetup( osl::File* pFile, const JobData& );
102
    bool            writePageSetup( osl::File* pFile, const JobData& );
102
    bool            writePageSetup( osl::File* pFile, const JobData&, bool bWriteFeatures = true );
103
    void			writeJobPatch( osl::File* File, const JobData& );
103
    void			writeJobPatch( osl::File* File, const JobData& );
104
    bool            writeProlog (osl::File* pFile, const JobData& );
104
    bool            writeProlog (osl::File* pFile, const JobData& );
105
105
106
-- vcl/unx/source/printergfx/printerjob.cxx
106
++ vcl/unx/source/printergfx/printerjob.cxx
Lines 1047-1060 PrinterJob::StartPage (const JobData& rJ Link Here
1047
    if( ! (pPageHeader && pPageBody) )
1047
    if( ! (pPageHeader && pPageBody) )
1048
        return sal_False;
1048
        return sal_False;
1049
1049
1050
    /* #i7262# write setup only before first page
1051
     *  don't do this in StartJob since the jobsetup there may be
1052
     *  different.
1053
     */ 
1054
    bool bSuccess =  true;
1055
    if( 1 == maPageList.size() )
1056
        m_aDocumentJobData = rJobSetup;
1057
1058
    // write page header according to Document Structuring Conventions (DSC)
1050
    // write page header according to Document Structuring Conventions (DSC)
1059
    WritePS (pPageHeader, "%%Page: ");
1051
    WritePS (pPageHeader, "%%Page: ");
1060
    WritePS (pPageHeader, aPageNo); 
1052
    WritePS (pPageHeader, aPageNo); 
Lines 1077-1089 PrinterJob::StartPage (const JobData& rJ Link Here
1077
1069
1078
    WritePS (pPageHeader, pBBox);
1070
    WritePS (pPageHeader, pBBox);
1079
1071
1080
    if (bSuccess)
1072
    /* #i7262# #i65491# write setup only before first page
1081
        bSuccess = writePageSetup ( pPageHeader, rJobSetup );
1073
     *  (to %%Begin(End)Setup, instead of %%Begin(End)PageSetup)
1082
    if(bSuccess)
1074
     *  don't do this in StartJob since the jobsetup there may be
1083
        m_aLastJobData = rJobSetup;
1075
     *  different.
1076
     */ 
1077
    bool bWriteFeatures = true;
1078
    if( 1 == maPageList.size() )
1079
    {
1080
        m_aDocumentJobData = rJobSetup;
1081
        bWriteFeatures = false;
1082
    }
1084
1083
1084
    if ( writePageSetup( pPageHeader, rJobSetup, bWriteFeatures ) )
1085
    {
1086
        m_aLastJobData = rJobSetup;
1087
        return true;
1088
    }
1085
        
1089
        
1086
    return bSuccess;
1090
    return false;
1087
}
1091
}
1088
1092
1089
sal_Bool
1093
sal_Bool
Lines 1174-1185 bool PrinterJob::writeFeatureList( osl:: Link Here
1174
                if( pKey->getSetupType()    == PPDKey::DocumentSetup )
1178
                if( pKey->getSetupType()    == PPDKey::DocumentSetup )
1175
                    bEmit = true;
1179
                    bEmit = true;
1176
            }
1180
            }
1177
            else
1181
            if( pKey->getSetupType()    == PPDKey::PageSetup        ||
1178
            {
1182
                pKey->getSetupType()    == PPDKey::AnySetup )
1179
                if( pKey->getSetupType()    == PPDKey::PageSetup        ||
1183
                bEmit = true;
1180
                    pKey->getSetupType()    == PPDKey::AnySetup )
1181
                    bEmit = true;
1182
            }
1183
            if( bEmit )
1184
            if( bEmit )
1184
            {
1185
            {
1185
                const PPDValue* pValue = rJob.m_aContext.getValue( pKey );
1186
                const PPDValue* pValue = rJob.m_aContext.getValue( pKey );
Lines 1213-1225 bool PrinterJob::writeFeatureList( osl:: Link Here
1213
    return bSuccess;
1214
    return bSuccess;
1214
}
1215
}
1215
1216
1216
bool PrinterJob::writePageSetup( osl::File* pFile, const JobData& rJob )
1217
bool PrinterJob::writePageSetup( osl::File* pFile, const JobData& rJob, bool bWriteFeatures )
1217
{
1218
{
1218
    bool bSuccess = true;
1219
    bool bSuccess = true;
1219
1220
1220
    WritePS (pFile, "%%BeginPageSetup\n%\n");
1221
    WritePS (pFile, "%%BeginPageSetup\n%\n");
1221
1222
    if ( bWriteFeatures )
1222
    bSuccess = writeFeatureList( pFile, rJob, false );
1223
        bSuccess = writeFeatureList( pFile, rJob, false );
1223
    WritePS (pFile, "%%EndPageSetup\n");
1224
    WritePS (pFile, "%%EndPageSetup\n");
1224
1225
1225
    sal_Char  pTranslate [128];
1226
    sal_Char  pTranslate [128];

Return to issue 65491