[Libreoffice-commits] core.git: framework/source include/svl sc/source svl/source vcl/inc vcl/source vcl/unx

Noel Grandin noel.grandin at collabora.co.uk
Tue Jan 10 06:29:38 UTC 2017


 framework/source/uiconfiguration/ImageList.cxx |   24 -------
 framework/source/uiconfiguration/ImageList.hxx |    2 
 include/svl/languageoptions.hxx                |    1 
 sc/source/filter/inc/biffcodec.hxx             |   21 ------
 sc/source/filter/oox/biffcodec.cxx             |   47 --------------
 svl/source/config/languageoptions.cxx          |    6 -
 vcl/inc/unx/fc_fontoptions.hxx                 |    4 -
 vcl/source/gdi/impvect.cxx                     |   83 -------------------------
 vcl/source/gdi/impvect.hxx                     |    1 
 vcl/unx/generic/print/psputil.cxx              |   42 ------------
 vcl/unx/generic/print/psputil.hxx              |   13 ---
 11 files changed, 244 deletions(-)

New commits:
commit 014b9ac2e4ec22a1eed2fde806edd7a840035a45
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Jan 9 10:35:25 2017 +0200

    loplugin:unusedmethods
    
    Change-Id: Ibe11923601760ded53a277c48631e4893606b2d6
    Reviewed-on: https://gerrit.libreoffice.org/32875
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/framework/source/uiconfiguration/ImageList.cxx b/framework/source/uiconfiguration/ImageList.cxx
index 389c016..cdceb4b 100644
--- a/framework/source/uiconfiguration/ImageList.cxx
+++ b/framework/source/uiconfiguration/ImageList.cxx
@@ -229,11 +229,6 @@ sal_uInt16 ImageList::GetImagePos( sal_uInt16 nId ) const
     return IMAGELIST_IMAGE_NOTFOUND;
 }
 
-bool ImageList::HasImageForId( sal_uInt16 nId ) const
-{
-    return GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND;
-}
-
 sal_uInt16 ImageList::GetImagePos( const OUString& rImageName ) const
 {
     if( mpImplData && !rImageName.isEmpty() )
@@ -281,25 +276,6 @@ void ImageList::GetImageNames( std::vector< OUString >& rNames ) const
     }
 }
 
-Size ImageList::GetImageSize() const
-{
-    Size aRet;
-
-    if( mpImplData )
-    {
-        aRet = mpImplData->maImageSize;
-
-        // force load of 1st image to see - uncommon case.
-        if( aRet.Width() == 0 && aRet.Height() == 0 &&
-            !mpImplData->maImages.empty() )
-        {
-            Image aTmp = GetImage( mpImplData->maImages[ 0 ]->mnId );
-            aRet = mpImplData->maImageSize = aTmp.GetSizePixel();
-        }
-    }
-    return aRet;
-}
-
 bool ImageList::operator==( const ImageList& rImageList ) const
 {
     bool bRet = false;
diff --git a/framework/source/uiconfiguration/ImageList.hxx b/framework/source/uiconfiguration/ImageList.hxx
index 426a626..d6db88c 100644
--- a/framework/source/uiconfiguration/ImageList.hxx
+++ b/framework/source/uiconfiguration/ImageList.hxx
@@ -31,7 +31,6 @@ public:
                                    const std::vector< OUString > &rNameVector );
     BitmapEx        GetAsHorizontalStrip() const;
     sal_uInt16      GetImageCount() const;
-    Size            GetImageSize() const;
 
     void            AddImage( const OUString& rImageName, const Image& rImage );
 
@@ -43,7 +42,6 @@ public:
     Image           GetImage( const OUString& rImageName ) const;
 
     sal_uInt16      GetImagePos( sal_uInt16 nId ) const;
-    bool            HasImageForId( sal_uInt16 nId ) const;
     sal_uInt16      GetImagePos( const OUString& rImageName ) const;
 
     sal_uInt16      GetImageId( sal_uInt16 nPos ) const;
diff --git a/include/svl/languageoptions.hxx b/include/svl/languageoptions.hxx
index f223904..9967080 100644
--- a/include/svl/languageoptions.hxx
+++ b/include/svl/languageoptions.hxx
@@ -128,7 +128,6 @@ public:
 
     LanguageType    GetWin16SystemLanguage() const;
 
-    bool            isCTLKeyboardLayoutInstalled() const;
     bool            isCJKKeyboardLayoutInstalled() const;
 };
 
diff --git a/sc/source/filter/inc/biffcodec.hxx b/sc/source/filter/inc/biffcodec.hxx
index 959fed5..fed33b8 100644
--- a/sc/source/filter/inc/biffcodec.hxx
+++ b/sc/source/filter/inc/biffcodec.hxx
@@ -50,13 +50,6 @@ private:
     virtual css::uno::Sequence< css::beans::NamedValue > implVerifyPassword( const OUString& rPassword ) = 0;
     virtual bool implVerifyEncryptionData( const css::uno::Sequence< css::beans::NamedValue >& rEncryptionData ) = 0;
 
