unusedcode.easy | 5 ---- vcl/inc/vcl/print.hxx | 14 ------------- vcl/source/gdi/print3.cxx | 49 ---------------------------------------------- 3 files changed, 68 deletions(-)
New commits: commit e1de59eb4661397c888e7fab223710543c541e87 Author: Matúš Kukan <matus.ku...@gmail.com> Date: Sat Sep 24 10:36:05 2011 +0200 unusedcode: vcl::PrinterFoo diff --git a/unusedcode.easy b/unusedcode.easy index 390fea9..3e7cc88 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -2939,11 +2939,6 @@ vcl::PDFExtOutDevData::SetOutlineItemText(int, rtl::OUString const&) vcl::PDFWriter::DrawPixel(Polygon const&, Color const*) vcl::PDFWriterImpl::drawPolyPolygon(PolyPolygon const&, int, bool) vcl::PrintDialog::getCopyCount() -vcl::PrinterController::PrinterController() -vcl::PrinterController::enableUIOption(rtl::OUString const&, bool) -vcl::PrinterController::getValues(com::sun::star::uno::Sequence<rtl::OUString> const&) const -vcl::PrinterOptionsHelper::hasProperty(rtl::OUString const&) const -vcl::PrinterOptionsHelper::setValue(rtl::OUString const&, com::sun::star::uno::Any const&) vcl::RenderGraphic::RenderGraphic(boost::shared_array<unsigned char> const&, unsigned int, rtl::OUString const&) vcl::RowOrColumn::remove(Window*) vcl::RowOrColumn::remove(boost::shared_ptr<vcl::WindowArranger> const&) diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx index 7b92327..d154b04 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 dfe5bfb..6365b20 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;
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits