viewprn.cxx (79aad27f) | viewprn.cxx (3d720f72) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 11 unchanged lines hidden (view full) --- 20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_sfx2.hxx" 26 27#include <com/sun/star/document/XDocumentProperties.hpp> | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 11 unchanged lines hidden (view full) --- 20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_sfx2.hxx" 26 27#include <com/sun/star/document/XDocumentProperties.hpp> |
28#include <com/sun/star/view/PrintableState.hpp> | |
29#include "com/sun/star/view/XRenderable.hpp" 30 31#include <svl/itempool.hxx> 32#include <vcl/msgbox.hxx> 33#include <svtools/prnsetup.hxx> 34#include <svl/flagitem.hxx> 35#include <svl/stritem.hxx> 36#include <svl/intitem.hxx> --- 19 unchanged lines hidden (view full) --- 56#include "toolkit/awt/vclxdevice.hxx" 57 58#include "view.hrc" 59#include "helpid.hrc" 60 61using namespace com::sun::star; 62using namespace com::sun::star::uno; 63 | 28#include "com/sun/star/view/XRenderable.hpp" 29 30#include <svl/itempool.hxx> 31#include <vcl/msgbox.hxx> 32#include <svtools/prnsetup.hxx> 33#include <svl/flagitem.hxx> 34#include <svl/stritem.hxx> 35#include <svl/intitem.hxx> --- 19 unchanged lines hidden (view full) --- 55#include "toolkit/awt/vclxdevice.hxx" 56 57#include "view.hrc" 58#include "helpid.hrc" 59 60using namespace com::sun::star; 61using namespace com::sun::star::uno; 62 |
64TYPEINIT1(SfxPrintingHint, SfxHint); | 63TYPEINIT1(SfxPrintingHint, SfxViewEventHint); |
65 66// ----------------------------------------------------------------------- 67class SfxPrinterController : public vcl::PrinterController, public SfxListener 68{ 69 Any maCompleteSelection; 70 Any maSelection; 71 Reference< view::XRenderable > mxRenderable; 72 mutable Printer* mpLastPrinter; --- 227 unchanged lines hidden (view full) --- 300 ? ::rtl::OUString( SvtUserOptions().GetFullName() ) 301 : ::rtl::OUString() ); 302 ::DateTime now; 303 304 xDocProps->setPrintDate( util::DateTime( 305 now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(), 306 now.GetDay(), now.GetMonth(), now.GetYear() ) ); 307 | 64 65// ----------------------------------------------------------------------- 66class SfxPrinterController : public vcl::PrinterController, public SfxListener 67{ 68 Any maCompleteSelection; 69 Any maSelection; 70 Reference< view::XRenderable > mxRenderable; 71 mutable Printer* mpLastPrinter; --- 227 unchanged lines hidden (view full) --- 299 ? ::rtl::OUString( SvtUserOptions().GetFullName() ) 300 : ::rtl::OUString() ); 301 ::DateTime now; 302 303 xDocProps->setPrintDate( util::DateTime( 304 now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(), 305 now.GetDay(), now.GetMonth(), now.GetYear() ) ); 306 |
308 // FIXME: how to get all print options incl. AdditionalOptions easily? | |
309 uno::Sequence < beans::PropertyValue > aOpts; | 307 uno::Sequence < beans::PropertyValue > aOpts; |
310 mpObjectShell->Broadcast( SfxPrintingHint( view::PrintableState_JOB_STARTED, aOpts ) ); | 308 aOpts = getJobProperties( aOpts ); 309 310 uno::Reference< frame::XController2 > xController; 311 if ( mpViewShell ) 312 xController.set( mpViewShell->GetController(), uno::UNO_QUERY ); 313 314 mpObjectShell->Broadcast( SfxPrintingHint( 315 view::PrintableState_JOB_STARTED, aOpts, mpObjectShell, xController ) ); |
311 } 312} 313 314void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nState ) 315{ 316 if ( mpObjectShell ) 317 { 318 bool bCopyJobSetup = false; --- 650 unchanged lines hidden --- | 316 } 317} 318 319void SfxPrinterController::jobFinished( com::sun::star::view::PrintableState nState ) 320{ 321 if ( mpObjectShell ) 322 { 323 bool bCopyJobSetup = false; --- 650 unchanged lines hidden --- |