-    /** Implementation of decryption of a memory block. */
-    virtual void        implDecode(
-                            sal_uInt8* pnDestData,
-                            const sal_uInt8* pnSrcData,
-                            sal_Int64 nStreamPos,
-                            sal_uInt16 nBytes ) = 0;
-
 private:
     bool                mbValid;        /// True = decoder is correctly initialized.
 };
@@ -74,13 +67,6 @@ private:
     virtual css::uno::Sequence< css::beans::NamedValue > implVerifyPassword( const OUString& rPassword ) override;
     virtual bool implVerifyEncryptionData( const css::uno::Sequence< css::beans::NamedValue >& rEncryptionData ) override;
 
-    /** Implementation of decryption of a memory block. */
-    virtual void        implDecode(
-                            sal_uInt8* pnDestData,
-                            const sal_uInt8* pnSrcData,
-                            sal_Int64 nStreamPos,
-                            sal_uInt16 nBytes ) override;
-
 private:
     ::oox::core::BinaryCodec_XOR maCodec;   /// Cipher algorithm implementation.
     css::uno::Sequence< css::beans::NamedValue > maEncryptionData;
@@ -99,13 +85,6 @@ private:
     virtual css::uno::Sequence< css::beans::NamedValue > implVerifyPassword( const OUString& rPassword ) override;
     virtual bool implVerifyEncryptionData( const css::uno::Sequence< css::beans::NamedValue >& rEncryptionData ) override;
 
-    /** Implementation of decryption of a memory block. */
-    virtual void        implDecode(
-                            sal_uInt8* pnDestData,
-                            const sal_uInt8* pnSrcData,
-                            sal_Int64 nStreamPos,
-                            sal_uInt16 nBytes ) override;
-
 private:
     ::oox::core::BinaryCodec_RCF maCodec;   /// Cipher algorithm implementation.
     css::uno::Sequence< css::beans::NamedValue > maEncryptionData;
diff --git a/sc/source/filter/oox/biffcodec.cxx b/sc/source/filter/oox/biffcodec.cxx
index 705db27..4cfb84e 100644
--- a/sc/source/filter/oox/biffcodec.cxx
+++ b/sc/source/filter/oox/biffcodec.cxx
@@ -99,28 +99,6 @@ bool BiffDecoder_XOR::implVerifyEncryptionData( const Sequence< NamedValue >& rE
     return maEncryptionData.hasElements();
 }
 
-void BiffDecoder_XOR::implDecode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData, sal_Int64 nStreamPos, sal_uInt16 nBytes )
-{
-    maCodec.startBlock();
-    maCodec.skip( static_cast< sal_Int32 >( (nStreamPos + nBytes) & 0x0F ) );
-    maCodec.decode( pnDestData, pnSrcData, nBytes );
-}
-
-namespace {
-
-/** Returns the block index of the passed stream position for RCF decryption. */
-sal_Int32 lclGetRcfBlock( sal_Int64 nStreamPos )
-{
-    return static_cast< sal_Int32 >( nStreamPos / BIFF_RCF_BLOCKSIZE );
-}
-
-/** Returns the offset of the passed stream position in a block for RCF decryption. */
-sal_Int32 lclGetRcfOffset( sal_Int64 nStreamPos )
-{
-    return static_cast< sal_Int32 >( nStreamPos % BIFF_RCF_BLOCKSIZE );
-}
-
-} // namespace
 
 BiffDecoder_RCF::BiffDecoder_RCF( const BiffDecoder_RCF& rDecoder ) :
     BiffDecoderBase(),  // must be called to prevent compiler warning
@@ -173,31 +151,6 @@ bool BiffDecoder_RCF::implVerifyEncryptionData( const Sequence< NamedValue >& rE
     return maEncryptionData.hasElements();
 }
 
