diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/backendtest/outputdevice/bitmap.cxx | 10 | ||||
-rw-r--r-- | vcl/inc/impfontmetricdata.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/sallayout.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/test/outputdevice.hxx | 1 | ||||
-rw-r--r-- | vcl/inc/unx/glyphcache.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/unx/printergfx.hxx | 3 | ||||
-rw-r--r-- | vcl/source/fontsubset/xlat.cxx | 53 | ||||
-rw-r--r-- | vcl/source/fontsubset/xlat.hxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 5 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 15 | ||||
-rw-r--r-- | vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 53 | ||||
-rw-r--r-- | vcl/unx/generic/print/common_gfx.cxx | 19 | ||||
-rw-r--r-- | vcl/unx/generic/print/glyphset.hxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/print/psputil.cxx | 28 | ||||
-rw-r--r-- | vcl/unx/generic/print/psputil.hxx | 6 |
15 files changed, 2 insertions, 211 deletions
diff --git a/vcl/backendtest/outputdevice/bitmap.cxx b/vcl/backendtest/outputdevice/bitmap.cxx index 351dfa2eb802..c86589ae9171 100644 --- a/vcl/backendtest/outputdevice/bitmap.cxx +++ b/vcl/backendtest/outputdevice/bitmap.cxx @@ -111,16 +111,6 @@ Bitmap OutputDeviceTestBitmap::setupDrawMask() return mpVirtualDevice->GetBitmap(maVDRectangle.TopLeft(), maVDRectangle.GetSize()); } -TestResult OutputDeviceTestBitmap::checkBitmap(Bitmap& rBitmap) -{ - std::vector<Color> aExpected - { - constBackgroundColor, constBackgroundColor, - COL_YELLOW, constFillColor, COL_YELLOW, constFillColor, constFillColor - }; - return checkRectangles(rBitmap, aExpected); -} - TestResult OutputDeviceTestBitmap::checkTransformedBitmap(Bitmap& rBitmap) { std::vector<Color> aExpected diff --git a/vcl/inc/impfontmetricdata.hxx b/vcl/inc/impfontmetricdata.hxx index 31a0557f341e..40ff182d64ae 100644 --- a/vcl/inc/impfontmetricdata.hxx +++ b/vcl/inc/impfontmetricdata.hxx @@ -50,10 +50,6 @@ public: int GetSlant() { return mnSlant; } long GetMinKashida() { return mnMinKashida; } - void SetAscent(long nAscent) { mnAscent=nAscent; } - void SetDescent(long nDescent) { mnDescent=nDescent; } - void SetInternalLeading(long nIntLeading) { mnIntLeading = nIntLeading; } - void SetExternalLeading(long nExtLeading) { mnExtLeading = nExtLeading; } void SetSlant(int nSlant) { mnSlant=nSlant; } void SetMinKashida( long nMinKashida ) { mnMinKashida=nMinKashida; } diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index 447cc390a6b4..542eebf88348 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -105,8 +105,6 @@ public: bool GetNextPos( int* nCharPos, bool* bRTL ) { return maRuns.GetNextPos( nCharPos, bRTL ); } bool GetNextRun( int* nMinRunPos, int* nEndRunPos, bool* bRTL ); - void NeedFallback( int nCharPos, bool bRTL ) - { maFallbackRuns.AddPos( nCharPos, bRTL ); } void NeedFallback( int nMinRunPos, int nEndRunPos, bool bRTL ) { maFallbackRuns.AddRun( nMinRunPos, nEndRunPos, bRTL ); } // methods used by BiDi and glyph fallback @@ -200,7 +198,6 @@ protected: virtual ~SalLayout(); // used by layout layers - void SetUnitsPerPixel( int n ) { mnUnitsPerPixel = n; } void SetOrientation( int nOrientation ) // in 0-3600 system { mnOrientation = nOrientation; } diff --git a/vcl/inc/test/outputdevice.hxx b/vcl/inc/test/outputdevice.hxx index cc90b000b10d..0192bf9a4d5a 100644 --- a/vcl/inc/test/outputdevice.hxx +++ b/vcl/inc/test/outputdevice.hxx @@ -78,7 +78,6 @@ public: Bitmap setupDrawBitmapExWithAlpha(); Bitmap setupDrawMask(); - static TestResult checkBitmap(Bitmap& rBitmap); static TestResult checkTransformedBitmap(Bitmap& rBitmap); static TestResult checkBitmapExWithAlpha(Bitmap& rBitmap); static TestResult checkMask(Bitmap& rBitmap); diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx index 36155d72a485..c86dbac36a6b 100644 --- a/vcl/inc/unx/glyphcache.hxx +++ b/vcl/inc/unx/glyphcache.hxx @@ -143,7 +143,6 @@ public: bool TestFont() const { return mbFaceOk;} FT_Face GetFtFace() const; int GetLoadFlags() const { return (mnLoadFlags & ~FT_LOAD_IGNORE_TRANSFORM); } - void SetFontOptions(const std::shared_ptr<FontConfigFontOptions>&); const std::shared_ptr<FontConfigFontOptions>& GetFontOptions() const; bool NeedsArtificialBold() const { return mbArtBold; } bool NeedsArtificialItalic() const { return mbArtItalic; } @@ -152,8 +151,6 @@ public: void GetFontMetric(ImplFontMetricDataRef&) const; const unsigned char* GetTable( const char* pName, sal_uLong* pLength ); - int GetEmUnits() const { return maFaceFT->units_per_EM;} - double GetStretch() { return mfStretch; } const FontCharMapRef GetFontCharMap() const; bool GetFontCapabilities(vcl::FontCapabilities &) const; diff --git a/vcl/inc/unx/printergfx.hxx b/vcl/inc/unx/printergfx.hxx index cb9a6c8f355a..bf477933f37d 100644 --- a/vcl/inc/unx/printergfx.hxx +++ b/vcl/inc/unx/printergfx.hxx @@ -250,7 +250,6 @@ public: void PSPointOp (const Point& rPoint, const sal_Char* pOperator); void PSHexString (const unsigned char* pString, sal_Int16 nLen); void PSShowGlyph (const unsigned char nGlyphId); - void PSComment (const sal_Char* pComment ); void OnEndJob (); void writeResources( osl::File* pFile, std::list< OString >& rSuppliedFonts ); @@ -321,8 +320,6 @@ public: bool bArtItalic, bool bArtBold ); - sal_Int32 GetFontAngle () const - { return mnTextAngle; } sal_Int32 GetFontID () const { return mnFontID; } bool GetFontVertical() const diff --git a/vcl/source/fontsubset/xlat.cxx b/vcl/source/fontsubset/xlat.cxx index f78674be39d5..8a355da97b02 100644 --- a/vcl/source/fontsubset/xlat.cxx +++ b/vcl/source/fontsubset/xlat.cxx @@ -31,7 +31,6 @@ public: explicit ConverterCache(); ~ConverterCache(); sal_uInt16 convertOne( int nSelect, sal_Unicode ); - void convertStr( int nSelect, const sal_Unicode* pSrc, sal_uInt16* pDst, int nCount ); protected: void ensureConverter( int nSelect ); private: @@ -109,34 +108,6 @@ sal_uInt16 ConverterCache::convertOne( int nSelect, sal_Unicode aChar ) return aCode; } -void ConverterCache::convertStr( int nSelect, const sal_Unicode* pSrc, sal_uInt16* pDst, int nCount ) -{ - ensureConverter( nSelect ); - - for( int n = 0; n < nCount; ++n ) - { - sal_Unicode aUCS2Char = pSrc[n]; - - sal_Char aTempArray[8]; - sal_Size nTempSize; - sal_uInt32 nCvtInfo; - - // assume that non-unicode-fonts do not support codepoints >U+FFFF - // TODO: use direct unicode->mbcs converter should there ever be one - int nCodeLen = rtl_convertUnicodeToText( - maConverterCache[ nSelect ], maContexts[ nSelect ], - &aUCS2Char, 1, aTempArray, sizeof(aTempArray), - RTL_UNICODETOTEXT_FLAGS_UNDEFINED_0 - | RTL_UNICODETOTEXT_FLAGS_INVALID_0, - &nCvtInfo, &nTempSize ); - - sal_uInt16 aCode = aTempArray[0]; - for( int i = 1; i < nCodeLen; ++i ) - aCode = (aCode << 8) + (aTempArray[i] & 0xFF); - pDst[n] = aCode; - } -} - } // anonymous namespace namespace vcl @@ -169,30 +140,6 @@ sal_uInt16 TranslateChar16(sal_uInt16 src) return aCC.convertOne( 6, src); } -void TranslateString12(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n) -{ - aCC.convertStr( 2, reinterpret_cast<sal_Unicode *>(src), dst, n); -} - -void TranslateString13(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n) -{ - aCC.convertStr( 3, reinterpret_cast<sal_Unicode *>(src), dst, n); -} - -void TranslateString14(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n) -{ - aCC.convertStr( 4, reinterpret_cast<sal_Unicode *>(src), dst, n); -} - -void TranslateString15(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n) -{ - aCC.convertStr( 5, reinterpret_cast<sal_Unicode *>(src), dst, n); -} - -void TranslateString16(sal_uInt16 *src, sal_uInt16 *dst, sal_uInt32 n) -{ - aCC.convertStr( 6, reinterpret_cast<sal_Unicode *>(src), dst, n); -} } // namespace vcl diff --git a/vcl/source/fontsubset/xlat.hxx b/vcl/source/fontsubset/xlat.hxx index 62317c0d925b..ce79887b4b95 100644 --- a/vcl/source/fontsubset/xlat.hxx +++ b/vcl/source/fontsubset/xlat.hxx @@ -33,12 +33,6 @@ namespace vcl sal_uInt16 TranslateChar14(sal_uInt16); sal_uInt16 TranslateChar15(sal_uInt16); sal_uInt16 TranslateChar16(sal_uInt16); - - void TranslateString12(sal_uInt16 *, sal_uInt16 *, sal_uInt32); - void TranslateString13(sal_uInt16 *, sal_uInt16 *, sal_uInt32); - void TranslateString14(sal_uInt16 *, sal_uInt16 *, sal_uInt32); - void TranslateString15(sal_uInt16 *, sal_uInt16 *, sal_uInt32); - void TranslateString16(sal_uInt16 *, sal_uInt16 *, sal_uInt32); } #endif // INCLUDED_VCL_SOURCE_FONTSUBSET_XLAT_HXX diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 3fd517379d05..93c4ad94312b 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -2103,11 +2103,6 @@ void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal, } } -bool Bitmap::Vectorize( tools::PolyPolygon& rPolyPoly ) -{ - return ImplVectorizer::ImplVectorize( *this, rPolyPoly ); -} - bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, const Link<long,void>* pProgress ) { return ImplVectorizer::ImplVectorize( *this, rMtf, cReduce, pProgress ); diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 73af1121e980..037d228e1e60 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -970,21 +970,6 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) } } -void ToolBox::SetImageList( const ImageList& rImageList ) -{ - maImageList = rImageList; - - sal_uInt16 nCount = (sal_uInt16)mpData->m_aItems.size(); - for( sal_uInt16 i = 0; i < nCount; i++ ) - { - Image aImage; - if ( mpData->m_aItems[i].mnId ) - aImage = maImageList.GetImage( mpData->m_aItems[i].mnId ); - if( !!aImage ) - SetItemImage( mpData->m_aItems[i].mnId, aImage ); - } -} - static Image ImplRotImage( const Image& rImage, long nAngle10 ) { Image aRet; diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx index cc5683c93a60..ca84009d81d1 100644 --- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx +++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx @@ -454,59 +454,6 @@ FreetypeFont::FreetypeFont( const FontSelectPattern& rFSD, FreetypeFontInfo* pFI mnLoadFlags |= FT_LOAD_NO_BITMAP; } -void FreetypeFont::SetFontOptions(const std::shared_ptr<FontConfigFontOptions>& xFontOptions) -{ - mxFontOptions = xFontOptions; - - if (!mxFontOptions) - return; - - FontAutoHint eHint = mxFontOptions->GetUseAutoHint(); - if( eHint == FontAutoHint::DontKnow ) - eHint = mbUseGamma ? FontAutoHint::Yes : FontAutoHint::No; - - if( eHint == FontAutoHint::Yes ) - mnLoadFlags |= FT_LOAD_FORCE_AUTOHINT; - - if( (mnSin != 0) && (mnCos != 0) ) // hinting for 0/90/180/270 degrees only - mnLoadFlags |= FT_LOAD_NO_HINTING; - mnLoadFlags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; - - if (mxFontOptions->DontUseAntiAlias()) - mnPrioAntiAlias = 0; - if (mxFontOptions->DontUseEmbeddedBitmaps()) - mnPrioEmbedded = 0; - if (mxFontOptions->DontUseHinting()) - mnPrioAutoHint = 0; - - if( mnPrioAutoHint <= 0 ) - mnLoadFlags |= FT_LOAD_NO_HINTING; - -#if defined(FT_LOAD_TARGET_LIGHT) && defined(FT_LOAD_TARGET_NORMAL) - if( !(mnLoadFlags & FT_LOAD_NO_HINTING) ) - { - mnLoadFlags |= FT_LOAD_TARGET_NORMAL; - switch (mxFontOptions->GetHintStyle()) - { - case FontHintStyle::NONE: - mnLoadFlags |= FT_LOAD_NO_HINTING; - break; - case FontHintStyle::Slight: - mnLoadFlags |= FT_LOAD_TARGET_LIGHT; - break; - case FontHintStyle::Medium: - break; - case FontHintStyle::Full: - default: - break; - } - } -#endif - - if( mnPrioEmbedded <= 0 ) - mnLoadFlags |= FT_LOAD_NO_BITMAP; -} - namespace { FontConfigFontOptions* GetFCFontOptions( const FontAttributes& rFontAttributes, int nSize) diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx index d8b199b708b4..d6e0508f451e 100644 --- a/vcl/unx/generic/print/common_gfx.cxx +++ b/vcl/unx/generic/print/common_gfx.cxx @@ -1052,25 +1052,6 @@ PrinterGfx::PSShowGlyph (const unsigned char nGlyphId) PSGRestore (); } -void -PrinterGfx::PSComment( const sal_Char* pComment ) -{ - const sal_Char* pLast = pComment; - while( pComment && *pComment ) - { - while( *pComment && *pComment != '\n' && *pComment != '\r' ) - pComment++; - if( pComment - pLast > 1 ) - { - WritePS( mpPageBody, "% ", 2 ); - WritePS( mpPageBody, pLast, pComment - pLast ); - WritePS( mpPageBody, "\n", 1 ); - } - if( *pComment ) - pLast = ++pComment; - } -} - bool PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize ) { diff --git a/vcl/unx/generic/print/glyphset.hxx b/vcl/unx/generic/print/glyphset.hxx index 01ae3488c8d0..c7b023cc2610 100644 --- a/vcl/unx/generic/print/glyphset.hxx +++ b/vcl/unx/generic/print/glyphset.hxx @@ -70,9 +70,7 @@ public: static OString GetReencodedFontName (rtl_TextEncoding nEnc, const OString &rFontName); - static OString - GetGlyphSetEncodingName (rtl_TextEncoding nEnc, - const OString &rFontName); + bool IsVertical () { return mbVertical;} void DrawGlyph (PrinterGfx& rGfx, diff --git a/vcl/unx/generic/print/psputil.cxx b/vcl/unx/generic/print/psputil.cxx index 53b94c465e99..5c68bf687781 100644 --- a/vcl/unx/generic/print/psputil.cxx +++ b/vcl/unx/generic/print/psputil.cxx @@ -208,29 +208,6 @@ ConverterFactory::Get (rtl_TextEncoding nEncoding) return nullptr; } -// wrapper for rtl_convertUnicodeToText that handles the usual cases for -// textconversion in drawtext -std::size_t -ConverterFactory::Convert (const sal_Unicode *pText, int nTextLen, - unsigned char *pBuffer, std::size_t nBufferSize, rtl_TextEncoding nEncoding) -{ - const sal_uInt32 nCvtFlags = RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK - | RTL_UNICODETOTEXT_FLAGS_INVALID_QUESTIONMARK ; - sal_uInt32 nCvtInfo; - sal_Size nCvtChars; - - rtl_UnicodeToTextConverter aConverter = Get (nEncoding); - rtl_UnicodeToTextContext aContext = rtl_createUnicodeToTextContext (aConverter); - - sal_Size nSize = rtl_convertUnicodeToText (aConverter, aContext, - pText, nTextLen, reinterpret_cast<char*>(pBuffer), nBufferSize, - nCvtFlags, &nCvtInfo, &nCvtChars); - - rtl_destroyUnicodeToTextContext (aConverter, aContext); - - return nSize; -} - namespace { class theConverterFactory @@ -239,11 +216,6 @@ namespace }; } -ConverterFactory& GetConverterFactory() -{ - return theConverterFactory::get(); -} - } /* 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 b035de16aafe..8cdd337eff21 100644 --- a/vcl/unx/generic/print/psputil.hxx +++ b/vcl/unx/generic/print/psputil.hxx @@ -53,16 +53,12 @@ public: ConverterFactory(); ~ConverterFactory(); rtl_UnicodeToTextConverter Get (rtl_TextEncoding nEncoding); - std::size_t Convert (const sal_Unicode *pText, int nTextLen, - unsigned char *pBuffer, std::size_t nBufferSize, - rtl_TextEncoding nEncoding); + private: std::map< rtl_TextEncoding, rtl_UnicodeToTextConverter > m_aConverters; }; -ConverterFactory& GetConverterFactory (); - } /* namespace psp */ #endif // INCLUDED_VCL_GENERIC_PRINT_PSPUTIL_HXX |