summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svl/inc/svl/brdcst.hxx3
-rw-r--r--svl/source/notify/brdcst.cxx21
-rw-r--r--svtools/inc/svtools/scriptedtext.hxx15
-rw-r--r--svtools/source/contnr/templwin.cxx40
-rw-r--r--svtools/source/control/scriptedtext.cxx7
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolbase.hxx2
-rw-r--r--toolkit/source/controls/unocontrolbase.cxx22
-rw-r--r--tools/inc/tools/color.hxx4
-rw-r--r--tools/inc/tools/stream.hxx2
-rw-r--r--tools/source/generic/color.cxx49
-rw-r--r--tools/source/stream/stream.cxx7
-rw-r--r--unotools/inc/unotools/lingucfg.hxx9
-rw-r--r--unotools/source/config/lingucfg.cxx110
-rw-r--r--vcl/inc/vcl/outdev.hxx8
-rw-r--r--vcl/source/gdi/print2.cxx69
15 files changed, 5 insertions, 363 deletions
diff --git a/svl/inc/svl/brdcst.hxx b/svl/inc/svl/brdcst.hxx
index d8ad823ed6d8..cc00157d3d90 100644
--- a/svl/inc/svl/brdcst.hxx
+++ b/svl/inc/svl/brdcst.hxx
@@ -64,9 +64,6 @@ public:
virtual ~SfxBroadcaster();
void Broadcast( const SfxHint &rHint );
- void BroadcastDelayed( const SfxHint& rHint );
- void BroadcastInIdle( const SfxHint& rHint );
-
sal_Bool HasListeners() const;
sal_uInt16 GetListenerCount() const { return aListeners.Count(); }
SfxListener* GetListener( sal_uInt16 nNo ) const
diff --git a/svl/source/notify/brdcst.cxx b/svl/source/notify/brdcst.cxx
index 7722814216a5..d70e98b55300 100644
--- a/svl/source/notify/brdcst.cxx
+++ b/svl/source/notify/brdcst.cxx
@@ -68,27 +68,6 @@ void SfxBroadcaster::Broadcast( const SfxHint &rHint )
}
}
-//--------------------------------------------------------------------
-
-// broadcast after a timeout
-
-
-void SfxBroadcaster::BroadcastDelayed( const SfxHint& rHint )
-{
- DBG_WARNING( "not implemented" );
- Broadcast(rHint);
-}
-//--------------------------------------------------------------------
-
-// broadcast in idle-handler
-
-void SfxBroadcaster::BroadcastInIdle( const SfxHint& rHint )
-{
- DBG_WARNING( "not implemented" );
- Broadcast(rHint);
-}
-//--------------------------------------------------------------------
-
// unregister all listeners
SfxBroadcaster::~SfxBroadcaster()
diff --git a/svtools/inc/svtools/scriptedtext.hxx b/svtools/inc/svtools/scriptedtext.hxx
index bbca120ef017..d7114042562b 100644
--- a/svtools/inc/svtools/scriptedtext.hxx
+++ b/svtools/inc/svtools/scriptedtext.hxx
@@ -59,21 +59,6 @@ public:
A reference to an output device. */
SvtScriptedTextHelper( OutputDevice& _rOutDevice );
- /** Constructor sets an output device and fonts for all script types.
- @param _rOutDevice
- A reference to an output device.
- @param _pLatinFont
- The font for latin characters.
- @param _pAsianFont
- The font for asian characters.
- @param _pCmplxFont
- The font for complex text layout. */
- SvtScriptedTextHelper(
- OutputDevice& _rOutDevice,
- Font* _pLatinFont,
- Font* _pAsianFont,
- Font* _pCmplxFont );
-
/** Copy constructor. */
SvtScriptedTextHelper(
const SvtScriptedTextHelper& _rCopy );
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 7650fa534f77..6e4e51559754 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -1639,7 +1639,6 @@ void SvtTemplateWindow::SelectFolder(sal_Int32 nFolderPosition)
{
pIconWin->SelectFolder(nFolderPosition);
}
-// struct SvtTmplDlg_Impl ------------------------------------------------
struct SvtTmplDlg_Impl
{
@@ -1654,47 +1653,8 @@ struct SvtTmplDlg_Impl
SvtTmplDlg_Impl( Window* pParent ) : pWin( new SvtTemplateWindow( pParent ) ) ,bSelectNoOpen( sal_False ) {}
~SvtTmplDlg_Impl() { delete pWin; }
-
- uno::Reference< util::XOfficeInstallationDirectories > getOfficeInstDirs();
};
-uno::Reference< util::XOfficeInstallationDirectories > SvtTmplDlg_Impl::getOfficeInstDirs()
-{
- if ( !m_xOfficeInstDirs.is() )
- {
- try
- {
- uno::Reference< lang::XMultiServiceFactory > xSMgr = comphelper::getProcessServiceFactory();
-
- uno::Reference< beans::XPropertySet > xPropSet( xSMgr, uno::UNO_QUERY );
- if ( xPropSet.is() )
- {
- uno::Reference< uno::XComponentContext > xCtx;
- xPropSet->getPropertyValue(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) )
- >>= xCtx;
-
- if ( xCtx.is() )
- {
- xCtx->getValueByName(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "/singletons/com.sun.star.util.theOfficeInstallationDirectories" ) ) )
- >>= m_xOfficeInstDirs;
- }
- }
- }
- catch( uno::Exception& )
- {}
- }
-
- return m_xOfficeInstDirs;
-}
-
-// class SvtDocumentTemplateDialog ---------------------------------------
-
-// ------------------------------------------------------------------------
-
SvtDocumentTemplateDialog::SvtDocumentTemplateDialog( Window* pParent ) :
ModalDialog( pParent, SvtResId( DLG_DOCTEMPLATE ) ),
diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx
index 98f6c05ac0d7..143f630fa95e 100644
--- a/svtools/source/control/scriptedtext.cxx
+++ b/svtools/source/control/scriptedtext.cxx
@@ -331,13 +331,6 @@ SvtScriptedTextHelper::SvtScriptedTextHelper( OutputDevice& _rOutDevice ) :
{
}
-SvtScriptedTextHelper::SvtScriptedTextHelper(
- OutputDevice& _rOutDevice,
- Font* _pLatinFont, Font* _pAsianFont, Font* _pCmplxFont ) :
- mpImpl( new SvtScriptedTextHelper_Impl( _rOutDevice, _pLatinFont, _pAsianFont, _pCmplxFont ) )
-{
-}
-
SvtScriptedTextHelper::SvtScriptedTextHelper( const SvtScriptedTextHelper& _rCopy ) :
mpImpl( new SvtScriptedTextHelper_Impl( *_rCopy.mpImpl ) )
{
diff --git a/toolkit/inc/toolkit/controls/unocontrolbase.hxx b/toolkit/inc/toolkit/controls/unocontrolbase.hxx
index aa2036935344..34779ccd20d9 100644
--- a/toolkit/inc/toolkit/controls/unocontrolbase.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolbase.hxx
@@ -56,9 +56,7 @@ protected:
sal_Bool ImplGetPropertyValue_BOOL( sal_uInt16 nProp );
sal_Int16 ImplGetPropertyValue_INT16( sal_uInt16 nProp );
- sal_uInt16 ImplGetPropertyValue_UINT16( sal_uInt16 nProp );
sal_Int32 ImplGetPropertyValue_INT32( sal_uInt16 nProp );
- sal_uInt32 ImplGetPropertyValue_UINT32( sal_uInt16 nProp );
double ImplGetPropertyValue_DOUBLE( sal_uInt16 nProp );
::rtl::OUString ImplGetPropertyValue_UString( sal_uInt16 nProp );
diff --git a/toolkit/source/controls/unocontrolbase.cxx b/toolkit/source/controls/unocontrolbase.cxx
index c2622946009b..45f6613de0d5 100644
--- a/toolkit/source/controls/unocontrolbase.cxx
+++ b/toolkit/source/controls/unocontrolbase.cxx
@@ -153,17 +153,6 @@ sal_Int16 UnoControlBase::ImplGetPropertyValue_INT16( sal_uInt16 nProp )
return n;
}
-sal_uInt16 UnoControlBase::ImplGetPropertyValue_UINT16( sal_uInt16 nProp )
-{
- sal_uInt16 n = 0;
- if ( mxModel.is() )
- {
- ::com::sun::star::uno::Any aVal = ImplGetPropertyValue( GetPropertyName( nProp ) );
- aVal >>= n;
- }
- return n;
-}
-
sal_Int32 UnoControlBase::ImplGetPropertyValue_INT32( sal_uInt16 nProp )
{
sal_Int32 n = 0;
@@ -175,17 +164,6 @@ sal_Int32 UnoControlBase::ImplGetPropertyValue_INT32( sal_uInt16 nProp )
return n;
}
-sal_uInt32 UnoControlBase::ImplGetPropertyValue_UINT32( sal_uInt16 nProp )
-{
- sal_uInt32 n = 0;
- if ( mxModel.is() )
- {
- ::com::sun::star::uno::Any aVal = ImplGetPropertyValue( GetPropertyName( nProp ) );
- aVal >>= n;
- }
- return n;
-}
-
double UnoControlBase::ImplGetPropertyValue_DOUBLE( sal_uInt16 nProp )
{
double n = 0;
diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx
index ecd5f83b688c..ba9d7df5806d 100644
--- a/tools/inc/tools/color.hxx
+++ b/tools/inc/tools/color.hxx
@@ -177,10 +177,6 @@ public:
static ColorData HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri );
void RGBtoHSB( sal_uInt16& nHue, sal_uInt16& nSat, sal_uInt16& nBri ) const;
- // the range for cymk is 0 to 1.0
- static ColorData CMYKtoRGB( double fCyan, double fMagenta, double fYellow, double fKey );
- void RGBtoCMYK( double& fCyan, double& fMagenta, double& fYellow, double& fKey );
-
sal_Bool operator==( const Color& rColor ) const
{ return (mnColor == rColor.mnColor); }
sal_Bool operator!=( const Color& rColor ) const
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 82ff78ce554f..0bd7fb654136 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -445,8 +445,6 @@ public:
sal_Bool WriteUnicodeOrByteText( const String& rStr, rtl_TextEncoding eDestCharSet );
sal_Bool WriteUnicodeOrByteText( const String& rStr )
{ return WriteUnicodeOrByteText( rStr, GetStreamCharSet() ); }
- /// Write a line of Unicode and append line end (endlu())
- sal_Bool WriteUniStringLine( const String& rStr );
/// Write a Unicode character if eDestCharSet==RTL_TEXTENCODING_UNICODE,
/// otherwise write as Bytecode converted to eDestCharSet.
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 5560e631767a..114f395e7786 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -259,55 +259,6 @@ ColorData Color::HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri )
return RGB_COLORDATA( cR, cG, cB );
}
-// -----------------------------------------------------------------------
-
-// CMYK values from 0 to 1
-ColorData Color::CMYKtoRGB( double fCyan, double fMagenta, double fYellow, double fKey )
-{
- fCyan = (fCyan * ( 1.0 - fKey )) + fKey;
- fMagenta = (fMagenta * ( 1.0 - fKey )) + fKey;
- fYellow = (fYellow * ( 1.0 - fKey )) + fKey;
-
- sal_uInt8 nRed = static_cast< sal_uInt8 >( std::max( std::min( ( 1.0 - fCyan ) * 255.0, 255.0), 0.0 ) );
- sal_uInt8 nGreen = static_cast< sal_uInt8 >( std::max( std::min( ( 1.0 - fMagenta ) * 255.0, 255.0), 0.0 ) );
- sal_uInt8 nBlue = static_cast< sal_uInt8 >( std::max( std::min( ( 1.0 - fYellow ) * 255.0, 255.0), 0.0 ) );
-
- return RGB_COLORDATA( nRed, nGreen, nBlue );
-}
-
-// -----------------------------------------------------------------------
-
-// RGB values from 0 to 255
-// CMY results from 0 to 1
-void Color::RGBtoCMYK( double& fCyan, double& fMagenta, double& fYellow, double& fKey )
-{
- fCyan = 1 - ( GetRed() / 255.0 );
- fMagenta = 1 - ( GetGreen() / 255.0 );
- fYellow = 1 - ( GetBlue() / 255.0 );
-
- //CMYK and CMY values from 0 to 1
- fKey = 1.0;
- if( fCyan < fKey ) fKey = fCyan;
- if( fMagenta < fKey ) fKey = fMagenta;
- if( fYellow < fKey ) fKey = fYellow;
-
- if ( fKey == 1.0 )
- {
- //Black
- fCyan = 0.0;
- fMagenta = 0.0;
- fYellow = 0.0;
- }
- else
- {
- fCyan = ( fCyan - fKey ) / ( 1.0 - fKey );
- fMagenta = ( fMagenta - fKey ) / ( 1.0 - fKey );
- fYellow = ( fYellow - fKey ) / ( 1.0 - fKey );
- }
-}
-
-// -----------------------------------------------------------------------
-
SvStream& Color::Read( SvStream& rIStm, sal_Bool bNewFormat )
{
if ( bNewFormat )
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 84ae7bfb72ee..db7820e838c1 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -920,13 +920,6 @@ sal_Bool SvStream::WriteLine( const ByteString& rStr )
return nError == SVSTREAM_OK;
}
-sal_Bool SvStream::WriteUniStringLine( const String& rStr )
-{
- WriteUnicodeText( rStr );
- endlu(*this);
- return nError == SVSTREAM_OK;
-}
-
/*************************************************************************
|*
|* Stream::WriteLines()
diff --git a/unotools/inc/unotools/lingucfg.hxx b/unotools/inc/unotools/lingucfg.hxx
index f1a2e119a2ed..4ae102007dde 100644
--- a/unotools/inc/unotools/lingucfg.hxx
+++ b/unotools/inc/unotools/lingucfg.hxx
@@ -217,14 +217,11 @@ public:
sal_Bool GetElementNamesFor( const rtl::OUString &rNodeName, com::sun::star::uno::Sequence< rtl::OUString > &rElementNames ) const;
//
sal_Bool GetSupportedDictionaryFormatsFor( const rtl::OUString &rSetName, const rtl::OUString &rSetEntry, com::sun::star::uno::Sequence< rtl::OUString > &rFormatList ) const;
- void SetOrCreateSupportedDictionaryFormatsFor( const rtl::OUString &rSetName, const rtl::OUString &rSetEntry, const com::sun::star::uno::Sequence< rtl::OUString > &rFormatList ) const;
- //
+
sal_Bool GetDictionaryEntry( const rtl::OUString &rNodeName, SvtLinguConfigDictionaryEntry &rDicEntry ) const;
- void SetOrCreateDictionaryEntry( const rtl::OUString &rNodeName, const SvtLinguConfigDictionaryEntry &rDicEntry ) const;
- //
+
com::sun::star::uno::Sequence< rtl::OUString > GetDisabledDictionaries() const;
- void SetDisabledDictionaries( const com::sun::star::uno::Sequence< rtl::OUString > &rDictionaries ) const;
- //
+
std::vector< SvtLinguConfigDictionaryEntry > GetActiveDictionariesByFormat( const rtl::OUString &rFormatName );
// functions returning file URLs to the respective images (if found) and empty string otherwise
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 382ac3f578f3..828c0736ccdb 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -972,28 +972,6 @@ sal_Bool SvtLinguConfig::GetElementNamesFor(
return bSuccess;
}
-static uno::Reference< container::XNameAccess > GetOrCreateSetEntry_Impl(
- const uno::Reference< container::XNameAccess > &rxSetNameAccess,
- const rtl::OUString &rEntryName )
-{
- uno::Reference< container::XNameAccess > xResult;
- try
- {
- if (!rxSetNameAccess->hasByName( rEntryName ))
- {
- uno::Reference< lang::XSingleServiceFactory > xFactory( rxSetNameAccess, uno::UNO_QUERY_THROW);
- uno::Reference< uno::XInterface > xNewEntry( xFactory->createInstance() );
- uno::Reference< container::XNameContainer > xNC( rxSetNameAccess, uno::UNO_QUERY_THROW );
- xNC->insertByName( rEntryName, makeAny( xNewEntry ) );
- }
- xResult.set( rxSetNameAccess->getByName( rEntryName ), uno::UNO_QUERY_THROW );
- }
- catch (uno::Exception &)
- {
- }
- return xResult;
-}
-
sal_Bool SvtLinguConfig::GetSupportedDictionaryFormatsFor(
const rtl::OUString &rSetName,
const rtl::OUString &rSetEntry,
@@ -1018,38 +996,10 @@ sal_Bool SvtLinguConfig::GetSupportedDictionaryFormatsFor(
return bSuccess;
}
-void SvtLinguConfig::SetOrCreateSupportedDictionaryFormatsFor(
- const rtl::OUString &rSetName,
- const rtl::OUString &rSetEntry,
- const uno::Sequence< rtl::OUString > &rFormatList ) const
-{
- if (rSetName.getLength() == 0 || rSetEntry.getLength() == 0)
- return;
- try
- {
- DBG_ASSERT( rFormatList.getLength(), "applying empty format list. Really??" );
-
- uno::Reference< util::XChangesBatch > xUpdateAccess( GetMainUpdateAccess() );
- uno::Reference< container::XNameAccess > xNA( xUpdateAccess, uno::UNO_QUERY_THROW );
- xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW );
- xNA.set( xNA->getByName( rSetName ), uno::UNO_QUERY_THROW );
- xNA = GetOrCreateSetEntry_Impl( xNA, rSetEntry );
-
- uno::Reference< container::XNameReplace > xNR( xNA, uno::UNO_QUERY_THROW );
- xNR->replaceByName( aG_SupportedDictionaryFormats, uno::makeAny( rFormatList ) );
-
- xUpdateAccess->commitChanges();
- }
- catch (uno::Exception &)
- {
- }
-}
-
-
-static uno::WeakReference< util::XMacroExpander > aG_xMacroExpander;
-
static uno::Reference< util::XMacroExpander > lcl_GetMacroExpander()
{
+ static uno::WeakReference< util::XMacroExpander > aG_xMacroExpander;
+
uno::Reference< util::XMacroExpander > xMacroExpander( aG_xMacroExpander );
if ( !xMacroExpander.is() )
{
@@ -1163,36 +1113,6 @@ sal_Bool SvtLinguConfig::GetDictionaryEntry(
return bSuccess;
}
-void SvtLinguConfig::SetOrCreateDictionaryEntry(
- const rtl::OUString &rNodeName,
- const SvtLinguConfigDictionaryEntry &rDicEntry ) const
-{
- if (rNodeName.getLength() == 0)
- return;
- try
- {
- uno::Reference< util::XChangesBatch > xUpdateAccess( GetMainUpdateAccess() );
- uno::Reference< container::XNameAccess > xNA( xUpdateAccess, uno::UNO_QUERY_THROW );
- xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW );
- xNA.set( xNA->getByName( aG_Dictionaries ), uno::UNO_QUERY_THROW );
- xNA = GetOrCreateSetEntry_Impl( xNA, rNodeName );
-
- DBG_ASSERT( rDicEntry.aLocations.getLength(), "Applying empty dictionary locations. Really correct??" );
- DBG_ASSERT( rDicEntry.aFormatName.getLength(), "Applying empty dictionary format name. Really correct??" );
- DBG_ASSERT( rDicEntry.aLocaleNames.getLength(), "Applying empty list of locales for the dictionary. Really correct??" );
-
- uno::Reference< container::XNameReplace > xNR( xNA, uno::UNO_QUERY_THROW );
- xNR->replaceByName( aG_Locations, uno::makeAny( rDicEntry.aLocations ) );
- xNR->replaceByName( aG_Format, uno::makeAny( rDicEntry.aFormatName ) );
- xNR->replaceByName( aG_Locales, uno::makeAny( rDicEntry.aLocaleNames ) );
-
- xUpdateAccess->commitChanges();
- }
- catch (uno::Exception &)
- {
- }
-}
-
uno::Sequence< rtl::OUString > SvtLinguConfig::GetDisabledDictionaries() const
{
uno::Sequence< rtl::OUString > aResult;
@@ -1208,32 +1128,6 @@ uno::Sequence< rtl::OUString > SvtLinguConfig::GetDisabledDictionaries() const
return aResult;
}
-void SvtLinguConfig::SetDisabledDictionaries(
- const uno::Sequence< rtl::OUString > &rDictionaries ) const
-{
- try
- {
- uno::Reference< util::XChangesBatch > xUpdateAccess( GetMainUpdateAccess() );
- uno::Reference< container::XNameAccess > xNA( xUpdateAccess, uno::UNO_QUERY_THROW );
- xNA.set( xNA->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ServiceManager"))), uno::UNO_QUERY_THROW );
- if (xNA->hasByName( aG_DisabledDictionaries ))
- {
- uno::Reference< container::XNameReplace > xNR( xNA, uno::UNO_QUERY_THROW );
- xNR->replaceByName( aG_DisabledDictionaries, makeAny( rDictionaries ) );
- }
- else
- {
- uno::Reference< container::XNameContainer > xNC( xNA, uno::UNO_QUERY_THROW );
- xNC->insertByName( aG_DisabledDictionaries, makeAny( rDictionaries ) );
- }
-
- xUpdateAccess->commitChanges();
- }
- catch (uno::Exception &)
- {
- }
-}
-
std::vector< SvtLinguConfigDictionaryEntry > SvtLinguConfig::GetActiveDictionariesByFormat(
const rtl::OUString &rFormatName )
{
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index 78c7ad938d1a..135cdfe59a83 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -1193,14 +1193,6 @@ public:
Bitmap GetDownsampledBitmap( const Size& rDstSz,
const Point& rSrcPt, const Size& rSrcSz,
const Bitmap& rBmp, long nMaxBmpDPIX, long nMaxBmpDPIY );
- /** Retrieve downsampled and cropped bitmapEx
-
- @attention This method ignores negative rDstSz values, thus
- mirroring must happen outside this method (e.g. in DrawBitmapEx)
- */
- BitmapEx GetDownsampledBitmapEx( const Size& rDstSz,
- const Point& rSrcPt, const Size& rSrcSz,
- const BitmapEx& rBmpEx, long nMaxBmpDPIX, long nMaxBmpDPIY );
//-------------------------------------
// Native Widget Rendering functions
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 2001968c60e8..0ce7d92e3f29 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -1470,75 +1470,6 @@ Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
// -----------------------------------------------------------------------------
-BitmapEx OutputDevice::GetDownsampledBitmapEx( const Size& rDstSz,
- const Point& rSrcPt, const Size& rSrcSz,
- const BitmapEx& rBmpEx, long nMaxBmpDPIX, long nMaxBmpDPIY )
-{
- BitmapEx aBmpEx( rBmpEx );
-
- if( !aBmpEx.IsEmpty() )
- {
- Point aPoint;
- const Rectangle aBmpRect( aPoint, aBmpEx.GetSizePixel() );
- Rectangle aSrcRect( rSrcPt, rSrcSz );
-
- // do cropping if neccessary
- if( aSrcRect.Intersection( aBmpRect ) != aBmpRect )
- {
- if( !aSrcRect.IsEmpty() )
- aBmpEx.Crop( aSrcRect );
- else
- aBmpEx.SetEmpty();
- }
-
- if( !aBmpEx.IsEmpty() )
- {
- // do downsampling if neccessary
- Size aDstSizeTwip( PixelToLogic( LogicToPixel( rDstSz ), MAP_TWIP ) );
-
- // #103209# Normalize size (mirroring has to happen outside of this method)
- aDstSizeTwip = Size( labs(aDstSizeTwip.Width()), labs(aDstSizeTwip.Height()) );
-
- const Size aBmpSize( aBmpEx.GetSizePixel() );
- const double fBmpPixelX = aBmpSize.Width();
- const double fBmpPixelY = aBmpSize.Height();
- const double fMaxPixelX = aDstSizeTwip.Width() * nMaxBmpDPIX / 1440.0;
- const double fMaxPixelY = aDstSizeTwip.Height() * nMaxBmpDPIY / 1440.0;
-
- // check, if the bitmap DPI exceeds the maximum DPI (allow 4 pixel rounding tolerance)
- if( ( ( fBmpPixelX > ( fMaxPixelX + 4 ) ) ||
- ( fBmpPixelY > ( fMaxPixelY + 4 ) ) ) &&
- ( fBmpPixelY > 0.0 ) && ( fMaxPixelY > 0.0 ) )
- {
- // do scaling
- Size aNewBmpSize;
- const double fBmpWH = fBmpPixelX / fBmpPixelY;
- const double fMaxWH = fMaxPixelX / fMaxPixelY;
-
- if( fBmpWH < fMaxWH )
- {
- aNewBmpSize.Width() = FRound( fMaxPixelY * fBmpWH );
- aNewBmpSize.Height() = FRound( fMaxPixelY );
- }
- else if( fBmpWH > 0.0 )
- {
- aNewBmpSize.Width() = FRound( fMaxPixelX );
- aNewBmpSize.Height() = FRound( fMaxPixelX / fBmpWH);
- }
-
- if( aNewBmpSize.Width() && aNewBmpSize.Height() )
- aBmpEx.Scale( aNewBmpSize );
- else
- aBmpEx.SetEmpty();
- }
- }
- }
-
- return aBmpEx;
-}
-
-// -----------------------------------------------------------------------------
-
void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const Gradient& rGradient )
{
const PrinterOptions& rPrinterOptions = GetPrinterOptions();