-void BiffDecoder_RCF::implDecode( sal_uInt8* pnDestData, const sal_uInt8* pnSrcData, sal_Int64 nStreamPos, sal_uInt16 nBytes )
-{
-    sal_uInt8* pnCurrDest = pnDestData;
-    const sal_uInt8* pnCurrSrc = pnSrcData;
-    sal_Int64 nCurrPos = nStreamPos;
-    sal_uInt16 nBytesLeft = nBytes;
-    while( nBytesLeft > 0 )
-    {
-        // initialize codec for current stream position
-        maCodec.startBlock( lclGetRcfBlock( nCurrPos ) );
-        maCodec.skip( lclGetRcfOffset( nCurrPos ) );
-
-        // decode the block
-        sal_uInt16 nBlockLeft = static_cast< sal_uInt16 >( BIFF_RCF_BLOCKSIZE - lclGetRcfOffset( nCurrPos ) );
-        sal_uInt16 nDecBytes = ::std::min( nBytesLeft, nBlockLeft );
-        maCodec.decode( pnCurrDest, pnCurrSrc, static_cast< sal_Int32 >( nDecBytes ) );
-
-        // prepare for next block
-        pnCurrDest += nDecBytes;
-        pnCurrSrc += nDecBytes;
-        nCurrPos += nDecBytes;
-        nBytesLeft = nBytesLeft - nDecBytes;
-    }
-}
-
 } // namespace xls
 } // namespace oox
 
diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index 8757244..3d2f594 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -254,12 +254,6 @@ bool SvtSystemLanguageOptions::isKeyboardLayoutTypeInstalled(sal_Int16 scriptTyp
 }
 
 
-bool SvtSystemLanguageOptions::isCTLKeyboardLayoutInstalled() const
-{
-    return isKeyboardLayoutTypeInstalled(css::i18n::ScriptType::COMPLEX);
-}
-
-
 bool SvtSystemLanguageOptions::isCJKKeyboardLayoutInstalled() const
 {
     return isKeyboardLayoutTypeInstalled(css::i18n::ScriptType::ASIAN);
diff --git a/vcl/inc/unx/fc_fontoptions.hxx b/vcl/inc/unx/fc_fontoptions.hxx
index 3c34610..06403e3 100644
--- a/vcl/inc/unx/fc_fontoptions.hxx
+++ b/vcl/inc/unx/fc_fontoptions.hxx
@@ -46,11 +46,7 @@ public:
                             mpPattern(pPattern) {}
                         ~FontConfigFontOptions();
 
-    FontAutoHint        GetUseAutoHint() const { return meAutoHint; }
     FontHintStyle       GetHintStyle() const { return meHintStyle; }
-    bool                DontUseEmbeddedBitmaps() const { return meEmbeddedBitmap == EMBEDDEDBITMAP_FALSE; }
-    bool                DontUseAntiAlias() const { return meAntiAlias == ANTIALIAS_FALSE; }
-    bool                DontUseHinting() const { return (meHinting == FontHinting::No) || (GetHintStyle() == FontHintStyle::NONE); }
     void                SyncPattern(const OString& rFileName, int nFontFace, bool bEmbolden);
     FcPattern*          GetPattern() const;
     static void         cairo_font_options_substitute(FcPattern* pPattern);
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 50fdf6f..8891838 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -732,89 +732,6 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
     return bRet;
 }
 
-bool ImplVectorize( const Bitmap& rMonoBmp,
-                                    tools::PolyPolygon& rPolyPoly )
-{
-    std::unique_ptr<Bitmap> xBmp(new Bitmap( rMonoBmp ));
-    bool                bRet = false;
-
-    if( xBmp->GetBitCount() > 1 )
-        xBmp->Convert( BMP_CONVERSION_1BIT_THRESHOLD );
-
-    Bitmap::ScopedReadAccess pRAcc(*xBmp);
-    std::unique_ptr <ImplVectMap> xMap(ImplExpand( pRAcc.get(), COL_BLACK ));
-    pRAcc.reset();
-    xBmp.reset();
-
-    if( xMap )
-    {
-        rPolyPoly.Clear();
-        ImplCalculate( xMap.get(), rPolyPoly, 0 );
-        xMap.reset();
-        ImplLimitPolyPoly( rPolyPoly );
-
-        rPolyPoly.Optimize( PolyOptimizeFlags::EDGES );
-
-        // #i14895#:setting the correct direction for polygons
-        // that represent holes and non-holes; non-hole polygons
-        // need to have a right orientation, holes need to have a
-        // left orientation in order to be treated correctly by
-        // several external tools like Flash viewers
-        sal_Int32   nFirstPoly = -1;
-        sal_uInt16  nCurPoly( 0 ), nCount( rPolyPoly.Count() );
-
-        for( ; nCurPoly < nCount; ++nCurPoly )
-        {
-            const tools::Polygon& rPoly = rPolyPoly.GetObject( nCurPoly );
-            const sal_uInt16    nSize( rPoly.GetSize() );
-            sal_uInt16          nDepth( 0 ), i( 0 );
-            const bool          bRight( rPoly.IsRightOrientated() );
-
-            for( ; i < nCount; ++i )
-                if( ( i != nCurPoly ) && rPolyPoly.GetObject( i ).IsInside( rPoly[ 0 ] ) )
-                    ++nDepth;
-
-            const bool bHole( ( nDepth & 0x0001 ) == 1 );
-
-            if( nSize && ( ( !bRight && !bHole ) || ( bRight && bHole ) ) )
-            {
-                tools::Polygon aNewPoly( nSize );
-                sal_uInt16  nPrim( 0 ), nSec( nSize - 1 );
-
-                if( rPoly.HasFlags() )
-                {
-                    while( nPrim < nSize )
-                    {
-                        aNewPoly.SetPoint( rPoly.GetPoint( nSec ), nPrim );
-                        aNewPoly.SetFlags( nPrim++, rPoly.GetFlags( nSec-- ) );
-                    }
-                }
-                else
-                    while( nPrim < nSize )
-                        aNewPoly.SetPoint( rPoly.GetPoint( nSec-- ), nPrim++ );
-
-                rPolyPoly.Replace( aNewPoly, nCurPoly );
-            }
-
-            if( ( 0 == nDepth ) && ( -1 == nFirstPoly ) )
-                nFirstPoly = nCurPoly;
-        }
-
-        // put outmost polygon to the front
-        if( nFirstPoly > 0 )
-        {
-            const tools::Polygon aFirst( rPolyPoly.GetObject( static_cast< sal_uInt16 >( nFirstPoly ) ) );
-
-            rPolyPoly.Remove( static_cast< sal_uInt16 >( nFirstPoly ) );
-            rPolyPoly.Insert( aFirst, 0 );
-        }
-
-        bRet = true;
-    }
-
-    return bRet;
-}
-
 void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly )
 {
     if( rPolyPoly.Count() > VECT_POLY_MAX )
diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx
index 3ed5b8e..017b2dc 100644
--- a/vcl/source/gdi/impvect.hxx
+++ b/vcl/source/gdi/impvect.hxx
@@ -28,7 +28,6 @@ namespace ImplVectorizer
 {
     bool     ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf,
                             sal_uInt8 cReduce, const Link<long,void>* pProgress );
-    bool     ImplVectorize( const Bitmap& rMonoBmp, tools::PolyPolygon& rPolyPoly );
 };
 
 #endif
