summaryrefslogtreecommitdiffstats
path: root/vcl/unx
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2011-11-07 12:53:33 +0100
committerDavid Tardon <dtardon@redhat.com>2011-11-07 12:54:39 +0100
commiteffa8def9d60ef75152455562f88300754c8ab65 (patch)
treed410a2a6c8b1fd8d26c3fcbca9c8fe06e14a53f4 /vcl/unx
parentadd soffice.bin generation to the desktop/ module rule to fix win32 (diff)
downloadcore-effa8def9d60ef75152455562f88300754c8ab65.tar.gz
core-effa8def9d60ef75152455562f88300754c8ab65.zip
remove unused file
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/printer/unxpspgraphics.cxx156
1 files changed, 0 insertions, 156 deletions
diff --git a/vcl/unx/generic/printer/unxpspgraphics.cxx b/vcl/unx/generic/printer/unxpspgraphics.cxx
deleted file mode 100644
index 4998e44a6092..000000000000
--- a/vcl/unx/generic/printer/unxpspgraphics.cxx
+++ /dev/null
@@ -1,156 +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"
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include "generic/geninst.h"
-#include "generic/pspgraphics.h"
-#include "generic/glyphcache.hxx"
-
-#include "vcl/jobdata.hxx"
-#include "vcl/printerinfomanager.hxx"
-#include "vcl/bmpacc.hxx"
-#include "vcl/svapp.hxx"
-#include "vcl/sysdata.hxx"
-
-#include "generic/printergfx.hxx"
-#include "salbmp.hxx"
-#include "impfont.hxx"
-#include "outfont.hxx"
-#include "fontsubset.hxx"
-#include "salprn.hxx"
-#include "region.h"
-
-#ifdef ENABLE_GRAPHITE
-#include <graphite_layout.hxx>
-#include <graphite_serverfont.hxx>
-#endif
-
-using ::rtl::OUString;
-using ::rtl::OString;
-
-UnxPspGraphics::UnxPspGraphics()
-{
-}
-
-UnxPspGraphics::~UnxPspGraphics()
-{
-}
-
-}
-
-void UnxPspGraphics::FreeEmbedFontData( const void* pData, long nLen )
-{
- if( pData )
- munmap( (char*)pData, nLen );
-}
-
-const void* UnxPspGraphics::GetEmbedFontData( const ImplFontData* pFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen )
-{
- // in this context the pFont->GetFontId() is a valid PSP
- // font since they are the only ones left after the PDF
- // export has filtered its list of subsettable fonts (for
- // which this method was created). The correct way would
- // be to have the GlyphCache search for the ImplFontData pFont
- psp::fontID aFont = pFont->GetFontId();
-
- psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
-
- psp::PrintFontInfo aFontInfo;
- if( ! rMgr.getFontInfo( aFont, aFontInfo ) )
- return NULL;
-
- // fill in font info
- rInfo.m_nAscent = aFontInfo.m_nAscend;
- rInfo.m_nDescent = aFontInfo.m_nDescend;
- rInfo.m_aPSName = rMgr.getPSName( aFont );
-
- int xMin, yMin, xMax, yMax;
- rMgr.getFontBoundingBox( aFont, xMin, yMin, xMax, yMax );
-
- psp::CharacterMetric aMetrics[256];
- sal_Ucs aUnicodes[256];
- if( aFontInfo.m_aEncoding == RTL_TEXTENCODING_SYMBOL && aFontInfo.m_eType == psp::fonttype::Type1 )
- {
- for( int i = 0; i < 256; i++ )
- aUnicodes[i] = pUnicodes[i] < 0x0100 ? pUnicodes[i] + 0xf000 : pUnicodes[i];
- pUnicodes = aUnicodes;
- }
- if( ! rMgr.getMetrics( aFont, pUnicodes, 256, aMetrics ) )
- return NULL;
-
- OString aSysPath = rMgr.getFontFileSysPath( aFont );
- struct stat aStat;
- if( stat( aSysPath.getStr(), &aStat ) )
- return NULL;
- int fd = open( aSysPath.getStr(), O_RDONLY );
- if( fd < 0 )
- return NULL;
- void* pFile = mmap( NULL, aStat.st_size, PROT_READ, MAP_SHARED, fd, 0 );
- close( fd );
- if( pFile == MAP_FAILED )
- return NULL;
-
- *pDataLen = aStat.st_size;
-
- rInfo.m_aFontBBox = Rectangle( Point( xMin, yMin ), Size( xMax-xMin, yMax-yMin ) );
- rInfo.m_nCapHeight = yMax; // Well ...
-
- for( int i = 0; i < 256; i++ )
- pWidths[i] = (aMetrics[i].width > 0 ? aMetrics[i].width : 0);
-
- switch( aFontInfo.m_eType )
- {
- case psp::fonttype::TrueType:
- rInfo.m_nFontType = FontSubsetInfo::SFNT_TTF;
- break;
- case psp::fonttype::Type1: {
- const bool bPFA = ((*(unsigned char*)pFile) < 0x80);
- rInfo.m_nFontType = bPFA ? FontSubsetInfo::TYPE1_PFA : FontSubsetInfo::TYPE1_PFB;
- }
- break;
- default:
- return NULL;
- }
-
- return pFile;
-}
-
-void UnxPspGraphics::DoFreeEmbedFontData( const void* pData, long nLen )
-{
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */