diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2011-09-24 10:36:05 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2011-09-24 15:52:31 +0200 |
commit | e1de59eb4661397c888e7fab223710543c541e87 (patch) | |
tree | 32f54213eef31333575d16f4371ff31651dac4a0 /vcl | |
parent | 0f7d6910567f1df22f1706623043554989216a7c (diff) |
unusedcode: vcl::PrinterFoo
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/print.hxx | 14 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 49 |
2 files changed, 0 insertions, 63 deletions
diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx index 7b923270d4a9..d154b045d52f 100644 --- a/vcl/inc/vcl/print.hxx +++ b/vcl/inc/vcl/print.hxx @@ -441,7 +441,6 @@ public: ) : aSize( i_rSize ), bFullPaper( i_bFullPaper ) {} }; - PrinterController(); virtual ~PrinterController(); const boost::shared_ptr<Printer>& getPrinter() const; @@ -458,8 +457,6 @@ public: */ com::sun::star::beans::PropertyValue* getValue( const rtl::OUString& i_rPropertyName ); const com::sun::star::beans::PropertyValue* getValue( const rtl::OUString& i_rPropertyName ) const; - // get a sequence of properties - com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > getValues( const com::sun::star::uno::Sequence< rtl::OUString >& ) const; /* get a bool property in case the property is unknown or not convertible to bool, i_bFallback is returned */ @@ -479,7 +476,6 @@ public: void setUIOptions( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& ); /* enable/disable an option; this can be used to implement dialog logic. */ - void enableUIOption( const rtl::OUString& rPropName, bool bEnable ); bool isUIOptionEnabled( const rtl::OUString& rPropName ) const; bool isUIChoiceEnabled( const rtl::OUString& rPropName, sal_Int32 nChoice ) const; /* returns the property name rPropName depends on or an empty string @@ -570,18 +566,8 @@ class VCL_DLLPUBLIC PrinterOptionsHelper **/ void appendPrintUIOptions( com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& io_rProps ) const; - // check if a property exists - bool hasProperty( const rtl::OUString& i_rPropertyName ) const; - bool hasProperty( const char* i_pPropertyName ) const - { return hasProperty( rtl::OUString::createFromAscii( i_pPropertyName ) ); } - // returns an empty Any for not existing properties com::sun::star::uno::Any getValue( const rtl::OUString& i_rPropertyName ) const; - // change a value in the property set; this will not have an effect to an eventual PrinterController - // the user of setValue must decide whether it is necessary to set the value there also - void setValue( const rtl::OUString& i_rPropertyName, const com::sun::star::uno::Any& i_rValue ); - void setValue( const char* i_pPropertyName, const com::sun::star::uno::Any& i_rValue ) - { setValue( rtl::OUString::createFromAscii( i_pPropertyName ), i_rValue ); } sal_Bool getBoolValue( const rtl::OUString& i_rPropertyName, sal_Bool i_bDefault = sal_False ) const; // convenience for fixed strings diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index dfe5bfb2aa73..6365b20abb2d 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -198,11 +198,6 @@ public: PrinterController::PageSize modifyJobSetup( const Sequence< PropertyValue >& i_rProps, bool bNoNUP ); }; -PrinterController::PrinterController() - : mpImplData( new ImplPrinterControllerData ) -{ -} - PrinterController::PrinterController( const boost::shared_ptr<Printer>& i_pPrinter ) : mpImplData( new ImplPrinterControllerData ) { @@ -1292,20 +1287,6 @@ const beans::PropertyValue* PrinterController::getValue( const rtl::OUString& i_ return it != mpImplData->maPropertyToIndex.end() ? &mpImplData->maUIProperties[it->second] : NULL; } -Sequence< beans::PropertyValue > PrinterController::getValues( const Sequence< rtl::OUString >& i_rNames ) const -{ - Sequence< beans::PropertyValue > aRet( i_rNames.getLength() ); - sal_Int32 nFound = 0; - for( sal_Int32 i = 0; i < i_rNames.getLength(); i++ ) - { - const beans::PropertyValue* pVal = getValue( i_rNames[i] ); - if( pVal ) - aRet[ nFound++ ] = *pVal; - } - aRet.realloc( nFound ); - return aRet; -} - void PrinterController::setValue( const rtl::OUString& i_rName, const Any& i_rValue ) { beans::PropertyValue aVal; @@ -1394,23 +1375,6 @@ void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_ } } -void PrinterController::enableUIOption( const rtl::OUString& i_rProperty, bool i_bEnable ) -{ - boost::unordered_map< rtl::OUString, size_t, rtl::OUStringHash >::const_iterator it = - mpImplData->maPropertyToIndex.find( i_rProperty ); - if( it != mpImplData->maPropertyToIndex.end() ) - { - // call handler only for actual changes - if( ( mpImplData->maUIPropertyEnabled[ it->second ] && ! i_bEnable ) || - ( ! mpImplData->maUIPropertyEnabled[ it->second ] && i_bEnable ) ) - { - mpImplData->maUIPropertyEnabled[ it->second ] = i_bEnable; - rtl::OUString aPropName( i_rProperty ); - mpImplData->maOptionChangeHdl.Call( &aPropName ); - } - } -} - bool PrinterController::isUIOptionEnabled( const rtl::OUString& i_rProperty ) const { bool bEnabled = false; @@ -1642,19 +1606,6 @@ Any PrinterOptionsHelper::getValue( const rtl::OUString& i_rPropertyName ) const return aRet; } -void PrinterOptionsHelper::setValue( const rtl::OUString& i_rPropertyName, const Any& i_rValue ) -{ - m_aPropertyMap[ i_rPropertyName ] = i_rValue; -} - -bool PrinterOptionsHelper::hasProperty( const rtl::OUString& i_rPropertyName ) const -{ - Any aRet; - boost::unordered_map< rtl::OUString, Any, rtl::OUStringHash >::const_iterator it = - m_aPropertyMap.find( i_rPropertyName ); - return it != m_aPropertyMap.end(); -} - sal_Bool PrinterOptionsHelper::getBoolValue( const rtl::OUString& i_rPropertyName, sal_Bool i_bDefault ) const { sal_Bool bRet = sal_False; |