diff --git a/vcl/unx/generic/print/psputil.cxx b/vcl/unx/generic/print/psputil.cxx
index 5c68bf6..0026ccf 100644
--- a/vcl/unx/generic/print/psputil.cxx
+++ b/vcl/unx/generic/print/psputil.cxx
@@ -174,48 +174,6 @@ WritePS (osl::File* pFile, const OUString &rString)
     return WritePS (pFile, OUStringToOString(rString, RTL_TEXTENCODING_ASCII_US));
 }
 
-/*
- * cache converter for use in postscript drawing routines
- */
-
-ConverterFactory::ConverterFactory()
-{
-}
-
-ConverterFactory::~ConverterFactory ()
-{
-    for( std::map< rtl_TextEncoding, rtl_UnicodeToTextConverter >::const_iterator it = m_aConverters.begin(); it != m_aConverters.end(); ++it )
-            rtl_destroyUnicodeToTextConverter (it->second);
-}
-
-rtl_UnicodeToTextConverter
-ConverterFactory::Get (rtl_TextEncoding nEncoding)
-{
-    if (rtl_isOctetTextEncoding( nEncoding ))
-    {
-        std::map< rtl_TextEncoding, rtl_UnicodeToTextConverter >::const_iterator it =
-            m_aConverters.find( nEncoding );
-        rtl_UnicodeToTextConverter aConverter;
-        if (it == m_aConverters.end())
-        {
-            aConverter = rtl_createUnicodeToTextConverter (nEncoding);
-            m_aConverters[nEncoding] = aConverter;
-        }
-        else
-            aConverter = it->second;
-        return aConverter;
-    }
-    return nullptr;
-}
-
-namespace
-{
-    class theConverterFactory
-        : public rtl::Static<ConverterFactory, theConverterFactory>
-    {
-    };
-}
-
 } /* namespace psp */
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/print/psputil.hxx b/vcl/unx/generic/print/psputil.hxx
index 8cdd337..efb9e70 100644
--- a/vcl/unx/generic/print/psputil.hxx
+++ b/vcl/unx/generic/print/psputil.hxx
@@ -46,19 +46,6 @@ bool    WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLength
 bool    WritePS (osl::File* pFile, const OString &rString);
 bool    WritePS (osl::File* pFile, const OUString &rString);
 
-class ConverterFactory
-{
-
-public:
-    ConverterFactory();
-    ~ConverterFactory();
-    rtl_UnicodeToTextConverter  Get (rtl_TextEncoding nEncoding);
-
-private:
-
-    std::map< rtl_TextEncoding, rtl_UnicodeToTextConverter >        m_aConverters;
-};
-
 }  /* namespace psp */
 
 #endif // INCLUDED_VCL_GENERIC_PRINT_PSPUTIL_HXX


More information about the Libreoffice-commits mailing list