summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/printhelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/printhelper.cxx')
-rwxr-xr-xsfx2/source/doc/printhelper.cxx74
1 files changed, 0 insertions, 74 deletions
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 2cd195976832..1dc2423bcdaf 100755
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -53,7 +53,6 @@
#include <ucbhelper/content.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <vos/mutex.hxx>
-#include <svtools/printdlg.hxx>
#include <cppuhelper/implbase1.hxx>
#include <sfx2/viewfrm.hxx>
@@ -799,81 +798,8 @@ void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHin
{
if ( !m_xPrintJob.is() )
m_xPrintJob = new SfxPrintJob_Impl( this );
-/*
- PrintDialog* pDlg = pPrintHint->GetPrintDialog();
- Printer* pPrinter = pPrintHint->GetPrinter();
- ::rtl::OUString aPrintFile ( ( pPrinter && pPrinter->IsPrintFileEnabled() ) ? pPrinter->GetPrintFile() : String() );
- ::rtl::OUString aRangeText ( ( pDlg && pDlg->IsRangeChecked(PRINTDIALOG_RANGE) ) ? pDlg->GetRangeText() : String() );
- sal_Bool bSelectionOnly = ( ( pDlg && pDlg->IsRangeChecked(PRINTDIALOG_SELECTION) ) ? sal_True : sal_False );
-
- sal_Int32 nArgs = 2;
- if ( aPrintFile.getLength() )
- nArgs++;
- if ( aRangeText.getLength() )
- nArgs++;
- else if ( bSelectionOnly )
- nArgs++;
-
- m_aPrintOptions.realloc(nArgs);
- m_aPrintOptions[0].Name = DEFINE_CONST_UNICODE("CopyCount");
- m_aPrintOptions[0].Value <<= (sal_Int16) (pPrinter ? pPrinter->GetCopyCount() : 1 );
- m_aPrintOptions[1].Name = DEFINE_CONST_UNICODE("Collate");
- m_aPrintOptions[1].Value <<= (sal_Bool) (pDlg ? pDlg->IsCollateChecked() : sal_False );
-
- if ( bSelectionOnly )
- {
- m_aPrintOptions[2].Name = DEFINE_CONST_UNICODE("Selection");
- m_aPrintOptions[2].Value <<= bSelectionOnly;
- }
- else if ( aRangeText.getLength() )
- {
- m_aPrintOptions[2].Name = DEFINE_CONST_UNICODE("Pages");
- m_aPrintOptions[2].Value <<= aRangeText;
- }
-
- if ( aPrintFile.getLength() )
- {
- m_aPrintOptions[nArgs-1].Name = DEFINE_CONST_UNICODE("FileName");
- m_aPrintOptions[nArgs-1].Value <<= aPrintFile;
- }
-*/
m_aPrintOptions = pPrintHint->GetOptions();
}
-/*
- else if ( pPrintHint->GetWhich() == -3 ) // -3 : AdditionalPrintOptions
- {
- uno::Sequence < beans::PropertyValue >& lOldOpts = m_aPrintOptions;
- const uno::Sequence < beans::PropertyValue >& lNewOpts = pPrintHint->GetAdditionalOptions();
- sal_Int32 nOld = lOldOpts.getLength();
- sal_Int32 nAdd = lNewOpts.getLength();
- lOldOpts.realloc( nOld + nAdd );
-
- // assume that all new elements are overwriting old ones and so don't need to be added
- sal_Int32 nTotal = nOld;
- for ( sal_Int32 n=0; n<nAdd; n++ )
- {
- sal_Int32 m;
- for ( m=0; m<nOld; m++ )
- if ( lNewOpts[n].Name == lOldOpts[m].Name )
- // new option overwrites old one
- break;
-
- if ( m == nOld )
- {
- // this is a new option, so add it to the resulting sequence - counter must be incremented
- lOldOpts[nTotal].Name = lNewOpts[n].Name;
- lOldOpts[nTotal++].Value = lNewOpts[n].Value;
- }
- else
- // overwrite old option with new value, counter stays unmodified
- lOldOpts[m].Value = lNewOpts[n].Value;
- }
-
- if ( nTotal != lOldOpts.getLength() )
- // at least one new options has overwritten an old one, so we allocated too much
- lOldOpts.realloc( nTotal );
- }
-*/
else if ( pPrintHint->GetWhich() != -2 ) // -2 : CancelPrintJob
{
view::PrintJobEvent aEvent;