Kaydet (Commit) 0fd4d12c authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Stahl

Remove code associated with psprint::CompatMetricOverride service

We don't actually have any implementations of this service.

This service was introduced by
   commit 01cf4811
   Author: Kurt Zenker <kz@openoffice.org>
   Date:   Wed Jun 20 09:07:44 2007 +0000
       INTEGRATION: CWS compmetric (1.77.2); FILE MERGED
       2007/05/09 16:27:46 pl 1.77.2.2: #146890# algorithm is needed
       2007/05/09 12:13:59 pl 1.77.2.1: #146890# backwards compatibility service for metrics

Michael Stahl seems to think it was a Sun-internal hack introduced
for a specific customer.

Change-Id: I1b27778f827504c2adb0e27e8d7c0f0dedcaf940
Reviewed-on: https://gerrit.libreoffice.org/3824Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 859f2886
...@@ -284,8 +284,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager ...@@ -284,8 +284,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
mutable FontCache* m_pFontCache; mutable FontCache* m_pFontCache;
mutable std::vector< fontID > m_aOverrideFonts;
OString getAfmFile( PrintFont* pFont ) const; OString getAfmFile( PrintFont* pFont ) const;
OString getFontFile( PrintFont* pFont ) const; OString getFontFile( PrintFont* pFont ) const;
...@@ -343,8 +341,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager ...@@ -343,8 +341,6 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
*/ */
bool addFontconfigDir(const OString& rDirectory); bool addFontconfigDir(const OString& rDirectory);
bool readOverrideMetrics();
std::set<OString> m_aPreviousLangSupportRequests; std::set<OString> m_aPreviousLangSupportRequests;
std::vector<OString> m_aCurrentRequests; std::vector<OString> m_aCurrentRequests;
Timer m_aFontInstallerTimer; Timer m_aFontInstallerTimer;
...@@ -371,9 +367,9 @@ public: ...@@ -371,9 +367,9 @@ public:
// returns the ids of all managed fonts. on pParser != NULL // returns the ids of all managed fonts. on pParser != NULL
// all fonttype::Builtin type fonts are not listed // all fonttype::Builtin type fonts are not listed
// which do not occur in the PPD of pParser // which do not occur in the PPD of pParser
void getFontList( std::list< fontID >& rFontIDs, const PPDParser* pParser = NULL, bool bUseOverrideMetrics = false ); void getFontList( std::list< fontID >& rFontIDs, const PPDParser* pParser = NULL );
// get the font list and fast font info. see getFontList for pParser // get the font list and fast font info. see getFontList for pParser
void getFontListWithFastInfo( std::list< FastPrintFontInfo >& rFonts, const PPDParser* pParser = NULL, bool bUseOverrideMetrics = false ); void getFontListWithFastInfo( std::list< FastPrintFontInfo >& rFonts, const PPDParser* pParser = NULL );
// get font info for a specific font // get font info for a specific font
bool getFontInfo( fontID nFontID, PrintFontInfo& rInfo ) const; bool getFontInfo( fontID nFontID, PrintFontInfo& rInfo ) const;
......
...@@ -357,8 +357,6 @@ public: ...@@ -357,8 +357,6 @@ public:
void SetErrorHdl( const Link& rLink ) { maErrorHdl = rLink; } void SetErrorHdl( const Link& rLink ) { maErrorHdl = rLink; }
const Link& GetErrorHdl() const { return maErrorHdl; } const Link& GetErrorHdl() const { return maErrorHdl; }
void Compat_OldPrinterMetrics( bool bSet );
/** checks the printer list and updates it necessary /** checks the printer list and updates it necessary
* *
* sends a DataChanged event of type DATACHANGED_PRINTER * sends a DataChanged event of type DATACHANGED_PRINTER
......
...@@ -650,7 +650,7 @@ RTSFontSubstPage::RTSFontSubstPage( RTSDialog* pParent ) : ...@@ -650,7 +650,7 @@ RTSFontSubstPage::RTSFontSubstPage( RTSDialog* pParent ) :
// fill to box // fill to box
PrintFontManager& rFontManager = PrintFontManager::get(); PrintFontManager& rFontManager = PrintFontManager::get();
::std::list< FastPrintFontInfo > aFonts; ::std::list< FastPrintFontInfo > aFonts;
rFontManager.getFontListWithFastInfo( aFonts, m_pParent->m_aJobData.m_pParser, false ); rFontManager.getFontListWithFastInfo( aFonts, m_pParent->m_aJobData.m_pParser );
::std::list< FastPrintFontInfo >::const_iterator it; ::std::list< FastPrintFontInfo >::const_iterator it;
::boost::unordered_map< OUString, int, OUStringHash > aToMap, aFromMap; ::boost::unordered_map< OUString, int, OUStringHash > aToMap, aFromMap;
for( it = aFonts.begin(); it != aFonts.end(); ++it ) for( it = aFonts.begin(); it != aFonts.end(); ++it )
......
...@@ -65,7 +65,6 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd ...@@ -65,7 +65,6 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME, CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME,
UNIX_FORCE_ZERO_EXT_LEADING, UNIX_FORCE_ZERO_EXT_LEADING,
USE_OLD_PRINTER_METRICS,
TABS_RELATIVE_TO_INDENT, TABS_RELATIVE_TO_INDENT,
PROTECT_FORM, PROTECT_FORM,
// #i89181# // #i89181#
......
...@@ -181,7 +181,6 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const ...@@ -181,7 +181,6 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const
// #i68949# // #i68949#
case CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME: return mbClipAsCharacterAnchoredWriterFlyFrames; case CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME: return mbClipAsCharacterAnchoredWriterFlyFrames;
case UNIX_FORCE_ZERO_EXT_LEADING: return mbUnixForceZeroExtLeading; case UNIX_FORCE_ZERO_EXT_LEADING: return mbUnixForceZeroExtLeading;
case USE_OLD_PRINTER_METRICS: return mbOldPrinterMetrics;
case TABS_RELATIVE_TO_INDENT : return mbTabRelativeToIndent; case TABS_RELATIVE_TO_INDENT : return mbTabRelativeToIndent;
case PROTECT_FORM: return mbProtectForm; case PROTECT_FORM: return mbProtectForm;
// #i89181# // #i89181#
...@@ -310,9 +309,6 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) ...@@ -310,9 +309,6 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
mbProtectForm = value; mbProtectForm = value;
break; break;
case USE_OLD_PRINTER_METRICS:
mbOldPrinterMetrics = value;
break;
case TABS_RELATIVE_TO_INDENT: case TABS_RELATIVE_TO_INDENT:
mbTabRelativeToIndent = value; mbTabRelativeToIndent = value;
break; break;
......
...@@ -1455,14 +1455,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC ...@@ -1455,14 +1455,6 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
// The flag might be set from setting the printer, so it // The flag might be set from setting the printer, so it
// it is required to clear it. // it is required to clear it.
pDoc->SetOLEPrtNotifyPending( !pPrinter->IsKnown() ); pDoc->SetOLEPrtNotifyPending( !pPrinter->IsKnown() );
// old printer metrics compatibility
if ( pDoc->get(IDocumentSettingAccess::USE_OLD_PRINTER_METRICS ) &&
!pDoc->get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) )
{
pPrinter->Compat_OldPrinterMetrics( true );
pDoc->GetDocShell()->UpdateFontList();
}
} }
} }
......
...@@ -662,10 +662,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf ...@@ -662,10 +662,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
} }
break; break;
case HANDLE_USE_OLD_PRINTER_METRICS: case HANDLE_USE_OLD_PRINTER_METRICS:
{ // ignore - this is a dead property
sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
mpDoc->set(IDocumentSettingAccess::USE_OLD_PRINTER_METRICS, bTmp);
}
break; break;
case HANDLE_TABS_RELATIVE_TO_INDENT: case HANDLE_TABS_RELATIVE_TO_INDENT:
{ {
...@@ -1088,12 +1085,6 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf ...@@ -1088,12 +1085,6 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
rValue.setValue( &bTmp, ::getBooleanCppuType() ); rValue.setValue( &bTmp, ::getBooleanCppuType() );
} }
break; break;
case HANDLE_USE_OLD_PRINTER_METRICS:
{
sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::USE_OLD_PRINTER_METRICS);
rValue.setValue( &bTmp, ::getBooleanCppuType() );
}
break;
case HANDLE_TABS_RELATIVE_TO_INDENT: case HANDLE_TABS_RELATIVE_TO_INDENT:
{ {
sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT); sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT);
......
...@@ -894,7 +894,7 @@ void GenPspGraphics::GetDevFontList( ImplDevFontList *pList ) ...@@ -894,7 +894,7 @@ void GenPspGraphics::GetDevFontList( ImplDevFontList *pList )
{ {
::std::list< psp::fontID > aList; ::std::list< psp::fontID > aList;
psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
rMgr.getFontList( aList, m_pJobData->m_pParser, m_pInfoPrinter->m_bCompatMetrics ); rMgr.getFontList( aList, m_pJobData->m_pParser );
::std::list< psp::fontID >::iterator it; ::std::list< psp::fontID >::iterator it;
psp::FastPrintFontInfo aInfo; psp::FastPrintFontInfo aInfo;
......
...@@ -52,9 +52,8 @@ class VCL_PLUGIN_PUBLIC SalInfoPrinter ...@@ -52,9 +52,8 @@ class VCL_PLUGIN_PUBLIC SalInfoPrinter
public: public:
std::vector< PaperInfo > m_aPaperFormats; // all printer supported formats std::vector< PaperInfo > m_aPaperFormats; // all printer supported formats
bool m_bPapersInit; // set to true after InitPaperFormats bool m_bPapersInit; // set to true after InitPaperFormats
bool m_bCompatMetrics;
SalInfoPrinter() : m_bPapersInit( false ), m_bCompatMetrics( false ) {} SalInfoPrinter() : m_bPapersInit( false ) {}
virtual ~SalInfoPrinter(); virtual ~SalInfoPrinter();
// SalGraphics or NULL, but two Graphics for all SalFrames // SalGraphics or NULL, but two Graphics for all SalFrames
......
...@@ -689,17 +689,6 @@ Printer::~Printer() ...@@ -689,17 +689,6 @@ Printer::~Printer()
pSVData->maGDIData.mpLastPrinter = mpPrev; pSVData->maGDIData.mpLastPrinter = mpPrev;
} }
void Printer::Compat_OldPrinterMetrics( bool bSet )
{
// propagate flag
if( mpInfoPrinter )
mpInfoPrinter->m_bCompatMetrics = bSet;
// get new font data
ImplUpdateFontData( sal_True );
}
sal_uLong Printer::GetCapabilities( sal_uInt16 nType ) const sal_uLong Printer::GetCapabilities( sal_uInt16 nType ) const
{ {
if ( IsDisplayPrinter() ) if ( IsDisplayPrinter() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment