diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-01-21 13:49:22 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-01-21 13:49:22 +0100 |
commit | e1418e1b155368d8e9be649c2ce809d012d565fa (patch) | |
tree | b6627dc74804b255dbc28f0a6199324deb128482 /toolkit | |
parent | 9fe074cacb027df327a00e39724ece4166b68147 (diff) | |
parent | 7f5f6c30e89c27422a1576ccceb9b0d79c8e3f0d (diff) |
resync to DEV300_m70
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/inc/toolkit/awt/vclxprinter.hxx | 15 | ||||
-rw-r--r-- | toolkit/source/awt/vclxprinter.cxx | 36 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindows.cxx | 6 | ||||
-rw-r--r-- | toolkit/source/controls/formattedcontrol.cxx | 1 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrols.cxx | 2 |
5 files changed, 37 insertions, 23 deletions
diff --git a/toolkit/inc/toolkit/awt/vclxprinter.hxx b/toolkit/inc/toolkit/awt/vclxprinter.hxx index e94864b51280..4db43a3c5d77 100644 --- a/toolkit/inc/toolkit/awt/vclxprinter.hxx +++ b/toolkit/inc/toolkit/awt/vclxprinter.hxx @@ -43,9 +43,7 @@ #include <toolkit/helper/mutexandbroadcasthelper.hxx> #include <cppuhelper/propshlp.hxx> -class Printer; -class String; - +#include "vcl/oldprintadaptor.hxx" // Fuer den Drucker relevante Properties: /* @@ -65,20 +63,17 @@ class VCLXPrinterPropertySet : public ::com::sun::star::awt::XPrinterPropertySe public MutexAndBroadcastHelper, public ::cppu::OPropertySetHelper { -private: - Printer* mpPrinter; +protected: + boost::shared_ptr<Printer> mpPrinter; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > mxPrnDevice; sal_Int16 mnOrientation; sal_Bool mbHorizontal; - -protected: - public: VCLXPrinterPropertySet( const String& rPrinterName ); virtual ~VCLXPrinterPropertySet(); - Printer* GetPrinter() const { return mpPrinter; } + Printer* GetPrinter() const { return mpPrinter.get(); } ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > GetDevice(); // ::com::sun::star::uno::XInterface @@ -120,6 +115,8 @@ class VCLXPrinter: public ::com::sun::star::awt::XPrinter, public VCLXPrinterPropertySet, public ::cppu::OWeakObject { + boost::shared_ptr<vcl::OldStylePrintAdaptor> mpListener; + JobSetup maInitJobSetup; public: VCLXPrinter( const String& rPrinterName ); ~VCLXPrinter(); diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx index 69d8dd827497..a8059463a297 100644 --- a/toolkit/source/awt/vclxprinter.cxx +++ b/toolkit/source/awt/vclxprinter.cxx @@ -102,10 +102,10 @@ IMPL_XTYPEPROVIDER_END VCLXPrinterPropertySet::VCLXPrinterPropertySet( const String& rPrinterName ) : OPropertySetHelper( BrdcstHelper ) + , mpPrinter( new Printer( rPrinterName ) ) { osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() ); - mpPrinter = new Printer( rPrinterName ); mnOrientation = 0; mbHorizontal = sal_False; } @@ -113,8 +113,7 @@ VCLXPrinterPropertySet::VCLXPrinterPropertySet( const String& rPrinterName ) VCLXPrinterPropertySet::~VCLXPrinterPropertySet() { osl::Guard< vos::IMutex > aSolarGuard( Application::GetSolarMutex() ); - - delete mpPrinter; + mpPrinter.reset(); } ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXPrinterPropertySet::GetDevice() @@ -326,13 +325,16 @@ IMPL_XTYPEPROVIDER_START( VCLXPrinter ) VCLXPrinterPropertySet::getTypes() IMPL_XTYPEPROVIDER_END -sal_Bool VCLXPrinter::start( const ::rtl::OUString& rJobName, sal_Int16 /*nCopies*/, sal_Bool /*bCollate*/ ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) +sal_Bool VCLXPrinter::start( const ::rtl::OUString& /*rJobName*/, sal_Int16 /*nCopies*/, sal_Bool /*bCollate*/ ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); sal_Bool bDone = sal_True; - if ( GetPrinter() ) - bDone = GetPrinter()->StartJob( rJobName ); + if ( mpListener.get() ) + { + maInitJobSetup = mpPrinter->GetJobSetup(); + mpListener.reset( new vcl::OldStylePrintAdaptor( mpPrinter ) ); + } return bDone; } @@ -341,24 +343,28 @@ void VCLXPrinter::end( ) throw(::com::sun::star::awt::PrinterException, ::com:: { ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); - if ( GetPrinter() ) - GetPrinter()->EndJob(); + if ( mpListener.get() ) + { + Printer::PrintJob( mpListener, maInitJobSetup ); + mpListener.reset(); + } } void VCLXPrinter::terminate( ) throw(::com::sun::star::uno::RuntimeException) { ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); - if ( GetPrinter() ) - GetPrinter()->AbortJob(); + mpListener.reset(); } ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > VCLXPrinter::startPage( ) throw(::com::sun::star::awt::PrinterException, ::com::sun::star::uno::RuntimeException) { ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); - if ( GetPrinter() ) - GetPrinter()->StartPage(); + if ( mpListener.get() ) + { + mpListener->StartPage(); + } return GetDevice(); } @@ -366,8 +372,10 @@ void VCLXPrinter::endPage( ) throw(::com::sun::star::awt::PrinterException, ::c { ::osl::Guard< ::osl::Mutex > aGuard( Mutex ); - if ( GetPrinter() ) - GetPrinter()->EndPage(); + if ( mpListener.get() ) + { + mpListener->EndPage(); + } } diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 7757d170256a..e41de1e8bd25 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -3390,6 +3390,7 @@ void VCLXEdit::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_PAINTTRANSPARENT, BASEPROPERTY_AUTOHSCROLL, BASEPROPERTY_AUTOVSCROLL, + BASEPROPERTY_VERTICALALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, 0); @@ -4283,6 +4284,7 @@ void VCLXDateField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_ENFORCE_FORMAT, BASEPROPERTY_TEXT, BASEPROPERTY_HIDEINACTIVESELECTION, + BASEPROPERTY_VERTICALALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, @@ -4624,6 +4626,7 @@ void VCLXTimeField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_ENFORCE_FORMAT, BASEPROPERTY_TEXT, BASEPROPERTY_HIDEINACTIVESELECTION, + BASEPROPERTY_VERTICALALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, @@ -4927,6 +4930,7 @@ void VCLXNumericField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_VALUE_DOUBLE, BASEPROPERTY_ENFORCE_FORMAT, BASEPROPERTY_HIDEINACTIVESELECTION, + BASEPROPERTY_VERTICALALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, @@ -5521,6 +5525,7 @@ void VCLXCurrencyField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_VALUE_DOUBLE, BASEPROPERTY_ENFORCE_FORMAT, BASEPROPERTY_HIDEINACTIVESELECTION, + BASEPROPERTY_VERTICALALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, @@ -5868,6 +5873,7 @@ void VCLXPatternField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_TABSTOP, BASEPROPERTY_TEXT, BASEPROPERTY_HIDEINACTIVESELECTION, + BASEPROPERTY_VERTICALALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx index 6171067f1185..5ac7a0237479 100644 --- a/toolkit/source/controls/formattedcontrol.cxx +++ b/toolkit/source/controls/formattedcontrol.cxx @@ -160,6 +160,7 @@ namespace toolkit ImplRegisterProperty( BASEPROPERTY_TEXTCOLOR ); ImplRegisterProperty( BASEPROPERTY_HIDEINACTIVESELECTION ); ImplRegisterProperty( BASEPROPERTY_ENFORCE_FORMAT ); + ImplRegisterProperty( BASEPROPERTY_VERTICALALIGN ); ImplRegisterProperty( BASEPROPERTY_WRITING_MODE ); ImplRegisterProperty( BASEPROPERTY_CONTEXT_WRITING_MODE ); ImplRegisterProperty( BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR ); diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 3abacef7b67f..9e508c884f59 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -476,6 +476,7 @@ void UnoEditControl::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) t // ---------------------------------------------------- UnoControlFileControlModel::UnoControlFileControlModel() { + ImplRegisterProperty( BASEPROPERTY_ALIGN ); ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); ImplRegisterProperty( BASEPROPERTY_BORDER ); ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR ); @@ -489,6 +490,7 @@ UnoControlFileControlModel::UnoControlFileControlModel() ImplRegisterProperty( BASEPROPERTY_READONLY ); ImplRegisterProperty( BASEPROPERTY_TABSTOP ); ImplRegisterProperty( BASEPROPERTY_TEXT ); + ImplRegisterProperty( BASEPROPERTY_VERTICALALIGN ); ImplRegisterProperty( BASEPROPERTY_WRITING_MODE ); ImplRegisterProperty( BASEPROPERTY_CONTEXT_WRITING_MODE ); ImplRegisterProperty( BASEPROPERTY_HIDEINACTIVESELECTION ); |