diff options
Diffstat (limited to 'vcl')
82 files changed, 13 insertions, 2239 deletions
diff --git a/vcl/aqua/source/gdi/salatslayout.cxx b/vcl/aqua/source/gdi/salatslayout.cxx index 822af42b27d0..6f21be3f5c49 100644 --- a/vcl/aqua/source/gdi/salatslayout.cxx +++ b/vcl/aqua/source/gdi/salatslayout.cxx @@ -274,11 +274,7 @@ bool ATSLayout::LayoutText( ImplLayoutArgs& rArgs ) aTagSizes[0] = sizeof( nLineDirTag ); aTagValues[0] = &nLineDirTag; // set run-specific layout controls -#if 0 // why don't line-controls work as reliably as layout-controls??? - ATSUSetLineControls( maATSULayout, rArgs.mnMinCharPos, 1, aTagAttrs, aTagSizes, aTagValues ); -#else ATSUSetLayoutControls( maATSULayout, 1, aTagAttrs, aTagSizes, aTagValues ); -#endif } return true; @@ -1094,113 +1090,6 @@ void ATSLayout::InvalidateMeasurements() // ======================================================================= -#if 0 -// helper class to convert ATSUI outlines to VCL PolyPolygons -class PolyArgs -{ -public: - PolyArgs(); - ~PolyArgs(); - - void Init( PolyPolygon* pPolyPoly, long nXOffset, long nYOffset ); - void AddPoint( const Float32Point&, PolyFlags ); - void ClosePolygon(); - -private: - PolyPolygon* mpPolyPoly; - long mnXOffset, mnYOffset; - - Point* mpPointAry; - BYTE* mpFlagAry; - USHORT mnMaxPoints; - - USHORT mnPointCount; - USHORT mnPolyCount; - bool mbHasOffline; -}; - -// ----------------------------------------------------------------------- - -PolyArgs::PolyArgs() -: mpPolyPoly(NULL), - mnPointCount(0), - mnPolyCount(0), - mbHasOffline(false) -{ - mnMaxPoints = 256; - mpPointAry = new Point[ mnMaxPoints ]; - mpFlagAry = new BYTE [ mnMaxPoints ]; -} - -// ----------------------------------------------------------------------- - -PolyArgs::~PolyArgs() -{ - delete[] mpFlagAry; - delete[] mpPointAry; -} - -// ----------------------------------------------------------------------- - -void PolyArgs::Init( PolyPolygon* pPolyPoly, long nXOffset, long nYOffset ) -{ - mnXOffset = nXOffset; - mnYOffset = nYOffset; - mpPolyPoly = pPolyPoly; - - mpPolyPoly->Clear(); - mnPointCount = 0; - mnPolyCount = 0; -} - -// ----------------------------------------------------------------------- - -void PolyArgs::AddPoint( const Float32Point& rPoint, PolyFlags eFlags ) -{ - if( mnPointCount >= mnMaxPoints ) - { - // resize if needed (TODO: use STL?) - mnMaxPoints *= 4; - Point* mpNewPoints = new Point[ mnMaxPoints ]; - BYTE* mpNewFlags = new BYTE[ mnMaxPoints ]; - for( int i = 0; i < mnPointCount; ++i ) - { - mpNewPoints[ i ] = mpPointAry[ i ]; - mpNewFlags[ i ] = mpFlagAry[ i ]; - } - delete[] mpFlagAry; - delete[] mpPointAry; - mpPointAry = mpNewPoints; - mpFlagAry = mpNewFlags; - } - - // convert to pixels and add startpoint offset - int nXPos = Float32ToInt( rPoint.x ); - int nYPos = Float32ToInt( rPoint.y ); - mpPointAry[ mnPointCount ] = Point( nXPos + mnXOffset, nYPos + mnYOffset ); - // set point flags - mpFlagAry[ mnPointCount++ ]= eFlags; - mbHasOffline |= (eFlags != POLY_NORMAL); -} - -// ----------------------------------------------------------------------- - -void PolyArgs::ClosePolygon() -{ - if( !mnPolyCount++ ) - return; - - // append finished polygon - Polygon aPoly( mnPointCount, mpPointAry, (mbHasOffline ? mpFlagAry : NULL) ); - mpPolyPoly->Insert( aPoly ); - - // prepare for new polygon - mnPointCount = 0; - mbHasOffline = false; -} -#endif -// ======================================================================= - // glyph fallback is supported directly by Aqua // so methods used only by MultiSalLayout can be dummy implementated bool ATSLayout::GetGlyphOutlines( SalGraphics&, PolyPolyVector& rPPV ) const { return false; } diff --git a/vcl/aqua/source/gdi/salatsuifontutils.cxx b/vcl/aqua/source/gdi/salatsuifontutils.cxx index 01b2aa51f186..c11ca9764400 100644 --- a/vcl/aqua/source/gdi/salatsuifontutils.cxx +++ b/vcl/aqua/source/gdi/salatsuifontutils.cxx @@ -344,75 +344,6 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, ImplDevFontAttributes& rDF } } -#if 0 // multiple-master fonts are mostly obsolete nowadays - // if we still want to support them this should probably be done one frame higher - ItemCount nMaxInstances = 0; - rc = ATSUCountFontInstances ( nFontID, &nMaxInstances ); - for( ItemCount nInstanceIndex = 0; nInstanceIndex < nMaxInstances; ++nInstanceIndex ) - { - ItemCount nMaxVariations = 0; - rc = ATSUGetFontInstance( nFontID, nInstanceIndex, 0, NULL, NULL, &nMaxVariations ); - if( (rc == noErr) && (nMaxVariations > 0) ) - { - fprintf(stderr,"\tnMaxVariations=%d\n",(int)nMaxVariations); - typedef ::std::vector<ATSUFontVariationAxis> VariationAxisVector; - typedef ::std::vector<ATSUFontVariationValue> VariationValueVector; - VariationAxisVector aVariationAxes( nMaxVariations ); - VariationValueVector aVariationValues( nMaxVariations ); - ItemCount nVariationCount = 0; - rc = ATSUGetFontInstance ( nFontID, nInstanceIndex, nMaxVariations, - &aVariationAxes[0], &aVariationValues[0], &nVariationCount ); - fprintf(stderr,"\tnVariationCount=%d\n",(int)nVariationCount); - for( ItemCount nVariationIndex = 0; nVariationIndex < nMaxVariations; ++nVariationIndex ) - { - const char* pTag = (const char*)&aVariationAxes[nVariationIndex]; - fprintf(stderr,"\tvariation[%d] \'%c%c%c%c\' is %d\n", (int)nVariationIndex, - pTag[3],pTag[2],pTag[1],pTag[0], (int)aVariationValues[nVariationIndex]); - } - } - } -#endif - -#if 0 // selecting non-defaulted font features is not enabled yet - ByteString aFName( rDFA.maName, RTL_TEXTENCODING_UTF8 ); - ByteString aSName( rDFA.maStyleName, RTL_TEXTENCODING_UTF8 ); - ItemCount nMaxFeatures = 0; - rc = ATSUCountFontFeatureTypes( nFontID, &nMaxFeatures ); - fprintf(stderr,"Font \"%s\" \"%s\" has %d features\n",aFName.GetBuffer(),aSName.GetBuffer(),rc); - if( (rc == noErr) && (nMaxFeatures > 0) ) - { - typedef std::vector<ATSUFontFeatureType> FeatureVector; - FeatureVector aFeatureVector( nMaxFeatures ); - ItemCount nFeatureCount = 0; - rc = ATSUGetFontFeatureTypes( nFontID, nMaxFeatures, &aFeatureVector[0], &nFeatureCount ); - fprintf(stderr,"nFeatureCount=%d\n",(int)nFeatureCount); - for( ItemCount nFeatureIndex = 0; nFeatureIndex < nFeatureCount; ++nFeatureIndex ) - { - ItemCount nMaxSelectors = 0; - rc = ATSUCountFontFeatureSelectors( nFontID, aFeatureVector[nFeatureIndex], &nMaxSelectors ); - fprintf(stderr,"\tFeature[%d] = %d has %d selectors\n", - (int)nFeatureIndex, (int)aFeatureVector[nFeatureIndex], (int)nMaxSelectors ); - typedef std::vector<ATSUFontFeatureSelector> SelectorVector; - SelectorVector aSelectorVector( nMaxSelectors ); - typedef std::vector<MacOSBoolean> BooleanVector; - BooleanVector aEnabledVector( nMaxSelectors ); - BooleanVector aExclusiveVector( nMaxSelectors ); - ItemCount nSelectorCount = 0; - rc = ATSUGetFontFeatureSelectors ( nFontID, aFeatureVector[nFeatureIndex], nMaxSelectors, - &aSelectorVector[0], &aEnabledVector[0], &nSelectorCount, &aExclusiveVector[0]); - for( ItemCount nSelectorIndex = 0; nSelectorIndex < nSelectorCount; ++nSelectorIndex ) - { - FontNameCode eFontNameCode; - rc = ATSUGetFontFeatureNameCode( nFontID, aFeatureVector[nFeatureIndex], - aSelectorVector[nSelectorIndex], &eFontNameCode ); - fprintf(stderr,"\t\tselector[%d] n=%d e=%d, x=%d\n", - (int)nSelectorIndex, (int)eFontNameCode, - aEnabledVector[nSelectorIndex], aExclusiveVector[nSelectorIndex] ); - } - } - } -#endif - bool bRet = (rDFA.maName.Len() > 0); return bRet; } diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index d6ea065f73e7..5dfb9e359c3e 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -1156,23 +1156,6 @@ void AquaSalGraphics::copyArea( long nDstX, long nDstY,long nSrcX, long nSrcY, l { ApplyXorContext(); -#if 0 // TODO: make AquaSalBitmap as fast as the alternative implementation below - SalBitmap* pBitmap = getBitmap( nSrcX, nSrcY, nSrcWidth, nSrcHeight ); - if( pBitmap ) - { - SalTwoRect aPosAry; - aPosAry.mnSrcX = 0; - aPosAry.mnSrcY = 0; - aPosAry.mnSrcWidth = nSrcWidth; - aPosAry.mnSrcHeight = nSrcHeight; - aPosAry.mnDestX = nDstX; - aPosAry.mnDestY = nDstY; - aPosAry.mnDestWidth = nSrcWidth; - aPosAry.mnDestHeight = nSrcHeight; - drawBitmap( &aPosAry, *pBitmap ); - delete pBitmap; - } -#else DBG_ASSERT( mxLayer!=NULL, "AquaSalGraphics::copyArea() for non-layered graphics" ); // in XOR mode the drawing context is redirected to the XOR mask @@ -1211,7 +1194,7 @@ void AquaSalGraphics::copyArea( long nDstX, long nDstY,long nSrcX, long nSrcY, l // mark the destination rectangle as updated RefreshRect( nDstX, nDstY, nSrcWidth, nSrcHeight ); -#endif + } // ----------------------------------------------------------------------- @@ -2375,20 +2358,7 @@ void AquaSalGraphics::GetGlyphWidths( const ImplFontData* pFontData, bool bVerti else if( pFontData->IsEmbeddable() ) { // get individual character widths -#if 0 // FIXME - rWidths.reserve( 224 ); - for( sal_Unicode i = 32; i < 256; ++i ) - { - int nCharWidth = 0; - if( ::GetCharWidth32W( mhDC, i, i, &nCharWidth ) ) - { - rUnicodeEnc[ i ] = rWidths.size(); - rWidths.push_back( nCharWidth ); - } - } -#else DBG_ERROR("not implemented for non-subsettable fonts!\n"); -#endif } } diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx index 827283477bc3..4e40bfa7077d 100644 --- a/vcl/aqua/source/gdi/salnativewidgets.cxx +++ b/vcl/aqua/source/gdi/salnativewidgets.cxx @@ -342,10 +342,6 @@ BOOL AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart n break; case CTRL_TOOLTIP: // ** TO DO - #if 0 - if( nPart == PART_ENTIRE_CONTROL ) // we don't currently support the tooltip - return true; - #endif break; case CTRL_MENU_POPUP: diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index 2efd6f7bb8ef..28d554ba9054 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -105,12 +105,6 @@ AquaSalInfoPrinter::~AquaSalInfoPrinter() delete mpGraphics; if( mpPrintInfo ) [mpPrintInfo release]; - #if 0 - // FIXME: verify that NSPrintInfo releases the printer - // else we have a leak here - if( mpPrinter ) - [mpPrinter release]; - #endif if( mrContext ) CFRelease( mrContext ); } diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx index 5f651d3e37b0..a8a9e2fb45cd 100644 --- a/vcl/aqua/source/window/salframe.cxx +++ b/vcl/aqua/source/window/salframe.cxx @@ -611,12 +611,6 @@ BOOL AquaSalFrame::GetWindowState( SalFrameState* pState ) SAL_FRAMESTATE_MASK_Y | SAL_FRAMESTATE_MASK_WIDTH | SAL_FRAMESTATE_MASK_HEIGHT | - #if 0 - SAL_FRAMESTATE_MASK_MAXIMIZED_X | - SAL_FRAMESTATE_MASK_MAXIMIZED_Y | - SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH | - SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT | - #endif SAL_FRAMESTATE_MASK_STATE; NSRect aStateRect = [mpWindow frame]; diff --git a/vcl/inc/vcl/accel.hxx b/vcl/inc/vcl/accel.hxx index df5b9a182b3a..8c5ee6dfeb68 100644 --- a/vcl/inc/vcl/accel.hxx +++ b/vcl/inc/vcl/accel.hxx @@ -60,7 +60,6 @@ private: BOOL mbIsCancel; BOOL* mpDel; -//#if 0 // _SOLAR__PRIVATE SAL_DLLPRIVATE void ImplInit(); SAL_DLLPRIVATE void ImplCopyData( ImplAccelData& rAccelData ); SAL_DLLPRIVATE void ImplDeleteData(); @@ -68,7 +67,6 @@ private: BOOL bEnable, Accelerator* pAutoAccel ); SAL_DLLPRIVATE ImplAccelEntry* ImplGetAccelData( const KeyCode& rKeyCode ) const; -//#endif protected: SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); diff --git a/vcl/inc/vcl/animate.hxx b/vcl/inc/vcl/animate.hxx index b43834bedf85..5a9b1b6dfc4f 100644 --- a/vcl/inc/vcl/animate.hxx +++ b/vcl/inc/vcl/animate.hxx @@ -162,7 +162,6 @@ class VCL_DLLPUBLIC Animation BOOL mbLoopTerminated; BOOL mbIsWaiting; -//#if 0 // _SOLAR__PRIVATE SAL_DLLPRIVATE void ImplRestartTimer( ULONG nTimeout ); DECL_DLLPRIVATE_LINK( ImplTimeoutHdl, Timer* ); @@ -173,7 +172,6 @@ public: SAL_DLLPRIVATE static void ImplDecAnimCount() { mnAnimCount--; } SAL_DLLPRIVATE ULONG ImplGetCurPos() const { return mnPos; } -//#endif public: Animation(); diff --git a/vcl/inc/vcl/bitmap.hxx b/vcl/inc/vcl/bitmap.hxx index 80db7c839d03..b84ed70db927 100644 --- a/vcl/inc/vcl/bitmap.hxx +++ b/vcl/inc/vcl/bitmap.hxx @@ -258,7 +258,6 @@ private: MapMode maPrefMapMode; Size maPrefSize; -//#if 0 // _SOLAR__PRIVATE public: @@ -309,8 +308,6 @@ public: SAL_DLLPRIVATE BOOL ImplMosaic( const BmpFilterParam* pFilterParam, const Link* pProgress ); SAL_DLLPRIVATE BOOL ImplPopArt( const BmpFilterParam* pFilterParam, const Link* pProgress ); -//#endif // PRIVATE - public: Bitmap(); diff --git a/vcl/inc/vcl/bitmapex.hxx b/vcl/inc/vcl/bitmapex.hxx index d1f5488dbd5d..15e38cf1c286 100644 --- a/vcl/inc/vcl/bitmapex.hxx +++ b/vcl/inc/vcl/bitmapex.hxx @@ -64,13 +64,10 @@ private: public: -//#if 0 // _SOLAR__PRIVATE SAL_DLLPRIVATE ImpBitmap* ImplGetBitmapImpBitmap() const { return aBitmap.ImplGetImpBitmap(); } SAL_DLLPRIVATE ImpBitmap* ImplGetMaskImpBitmap() const { return aMask.ImplGetImpBitmap(); } -//#endif // PRIVATE - public: BitmapEx(); diff --git a/vcl/inc/vcl/bmpacc.hxx b/vcl/inc/vcl/bmpacc.hxx index 4ed3bc4f6a2c..e3530b786e65 100644 --- a/vcl/inc/vcl/bmpacc.hxx +++ b/vcl/inc/vcl/bmpacc.hxx @@ -34,7 +34,6 @@ #include <vcl/salbtype.hxx> #include <vcl/bitmap.hxx> -//#if 0 // _SOLAR__PRIVATE // -------------------- // - Access defines - @@ -70,7 +69,6 @@ case( BMP_FORMAT##Format ): \ } \ break; -//#endif // __PRIVATE // -------------------- // - Access functions - @@ -102,7 +100,6 @@ protected: FncSetPixel mFncSetPixel; BOOL mbModify; -//#if 0 // _SOLAR__PRIVATE SAL_DLLPRIVATE void ImplCreate( Bitmap& rBitmap ); SAL_DLLPRIVATE void ImplDestroy(); @@ -129,8 +126,6 @@ SAL_DLLPRIVATE BitmapBuffer* ImplGetBitmapBuffer() const { return mpBuffer; } DECL_FORMAT( _32BIT_TC_BGRA ) DECL_FORMAT( _32BIT_TC_RGBA ) DECL_FORMAT( _32BIT_TC_MASK ) -//#endif // __PRIVATE - protected: BitmapReadAccess( Bitmap& rBitmap, BOOL bModify ); diff --git a/vcl/inc/vcl/combobox.hxx b/vcl/inc/vcl/combobox.hxx index d161f615b02c..3ab9f6dfa630 100644 --- a/vcl/inc/vcl/combobox.hxx +++ b/vcl/inc/vcl/combobox.hxx @@ -59,7 +59,6 @@ private: Link maSelectHdl; Link maDoubleClickHdl; -//#if 0 // _SOLAR__PRIVATE private: SAL_DLLPRIVATE void ImplInitComboBoxData(); SAL_DLLPRIVATE void ImplUpdateFloatSelection(); @@ -79,7 +78,6 @@ protected: SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); SAL_DLLPRIVATE void ImplCalcEditHeight(); -//#endif protected: ComboBox( WindowType nType ); diff --git a/vcl/inc/vcl/ctrl.hxx b/vcl/inc/vcl/ctrl.hxx index dffcb3a48de7..1790096f8cdd 100644 --- a/vcl/inc/vcl/ctrl.hxx +++ b/vcl/inc/vcl/ctrl.hxx @@ -110,7 +110,6 @@ protected: void ImplInitSettings( const BOOL _bFont, const BOOL _bForeground ); -//#if 0 // _SOLAR__PRIVATE public: SAL_DLLPRIVATE void ImplClearLayoutData() const; /** draws a frame around the give rectangle, onto the given device @@ -132,7 +131,6 @@ public: by the space occupied by the drawn pixels. */ SAL_DLLPRIVATE void ImplDrawFrame( OutputDevice* pDev, Rectangle& rRect ); -//#endif public: Control( Window* pParent, WinBits nWinStyle = 0 ); diff --git a/vcl/inc/vcl/cursor.hxx b/vcl/inc/vcl/cursor.hxx index 564b5e0b4bc7..f1f07957db96 100644 --- a/vcl/inc/vcl/cursor.hxx +++ b/vcl/inc/vcl/cursor.hxx @@ -65,7 +65,6 @@ private: BOOL mbVisible; // Ist Cursor sichtbar unsigned char mnDirection; // indicates direction -//#if 0 // _SOLAR__PRIVATE public: SAL_DLLPRIVATE void ImplDraw(); SAL_DLLPRIVATE void ImplRestore(); @@ -73,7 +72,6 @@ public: SAL_DLLPRIVATE void ImplShow( BOOL bDrawDirect = TRUE ); SAL_DLLPRIVATE void ImplHide(); SAL_DLLPRIVATE void ImplNew(); -//#endif public: Cursor(); diff --git a/vcl/inc/vcl/cvtgrf.hxx b/vcl/inc/vcl/cvtgrf.hxx index c4bc49a2a041..37a3c271b52c 100644 --- a/vcl/inc/vcl/cvtgrf.hxx +++ b/vcl/inc/vcl/cvtgrf.hxx @@ -47,11 +47,9 @@ private: Link maFilterHdl; ConvertData* mpConvertData; -//#if 0 // _SOLAR__PRIVATE public: SAL_DLLPRIVATE ULONG ImplConvert( ULONG nInFormat, void* pInBuffer, ULONG nInBufSize, void** ppOutBuffer, ULONG nOutFormat ); -//#endif // __PRIVATE public: diff --git a/vcl/inc/vcl/cvtsvm.hxx b/vcl/inc/vcl/cvtsvm.hxx index 5681407ef1c3..f7c45f50ed16 100644 --- a/vcl/inc/vcl/cvtsvm.hxx +++ b/vcl/inc/vcl/cvtsvm.hxx @@ -96,14 +96,12 @@ class Stack; class VCL_DLLPUBLIC SVMConverter { private: -//#if 0 // _SOLAR__PRIVATE SAL_DLLPRIVATE void ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ); SAL_DLLPRIVATE void ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf ); SAL_DLLPRIVATE ULONG ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, VirtualDevice& rSaveVDev, BOOL& rRop_0_1, Color& rLineCol, Stack& rLineColStack, rtl_TextEncoding& rActualCharSet ); -//#endif public: SVMConverter( SvStream& rIStm, GDIMetaFile& rMtf, ULONG nConvertMode ); diff --git a/vcl/inc/vcl/dialog.hxx b/vcl/inc/vcl/dialog.hxx index f8a49441cad8..404b18127af8 100644 --- a/vcl/inc/vcl/dialog.hxx +++ b/vcl/inc/vcl/dialog.hxx @@ -59,7 +59,6 @@ private: SAL_DLLPRIVATE void ImplInitDialogData(); SAL_DLLPRIVATE void ImplInitSettings(); -//#if 0 // _SOLAR__PRIVATE // Copy assignment is forbidden and not implemented. SAL_DLLPRIVATE Dialog (const Dialog &); SAL_DLLPRIVATE Dialog & operator= (const Dialog &); @@ -73,7 +72,6 @@ protected: public: SAL_DLLPRIVATE BOOL IsInClose() const { return mbInClose; } -//#endif protected: Dialog( WindowType nType ); @@ -130,11 +128,9 @@ public: class VCL_DLLPUBLIC ModelessDialog : public Dialog { -//#if 0 // _SOLAR__PRIVATE // Copy assignment is forbidden and not implemented. SAL_DLLPRIVATE ModelessDialog (const ModelessDialog &); SAL_DLLPRIVATE ModelessDialog & operator= (const ModelessDialog &); -//#endif public: ModelessDialog( Window* pParent, WinBits nStyle = WB_STDMODELESS ); @@ -157,11 +153,9 @@ private: using Window::Hide; void Hide(); -//#if 0 // _SOLAR__PRIVATE // Copy assignment is forbidden and not implemented. SAL_DLLPRIVATE ModalDialog (const ModalDialog &); SAL_DLLPRIVATE ModalDialog & operator= (const ModalDialog &); -//#endif }; #endif // _SV_DIALOG_HXX diff --git a/vcl/inc/vcl/dockwin.hxx b/vcl/inc/vcl/dockwin.hxx index 3998b5ba792e..4950e267a786 100644 --- a/vcl/inc/vcl/dockwin.hxx +++ b/vcl/inc/vcl/dockwin.hxx @@ -288,7 +288,6 @@ private: mbDockBtn:1, mbHideBtn:1; -//#if 0 // _SOLAR__PRIVATE SAL_DLLPRIVATE void ImplInitDockingWindowData(); // Copy assignment is forbidden and not implemented. @@ -303,7 +302,6 @@ protected: public: SAL_DLLPRIVATE BOOL ImplStartDocking( const Point& rPos ); -//#endif protected: DockingWindow( WindowType nType ); diff --git a/vcl/inc/vcl/evntpost.hxx b/vcl/inc/vcl/evntpost.hxx index 5f36eeaa2470..2a27bbfff033 100644 --- a/vcl/inc/vcl/evntpost.hxx +++ b/vcl/inc/vcl/evntpost.hxx @@ -46,9 +46,7 @@ namespace vcl ULONG m_nId; Link m_aLink; -//#if 0 // _SOLAR__PRIVATE DECL_DLLPRIVATE_LINK( DoEvent_Impl, UserEvent* ); -//#endif public: EventPoster( const Link& rLink ); diff --git a/vcl/inc/vcl/fixed.hxx b/vcl/inc/vcl/fixed.hxx index 61921c6299d5..d14cc750d6ea 100644 --- a/vcl/inc/vcl/fixed.hxx +++ b/vcl/inc/vcl/fixed.hxx @@ -43,7 +43,6 @@ class UserDrawEvent; class VCL_DLLPUBLIC FixedText : public Control { -//#if 0 // _SOLAR__PRIVATE private: using Control::ImplInitSettings; using Window::ImplInit; @@ -54,7 +53,6 @@ private: const Point& rPos, const Size& rSize, bool bFillLayout = false ) const; public: SAL_DLLPRIVATE static USHORT ImplGetTextStyle( WinBits nWinBits ); -//#endif protected: virtual void FillLayoutData() const; virtual const Font& diff --git a/vcl/inc/vcl/floatwin.hxx b/vcl/inc/vcl/floatwin.hxx index 5dad714cc7cd..eb15b116938e 100644 --- a/vcl/inc/vcl/floatwin.hxx +++ b/vcl/inc/vcl/floatwin.hxx @@ -95,7 +95,6 @@ private: BOOL mbInCleanUp; Link maPopupModeEndHdl; -//#if 0 // _SOLAR__PRIVATE SAL_DLLPRIVATE void ImplCallPopupModeEnd(); DECL_DLLPRIVATE_LINK( ImplEndPopupModeHdl, void* ); @@ -124,7 +123,6 @@ public: SAL_DLLPRIVATE void ImplEndPopupMode( USHORT nFlags = 0, ULONG nFocusId = 0 ); SAL_DLLPRIVATE Rectangle& ImplGetItemEdgeClipRect(); SAL_DLLPRIVATE BOOL ImplIsInPrivatePopupMode() const { return mbInPopupMode; } -//#endif public: FloatingWindow( Window* pParent, WinBits nStyle = WB_STDFLOATWIN ); diff --git a/vcl/inc/vcl/gdimtf.hxx b/vcl/inc/vcl/gdimtf.hxx index 6c0cc72fd465..9e40829a26f6 100644 --- a/vcl/inc/vcl/gdimtf.hxx +++ b/vcl/inc/vcl/gdimtf.hxx @@ -85,12 +85,9 @@ enum MtfConversion // - Color conversion routines - // ----------------------------- -//#if 0 // _SOLAR__PRIVATE - typedef Color (*ColorExchangeFnc)( const Color& rColor, const void* pColParam ); typedef BitmapEx (*BmpExchangeFnc)( const BitmapEx& rBmpEx, const void* pBmpParam ); -//#endif // __PRIVATE // --------------- // - GDIMetaFile - @@ -111,7 +108,6 @@ private: BOOL bRecord; BOOL bUseCanvas; -//#if 0 // _SOLAR__PRIVATE SAL_DLLPRIVATE static Color ImplColAdjustFnc( const Color& rColor, const void* pColParam ); SAL_DLLPRIVATE static BitmapEx ImplBmpAdjustFnc( const BitmapEx& rBmpEx, const void* pBmpParam ); @@ -141,7 +137,6 @@ private: SAL_DLLPRIVATE bool ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, Size rDestSize ); SAL_DLLPRIVATE void ImplDelegate2PluggableRenderer( const MetaCommentAction* pAct, OutputDevice* pOut ); -//#endif // __PRIVATE protected: diff --git a/vcl/inc/vcl/graph.hxx b/vcl/inc/vcl/graph.hxx index b4221cefaf3b..78994327041e 100644 --- a/vcl/inc/vcl/graph.hxx +++ b/vcl/inc/vcl/graph.hxx @@ -87,15 +87,11 @@ private: ImpGraphic* mpImpGraphic; -//#if 0 // _SOLAR__PRIVATE - public: SAL_DLLPRIVATE void ImplTestRefCount(); SAL_DLLPRIVATE ImpGraphic* ImplGetImpGraphic() const { return mpImpGraphic; } -//#endif - public: TYPEINFO(); diff --git a/vcl/inc/vcl/impprn.hxx b/vcl/inc/vcl/impprn.hxx deleted file mode 100644 index 36acda22fd71..000000000000 --- a/vcl/inc/vcl/impprn.hxx +++ /dev/null @@ -1,141 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#if 0 -#define _SV_IMPPRN_HXX - -#include <vcl/print.hxx> -#include <vcl/timer.hxx> -#include <vcl/impdel.hxx> - -#include <vector> - -struct QueuePage; - -// ---------------- -// - ImplQPrinter - -// ---------------- - -/* - ImplQPrinter is on most systems a simple buffer that allows a potential - lengthy print job to be printed in the background. For this it saves all - normal drawing operations for each printed page to a metafile, then spooling - the metafiles timer based to a normal printer. The application can act in the meantime - including changing the original document without influencing the print job. - - On some systems (currently Mac/Aqua Cocoa) ImplQPrinter has the additional - purpose of adapting to the print system: here theprint systems starts a - job and will not return from that function until it has ended; to do so - it queries for each consecutive page to be printed. Also the Cocoa print system - needs to know the number of pages BEFORE starting a print job. Since our Printer - does not know that, we need to do the completing spooling to ImplQPrinter before - we can actually print to the real print system. Let's call this the pull model - instead of the push model (because the systems pulls the pages). -*/ - -class ImplQPrinter : public Printer, public vcl::DeletionNotifier -{ -private: - Printer* mpParent; - std::vector< QueuePage* > maQueue; - AutoTimer maTimer; - bool mbAborted; - bool mbUserCopy; - bool mbDestroyAllowed; - bool mbDestroyed; - - GDIMetaFile maCurPageMetaFile; - long mnMaxBmpDPIX; - long mnMaxBmpDPIY; - ULONG mnRestoreDrawMode; - int mnCurCopyCount; - - DECL_LINK( ImplPrintHdl, Timer* ); - - ~ImplQPrinter(); - - void ImplPrintMtf( GDIMetaFile& rMtf, long nMaxBmpDPIX, long nMaxBmpDPIY ); - - ImplQPrinter( const ImplQPrinter& rPrinter ); - Printer& operator =( const ImplQPrinter& rPrinter ); - - void PrePrintPage( QueuePage* ); - void PostPrintPage(); - -public: - - ImplQPrinter( Printer* pParent ); - void Destroy(); - - void StartQueuePrint(); - void EndQueuePrint(); - void AbortQueuePrint(); - void AddQueuePage( GDIMetaFile* pPage, USHORT nPage, BOOL bNewJobSetup ); - - bool IsUserCopy() const { return mbUserCopy; } - void SetUserCopy( bool bSet ) { mbUserCopy = bSet; } - - /** - used by pull implementation to emit the next page - */ - void PrintPage( unsigned int nPage ); - /** - used by pull implementation to get the number of physical pages - (that is how often PrintNextPage should be called) - */ - ULONG GetPrintPageCount() const; - - /** - used by pull implementation to get ranges of physical pages that - are to be printed on the same paper. If bIncludeOrientationChanges is true - then orientation changes will not break a page run; the implementation has - to rotate the page contents accordingly in that case. - - The returned vector contains all pages indices beginning a new medium and additionally - the index that of the last page+1 (for convenience, so the length of a range - is always v[i+1] - v[i]) - - Example: 5 pages, all A4 - return: [0 5] - - Example: 6 pages, beginning A4, switching tol A5 on fourth page, back to A4 on fifth page - return [0 3 4 6] - - returns an false in push model (error condition) - */ - bool GetPaperRanges( std::vector< ULONG >& o_rRanges, bool i_bIncludeOrientationChanges ) const; - - /** - get the jobsetup for a page - */ - ImplJobSetup* GetPageSetup( unsigned int nPage ) const; -}; - -#endif // _SV_IMPPRN_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/jobset.hxx b/vcl/inc/vcl/jobset.hxx index c684f144ce93..a5a3735c3da5 100644 --- a/vcl/inc/vcl/jobset.hxx +++ b/vcl/inc/vcl/jobset.hxx @@ -48,12 +48,10 @@ class VCL_DLLPUBLIC JobSetup private: ImplJobSetup* mpData; -//#if 0 // _SOLAR__PRIVATE public: SAL_DLLPRIVATE ImplJobSetup* ImplGetData(); SAL_DLLPRIVATE ImplJobSetup* ImplGetConstData(); SAL_DLLPRIVATE const ImplJobSetup* ImplGetConstData() const; -//#endif public: JobSetup(); diff --git a/vcl/inc/vcl/longcurr.hxx b/vcl/inc/vcl/longcurr.hxx index 953b90b9c873..fdbb36f7af6c 100644 --- a/vcl/inc/vcl/longcurr.hxx +++ b/vcl/inc/vcl/longcurr.hxx @@ -98,9 +98,7 @@ public: class VCL_DLLPUBLIC LongCurrencyField : public SpinField, public LongCurrencyFormatter { -//#if 0 // _SOLAR__PRIVATE friend void ImplNewLongCurrencyFieldValue( LongCurrencyField*, BigInt ); -//#endif private: BigInt mnSpinSize; diff --git a/vcl/inc/vcl/lstbox.hxx b/vcl/inc/vcl/lstbox.hxx index 5359f0622961..5d74ce5c7a99 100644 --- a/vcl/inc/vcl/lstbox.hxx +++ b/vcl/inc/vcl/lstbox.hxx @@ -57,7 +57,6 @@ private: Link maDoubleClickHdl; USHORT mnLineCount; -//#if 0 // _SOLAR__PRIVATE private: SAL_DLLPRIVATE void ImplInitListBoxData(); @@ -75,7 +74,6 @@ protected: SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); -//#endif BOOL IsDropDownBox() const { return mpFloatWin ? TRUE : FALSE; } protected: diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx index ea3e8b859dbb..751f4ac16ca5 100644 --- a/vcl/inc/vcl/menu.hxx +++ b/vcl/inc/vcl/menu.hxx @@ -401,7 +401,6 @@ class VCL_DLLPUBLIC MenuBar : public Menu BOOL mbHideBtnVisible; BOOL mbDisplayable; -//#if 0 // _SOLAR__PRIVATE friend class Application; friend class Menu; friend class MenuBarWindow; @@ -411,7 +410,6 @@ class VCL_DLLPUBLIC MenuBar : public Menu SAL_DLLPRIVATE static Window* ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu ); SAL_DLLPRIVATE static void ImplDestroy( MenuBar* pMenu, BOOL bDelete ); SAL_DLLPRIVATE BOOL ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu = TRUE ); -//#endif public: MenuBar(); diff --git a/vcl/inc/vcl/octree.hxx b/vcl/inc/vcl/octree.hxx index 12b64d8224ca..085ef648f98f 100644 --- a/vcl/inc/vcl/octree.hxx +++ b/vcl/inc/vcl/octree.hxx @@ -136,12 +136,9 @@ private: BYTE* pMap; const ULONG nBits; -//#if 0 // _SOLAR__PRIVATE SAL_DLLPRIVATE void ImplCreateBuffers( const ULONG nMax ); -//#endif // __PRIVATE - public: InverseColorMap( const BitmapPalette& rPal ); diff --git a/vcl/inc/vcl/salbtype.hxx b/vcl/inc/vcl/salbtype.hxx index 48b41f4cb137..1721e201b1ae 100644 --- a/vcl/inc/vcl/salbtype.hxx +++ b/vcl/inc/vcl/salbtype.hxx @@ -182,13 +182,11 @@ private: BitmapColor* mpBitmapColor; USHORT mnCount; -//#if 0 // _SOLAR__PRIVATE public: SAL_DLLPRIVATE inline BitmapColor* ImplGetColorBuffer() const; -//#endif // __PRIVATE public: @@ -685,13 +683,11 @@ inline BitmapColor& BitmapPalette::operator[]( USHORT nIndex ) // ------------------------------------------------------------------ -//#if 0 // _SOLAR__PRIVATE inline BitmapColor* BitmapPalette::ImplGetColorBuffer() const { DBG_ASSERT( mpBitmapColor, "No color buffer available!" ); return mpBitmapColor; } -//#endif // ------------------------------------------------------------------ inline USHORT BitmapPalette::GetBestIndex( const BitmapColor& rCol ) const diff --git a/vcl/inc/vcl/seleng.hxx b/vcl/inc/vcl/seleng.hxx index 3b642fe06f96..b0ccdec69cbb 100644 --- a/vcl/inc/vcl/seleng.hxx +++ b/vcl/inc/vcl/seleng.hxx @@ -92,9 +92,7 @@ private: USHORT nMouseSensitivity; USHORT nLockedMods; USHORT nFlags; -//#if 0 // _SOLAR__PRIVATE DECL_DLLPRIVATE_LINK( ImpWatchDog, Timer * ); -//#endif inline BOOL ShouldDeselect( BOOL bModifierKey1 ) const; // determines to deselect or not when Ctrl-key is pressed on CursorPosChanging diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx index c58934f6c2ae..7d5a9a1c9f2d 100644 --- a/vcl/inc/vcl/status.hxx +++ b/vcl/inc/vcl/status.hxx @@ -108,9 +108,7 @@ private: SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); SAL_DLLPRIVATE void ImplFormat(); SAL_DLLPRIVATE BOOL ImplIsItemUpdate(); -// #if 0 // _SOLAR__PRIVATE using OutputDevice::ImplDrawText; -// #endif SAL_DLLPRIVATE void ImplDrawText( BOOL bOffScreen, long nOldTextWidth ); SAL_DLLPRIVATE void ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL bDrawFrame ); SAL_DLLPRIVATE void ImplDrawProgress( BOOL bPaint, diff --git a/vcl/inc/vcl/taskpanelist.hxx b/vcl/inc/vcl/taskpanelist.hxx index 0624a4c38002..0eb4f20cd97d 100644 --- a/vcl/inc/vcl/taskpanelist.hxx +++ b/vcl/inc/vcl/taskpanelist.hxx @@ -41,10 +41,8 @@ class VCL_DLLPUBLIC TaskPaneList Window *FindNextFloat( Window *pWindow, BOOL bForward = TRUE ); Window *FindNextSplitter( Window *pWindow, BOOL bForward = TRUE ); -//#if 0 // _SOLAR__PRIVATE public: BOOL IsInList( Window *pWindow ); -//#endif public: TaskPaneList(); diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx index d7a9ef82e1b9..094e831af702 100644 --- a/vcl/inc/vcl/toolbox.hxx +++ b/vcl/inc/vcl/toolbox.hxx @@ -252,9 +252,7 @@ private: using Window::ImplInit; private: SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); -// #if 0 // _SOLAR__PRIVATE using DockingWindow::ImplInitSettings; -// #endif SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); SAL_DLLPRIVATE ImplToolItem* ImplGetItem( USHORT nId ) const; @@ -300,7 +298,6 @@ private: DECL_DLLPRIVATE_LINK( ImplCustomMenuListener, VclMenuEvent* ); DECL_DLLPRIVATE_LINK( ImplDropdownLongClickHdl, ToolBox* ); -//#if 0 // _SOLAR__PRIVATE // Copy assignment is forbidden and not implemented. SAL_DLLPRIVATE ToolBox (const ToolBox &); SAL_DLLPRIVATE ToolBox& operator= (const ToolBox &); @@ -342,7 +339,6 @@ public: static SAL_DLLPRIVATE void ImplDrawMenubutton( ToolBox *pThis, BOOL bHighlight ); static SAL_DLLPRIVATE USHORT ImplCountLineBreaks( const ToolBox *pThis ); SAL_DLLPRIVATE ImplToolBoxPrivateData* ImplGetToolBoxPrivateData() const { return mpData; } -//#endif protected: void SetCurItemId(USHORT nSet) { mnCurItemId = nSet; } diff --git a/vcl/inc/vcl/wall.hxx b/vcl/inc/vcl/wall.hxx index 372250dea18f..0011501392be 100644 --- a/vcl/inc/vcl/wall.hxx +++ b/vcl/inc/vcl/wall.hxx @@ -93,10 +93,9 @@ private: SAL_DLLPRIVATE void ImplMakeUnique( BOOL bReleaseCache = TRUE ); SAL_DLLPRIVATE Gradient ImplGetApplicationGradient() const; -//#if 0 // _SOLAR__PRIVATE public: SAL_DLLPRIVATE ImplWallpaper* ImplGetImpWallpaper() const { return mpImplWallpaper; } -//#endif + public: Wallpaper(); diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx index 9542854c8366..e6bd75afdcba 100644 --- a/vcl/inc/vcl/window.hxx +++ b/vcl/inc/vcl/window.hxx @@ -174,9 +174,7 @@ namespace svt { class PopupWindowControllerImpl; } #define TOTOP_RESTOREWHENMIN ((USHORT)0x0001) #define TOTOP_FOREGROUNDTASK ((USHORT)0x0002) #define TOTOP_NOGRABFOCUS ((USHORT)0x0004) -//#if 0 // _SOLAR__PRIVATE // vcl internal only #define TOTOP_GRABFOCUSONLY ((USHORT)0x0008) -//#endif // Flags for Invalidate #define INVALIDATE_CHILDREN ((USHORT)0x0001) @@ -301,7 +299,6 @@ typedef USHORT StateChangedType; #define EXTTEXTINPUT_END_COMPLETE ((USHORT)0x0001) #define EXTTEXTINPUT_END_CANCEL ((USHORT)0x0002) -//#if 0 // _SOLAR__PRIVATE #define IMPL_MINSIZE_BUTTON_WIDTH 70 #define IMPL_MINSIZE_BUTTON_HEIGHT 22 #define IMPL_EXTRA_BUTTON_WIDTH 18 @@ -319,7 +316,6 @@ typedef USHORT StateChangedType; #define DLGWINDOW_PREV 0 #define DLGWINDOW_NEXT 1 #define DLGWINDOW_FIRST 2 -//#endif enum WindowSizeType { WINDOWSIZE_MINIMUM, diff --git a/vcl/os2/inc/salgdi.h b/vcl/os2/inc/salgdi.h index 2fc98147bfc8..d0cb16af0dc3 100644 --- a/vcl/os2/inc/salgdi.h +++ b/vcl/os2/inc/salgdi.h @@ -194,21 +194,6 @@ protected: virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize ); -#if 0 - // native widget rendering methods that require mirroring - virtual BOOL hitTestNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion, - const Point& aPos, BOOL& rIsInside ); - virtual BOOL drawNativeControl( ControlType nType, ControlPart nPart, const Region& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - rtl::OUString aCaption ); - virtual BOOL drawNativeControlText( ControlType nType, ControlPart nPart, const Region& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - rtl::OUString aCaption ); - virtual BOOL getNativeControlRegion( ControlType nType, ControlPart nPart, const Region& rControlRegion, ControlState nState, - const ImplControlValue& aValue, rtl::OUString aCaption, - Region &rNativeBoundingRegion, Region &rNativeContentRegion ); -#endif - virtual bool drawAlphaBitmap( const SalTwoRect&, const SalBitmap& rSourceBitmap, const SalBitmap& rAlphaBitmap ); diff --git a/vcl/os2/inc/sallayout.h b/vcl/os2/inc/sallayout.h index 8444b5e758a9..b14220dd8232 100644 --- a/vcl/os2/inc/sallayout.h +++ b/vcl/os2/inc/sallayout.h @@ -28,42 +28,4 @@ #ifndef _SV_SALLAYOUT_H #define _SV_SALLAYOUT_H -#if 0 -#include <sv.h> -#include <sallayout.hxx> - -class ImplOs2FontEntry; - -class Os2SalLayout : public GenericSalLayout -{ -public: - Os2SalLayout( HPS); - virtual bool LayoutText( ImplLayoutArgs& ); - virtual void AdjustLayout( ImplLayoutArgs& ); - virtual void DrawText( SalGraphics& ) const; - -protected: - HPS mhPS; - FONTMETRICS FontMetrics; - int mnBaseAdv; - -private: - int mnGlyphCount; - int mnCharCount; - sal_Unicode* mpOutGlyphs; - int* mpGlyphAdvances; // if possible this is shared with mpGlyphAdvances[] - int* mpGlyphOrigAdvs; - int* mpCharWidths; // map rel char pos to char width - int* mpChars2Glyphs; // map rel char pos to abs glyph pos - int* mpGlyphs2Chars; // map abs glyph pos to abs char pos - bool* mpGlyphRTLFlags; // BiDi status for glyphs: true=>RTL - mutable long mnWidth; - bool mbDisableGlyphs; - - int mnNotdefWidth; - BYTE mnCharSet; - -}; -#endif - #endif // _SV_SALLAYOUT_H diff --git a/vcl/os2/source/app/salinfo.cxx b/vcl/os2/source/app/salinfo.cxx index cb1899be0999..08ca8b031982 100644 --- a/vcl/os2/source/app/salinfo.cxx +++ b/vcl/os2/source/app/salinfo.cxx @@ -74,23 +74,6 @@ Os2SalSystem::~Os2SalSystem() } // ----------------------------------------------------------------------- -#if 0 -bool Os2SalSystem::GetSalSystemDisplayInfo( DisplayInfo& rInfo ) -{ - HDC hDC; - if( hDC = WinQueryWindowDC(HWND_DESKTOP) ) - { - LONG bitCount; - DevQueryCaps(hDC, CAPS_COLOR_BITCOUNT, CAPS_COLOR_BITCOUNT, &bitCount); - rInfo.nWidth = WinQuerySysValue( HWND_DESKTOP, SV_CXSCREEN ); - rInfo.nHeight = WinQuerySysValue( HWND_DESKTOP, SV_CYSCREEN ); - rInfo.nDepth = bitCount; - return true; - } - else - return false; -} -#endif unsigned int Os2SalSystem::GetDisplayScreenCount() { diff --git a/vcl/os2/source/app/sallang.cxx b/vcl/os2/source/app/sallang.cxx index 0d9c17612c30..b93787013bbb 100644 --- a/vcl/os2/source/app/sallang.cxx +++ b/vcl/os2/source/app/sallang.cxx @@ -63,50 +63,6 @@ const sal_Unicode** ImplGetLangTab( LanguageType eLang ) //switch ( International::GetNeutralLanguage( eLang ) ) switch ( eLang ) { -#if 0 - case LANGUAGE_DANISH: - pLangTab = aImplLangDanishTab; - break; - - case LANGUAGE_DUTCH: - case LANGUAGE_DUTCH_BELGIAN: - pLangTab = aImplLangDutchTab; - break; - - case LANGUAGE_FINNISH: - pLangTab = aImplLangFinnishTab; - break; - - case LANGUAGE_FRENCH: - pLangTab = aImplLangFrenchTab; - break; - - case LANGUAGE_GERMAN: - pLangTab = aImplLangGermanTab; - break; - - case LANGUAGE_ITALIAN: - pLangTab = aImplLangItalianTab; - break; - - case LANGUAGE_NORWEGIAN: - case LANGUAGE_NORWEGIAN_BOKMAL: - pLangTab = aImplLangNorwegianTab; - break; - - case LANGUAGE_PORTUGUESE: - case LANGUAGE_PORTUGUESE_BRAZILIAN: - pLangTab = aImplLangPortugueseTab; - break; - - case LANGUAGE_SPANISH: - pLangTab = aImplLangSpanishTab; - break; - - case LANGUAGE_SWEDISH: - pLangTab = aImplLangSwedishTab; - break; -#endif default: pLangTab = aImplLangEnglishTab; break; diff --git a/vcl/os2/source/gdi/os2layout.cxx b/vcl/os2/source/gdi/os2layout.cxx index 25e169e8069c..0d30679bf309 100644 --- a/vcl/os2/source/gdi/os2layout.cxx +++ b/vcl/os2/source/gdi/os2layout.cxx @@ -246,15 +246,6 @@ bool Os2SalLayout::LayoutText( ImplLayoutArgs& rArgs ) } // TODO: use a cached value for bDisableAsianKern from upper layers -#if 0 - if( rArgs.mnFlags & SAL_LAYOUT_KERNING_ASIAN ) - { - TEXTMETRICA aTextMetricA; - if( ::GetTextMetricsA( mhDC, &aTextMetricA ) - && !(aTextMetricA.tmPitchAndFamily & TMPF_FIXED_PITCH) ) - rArgs.mnFlags &= ~SAL_LAYOUT_KERNING_ASIAN; - } -#endif // layout text int i, j; diff --git a/vcl/os2/source/gdi/salgdi.cxx b/vcl/os2/source/gdi/salgdi.cxx index f7e0f583fe47..35930904d1c8 100644 --- a/vcl/os2/source/gdi/salgdi.cxx +++ b/vcl/os2/source/gdi/salgdi.cxx @@ -786,46 +786,6 @@ static BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize ) return bRetValue; } -#if 0 -static void ImplWriteDouble( BYTE** pBuf, double nNumber ) -{ -// *pBuf += sprintf( (char*)*pBuf, "%f", nNumber ); - - if ( nNumber < 0 ) - { - *(*pBuf)++ = (BYTE)'-'; - nNumber = -nNumber; - } - ULONG nTemp = (ULONG)nNumber; - const String aNumber1( nTemp ); - ULONG nLen = aNumber1.Len(); - - for ( USHORT n = 0; n < nLen; n++ ) - *(*pBuf)++ = aNumber1[ n ]; - - nTemp = (ULONG)( ( nNumber - nTemp ) * 100000 ); - if ( nTemp ) - { - *(*pBuf)++ = (BYTE)'.'; - const String aNumber2( nTemp ); - - ULONG nLen = aNumber2.Len(); - if ( nLen < 8 ) - { - for ( n = 0; n < ( 5 - nLen ); n++ ) - { - *(*pBuf)++ = (BYTE)'0'; - } - } - for ( USHORT n = 0; n < nLen; n++ ) - { - *(*pBuf)++ = aNumber2[ n ]; - } - } - *(*pBuf)++ = ' '; -} -#endif - inline void ImplWriteString( BYTE** pBuf, const char* sString ) { strcpy( (char*)*pBuf, sString ); @@ -892,50 +852,6 @@ BOOL Os2SalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* " } if\n" "} if\n\n" ); -#if 0 - // #i10737# Apply clipping manually - // ---------------------------------------------------------------------------------- - - // Windows seems to ignore any clipping at the HDC, - // when followed by a POSTSCRIPT_PASSTHROUGH - - // Check whether we've got a clipping, consisting of - // exactly one rect (other cases should be, but aren't - // handled currently) - - // TODO: Handle more than one rectangle here (take - // care, the buffer can handle only POSTSCRIPT_BUFSIZE - // characters!) - if ( mhRegion != 0 && - mpStdClipRgnData != NULL && - mpClipRgnData == mpStdClipRgnData && - mpClipRgnData->rdh.nCount == 1 ) - { - RECT* pRect = &(mpClipRgnData->rdh.rcBound); - - aBuf.append( "\nnewpath\n" ); - aBuf.append( pRect->left ); - aBuf.append( " " ); - aBuf.append( pRect->top ); - aBuf.append( " moveto\n" ); - aBuf.append( pRect->right ); - aBuf.append( " " ); - aBuf.append( pRect->top ); - aBuf.append( " lineto\n" ); - aBuf.append( pRect->right ); - aBuf.append( " " ); - aBuf.append( pRect->bottom ); - aBuf.append( " lineto\n" ); - aBuf.append( pRect->left ); - aBuf.append( " " ); - aBuf.append( pRect->bottom ); - aBuf.append( " lineto\n" - "closepath\n" - "clip\n" - "newpath\n" ); - } -#endif - // #107797# Write out buffer // ---------------------------------------------------------------------------------- *((USHORT*)aBuf.getStr()) = (USHORT)( aBuf.getLength() - 2 ); @@ -961,20 +877,6 @@ BOOL Os2SalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* *((USHORT*)aBuf.getStr()) = (USHORT)( aBuf.getLength() - 2 ); DevEscape( mhDC, DEVESC_RAWDATA, aBuf.getLength(), (PBYTE)aBuf.getStr(), 0, NULL ); -#if 0 - BYTE* pTemp = pBuf; - ImplWriteString( &pTemp, "save\n[ " ); - ImplWriteDouble( &pTemp, dM11 ); - ImplWriteDouble( &pTemp, 0 ); - ImplWriteDouble( &pTemp, 0 ); - ImplWriteDouble( &pTemp, dM22 ); - ImplWriteDouble( &pTemp, nX - ( dM11 * nBoundingBox[0] ) ); - ImplWriteDouble( &pTemp, mnHeight - nY - ( dM22 * nBoundingBox[3] ) ); - ImplWriteString( &pTemp, "] concat /showpage {} def\n" ); - - if ( DevEscape( mhDC, DEVESC_RAWDATA, pTemp - pBuf, - (PBYTE)pBuf, 0, NULL ) == DEV_OK ) -#endif // { UINT32 nToDo = nSize; UINT32 nDoNow; @@ -1034,9 +936,6 @@ SystemGraphicsData Os2SalGraphics::GetGraphicsData() const { SystemGraphicsData aRes; aRes.nSize = sizeof(aRes); -#if 0 - aRes.hDC = mhDC; -#endif return aRes; } diff --git a/vcl/os2/source/gdi/salgdi3.cxx b/vcl/os2/source/gdi/salgdi3.cxx index 7d59dc92968f..b403bf5128da 100644 --- a/vcl/os2/source/gdi/salgdi3.cxx +++ b/vcl/os2/source/gdi/salgdi3.cxx @@ -518,29 +518,6 @@ void ImplOs2FontData::ReadGsubTable( HPS hPS ) const maGsubTable.insert( cChar ); // insert GSUBbed unicodes CloseTTFont( pTTFont ); - -#if 0 - TrueTypeFont* pTTFont = NULL; - ::OpenTTFont( &aRawFont[0], nFontSize, nFaceNum, &pTTFont ); - if( !pTTFont ) - return; - - // add vertically substituted characters to list - static const sal_Unicode aGSUBCandidates[] = { - 0x0020, 0x0080, // ASCII - 0x2000, 0x2600, // misc - 0x3000, 0x3100, // CJK punctutation - 0x3300, 0x3400, // squared words - 0xFF00, 0xFFF0, // halfwidth|fullwidth forms - 0 }; - - for( const sal_Unicode* pPair = aGSUBCandidates; *pPair; pPair += 2 ) - for( sal_Unicode cChar = pPair[0]; cChar < pPair[1]; ++cChar ) - if( ::MapChar( pTTFont, cChar, 0 ) != ::MapChar( pTTFont, cChar, 1 ) ) - maGsubTable.insert( cChar ); // insert GSUBbed unicodes - - CloseTTFont( pTTFont ); -#endif } #endif // GNG_VERT_HACK @@ -772,18 +749,6 @@ USHORT Os2SalGraphics::SetFont( ImplFontSelectData* pFont, int nFallbackLevel ) // return early if there is no new font if( !pFont ) { -#if 0 - // deselect still active font - if( mhDefFont ) - Ft2SetCharSet( mhPS, mhDefFont ); - // release no longer referenced font handles - for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i ) - { - if( mhFonts[i] ) - Ft2DeleteSetId( mhPS, mhFonts[i] ); - mhFonts[ i ] = 0; - } -#endif mhDefFont = 0; return 0; } @@ -810,9 +775,6 @@ USHORT Os2SalGraphics::SetFont( ImplFontSelectData* pFont, int nFallbackLevel ) { if( mhFonts[i] ) { -#if 0 - Ft2DeleteSetId( mhPS, mhFonts[i] ); -#endif mhFonts[i] = 0; } } @@ -1388,24 +1350,10 @@ private: ScopedFont::ScopedFont(Os2SalGraphics & rData): m_rData(rData) { -#if 0 - m_hOrigFont = m_rData.mhFonts[0]; - m_rData.mhFonts[0] = 0; // avoid deletion of current font -#endif } ScopedFont::~ScopedFont() { -#if 0 - if( m_hOrigFont ) - { - // restore original font, destroy temporary font - HFONT hTempFont = m_rData.mhFonts[0]; - m_rData.mhFonts[0] = m_hOrigFont; - SelectObject( m_rData.mhDC, m_hOrigFont ); - DeleteObject( hTempFont ); - } -#endif } class ScopedTrueTypeFont @@ -1624,19 +1572,11 @@ const Ucs2SIntMap* Os2SalGraphics::GetFontEncodingVector( const ImplFontData* pF // fill the encoding vector Ucs2SIntMap& rMap = *new Ucs2SIntMap; -#if 0 - // TODO: get correct encoding vector - ImplWinFontData* pWinFontData = reinterpret_cast<ImplWinFontData*>(pFont); - - GLYPHSET aGlyphSet; - aGlyphSet.cbThis = sizeof(aGlyphSet); - DWORD aW = ::GetFontUnicodeRanges( mhDC, &aGlyphSet); -#else + for( sal_Unicode i = 32; i < 256; ++i ) rMap[i] = i; if( pNonEncoded ) *pNonEncoded = NULL; -#endif return &rMap; } diff --git a/vcl/os2/source/gdi/salprn.cxx b/vcl/os2/source/gdi/salprn.cxx index c3404cef54e2..7290cdbcb9fe 100644 --- a/vcl/os2/source/gdi/salprn.cxx +++ b/vcl/os2/source/gdi/salprn.cxx @@ -1587,23 +1587,6 @@ BOOL Os2SalPrinter::StartJob( const XubString* pFileName, lType = OD_QUEUED; } -#if 0 // YD FIXME - // Set comment (AppName nur bis zum 1. Space-Zeichen nehmen) - const xub_Unicode* pComment = rAppName; - USHORT nCommentLen = 0; - memset( maCommentBuf, 0, sizeof( maCommentBuf ) ); - while ( (nCommentLen < 32) && - (((*pComment >= 'a') && (*pComment <= 'z')) || - ((*pComment >= 'A') && (*pComment <= 'Z')) || - ((*pComment >= '0') && (*pComment <= '9')) || - (*pComment == '-'))) - { - maCommentBuf[nCommentLen] = (char)(*pComment); - nCommentLen++; - pComment++; - } - aDevOpenStruc.pszComment = (PSZ)maCommentBuf; -#endif ByteString jobName( rJobName, gsl_getSystemTextEncoding()); aDevOpenStruc.pszComment = (PSZ)jobName.GetBuffer(); diff --git a/vcl/os2/source/window/salframe.cxx b/vcl/os2/source/window/salframe.cxx index a89798edda77..7ffc335d5528 100644 --- a/vcl/os2/source/window/salframe.cxx +++ b/vcl/os2/source/window/salframe.cxx @@ -249,26 +249,6 @@ static void dumpWindowInfo( char* fnc, HWND hwnd) SWP aSWP; HWND hwnd2; char szTitle[256]; - -#if 0 - _WinQueryWindowPos( hwnd, &aSWP ); - strcpy(szTitle,""); - WinQueryWindowText(hwnd, sizeof(szTitle), szTitle); - debug_printf( "%s: window %08x at %d,%d (size %dx%d) '%s'\n", fnc, hwnd, - aSWP.x, aSWP.y, aSWP.cx, aSWP.cy, szTitle); - hwnd2 = WinQueryWindow(hwnd, QW_PARENT); - _WinQueryWindowPos( hwnd2, &aSWP ); - strcpy(szTitle,""); - WinQueryWindowText(hwnd2, sizeof(szTitle), szTitle); - debug_printf( "%s: parent %08x at %d,%d (size %dx%d) '%s'\n", fnc, hwnd2, - aSWP.x, aSWP.y, aSWP.cx, aSWP.cy, szTitle); - hwnd2 = WinQueryWindow(hwnd, QW_OWNER); - _WinQueryWindowPos( hwnd2, &aSWP ); - strcpy(szTitle,""); - WinQueryWindowText(hwnd2, sizeof(szTitle), szTitle); - debug_printf( "%s: owner %08x at %d,%d (size %dx%d) '%s'\n", fnc, hwnd2, - aSWP.x, aSWP.y, aSWP.cx, aSWP.cy, szTitle); -#endif } #endif @@ -1384,34 +1364,6 @@ BOOL Os2SalFrame::GetWindowState( SalFrameState* pState ) void Os2SalFrame::SetScreenNumber( unsigned int nNewScreen ) { -#if 0 - WinSalSystem* pSys = static_cast<WinSalSystem*>(ImplGetSalSystem()); - if( pSys ) - { - const std::vector<WinSalSystem::DisplayMonitor>& rMonitors = - pSys->getMonitors(); - size_t nMon = rMonitors.size(); - if( nNewScreen < nMon ) - { - Point aOldMonPos, aNewMonPos( rMonitors[nNewScreen].m_aArea.TopLeft() ); - Point aCurPos( maGeometry.nX, maGeometry.nY ); - for( size_t i = 0; i < nMon; i++ ) - { - if( rMonitors[i].m_aArea.IsInside( aCurPos ) ) - { - aOldMonPos = rMonitors[i].m_aArea.TopLeft(); - break; - } - } - mnDisplay = nNewScreen; - maGeometry.nScreenNumber = nNewScreen; - SetPosSize( aNewMonPos.X() + (maGeometry.nX - aOldMonPos.X()), - aNewMonPos.Y() + (maGeometry.nY - aOldMonPos.Y()), - 0, 0, - SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y ); - } - } -#endif } // ----------------------------------------------------------------------- @@ -1464,14 +1416,6 @@ void Os2SalFrame::StartPresentation( BOOL bStart ) void Os2SalFrame::SetAlwaysOnTop( BOOL bOnTop ) { mbAllwayOnTop = bOnTop; -#if 0 - HWND hWnd; - if ( bOnTop ) - hWnd = HWND_TOPMOST; - else - hWnd = HWND_NOTOPMOST; - SetWindowPos( mhWnd, hWnd, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE ); -#endif } @@ -1737,13 +1681,6 @@ void Os2SalFrame::SetInputContext( SalInputContext* pContext ) } // ----------------------------------------------------------------------- -#if 0 -void Os2SalFrame::UpdateExtTextInputArea() -{ -#ifdef ENABLE_IME -#endif -} -#endif // ----------------------------------------------------------------------- @@ -2206,16 +2143,6 @@ void Os2SalFrame::UpdateSettings( AllSettings& rSettings ) if ( PrfQueryProfileString( HINI_PROFILE, (PSZ)aSystemFonts, (PSZ)"Menus", aDummyStr, aFontNameBuf, sizeof( aFontNameBuf ) ) > 5 ) { if ( ImplOS2NameFontToVCLFont( aFontNameBuf, aFont ) ) { -#if 0 - // Add Workplace Sans if not already listed - if ( aFont.GetName().Search( (sal_Unicode*)L"WorkPlace Sans" ) == STRING_NOTFOUND ) - { - XubString aFontName = aFont.GetName(); - aFontName.Insert( (sal_Unicode*)L"WorkPlace Sans;", 0 ); - aFont.SetName( aFontName ); - aFont.SetSize( Size( 0, 9 ) ); - } -#endif aStyleSettings.SetMenuFont( aFont ); } } @@ -2306,12 +2233,6 @@ void Os2SalFrame::Beep( SoundType eSoundType ) WA_NOTE // SOUND_QUERY }; -#if 0 -#if SOUND_COUNT != 5 -#error New Sound must be defined! -#endif -#endif - debug_printf("Os2SalFrame::Beep %d\n", eSoundType); WinAlarm( HWND_DESKTOP, aImplSoundTab[eSoundType] ); } @@ -3113,26 +3034,6 @@ static int SalImplHandleProcessMenu( Os2SalFrame* pFrame, ULONG nMsg, MPARAM nMP { long nRet = 0; debug_printf("SalImplHandleProcessMenu\n"); -#if 0 - DWORD err=0; - if( !HIWORD(wParam) ) - { - // Menu command - WORD nId = LOWORD(wParam); - if( nId ) // zero for separators - { - SalMenuEvent aMenuEvt; - aMenuEvt.mnId = nId; - WinSalMenuItem *pSalMenuItem = ImplGetSalMenuItem( pFrame->mSelectedhMenu, nId, FALSE ); - if( pSalMenuItem ) - aMenuEvt.mpMenu = pSalMenuItem->mpMenu; - else - aMenuEvt.mpMenu = NULL; - - nRet = pFrame->CallCallback( SALEVENT_MENUCOMMAND, &aMenuEvt ); - } - } -#endif //return (nRet != 0); return (nRet == 0); } @@ -3145,18 +3046,6 @@ static void ImplHandleInputLangChange( HWND hWnd ) // Feststellen, ob wir IME unterstuetzen Os2SalFrame* pFrame = GetWindowPtr( hWnd ); -#if 0 - if ( pFrame && pFrame->mbIME && pFrame->mhDefIMEContext ) - { - HWND hWnd = pFrame->mhWnd; - HKL hKL = (HKL)lParam; - UINT nImeProps = ImmGetProperty( hKL, IGP_PROPERTY ); - - pFrame->mbSpezIME = (nImeProps & IME_PROP_SPECIAL_UI) != 0; - pFrame->mbAtCursorIME = (nImeProps & IME_PROP_AT_CARET) != 0; - pFrame->mbHandleIME = !pFrame->mbSpezIME; - } -#endif // trigger input language and codepage update UINT nLang = pFrame->mnInputLang; diff --git a/vcl/os2/source/window/salobj.cxx b/vcl/os2/source/window/salobj.cxx index 15b58d43ce84..0827f0de9a14 100644 --- a/vcl/os2/source/window/salobj.cxx +++ b/vcl/os2/source/window/salobj.cxx @@ -555,16 +555,4 @@ const SystemChildData* Os2SalObject::GetSystemData() const return &maSysData; } -// ----------------------------------------------------------------------- -#if 0 -void Os2SalObject::SetCallback( void* pInst, SALOBJECTPROC pProc ) -{ - mpInst = pInst; - if ( pProc ) - mpProc = pProc; - else - mpProc = ImplSalObjCallbackDummy; -} -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 6de205d0c3b8..8cc7bb221a09 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -90,27 +90,6 @@ struct ImplTabCtrlData // ----------------------------------------------------------------------- -#if 0 -// not used -#define TABCOLORCOUNT 10 - -static ColorData aImplTabColorAry[TABCOLORCOUNT] = -{ - RGB_COLORDATA( 80, 216, 248 ), - RGB_COLORDATA( 128, 216, 168 ), - RGB_COLORDATA( 128, 144, 248 ), - RGB_COLORDATA( 208, 180, 168 ), - RGB_COLORDATA( 248, 252, 168 ), - RGB_COLORDATA( 168, 144, 168 ), - RGB_COLORDATA( 248, 144, 80 ), - RGB_COLORDATA( 248, 216, 80 ), - RGB_COLORDATA( 248, 180, 168 ), - RGB_COLORDATA( 248, 216, 168 ) -}; -#endif - -// ----------------------------------------------------------------------- - #define TAB_OFFSET 3 #define TAB_TABOFFSET_X 3 #define TAB_TABOFFSET_Y 3 diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index 8472e073ba8d..15deba7d2e21 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -154,12 +154,6 @@ static const char* pStringIds[] = { // -------------------------------------------------------------------- -#if 0 // TODO: use them -static const char* pStdEncNames[] = { - "ISOAdobe", "Expert", "ExpertSubSet" -}; -#endif - // -------------------------------------------------------------------- // TOP DICT keywords (also covers PRIV DICT keywords) @@ -1244,32 +1238,23 @@ void CffSubsetterContext::convertOneTypeEsc( void) } case TYPE2OP::HFLEX1: { assert( mnStackIdx == 9); -#if 0 // emulate hflex1 as straight line - const ValType* pX = &mnValStack[ mnStackIdx]; - const ValType fDX = pX[-9] + pX[-7] + pX[-5] + pX[-4] + pX[-3] + pX[-1]; - writeType1Val( fDX); - writeTypeOp( TYPE1OP::HLINETO); -#else // emulate hflex1 as two curves + writeCurveTo( mnStackIdx, -9, -8, -7, -6, -5, 0); writeCurveTo( mnStackIdx, -4, 0, -3, -2, -1, 0); // TODO: emulate hflex1 using othersubr call -#endif + mnStackIdx -= 9; } break; case TYPE2OP::HFLEX: { assert( mnStackIdx == 7); ValType* pX = &mnValStack[ mnStackIdx]; -#if 0 // emulate hflex as straight line - const ValType fDX = pX[-7] + pX[-6] + pX[-4] + pX[-3] + pX[-2] + pX[-1]; - writeType1Val( fDX); - writeTypeOp( TYPE1OP::HLINETO); -#else // emulate hflex as two curves + pX[+1] = -pX[-5]; // temp: +dy5==-dy2 writeCurveTo( mnStackIdx, -7, 0, -6, -5, -4, 0); writeCurveTo( mnStackIdx, -3, 0, -2, +1, -1, 0); // TODO: emulate hflex using othersubr call -#endif + mnStackIdx -= 7; } break; @@ -1391,13 +1376,7 @@ if( mbSawError) { writeType1Val( -350); writeType1Val( 700); writeTypeOp( TYPE1OP::RLINETO); -#if 0 - writeType1Val( -300); - writeType1Val( -800); - writeTypeOp( TYPE1OP::RLINETO); -#else writeTypeOp( TYPE1OP::CLOSEPATH); -#endif writeTypeOp( TYPE1OP::ENDCHAR); } #else // useful for manually encoding charstrings @@ -2128,13 +2107,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, pOut += sprintf( pOut, "%%!FontType1-1.0: %s 001.003\n", rEmitter.maSubsetName); // emit TOPDICT -#if 0 // improve PS Type1 caching? - nOfs += sprintf( &aT1Str[nOfs], - "FontDirectory/%s known{/%s findfont dup/UniqueID known{dup\n" - "/UniqueID get %d eq exch/FontType get 1 eq and}{pop false}ifelse\n" - "{save true}{false}ifelse}\n{false}ifelse\n", - pFamilyName, pFamilyName, nUniqueId); -#endif pOut += sprintf( pOut, "11 dict begin\n" // TODO: dynamic entry count for TOPDICT "/FontType 1 def\n" @@ -2158,10 +2130,7 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, " /FamilyName (%s) readonly def\n" "end readonly def\n", pFullName, pFamilyName); -#if 0 // TODO: use an standard Type1 encoding if possible - pOut += sprintf( pOut, - "/Encoding StandardEncoding def\n"); -#else + pOut += sprintf( pOut, "/Encoding 256 array\n" "0 1 255 {1 index exch /.notdef put} for\n"); @@ -2170,7 +2139,6 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter, pOut += sprintf( pOut, "dup %d /%s put\n", pReqEncoding[i], pGlyphName); } pOut += sprintf( pOut, "readonly def\n"); -#endif pOut += sprintf( pOut, // TODO: more topdict entries "currentdict end\n" diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx index 49ccce7ffde1..b492033d078e 100644 --- a/vcl/source/fontsubset/fontsubset.cxx +++ b/vcl/source/fontsubset/fontsubset.cxx @@ -173,12 +173,8 @@ bool FontSubsetInfo::CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths ) // TODO: replace dummy implementation bool FontSubsetInfo::CreateFontSubsetFromType1( sal_Int32* pOutGlyphWidths) { -#if 0 - // TODO: replace dummy implementation when someone needs this -#else (void)pOutGlyphWidths; fprintf(stderr,"CreateFontSubsetFromType1: replace dummy implementation\n"); -#endif return false; } diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 15d6c3379baa..3555b701ef8a 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -3172,54 +3172,6 @@ int main(int ac, char **av) encoding[i] = i; } -#if 0 - i=0; - glyphs[i++] = 2001; - glyphs[i++] = 2002; - glyphs[i++] = 2003; - glyphs[i++] = 2004; - glyphs[i++] = 2005; - glyphs[i++] = 2006; - glyphs[i++] = 2007; - glyphs[i++] = 2008; - glyphs[i++] = 2009; - glyphs[i++] = 2010; - glyphs[i++] = 2011; - glyphs[i++] = 2012; - glyphs[i++] = 2013; - glyphs[i++] = 2014; - glyphs[i++] = 2015; - glyphs[i++] = 2016; - glyphs[i++] = 2017; - glyphs[i++] = 2018; - glyphs[i++] = 2019; - glyphs[i++] = 2020; - - - r = 97; - i = 0; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; - encoding[i++] = r++; -#endif - if (ac < 2) return 0; if ((r = OpenTTFont(av[1], 0, &fnt)) != SF_OK) { diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx index 78afdfaad06f..7a785b9bf99f 100644 --- a/vcl/source/fontsubset/ttcr.cxx +++ b/vcl/source/fontsubset/ttcr.cxx @@ -1544,19 +1544,6 @@ static void ProcessTables(TrueTypeCreator *tt) PutUInt16(maxCompositePoints, pMaxpData, 10, 1); PutUInt16(maxCompositeContours, pMaxpData, 12, 1); -#if 0 - /* XXX do not overwrite the existing data. Fix: re-calculate these numbers here */ - PutUInt16(2, maxp->data, 14, 1); /* maxZones is always 2 */ - PutUInt16(0, maxp->data, 16, 1); /* maxTwilightPoints */ - PutUInt16(0, maxp->data, 18, 1); /* maxStorage */ - PutUInt16(0, maxp->data, 20, 1); /* maxFunctionDefs */ - PutUint16(0, maxp->data, 22, 1); /* maxInstructionDefs */ - PutUint16(0, maxp->data, 24, 1); /* maxStackElements */ - PutUint16(0, maxp->data, 26, 1); /* maxSizeOfInstructions */ - PutUint16(0, maxp->data, 28, 1); /* maxComponentElements */ - PutUint16(0, maxp->data, 30, 1); /* maxComponentDepth */ -#endif - /* * Generate an htmx table and update hhea table */ diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx index 9c028195d04c..4c9ab03ea9c1 100644 --- a/vcl/source/gdi/bmpfast.cxx +++ b/vcl/source/gdi/bmpfast.cxx @@ -252,63 +252,6 @@ class TrueColorPixelPtr<BMP_FORMAT_8BIT_PAL> : public TrueColorPixelPtr<BMP_FORMAT_8BIT_TC_MASK> {}; -#if 0 -template <> -class TrueColorPixelPtr<BMP_FORMAT_24BIT_TC_MASK> : public BasePixelPtr -{ -public: - void operator++() { mpPixel += 3; } - - unsigned GetAlpha() const - { - unsigned nAlpha = mpPixel[0]; - nAlpha |= mpPixel[1] << 8U; - nAlpha |= mpPixel[2] << 16U; - return nAlpha; - } - - void SetAlpha( unsigned nAlpha ) const - { - mpPixel[0] = nAlpha; - mpPixel[1] = nAlpha >> 8U; - mpPixel[2] = nAlpha >> 16U; - } -}; - -template <> -class TrueColorPixelPtr<BMP_FORMAT_32BIT_TC_MASK> : public BasePixelPtr -{ -public: - void operator++() { mpPixel += 4; } - - unsigned GetAlpha() const - { -#ifdef OSL_BIGENDIAN - unsigned nAlpha = *reinterpret_cast<unsigned*>( mpPixel ); -#else - unsigned nAlpha = mpPixel[0]; - nAlpha |= mpPixel[1] << 8U; - nAlpha |= mpPixel[2] << 16U; - nAlpha |= mpPixel[3] << 24U; -#endif - return nAlpha; - } - - void SetAlpha( unsigned nAlpha ) const - { -#ifdef OSL_BIGENDIAN - *reinterpret_cast<unsigned*>( mpPixel ) = nAlpha; -#else - mpPixel[0] = nAlpha; - mpPixel[1] = nAlpha >> 8U; - mpPixel[2] = nAlpha >> 16U; - mpPixel[3] = nAlpha >> 24U; -#endif - } -}; - -#endif - // ======================================================================= // converting truecolor formats diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 231b7547005b..b32f4933ace7 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -2364,11 +2364,6 @@ ULONG SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, } break; -#if 0 - case( META_OVERLINECOLOR_ACTION ): - break; -#endif - case( META_TEXTLINE_ACTION ): { const MetaTextLineAction* pA = (MetaTextLineAction*) pAction; diff --git a/vcl/source/gdi/impprn.cxx b/vcl/source/gdi/impprn.cxx deleted file mode 100644 index 0cc096d373c9..000000000000 --- a/vcl/source/gdi/impprn.cxx +++ /dev/null @@ -1,587 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" - -#define _SPOOLPRINTER_EXT -#include "tools/queue.hxx" -#include "vcl/svapp.hxx" -#include "vcl/metaact.hxx" -#include "vcl/gdimtf.hxx" -#include "vcl/timer.hxx" -#include "vcl/impprn.hxx" -#include "vcl/jobset.h" - -#include "vcl/svdata.hxx" -#include "vcl/salprn.hxx" - -// ----------- -// - Defines - -// ----------- - -#define OPTIMAL_BMP_RESOLUTION 300 -#define NORMAL_BMP_RESOLUTION 200 - -// ======================================================================= - -struct QueuePage -{ - GDIMetaFile* mpMtf; - JobSetup* mpSetup; - USHORT mnPage; - BOOL mbEndJob; - - QueuePage() { mpMtf = NULL; mpSetup = NULL; } - ~QueuePage() { delete mpMtf; if ( mpSetup ) delete mpSetup; } -}; - -// ======================================================================= - -ImplQPrinter::ImplQPrinter( Printer* pParent ) : - Printer( pParent->GetName() ), - mpParent( pParent ), - mbAborted( false ), - mbUserCopy( false ), - mbDestroyAllowed( true ), - mbDestroyed( false ), - mnMaxBmpDPIX( mnDPIX ), - mnMaxBmpDPIY( mnDPIY ), - mnCurCopyCount( 0 ) -{ - SetSelfAsQueuePrinter( TRUE ); - SetPrinterProps( pParent ); - SetPageQueueSize( 0 ); - mnCopyCount = pParent->mnCopyCount; - mbCollateCopy = pParent->mbCollateCopy; -} - -// ----------------------------------------------------------------------- - -ImplQPrinter::~ImplQPrinter() -{ - for( std::vector< QueuePage* >::iterator it = maQueue.begin(); - it != maQueue.end(); ++it ) - delete (*it); -} - -// ----------------------------------------------------------------------------- - -void ImplQPrinter::Destroy() -{ - if( mbDestroyAllowed ) - delete this; - else - mbDestroyed = TRUE; -} - -// ----------------------------------------------------------------------- - -void ImplQPrinter::ImplPrintMtf( GDIMetaFile& rPrtMtf, long nMaxBmpDPIX, long nMaxBmpDPIY ) -{ - for( MetaAction* pAct = rPrtMtf.FirstAction(); pAct && !mbAborted; pAct = rPrtMtf.NextAction() ) - { - const ULONG nType = pAct->GetType(); - sal_Bool bExecuted = sal_False; - - if( nType == META_COMMENT_ACTION ) - { - // search for special comments ( ..._BEGIN/..._END ) - MetaCommentAction* pComment = (MetaCommentAction*) pAct; - - if( pComment->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_BEGIN" ) == COMPARE_EQUAL ) - { - pAct = rPrtMtf.NextAction(); - - // if next action is a GradientEx action, execute this and - // skip actions until a XGRAD_SEQ_END comment is found - if( pAct && ( pAct->GetType() == META_GRADIENTEX_ACTION ) ) - { - MetaGradientExAction* pGradientExAction = (MetaGradientExAction*) pAct; - DrawGradientEx( this, pGradientExAction->GetPolyPolygon(), pGradientExAction->GetGradient() ); - - // seek to end of this comment - do - { - pAct = rPrtMtf.NextAction(); - } - while( pAct && - ( ( pAct->GetType() != META_COMMENT_ACTION ) || - ( ( (MetaCommentAction*) pAct )->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_END" ) != COMPARE_EQUAL ) ) ); - - bExecuted = sal_True; - } - } - else if( pComment->GetComment().CompareIgnoreCaseToAscii( "PRNSPOOL_TRANSPARENTBITMAP_BEGIN" ) == COMPARE_EQUAL ) - { - pAct = rPrtMtf.NextAction(); - - if( pAct && ( pAct->GetType() == META_BMPSCALE_ACTION ) ) - { - // execute action here to avoid DPI processing of bitmap; - pAct->Execute( this ); - -#ifdef VERBOSE_DEBUG - Push(); - SetLineColor(COL_RED); - SetFillColor(); - DrawRect( Rectangle( - static_cast<MetaBmpScaleAction*>(pAct)->GetPoint(), - static_cast<MetaBmpScaleAction*>(pAct)->GetSize()) ); - Pop(); -#endif - - // seek to end of this comment - do - { - pAct = rPrtMtf.NextAction(); - } - while( pAct && - ( ( pAct->GetType() != META_COMMENT_ACTION ) || - ( ( (MetaCommentAction*) pAct )->GetComment().CompareIgnoreCaseToAscii( "PRNSPOOL_TRANSPARENTBITMAP_END" ) != COMPARE_EQUAL ) ) ); - - bExecuted = sal_True; - } - } - } - else if( nType == META_GRADIENT_ACTION ) - { - MetaGradientAction* pGradientAction = (MetaGradientAction*) pAct; - DrawGradientEx( this, pGradientAction->GetRect(), pGradientAction->GetGradient() ); - bExecuted = sal_True; - } - else if( nType == META_BMPSCALE_ACTION ) - { - MetaBmpScaleAction* pBmpScaleAction = (MetaBmpScaleAction*) pAct; - const Bitmap& rBmp = pBmpScaleAction->GetBitmap(); - - DrawBitmap( pBmpScaleAction->GetPoint(), pBmpScaleAction->GetSize(), - GetDownsampledBitmap( pBmpScaleAction->GetSize(), - Point(), rBmp.GetSizePixel(), - rBmp, nMaxBmpDPIX, nMaxBmpDPIY ) ); - - bExecuted = sal_True; - } - else if( nType == META_BMPSCALEPART_ACTION ) - { - MetaBmpScalePartAction* pBmpScalePartAction = (MetaBmpScalePartAction*) pAct; - const Bitmap& rBmp = pBmpScalePartAction->GetBitmap(); - - DrawBitmap( pBmpScalePartAction->GetDestPoint(), pBmpScalePartAction->GetDestSize(), - GetDownsampledBitmap( pBmpScalePartAction->GetDestSize(), - pBmpScalePartAction->GetSrcPoint(), pBmpScalePartAction->GetSrcSize(), - rBmp, nMaxBmpDPIX, nMaxBmpDPIY ) ); - - bExecuted = sal_True; - } - else if( nType == META_BMPEXSCALE_ACTION ) - { - MetaBmpExScaleAction* pBmpExScaleAction = (MetaBmpExScaleAction*) pAct; - const BitmapEx& rBmpEx = pBmpExScaleAction->GetBitmapEx(); - - DrawBitmapEx( pBmpExScaleAction->GetPoint(), pBmpExScaleAction->GetSize(), - GetDownsampledBitmapEx( pBmpExScaleAction->GetSize(), - Point(), rBmpEx.GetSizePixel(), - rBmpEx, nMaxBmpDPIX, nMaxBmpDPIY ) ); - - bExecuted = sal_True; - } - else if( nType == META_BMPEXSCALEPART_ACTION ) - { - MetaBmpExScalePartAction* pBmpExScalePartAction = (MetaBmpExScalePartAction*) pAct; - const BitmapEx& rBmpEx = pBmpExScalePartAction->GetBitmapEx(); - - DrawBitmapEx( pBmpExScalePartAction->GetDestPoint(), pBmpExScalePartAction->GetDestSize(), - GetDownsampledBitmapEx( pBmpExScalePartAction->GetDestSize(), - pBmpExScalePartAction->GetSrcPoint(), pBmpExScalePartAction->GetSrcSize(), - rBmpEx, nMaxBmpDPIX, nMaxBmpDPIY ) ); - - bExecuted = sal_True; - } - else if( nType == META_TRANSPARENT_ACTION ) - { - MetaTransparentAction* pTransAct = static_cast<MetaTransparentAction*>(pAct); - USHORT nTransparency( pTransAct->GetTransparence() ); - - // #i10613# Respect transparency for draw color - if( nTransparency ) - { - Push( PUSH_LINECOLOR|PUSH_FILLCOLOR ); - - // assume white background for alpha blending - Color aLineColor( GetLineColor() ); - aLineColor.SetRed( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetRed()) / 100L ) ); - aLineColor.SetGreen( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetGreen()) / 100L ) ); - aLineColor.SetBlue( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetBlue()) / 100L ) ); - SetLineColor( aLineColor ); - - Color aFillColor( GetFillColor() ); - aFillColor.SetRed( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetRed()) / 100L ) ); - aFillColor.SetGreen( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetGreen()) / 100L ) ); - aFillColor.SetBlue( static_cast<UINT8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetBlue()) / 100L ) ); - SetFillColor( aFillColor ); - } - - DrawPolyPolygon( pTransAct->GetPolyPolygon() ); - - if( nTransparency ) - Pop(); - - bExecuted = sal_True; - } - else if( nType == META_FLOATTRANSPARENT_ACTION ) - { - MetaFloatTransparentAction* pFloatAction = (MetaFloatTransparentAction*) pAct; - GDIMetaFile& rMtf = (GDIMetaFile&) pFloatAction->GetGDIMetaFile(); - MapMode aDrawMap( rMtf.GetPrefMapMode() ); - Point aDestPoint( LogicToPixel( pFloatAction->GetPoint() ) ); - Size aDestSize( LogicToPixel( pFloatAction->GetSize() ) ); - - if( aDestSize.Width() && aDestSize.Height() ) - { - Size aTmpPrefSize( LogicToPixel( rMtf.GetPrefSize(), aDrawMap ) ); - - if( !aTmpPrefSize.Width() ) - aTmpPrefSize.Width() = aDestSize.Width(); - - if( !aTmpPrefSize.Height() ) - aTmpPrefSize.Height() = aDestSize.Height(); - - Fraction aScaleX( aDestSize.Width(), aTmpPrefSize.Width() ); - Fraction aScaleY( aDestSize.Height(), aTmpPrefSize.Height() ); - - aDrawMap.SetScaleX( aScaleX *= aDrawMap.GetScaleX() ); - aDrawMap.SetScaleY( aScaleY *= aDrawMap.GetScaleY() ); - aDrawMap.SetOrigin( PixelToLogic( aDestPoint, aDrawMap ) ); - - Push(); - SetMapMode( aDrawMap ); - ImplPrintMtf( rMtf, nMaxBmpDPIX, nMaxBmpDPIY ); - Pop(); - } - - bExecuted = sal_True; - } - - if( !bExecuted && pAct ) - pAct->Execute( this ); - - if( ! ImplGetSVData()->maGDIData.mbPrinterPullModel ) - Application::Reschedule(); - } -} - -// ----------------------------------------------------------------------- - -void ImplQPrinter::PrePrintPage( QueuePage* pPage ) -{ - mnRestoreDrawMode = GetDrawMode(); - mnMaxBmpDPIX = mnDPIX; - mnMaxBmpDPIY = mnDPIY; - - const PrinterOptions& rPrinterOptions = GetPrinterOptions(); - - if( rPrinterOptions.IsReduceBitmaps() ) - { - // calculate maximum resolution for bitmap graphics - if( PRINTER_BITMAP_OPTIMAL == rPrinterOptions.GetReducedBitmapMode() ) - { - mnMaxBmpDPIX = Min( (long) OPTIMAL_BMP_RESOLUTION, mnMaxBmpDPIX ); - mnMaxBmpDPIY = Min( (long) OPTIMAL_BMP_RESOLUTION, mnMaxBmpDPIY ); - } - else if( PRINTER_BITMAP_NORMAL == rPrinterOptions.GetReducedBitmapMode() ) - { - mnMaxBmpDPIX = Min( (long) NORMAL_BMP_RESOLUTION, mnMaxBmpDPIX ); - mnMaxBmpDPIY = Min( (long) NORMAL_BMP_RESOLUTION, mnMaxBmpDPIY ); - } - else - { - mnMaxBmpDPIX = Min( (long) rPrinterOptions.GetReducedBitmapResolution(), mnMaxBmpDPIX ); - mnMaxBmpDPIY = Min( (long) rPrinterOptions.GetReducedBitmapResolution(), mnMaxBmpDPIY ); - } - } - - // convert to greysacles - if( rPrinterOptions.IsConvertToGreyscales() ) - { - SetDrawMode( GetDrawMode() | ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT | - DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) ); - } - - // disable transparency output - if( rPrinterOptions.IsReduceTransparency() && ( PRINTER_TRANSPARENCY_NONE == rPrinterOptions.GetReducedTransparencyMode() ) ) - { - SetDrawMode( GetDrawMode() | DRAWMODE_NOTRANSPARENCY ); - } - - maCurPageMetaFile = GDIMetaFile(); - RemoveTransparenciesFromMetaFile( *pPage->mpMtf, maCurPageMetaFile, mnMaxBmpDPIX, mnMaxBmpDPIY, - rPrinterOptions.IsReduceTransparency(), - rPrinterOptions.GetReducedTransparencyMode() == PRINTER_TRANSPARENCY_AUTO, - rPrinterOptions.IsReduceBitmaps() && rPrinterOptions.IsReducedBitmapIncludesTransparency() - ); -} - -void ImplQPrinter::PostPrintPage() -{ - SetDrawMode( mnRestoreDrawMode ); -} - -// ----------------------------------------------------------------------- - -void ImplQPrinter::PrintPage( unsigned int nPage ) -{ - if( nPage >= maQueue.size() ) - return; - mnCurCopyCount = (mbUserCopy && !mbCollateCopy) ? mnCopyCount : 1; - QueuePage* pActPage = maQueue[nPage]; - PrePrintPage( pActPage ); - if ( pActPage->mpSetup ) - SetJobSetup( *pActPage->mpSetup ); - - StartPage(); - ImplPrintMtf( maCurPageMetaFile, mnMaxBmpDPIX, mnMaxBmpDPIY ); - EndPage(); - - mnCurCopyCount--; - if( mnCurCopyCount == 0 ) - PostPrintPage(); -} - -// ----------------------------------------------------------------------- - -ImplJobSetup* ImplQPrinter::GetPageSetup( unsigned int nPage ) const -{ - return nPage >= maQueue.size() ? NULL : - ( maQueue[nPage]->mpSetup ? maQueue[nPage]->mpSetup->ImplGetData() : NULL ); -} - -// ----------------------------------------------------------------------- -ULONG ImplQPrinter::GetPrintPageCount() const -{ - ULONG nPageCount = maQueue.size() * ((mbUserCopy && !mbCollateCopy) ? mnCopyCount : 1); - return nPageCount; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( ImplQPrinter, ImplPrintHdl, Timer*, EMPTYARG ) -{ - // Ist Drucken abgebrochen wurden? - if( !IsPrinting() || ( mpParent->IsJobActive() && ( maQueue.size() < (ULONG)mpParent->GetPageQueueSize() ) ) ) - return 0; - - // Druck-Job zuende? - QueuePage* pActPage = maQueue.front(); - maQueue.erase( maQueue.begin() ); - - - vcl::DeletionListener aDel( this ); - if ( pActPage->mbEndJob ) - { - maTimer.Stop(); - delete pActPage; - if( ! EndJob() ) - mpParent->Error(); - if( ! aDel.isDeleted() ) - mpParent->ImplEndPrint(); - } - else - { - mbDestroyAllowed = FALSE; - - PrePrintPage( pActPage ); - - USHORT nCopyCount = 1; - if( mbUserCopy && !mbCollateCopy ) - nCopyCount = mnCopyCount; - - for ( USHORT i = 0; i < nCopyCount; i++ ) - { - if ( pActPage->mpSetup ) - { - SetJobSetup( *pActPage->mpSetup ); - if ( mbAborted ) - break; - } - - StartPage(); - - if ( mbAborted ) - break; - - ImplPrintMtf( maCurPageMetaFile, mnMaxBmpDPIX, mnMaxBmpDPIY ); - - if( !mbAborted ) - EndPage(); - else - break; - } - - PostPrintPage(); - - delete pActPage; - mbDestroyAllowed = TRUE; - - if( mbDestroyed ) - Destroy(); - } - - return 0; -} - -// ----------------------------------------------------------------------- - -void ImplQPrinter::StartQueuePrint() -{ - if( ! ImplGetSVData()->maGDIData.mbPrinterPullModel ) - { - maTimer.SetTimeout( 50 ); - maTimer.SetTimeoutHdl( LINK( this, ImplQPrinter, ImplPrintHdl ) ); - maTimer.Start(); - } -} - -// ----------------------------------------------------------------------- - -void ImplQPrinter::EndQueuePrint() -{ - if( ImplGetSVData()->maGDIData.mbPrinterPullModel ) - { - DBG_ASSERT( mpPrinter, "no SalPrinter in ImplQPrinter" ); - if( mpPrinter ) - { - #if 0 - mpPrinter->StartJob( mbPrintFile ? &maPrintFile : NULL, - Application::GetDisplayName(), - maJobSetup.ImplGetConstData(), - this ); - #endif - EndJob(); - mpParent->ImplEndPrint(); - } - } - else - { - QueuePage* pQueuePage = new QueuePage; - pQueuePage->mbEndJob = TRUE; - maQueue.push_back( pQueuePage ); - } -} - -// ----------------------------------------------------------------------- - -bool ImplQPrinter::GetPaperRanges( std::vector< ULONG >& o_rRanges, bool i_bIncludeOrientationChanges ) const -{ - bool bRet = false; - - if( ImplGetSVData()->maGDIData.mbPrinterPullModel ) - { - bRet = true; - o_rRanges.clear(); - - if( ! maQueue.empty() ) - { - ULONG nCurPage = 0; - - // get first job data - const ImplJobSetup* pLastFormat = NULL; - if( maQueue.front()->mpSetup ) - pLastFormat = maQueue.front()->mpSetup->ImplGetConstData(); - - // begin first range - o_rRanges.push_back( 0 ); - for( std::vector< QueuePage* >::const_iterator it = maQueue.begin(); - it != maQueue.end(); ++it, ++nCurPage ) - { - const ImplJobSetup* pNewSetup = (*it)->mpSetup ? (*it)->mpSetup->ImplGetConstData() : NULL; - if( pNewSetup && pNewSetup != pLastFormat ) - { - bool bChange = false; - if( pLastFormat == NULL ) - { - bChange = true; - } - else if( ! i_bIncludeOrientationChanges && - pNewSetup->meOrientation != pLastFormat->meOrientation ) - { - bChange = true; - } - else if( pNewSetup->mePaperFormat != pLastFormat->mePaperFormat || - ( pNewSetup->mePaperFormat == PAPER_USER && - ( pNewSetup->mnPaperWidth != pLastFormat->mnPaperWidth || - pNewSetup->mnPaperHeight != pLastFormat->mnPaperHeight ) ) ) - { - bChange = true; - } - else if( pNewSetup->mnPaperBin != pLastFormat->mnPaperBin ) - { - bChange = true; - } - if( bChange ) - { - o_rRanges.push_back( nCurPage ); - pLastFormat = pNewSetup; - } - } - } - - o_rRanges.push_back( nCurPage ); - } - } - - return bRet; -} - -// ----------------------------------------------------------------------- - -void ImplQPrinter::AbortQueuePrint() -{ - maTimer.Stop(); - mbAborted = TRUE; - AbortJob(); -} - -// ----------------------------------------------------------------------- - -void ImplQPrinter::AddQueuePage( GDIMetaFile* pPage, USHORT nPage, BOOL bNewJobSetup ) -{ - QueuePage* pQueuePage = new QueuePage; - pQueuePage->mpMtf = pPage; - pQueuePage->mnPage = nPage; - pQueuePage->mbEndJob = FALSE; - // ensure that the first page has a valid setup, this is needed - // in GetPaperRanges (used in pullmodel) - // caution: this depends on mnCurPage in Printer being - // 0: not printing 1: after StartJob, 2 after first EndPage, 3+ at following EndPage calls - if ( bNewJobSetup || (nPage == 2 && ImplGetSVData()->maGDIData.mbPrinterPullModel) ) - pQueuePage->mpSetup = new JobSetup( mpParent->GetJobSetup() ); - maQueue.push_back( pQueuePage ); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx index 3939336101fb..5a65b04391f0 100644 --- a/vcl/source/gdi/metric.cxx +++ b/vcl/source/gdi/metric.cxx @@ -665,15 +665,8 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult ) sal_uInt32 cMaxChar = GetUInt( pGroup + 4 ); int nGlyphId = GetUInt( pGroup + 8 ); pGroup += 12; -#if 0 // TODO: remove unicode baseplane clipping for UCS-4 support - if( cMinChar > 0xFFFF ) - continue; - if( cMaxChar > 0xFFFF ) - cMaxChar = 0xFFFF; -#else if( cMinChar > cMaxChar ) // no sane font should trigger this break; -#endif *(pCP++) = cMinChar; *(pCP++) = cMaxChar + 1; pStartGlyphs[i] = nGlyphId; diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index da435dda245a..0389d8364b2c 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -1485,9 +1485,6 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon ) if( mpGraphics->supportsOperation( OutDevSupport_B2DClip ) ) { -#if 0 - ::basegfx::B2DPolyPolygon aB2DPolyPolygon = rPolyPolygon.getB2DPolyPolygon(); -#else // getB2DPolyPolygon() "optimizes away" some points // which prevents reliable undoing of the "triangle thingy" parameter // so the toolspoly -> b2dpoly conversion has to be done manually @@ -1504,7 +1501,6 @@ void OutputDevice::ImplSetTriangleClipRegion( const PolyPolygon &rPolyPolygon ) } aB2DPolyPolygon.append( aB2DPoly ); } -#endif const ::basegfx::B2DHomMatrix aTransform = ImplGetDeviceTransformation(); aB2DPolyPolygon.transform( aTransform ); @@ -2931,17 +2927,9 @@ void OutputDevice::DrawPolyPolygon( const basegfx::B2DPolyPolygon& rB2DPolyPoly DBG_TRACE( "OutputDevice::DrawPolyPolygon(B2D&)" ); DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); -#if 0 - // MetaB2DPolyPolygonAction is not implemented yet: - // according to AW adding it is very dangerous since there is a lot - // of code that uses the metafile actions directly and unless every - // place that does this knows about the new action we need to fallback - if( mpMetaFile ) - mpMetaFile->AddAction( new MetaB2DPolyPolygonAction( rB2DPolyPoly ) ); -#else + if( mpMetaFile ) mpMetaFile->AddAction( new MetaPolyPolygonAction( PolyPolygon( rB2DPolyPoly ) ) ); -#endif // call helper ImpDrawPolyPolygonWithB2DPolyPolygon(rB2DPolyPoly); @@ -3056,13 +3044,6 @@ void OutputDevice::DrawPolyLine( DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice ); (void)eLineJoin; // ATM used in UNX, but not in WNT, access it for warning-free -#if 0 // MetaB2DPolyLineAction is not implemented yet: - // according to AW adding it is very dangerous since there is a lot - // of code that uses the metafile actions directly and unless every - // place that does this knows about the new action we need to fallback - if( mpMetaFile ) - mpMetaFile->AddAction( new MetaB2DPolyLineAction( rB2DPolygon ) ); -#else if( mpMetaFile ) { LineInfo aLineInfo; @@ -3071,7 +3052,7 @@ void OutputDevice::DrawPolyLine( const Polygon aToolsPolygon( rB2DPolygon ); mpMetaFile->AddAction( new MetaPolyLineAction( aToolsPolygon, aLineInfo ) ); } -#endif + // AW: Do NOT paint empty PolyPolygons if(!rB2DPolygon.count()) diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx index dcccc1730846..63f2b7f1f27c 100644 --- a/vcl/source/gdi/outdev6.cxx +++ b/vcl/source/gdi/outdev6.cxx @@ -209,17 +209,8 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, if( bDrawnOk ) { -#if 0 - // MetaB2DPolyPolygonAction is not implemented yet: - // according to AW adding it is very dangerous since there is a lot - // of code that uses the metafile actions directly and unless every - // place that does this knows about the new action we need to fallback - if( mpMetaFile ) - mpMetaFile->AddAction( new MetaB2DPolyPolygonAction( rB2DPolyPoly ) ); -#else if( mpMetaFile ) mpMetaFile->AddAction( new MetaTransparentAction( PolyPolygon( rB2DPolyPoly ), static_cast< sal_uInt16 >(fTransparency * 100.0))); -#endif return; } } diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx index d16d83f7d71e..32abe784073d 100644 --- a/vcl/source/gdi/outdevnative.cxx +++ b/vcl/source/gdi/outdevnative.cxx @@ -208,43 +208,6 @@ static boost::shared_ptr< ImplControlValue > lcl_transformControlValue( const Im return aResult; } -#if 0 -static void lcl_moveControlValue( ControlType nType, const ImplControlValue& aValue, const Point& rDelta ) -{ - switch( aValue.getType() ) - { - case CTRL_SLIDER: - { - SliderValue* pSlVal = static_cast<SliderValue*>(const_cast<ImplControlValue*>(&aValue)); - pSlVal->maThumbRect.Move( rDelta.X(), rDelta.Y() ); - } - break; - case CTRL_SCROLLBAR: - { - ScrollbarValue* pScVal = static_cast<ScrollbarValue*>(const_cast<ImplControlValue*>(&aValue)); - pScVal->maThumbRect.Move( rDelta.X(), rDelta.Y() ); - pScVal->maButton1Rect.Move( rDelta.X(), rDelta.Y() ); - pScVal->maButton2Rect.Move( rDelta.X(), rDelta.Y() ); - } - break; - case CTRL_SPINBOX: - case CTRL_SPINBUTTONS: - { - SpinbuttonValue* pSpVal = static_cast<SpinbuttonValue*>(const_cast<ImplControlValue*>(&aValue)); - pSpVal->maUpperRect.Move( rDelta.X(), rDelta.Y() ); - pSpVal->maLowerRect.Move( rDelta.X(), rDelta.Y() ); - } - break; - case CTRL_TOOLBAR: - { - ToolbarValue* pTVal = static_cast<ToolbarValue*>(const_cast<ImplControlValue*>(&aValue)); - pTVal->maGripRect.Move( rDelta.X(), rDelta.Y() ); - } - break; - } -} -#endif - BOOL OutputDevice::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 78c84d579698..b3e5362be198 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1225,11 +1225,6 @@ bool PDFWriterImpl::PDFPage::emit(sal_Int32 nParentObject ) } aLine.append( "]\n" ); } - #if 0 - // FIXME: implement tab order as Structure Tree - if( m_bHasWidgets && m_pWriter->getVersion() >= PDFWriter::PDF_1_5 ) - aLine.append( " /Tabs /S\n" ); - #endif if( m_aMCIDParents.size() > 0 ) { OStringBuffer aStructParents( 1024 ); @@ -4980,22 +4975,6 @@ void PDFWriterImpl::createDefaultListBoxAppearance( PDFWidget& rBox, const PDFWr beginRedirect( pListBoxStream, rBox.m_aRect ); OStringBuffer aAppearance( 64 ); -#if 0 - if( ! rWidget.DropDown ) - { - // prepare linewidth for DA string hack, see below - Size aFontSize = lcl_convert( m_aGraphicsStack.front().m_aMapMode, - m_aMapMode, - getReferenceDevice(), - Size( 0, aFont.GetHeight() ) ); - sal_Int32 nLW = aFontSize.Height() / 40; - appendFixedInt( nLW > 0 ? nLW : 1, aAppearance ); - aAppearance.append( " w\n" ); - writeBuffer( aAppearance.getStr(), aAppearance.getLength() ); - aAppearance.setLength( 0 ); - } -#endif - setLineColor( Color( COL_TRANSPARENT ) ); setFillColor( replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ) ); drawRectangle( rBox.m_aRect ); @@ -5011,18 +4990,6 @@ void PDFWriterImpl::createDefaultListBoxAppearance( PDFWidget& rBox, const PDFWr // prepare DA string OStringBuffer aDA( 256 ); -#if 0 - if( !rWidget.DropDown ) - { - /* another of AR5's peculiarities: the selected item of a choice - field is highlighted using the non stroking color - same as the - text color. so workaround that by using text rendering mode 2 - (fill, then stroke) and set the stroking color - */ - appendStrokingColor( replaceColor( rWidget.BackgroundColor, rSettings.GetFieldColor() ), aDA ); - aDA.append( " 2 Tr " ); - } -#endif // prepare DA string appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetFieldTextColor() ), aDA ); aDA.append( ' ' ); @@ -9245,11 +9212,6 @@ bool PDFWriterImpl::writeTransparentObject( TransparencyEmit& rObject ) * resource dict anyway, let's use the one from the page by NOT * emitting a Resources entry. */ - #if 0 - aLine.append( " /Resources " ); - aLine.append( getResourceDictObj() ); - aLine.append( " 0 R\n" ); - #endif aLine.append( "/Length " ); aLine.append( (sal_Int32)(nSize) ); @@ -9324,12 +9286,6 @@ bool PDFWriterImpl::writeTransparentObject( TransparencyEmit& rObject ) aMask.append( "]\n" ); /* #i42884# see above */ -#if 0 - aLine.append( "/Resources " ); - aMask.append( getResourceDictObj() ); - aMask.append( " 0 R\n" ); -#endif - aMask.append( "/Group<</S/Transparency/CS/DeviceRGB>>\n" ); aMask.append( "/Length " ); aMask.append( nMaskSize ); diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 9e397f10c581..a2094c97a77c 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -477,11 +477,6 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint ) aRet.SetPrefSize( maPhysSize ); } -#if 0 - // TODO: make sure nobody depends on the stream being after the IEND chunks - // => let them do ReadChunks before - ReadRemainingChunks(); -#endif } return aRet; diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index eed9e9602f0b..970b0ff3cd0b 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -97,11 +97,6 @@ bool IsDiacritic( sal_UCS4 nChar ) {0x0590, 0x05BE}, {0x05BF, 0x05C0}, {0x05C1, 0x05C3}, {0x05C4, 0x05C6}, {0x05C7, 0x05C8}, {0x0610, 0x061B}, {0x064B, 0x0660}, {0x0670, 0x0671}, {0x06D6, 0x06DD}, {0x06DF, 0x06E5}, {0x06E7, 0x06E9}, {0x06EA,0x06EF}, {0x0730, 0x074D}, {0x07A6, 0x07B1}, {0x07EB, 0x07F4}, -#if 0 // all known fonts have zero-width diacritics already, so no need to query it - {0x0900, 0x0904}, {0x093C, 0x093D}, {0x0941, 0x0948}, {0x094D, 0x0950}, {0x0951, 0x0958}, - {0x0980, 0x0985}, {0x09BC, 0x09BD}, {0x09C1, 0x09C7}, {0x09CD, 0x09CE}, {0x09E2, 0x09E6}, - {0x0A00, 0x0A05}, {0x0A3C, 0x0A59}, //... -#endif {0x1DC0, 0x1E00}, {0x205F, 0x2070}, {0x20D0, 0x2100}, {0xFB1E, 0xFB1F} @@ -152,48 +147,6 @@ int GetVerticalFlags( sal_UCS4 nChar ) sal_UCS4 GetVerticalChar( sal_UCS4 ) { return 0; // #i14788# input method is responsible vertical char changes - -#if 0 - int nVert = 0; - switch( nChar ) - { - // #104627# special treatment for some unicodes - case 0x002C: nVert = 0x3001; break; - case 0x002E: nVert = 0x3002; break; - /* - // to few fonts have the compatibility forms, using - // them will then cause more trouble than good - // TODO: decide on a font specific basis - case 0x2018: nVert = 0xFE41; break; - case 0x2019: nVert = 0xFE42; break; - case 0x201C: nVert = 0xFE43; break; - case 0x201D: nVert = 0xFE44; break; - // CJK compatibility forms - case 0x2025: nVert = 0xFE30; break; - case 0x2014: nVert = 0xFE31; break; - case 0x2013: nVert = 0xFE32; break; - case 0x005F: nVert = 0xFE33; break; - case 0x0028: nVert = 0xFE35; break; - case 0x0029: nVert = 0xFE36; break; - case 0x007B: nVert = 0xFE37; break; - case 0x007D: nVert = 0xFE38; break; - case 0x3014: nVert = 0xFE39; break; - case 0x3015: nVert = 0xFE3A; break; - case 0x3010: nVert = 0xFE3B; break; - case 0x3011: nVert = 0xFE3C; break; - case 0x300A: nVert = 0xFE3D; break; - case 0x300B: nVert = 0xFE3E; break; - case 0x3008: nVert = 0xFE3F; break; - case 0x3009: nVert = 0xFE40; break; - case 0x300C: nVert = 0xFE41; break; - case 0x300D: nVert = 0xFE42; break; - case 0x300E: nVert = 0xFE43; break; - case 0x300F: nVert = 0xFE44; break; - */ - } - - return nVert; -#endif } // ----------------------------------------------------------------------- @@ -370,17 +323,6 @@ sal_UCS4 GetLocalizedChar( sal_UCS4 nChar, LanguageType eLang ) case LANGUAGE_TIBETAN & LANGUAGE_MASK_PRIMARY: nOffset = 0x0F20 - '0'; // tibetan break; -#if 0 // TODO: use language type for these digit substitutions? - // TODO case: - nOffset = 0x2776 - '0'; // dingbat circled - break; - // TODO case: - nOffset = 0x2070 - '0'; // superscript - break; - // TODO case: - nOffset = 0x2080 - '0'; // subscript - break; -#endif } nChar += nOffset; @@ -839,12 +781,6 @@ int SalLayout::CalcAsianKerning( sal_UCS4 c, bool bLeft, bool /*TODO:? bVertical nResult = nTable[ c - 0x3000 ]; else switch( c ) { -#if 0 // TODO: enable it for real-fixed-width fonts? - case ':': case ';': case '!': - if( !bVertical ) - nResult = bLeft ? -1 : +1; // 25% left and right - break; -#endif case 0x30FB: nResult = bLeft ? -1 : +1; // 25% left/right/top/bottom break; @@ -950,10 +886,6 @@ bool SalLayout::IsSpacingGlyph( sal_GlyphId nGlyph ) const const ImplFontData* SalLayout::GetFallbackFontData( sal_GlyphId /*nGlyphId*/ ) const { -#if 0 - int nFallbackLevel = (nGlyphId & GF_FONTMASK) >> GF_FONTSHIFT - assert( nFallbackLevel == 0 ); -#endif return NULL; } diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx index 113d03c17f3a..972540f6c7b7 100644 --- a/vcl/source/glyphs/gcach_ftyp.cxx +++ b/vcl/source/glyphs/gcach_ftyp.cxx @@ -1210,11 +1210,6 @@ int FreetypeServerFont::GetRawGlyphIndex( sal_UCS4 aChar ) const // check if symbol aliasing helps if( (aChar <= 0x00FF) && mpFontInfo->IsSymbolFont() ) nGlyphIndex = FT_Get_Char_Index( maFaceFT, aChar | 0xF000 ); -#if 0 // disabled for now because it introduced ae bad side-effect (#i88376#) - // Finally try the postscript name table - if (!nGlyphIndex) - nGlyphIndex = psp::PrintFontManager::get().FreeTypeCharIndex( maFaceFT, aChar ); -#endif } mpFontInfo->CacheGlyphIndex( aChar, nGlyphIndex ); } @@ -1252,17 +1247,6 @@ int FreetypeServerFont::FixupGlyphIndex( int nGlyphIndex, sal_UCS4 aChar ) const } } -#if 0 - // #95556# autohinting not yet optimized for non-western glyph styles - if( !(mnLoadFlags & (FT_LOAD_NO_HINTING | FT_LOAD_FORCE_AUTOHINT) ) - && ( (aChar >= 0x0600 && aChar < 0x1E00) // south-east asian + arabic - ||(aChar >= 0x2900 && aChar < 0xD800) // CJKV - ||(aChar >= 0xF800) ) ) // presentation + symbols - { - nGlyphFlags |= GF_UNHINTED; - } -#endif - if( nGlyphIndex != 0 ) nGlyphIndex |= nGlyphFlags; diff --git a/vcl/source/glyphs/gcach_layout.cxx b/vcl/source/glyphs/gcach_layout.cxx index eb7bd8954f6e..bed698d9c1aa 100644 --- a/vcl/source/glyphs/gcach_layout.cxx +++ b/vcl/source/glyphs/gcach_layout.cxx @@ -523,17 +523,6 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ImplLayoutArgs& rAr if( nCharPos >= 0 ) { sal_UCS4 aChar = rArgs.mpStr[ nCharPos ]; -#if 0 // TODO: enable if some unicodes>0xFFFF should need glyph flags!=0 - if( (aChar >= 0xD800) && (aChar <= 0xDFFF) ) - { - if( cChar >= 0xDC00 ) // this part of a surrogate pair was already processed - continue; - // calculate unicode scalar value of surrogate pair - aChar = 0x10000 + ((aChar - 0xD800) << 10); - sal_UCS4 aLow = rArgs.mpStr[ nCharPos+1 ]; - aChar += aLow & 0x03FF; - } -#endif nGlyphIndex = rFont.FixupGlyphIndex( nGlyphIndex, aChar ); // #i99367# HACK: try to detect all diacritics diff --git a/vcl/source/glyphs/glyphcache.cxx b/vcl/source/glyphs/glyphcache.cxx index 51b6570601e3..159639ccdd05 100644 --- a/vcl/source/glyphs/glyphcache.cxx +++ b/vcl/source/glyphs/glyphcache.cxx @@ -79,12 +79,6 @@ GlyphCache::~GlyphCache() void GlyphCache::InvalidateAllGlyphs() { -#if 0 // TODO: implement uncaching of all glyph shapes and metrics - for( FontList::iterator it = maFontList.begin(); it != maFontList.end(); ++it ) - delete const_cast<ServerFont*>( it->second ); - maFontList.clear(); - mpCurrentGCFont = NULL; -#endif } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index e1a924dbc183..98e7c279559a 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -703,15 +703,6 @@ void PrintDialog::JobTabPage::readFromSettings() SettingsConfigItem* pItem = SettingsConfigItem::get(); rtl::OUString aValue; - #if 0 - // do not actually make copy count persistent - // the assumption is that this would lead to a lot of unwanted copies - aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CopyCount" ) ) ); - sal_Int32 nVal = aValue.toInt32(); - maCopyCountField.SetValue( sal_Int64(nVal > 1 ? nVal : 1) ); - #endif - aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CollateBox" ) ) ); if( aValue.equalsIgnoreAsciiCaseAscii( "alwaysoff" ) ) @@ -787,14 +778,6 @@ void PrintDialog::OutputOptPage::setupLayout() void PrintDialog::OutputOptPage::readFromSettings() { - #if 0 - SettingsConfigItem* pItem = SettingsConfigItem::get(); - rtl::OUString aValue; - - aValue = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ToFile" ) ) ); - maToFileBox.Check( aValue.equalsIgnoreAsciiCaseAscii( "true" ) ); - #endif } void PrintDialog::OutputOptPage::storeToSettings() @@ -1155,10 +1138,6 @@ static void setHelpText( Window* /*i_pWindow*/, const Sequence< rtl::OUString >& // passed help texts for optional UI is used only for native dialogs which currently // cannot access the same (rather implicit) mechanism - #if 0 - if( i_nIndex >= 0 && i_nIndex < i_rHelpTexts.getLength() ) - i_pWindow->SetHelpText( i_rHelpTexts.getConstArray()[i_nIndex] ); - #endif } void updateMaxSize( const Size& i_rCheckSize, Size& o_rMaxSize ) diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx index 0ef9b2d54248..3b74af8c1b54 100644 --- a/vcl/unx/gtk/a11y/atkwrapper.cxx +++ b/vcl/unx/gtk/a11y/atkwrapper.cxx @@ -128,12 +128,7 @@ static AtkRelationType mapRelationType( sal_Int16 nRelation ) default: break; } -#if 0 - ATK_RELATION_NODE_CHILD_OF, - ATK_RELATION_EMBEDS, - ATK_RELATION_EMBEDDED_BY, - ATK_RELATION_POPUP_FOR, -#endif + return type; } diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 864eda267f62..423e254aed6a 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -1547,12 +1547,6 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, // Make sure the thumb is at least the default width (so we don't get tiny thumbs), // but if the VCL gives us a size smaller than the theme's default thumb size, // honor the VCL size -#if 0 - if ( (thumbRect.GetWidth() < min_slider_length) - && ((scrollbarRect.GetWidth()-button1BoundRect.GetWidth()-button2BoundRect.GetWidth()) > min_slider_length) ) - thumbRect.SetSize( Size( min_slider_length, thumbRect.GetHeight() ) ); -#endif - thumbRect.Right() += magic; // Center vertically in the track thumbRect.Move( 0, (scrollbarRect.GetHeight() - slider_width) / 2 ); @@ -1594,14 +1588,6 @@ BOOL GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, button22BoundRect.SetSize( Size( slider_width, stepper_size ) ); thumbRect.Right() = thumbRect.Left() + slider_width - 1; -#if 0 - // Make sure the thumb is at least the default width (so we don't get tiny thumbs), - // but if the VCL gives us a size smaller than the theme's default thumb size, - // honor the VCL size - if ( (thumbRect.GetHeight() < min_slider_length) - && ((scrollbarRect.GetHeight()-button1BoundRect.GetHeight()-button2BoundRect.GetHeight()) > min_slider_length) ) - thumbRect.SetSize( Size( thumbRect.GetWidth(), min_slider_length ) ); -#endif thumbRect.Bottom() += magic; // Center horizontally in the track @@ -3121,43 +3107,7 @@ BOOL GtkSalGraphics::NWPaintGTKSlider( slider_width, slider_length, eOri ); } - #if 0 - // paint background - gtk_paint_flat_box( gWidgetData[m_nScreen].gProgressBar->style, - pixDrawable, - GTK_STATE_NORMAL, - GTK_SHADOW_NONE, - NULL, - gWidgetData[m_nScreen].gProgressBar, - "trough", - 0, 0, w, h ); - if( nProgressWidth > 0 ) - { - // paint progress - if( Application::GetSettings().GetLayoutRTL() ) - { - gtk_paint_box( gWidgetData[m_nScreen].gProgressBar->style, - pixDrawable, - GTK_STATE_PRELIGHT, GTK_SHADOW_OUT, - NULL, - gWidgetData[m_nScreen].gProgressBar, - "bar", - w-nProgressWidth, 0, nProgressWidth, h - ); - } - else - { - gtk_paint_box( gWidgetData[m_nScreen].gProgressBar->style, - pixDrawable, - GTK_STATE_PRELIGHT, GTK_SHADOW_OUT, - NULL, - gWidgetData[m_nScreen].gProgressBar, - "bar", - 0, 0, nProgressWidth, h - ); - } - } - #endif + BOOL bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle ); g_object_unref( pixmap ); diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index a21c29269984..e130afbecd15 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -819,76 +819,6 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part, default: break; } -#if 0 - - - // Metrics of the scroll bar - case CTRL_SCROLLBAR: - //pWidget = pWidgetPainter->scrollBar( rControlRegion, - //( part == PART_BUTTON_LEFT || part == PART_BUTTON_RIGHT ), - //ImplControlValue() ); - //aStyleOption.initFrom( pWidget ); - - switch ( part ) - { - case PART_BUTTON_LEFT: - case PART_BUTTON_UP: - qRect = kapp->style()->subControlRect( - QStyle::CC_ScrollBar, &aStyleOption, QStyle::SC_ScrollBarSubLine ); - - // Workaround for Platinum style scroll bars. It makes the - // left/up button invisible. - if ( part == PART_BUTTON_LEFT ) - { - if ( qRect.left() > kapp->style()->subControlRect( - QStyle::CC_ScrollBar, &aStyleOption, - QStyle::SC_ScrollBarSubPage ).left() ) - { - qRect.setLeft( 0 ); - qRect.setRight( 0 ); - } - } - else - { - if ( qRect.top() > kapp->style()->subControlRect( - QStyle::CC_ScrollBar, &aStyleOption, - QStyle::SC_ScrollBarSubPage ).top() ) - { - qRect.setTop( 0 ); - qRect.setBottom( 0 ); - } - } - - qRect.translate( qBoundingRect.left(), qBoundingRect.top() ); - - bReturn = TRUE; - break; - - case PART_BUTTON_RIGHT: - case PART_BUTTON_DOWN: - qRect = kapp->style()->subControlRect( - QStyle::CC_ScrollBar, &aStyleOption, QStyle::SC_ScrollBarAddLine ); - - // Workaround for Platinum and 3 button style scroll bars. - // It makes the right/down button bigger. - if ( part == PART_BUTTON_RIGHT ) - qRect.setLeft( kapp->style()->subControlRect( - QStyle::CC_ScrollBar, &aStyleOption, - QStyle::SC_ScrollBarAddPage ).right() + 1 ); - else - qRect.setTop( kapp->style()->subControlRect( - QStyle::CC_ScrollBar, &aStyleOption, - QStyle::SC_ScrollBarAddPage ).bottom() + 1 ); - - qRect.translate( qBoundingRect.left(), qBoundingRect.top() ); - - bReturn = TRUE; - break; - } - break; - } -#endif - if (retVal) { // Bounding region diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx index d569d5c40e79..6f45c4413a3f 100644 --- a/vcl/unx/source/dtrans/X11_selection.cxx +++ b/vcl/unx/source/dtrans/X11_selection.cxx @@ -346,16 +346,6 @@ void SelectionManager::initialize( const Sequence< Any >& arguments ) throw (::c arguments.getConstArray()[0] >>= m_xDisplayConnection; if( ! m_xDisplayConnection.is() ) { -#if 0 - // for the time being try to live without XDisplayConnection - // for the sake of clipboard service - // clipboard service should be initialized with a XDisplayConnection - // in the future - Exception aExc; - aExc.Message = OUString::createFromAscii( "initialize me with a valid XDisplayConnection" ); - aExc.Context = static_cast< OWeakObject* >(this); - throw aExc; -#endif } else m_xDisplayConnection->addEventHandler( Any(), this, ~0 ); diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx index bc5164461aac..1de85367c39d 100644 --- a/vcl/unx/source/fontmanager/fontconfig.cxx +++ b/vcl/unx/source/fontmanager/fontconfig.cxx @@ -786,14 +786,6 @@ int PrintFontManager::countFontconfigFonts( std::hash_map<rtl::OString, int, rtl // set family name if( pUpdate->m_nFamilyName != nFamilyName ) { -#if 0 // fontconfig prefers nameid=16 for the family name which is all fine - // but Writer suffers from #i79878# - // the only reasonable workaround for now is to use the classic nameid=1 - pUpdate->m_aAliases.remove( pUpdate->m_nFamilyName ); - pUpdate->m_aAliases.push_back( pUpdate->m_nFamilyName ); - pUpdate->m_aAliases.remove( nFamilyName ); - pUpdate->m_nFamilyName = nFamilyName; -#endif } if( eWeightRes == FcResultMatch ) pUpdate->m_eWeight = convertWeight(weight); diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx index e64740e367ed..cb43af0351c6 100644 --- a/vcl/unx/source/fontmanager/fontmanager.cxx +++ b/vcl/unx/source/fontmanager/fontmanager.cxx @@ -1198,15 +1198,6 @@ PrintFontManager::PrintFontManager() : m_aUnicodeToAdobecode.insert( ::std::hash_multimap< sal_Unicode, sal_uInt8 >::value_type( aAdobeCodes[i].aUnicode, aAdobeCodes[i].aAdobeStandardCode ) ); m_aAdobecodeToUnicode.insert( ::std::hash_multimap< sal_uInt8, sal_Unicode >::value_type( aAdobeCodes[i].aAdobeStandardCode, aAdobeCodes[i].aUnicode ) ); } -#if 0 - m_aUnicodeToAdobename[ aAdobeCodes[i].aUnicode ] = aAdobeCodes[i].pAdobename; - m_aAdobenameToUnicode[ aAdobeCodes[i].pAdobename ] = aAdobeCodes[i].aUnicode; - if( aAdobeCodes[i].aAdobeStandardCode ) - { - m_aUnicodeToAdobecode[ aAdobeCodes[i].aUnicode ] = aAdobeCodes[i].aAdobeStandardCode; - m_aAdobecodeToUnicode[ aAdobeCodes[i].aAdobeStandardCode ] = aAdobeCodes[i].aUnicode; - } -#endif } } diff --git a/vcl/unx/source/fontmanager/parseAFM.cxx b/vcl/unx/source/fontmanager/parseAFM.cxx index 5eabcd592071..6732f4253332 100644 --- a/vcl/unx/source/fontmanager/parseAFM.cxx +++ b/vcl/unx/source/fontmanager/parseAFM.cxx @@ -549,95 +549,6 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi ) } /* parseGlobals */ -#if 0 -/************************* initializeArray ************************/ - -/* Unmapped character codes are (at Adobe Systems) assigned the - * width of the space character (if one exists) else they get the - * value of 250 ems. This function initializes all entries in the - * char widths array to have this value. Then any mapped character - * codes will be replaced with the width of the appropriate character - * when parsing the character metric section. - - * This function parses the Character Metrics Section looking - * for a space character (by comparing character names). If found, - * the width of the space character will be used to initialize the - * values in the array of character widths. - * - * Before returning, the position of the read/write pointer of the - * FileInputStream is reset to be where it was upon entering this function. - */ - -static int initializeArray( FileInputStream* fp, register int* cwi) -{ - bool cont = true, found = false; - unsigned int opos = fp->tell(); - int code = 0, width = 0, i = 0, error = 0, tokenlen; - register char *keyword; - - while (cont) - { - keyword = token(fp,tokenlen); - if (keyword == NULL) - { - error = earlyEOF; - break; /* get out of loop */ - } - switch(recognize(keyword,tokenlen)) - { - case COMMENT: - keyword = linetoken(fp); - break; - case CODE: - if ((keyword = token(fp,tokenlen)) != NULL) - code = atoi(keyword); - break; - case CODEHEX: - if ((keyword = token(fp,tokenlen)) != NULL) - sscanf(keyword,"<%x>", &code); - break; - case XWIDTH: - if ((keyword = token(fp,tokenlen)) != NULL) - width = atoi(keyword); - break; - case X0WIDTH: - (void) token(fp,tokenlen); - break; - case CHARNAME: - if ((keyword = token(fp,tokenlen)) != NULL) - if (MATCH(keyword, Space)) - { - cont = false; - found = true; - } - break; - case ENDCHARMETRICS: - cont = false; - break; - case ENDFONTMETRICS: - cont = false; - error = normalEOF; - break; - case NOPE: - default: - error = parseError; - break; - } /* switch */ - } /* while */ - - if (!found) - width = 250; - - for (i = 0; i < 256; ++i) - cwi[i] = width; - - fp->seek(opos); - - return(error); - -} /* initializeArray */ -#endif - /************************* parseCharWidths **************************/ /* This function is called by "parseFile". It will parse the AFM file diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx index 9ed242c5dd2f..0c4650a88dcc 100644 --- a/vcl/unx/source/gdi/pspgraphics.cxx +++ b/vcl/unx/source/gdi/pspgraphics.cxx @@ -721,14 +721,6 @@ static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx #ifdef ENABLE_GRAPHITE else if (pGrLayout) { - #if 0 // HACK: disabled for now due to #i114460#, see #desc12 there - // TODO: get rid of glyph->string mapping altogether for printing - // TODO: fix GraphiteServerFontLayout's returned aCharPosAry - // TODO: fix PrinterGfx's caching? - pText = pGrLayout->getTextPtr(); - nMinCharPos = pGrLayout->getMinCharPos(); - nMaxCharPos = pGrLayout->getMaxCharPos(); - #endif } #endif } diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index 525359c891a2..9ad8854c59dd 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -225,22 +225,10 @@ void X11SalGraphics::SetDrawable( Drawable aDrawable, int nScreen ) void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget, int nScreen ) { -#if 0 // TODO: use SetDrawable() instead - m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen); - hDrawable_ = aTarget; - m_nScreen = nScreen; - SetXRenderFormat( NULL ); - if( m_aRenderPicture ) - XRenderPeer::GetInstance().FreePicture( m_aRenderPicture ), m_aRenderPicture = 0; - nPenPixel_ = GetPixel( nPenColor_ ); - nTextPixel_ = GetPixel( nTextColor_ ); - nBrushPixel_ = GetPixel( nBrushColor_ ); -#else m_pColormap = &GetX11SalData()->GetDisplay()->GetColormap(nScreen); m_nScreen = nScreen; SetDrawable( aTarget, nScreen ); -#endif bWindow_ = TRUE; m_pFrame = pFrame; @@ -1052,13 +1040,6 @@ XID X11SalGraphics::GetXRenderPicture() m_aRenderPicture = rRenderPeer.CreatePicture( hDrawable_, pVisualFormat, 0, NULL ); } -#if 0 - // setup clipping so the callers don't have to do it themselves - // TODO: avoid clipping if already set correctly - if( pClipRegion_ && !XEmptyRegion( pClipRegion_ ) ) - rRenderPeer.SetPictureClipRegion( aDstPic, pClipRegion_ ); - else -#endif { // reset clip region // TODO: avoid clip reset if already done diff --git a/vcl/unx/source/gdi/salgdi2.cxx b/vcl/unx/source/gdi/salgdi2.cxx index cfb1b058639d..30094d46be52 100644 --- a/vcl/unx/source/gdi/salgdi2.cxx +++ b/vcl/unx/source/gdi/salgdi2.cxx @@ -49,21 +49,6 @@ // -=-= debugging =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#if 0 - -static void sal_PrintImage( char *s, XImage*p ) -{ - fprintf( stderr, "%s %d %d %d\n", s, p->depth, p->width, p->height ); - int nW = Min( 64, p->width*p->bits_per_pixel >> 3 ); - for( int i = 0; i < Min( 16, p->height ); i++ ) - { - for( int j = 0; j < nW; j++ ) - fprintf( stderr, "%02X", (UINT8)p->data[i*p->bytes_per_line+j] ); - fprintf( stderr, "\n" ); - } -} - -#endif // DBG_UTIL // ----------------------------------------------------------------------------- diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx index d3c3ff7381fd..fa0f695dee8b 100644 --- a/vcl/unx/source/gdi/salgdi3.cxx +++ b/vcl/unx/source/gdi/salgdi3.cxx @@ -1499,10 +1499,6 @@ ImplFontCharMap* X11SalGraphics::GetImplFontCharMap() const { // TODO: get ImplFontCharMap directly from fonts if( !mpServerFont[0] ) -#if 0 // RIP XLFD fonts - if( mXFont[0] ) - // TODO?: nPairCount = mXFont[0]->GetFontCodeRanges( NULL ); -#endif return NULL; CmapResult aCmapResult; diff --git a/vcl/unx/source/gdi/xfont.cxx b/vcl/unx/source/gdi/xfont.cxx index d1d2147f5231..e383e779aad8 100644 --- a/vcl/unx/source/gdi/xfont.cxx +++ b/vcl/unx/source/gdi/xfont.cxx @@ -385,22 +385,6 @@ QueryCharWidth16( Display* pDisplay, XLIB_Font nFontID, sal_MultiByte nChar, return CharExists( &aBoundingBox ) ? aBoundingBox.width : nDefaultWidth; } -#if 0 -// currently not used -static sal_Size -QueryCharWidth8( XFontStruct* pXFontStruct, sal_Char nChar, - sal_Size nDefaultWidth ) -{ - int nDirection, nFontAscent, nFontDescent; - XCharStruct aBoundingBox; - - XTextExtents( pXFontStruct, &nChar, 1, - &nDirection, &nFontAscent, &nFontDescent, &aBoundingBox ); - - return CharExists( &aBoundingBox ) ? aBoundingBox.width : nDefaultWidth; -} -#endif - sal_Size ExtendedFontStruct::GetDefaultWidth() { diff --git a/vcl/unx/source/gdi/xrender_peer.cxx b/vcl/unx/source/gdi/xrender_peer.cxx index 816d5d58ee28..533836e2e5d0 100644 --- a/vcl/unx/source/gdi/xrender_peer.cxx +++ b/vcl/unx/source/gdi/xrender_peer.cxx @@ -166,16 +166,10 @@ void XRenderPeer::InitRenderLib() int,int,unsigned int,unsigned int))pFunc; pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderCompositeTrapezoids" ); -#if 0 // not having trapezoid support is supported - if( !pFunc ) return; -#endif mpXRenderCompositeTrapezoids = (void(*)(Display*,int,Picture,Picture, const XRenderPictFormat*,int,int,const XTrapezoid*,int))pFunc; pFunc = osl_getAsciiFunctionSymbol( mpRenderLib, "XRenderAddTraps" ); -#if 0 // not having trapezoid support is supported - if( !pFunc ) return; -#endif mpXRenderAddTraps = (void(*)(Display*,Picture,int,int,const _XTrap*,int))pFunc; #endif // XRENDER_LINK diff --git a/vcl/unx/source/gdi/xrender_peer.hxx b/vcl/unx/source/gdi/xrender_peer.hxx index 8c8fb0cebc61..f9417bb2be95 100644 --- a/vcl/unx/source/gdi/xrender_peer.hxx +++ b/vcl/unx/source/gdi/xrender_peer.hxx @@ -278,16 +278,6 @@ inline void XRenderPeer::FreeGlyph( GlyphSet aGS, Glyph nGlyphId ) const // #108209# disabled because of crash potential, // the glyph leak is not too bad because they will // be cleaned up when the glyphset is released -#if 0 // TODO: reenable when it works without problems - if( mnRenderVersion >= 0x05 ) - { -#ifdef XRENDER_LINK - XRenderFreeGlyphs( mpDisplay, aGS, &nGlyphId, 1 ); -#else - (*mpXRenderFreeGlyphs)( mpDisplay, aGS, &nGlyphId, 1 ); -#endif - } -#endif } inline void XRenderPeer::CompositeString32( Picture aSrc, Picture aDst, diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index 1904090cc9f3..79315a2e10b6 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -1181,12 +1181,6 @@ void ImplWinFontData::UpdateFromHDC( HDC hDC ) const || (aTextMetric.tmPitchAndFamily & TMPF_DEVICE) ) mbDisableGlyphApi = true; -#if 0 - // #110548# more important than #107885# => TODO: better solution - DWORD nFLI = GetFontLanguageInfo( hDC ); - if( 0 == (nFLI & GCP_GLYPHSHAPE) ) - mbDisableGlyphApi = true; -#endif } // ----------------------------------------------------------------------- @@ -1238,10 +1232,6 @@ void ImplWinFontData::ReadOs2Table( HDC hDC ) const // to have access to the needed struct members. sal_uInt32 ulUnicodeRange1 = GetUInt( pOS2map + 42 ); sal_uInt32 ulUnicodeRange2 = GetUInt( pOS2map + 46 ); -#if 0 - sal_uInt32 ulUnicodeRange3 = GetUInt( pOS2map + 50 ); - sal_uInt32 ulUnicodeRange4 = GetUInt( pOS2map + 54 ); -#endif // Check for CJK capabilities of the current font mbHasCJKSupport = (ulUnicodeRange2 & 0x2DF00000); @@ -3098,15 +3088,8 @@ const Ucs2SIntMap* WinSalGraphics::GetFontEncodingVector( const ImplFontData* pF if( pEncoding == NULL ) { Ucs2SIntMap* pNewEncoding = new Ucs2SIntMap; - #if 0 - // TODO: get correct encoding vector - GLYPHSET aGlyphSet; - aGlyphSet.cbThis = sizeof(aGlyphSet); - DWORD aW = ::GetFontUnicodeRanges( mhDC, &aGlyphSet); - #else for( sal_Unicode i = 32; i < 256; ++i ) (*pNewEncoding)[i] = i; - #endif pWinFontData->SetEncodingVector( pNewEncoding ); pEncoding = pNewEncoding; } diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index 9f635bba2c2b..9ef1035fc21c 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -1546,11 +1546,6 @@ bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs ) if( nRC != 0 ) continue; -#if 0 // keep the glyphs for now because they are better than nothing - // mark as NotDef glyphs - for( i = 0; i < nGlyphCount; ++i ) - mpOutGlyphs[ i + rVisualItem.mnMinGlyphPos ] = 0; -#endif } else if( nRC != 0 ) // something undefined happened => give up for this visual item diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index 525ccbbdc6b8..544f246a030b 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -267,16 +267,10 @@ void MyWin::Paint( const Rectangle& rRect ) const int nFontSamples = (nFontCount<15) ? nFontCount : 15; for( int i = 0; i < nFontSamples; ++i ) { -#if 0 - Font aFont( GetFont() ); - aFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "Courier" ) ) ); - aFont.SetWeight( WEIGHT_NORMAL ); - aFont.SetItalic( ITALIC_NONE ); -#else + FontInfo aFont = GetDevFont( (i*nFontCount) / nFontSamples ); aFont.SetHeight( 400 + (i%7) * 100 ); aFont.SetOrientation( i * (3600 / nFontSamples) ); -#endif SetFont( aFont ); sal_uInt8 nRed = (i << 6) & 0xC0; |