diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-11 11:42:25 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-11 14:13:32 +0000 |
commit | 6eddd1b54cb6fc21cdc6883eee708d1247d15f9d (patch) | |
tree | 47d78be7322dbd8771a0206ffee66c4a0c137b55 /padmin | |
parent | 44cf768131e8a06ff688ddfa8b53f144ffb9e4a0 (diff) |
further shrinkage of padmin non-fontconfig code-paths
Diffstat (limited to 'padmin')
-rw-r--r-- | padmin/Library_spa.mk | 1 | ||||
-rw-r--r-- | padmin/source/fontentry.cxx | 590 | ||||
-rw-r--r-- | padmin/source/fontentry.hxx | 138 | ||||
-rw-r--r-- | padmin/source/padialog.cxx | 1 | ||||
-rw-r--r-- | padmin/source/padialog.hrc | 89 | ||||
-rw-r--r-- | padmin/source/padialog.src | 339 |
6 files changed, 6 insertions, 1152 deletions
diff --git a/padmin/Library_spa.mk b/padmin/Library_spa.mk index 6bba1dd05fc4..ec6c1e79fcd6 100644 --- a/padmin/Library_spa.mk +++ b/padmin/Library_spa.mk @@ -54,7 +54,6 @@ $(eval $(call gb_Library_add_linked_libs,spa,\ $(eval $(call gb_Library_add_exception_objects,spa,\ padmin/source/adddlg \ padmin/source/cmddlg \ - padmin/source/fontentry \ padmin/source/helper \ padmin/source/newppdlg \ padmin/source/padialog \ diff --git a/padmin/source/fontentry.cxx b/padmin/source/fontentry.cxx deleted file mode 100644 index f26283c04260..000000000000 --- a/padmin/source/fontentry.cxx +++ /dev/null @@ -1,590 +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. - * - ************************************************************************/ - -#include "fontentry.hxx" -#include "helper.hxx" -#include "padialog.hrc" -#include "vcl/strhelper.hxx" - -#include "vcl/msgbox.hxx" -#include "vcl/fontmanager.hxx" - -#include "osl/thread.h" - -#include "tools/config.hxx" - -using namespace padmin; -using namespace osl; -using namespace psp; - -using ::rtl::OUString; -using ::rtl::OUStringHash; -using ::rtl::OUStringToOString; -using ::rtl::OString; -using ::rtl::OStringHash; - -FontNameDlg::FontNameDlg( Window *pParent ) : - ModalDialog( pParent, PaResId( RID_FONTNAMEDIALOG ) ), - m_aOKButton( this, PaResId( RID_FNTNM_BTN_OK ) ), - m_aRenameButton( this, PaResId( RID_FNTNM_BTN_RENAME ) ), - m_aRemoveButton( this, PaResId( RID_FNTNM_BTN_REMOVE ) ), - m_aImportButton( this, PaResId( RID_FNTNM_BTN_IMPORT ) ), - m_aFontBox( this, PaResId( RID_FNTNM_LB_FONTS ) ), - m_aFixedText( this, PaResId( RID_FNTNM_FIXED ) ), - m_aRenameString( PaResId( RID_FNTNM_STR_RENAME ) ), - m_aRenameTTCString( PaResId( RID_FNTNM_STR_TTCRENAME ) ), - m_aNoRenameString( PaResId( RID_FNTNM_STR_NOTRENAMABLE ) ), - m_rFontManager( PrintFontManager::get() ) -{ - FreeResource(); - - m_aFontBox.EnableMultiSelection( sal_True ); - - m_aOKButton.SetClickHdl( LINK( this, FontNameDlg, ClickBtnHdl ) ); - m_aRenameButton.SetClickHdl( LINK( this, FontNameDlg, ClickBtnHdl ) ); - m_aRemoveButton.SetClickHdl( LINK( this, FontNameDlg, ClickBtnHdl ) ); - m_aImportButton.SetClickHdl( LINK( this, FontNameDlg, ClickBtnHdl ) ); - m_aFontBox.setDelPressedLink( LINK( this, FontNameDlg, DelPressedHdl ) ); - m_aFontBox.SetSelectHdl( LINK( this, FontNameDlg, SelectHdl ) ); - - init(); -} - -FontNameDlg::~FontNameDlg() -{ -} - -String FontNameDlg::fillFontEntry( FastPrintFontInfo& rInfo, const String& rFile, bool bAddRegular ) -{ - static String aThinTxt( PaResId( RID_TXT_FONT_THIN ) ); - static String aUltraLightTxt( PaResId( RID_TXT_FONT_ULTRALIGHT ) ); - static String aLightTxt( PaResId( RID_TXT_FONT_LIGHT ) ); - static String aSemiLightTxt( PaResId( RID_TXT_FONT_SEMILIGHT ) ); - static String aSemiBoldTxt( PaResId( RID_TXT_FONT_SEMIBOLD ) ); - static String aBoldTxt( PaResId( RID_TXT_FONT_BOLD ) ); - static String aUltraBoldTxt( PaResId( RID_TXT_FONT_ULTRABOLD ) ); - - static String aItalicTxt( PaResId( RID_TXT_FONT_ITALIC ) ); - static String aObliqueTxt( PaResId( RID_TXT_FONT_OBLIQUE ) ); - - static String aUltraCondensedTxt( PaResId( RID_TXT_FONT_ULTRACONDENSED ) ); - static String aExtraCondensedTxt( PaResId( RID_TXT_FONT_EXTRACONDENSED ) ); - static String aCondensedTxt( PaResId( RID_TXT_FONT_CONDENSED ) ); - static String aSemiCondensedTxt( PaResId( RID_TXT_FONT_SEMICONDENSED ) ); - static String aSemiExpandedTxt( PaResId( RID_TXT_FONT_SEMIEXPANDED ) ); - static String aExpandedTxt( PaResId( RID_TXT_FONT_EXPANDED ) ); - static String aExtraExpandedTxt( PaResId( RID_TXT_FONT_EXTRAEXPANDED ) ); - static String aUltraExpandedTxt( PaResId( RID_TXT_FONT_ULTRAEXPANDED ) ); - - static String aRegularTxt( PaResId( RID_TXT_FONT_REGULAR ) ); - - String aEntry( rInfo.m_aFamilyName ); - bool bWeight = true, bItalic = true, bWidth = true; - switch( rInfo.m_eWeight ) - { - case WEIGHT_THIN: aEntry.AppendAscii( ", " ); aEntry.Append( aThinTxt ); break; - case WEIGHT_ULTRALIGHT: aEntry.AppendAscii( ", " ); aEntry.Append( aUltraLightTxt ); break; - case WEIGHT_LIGHT: aEntry.AppendAscii( ", " ); aEntry.Append( aLightTxt ); break; - case WEIGHT_SEMILIGHT: aEntry.AppendAscii( ", " ); aEntry.Append( aSemiLightTxt ); break; - case WEIGHT_SEMIBOLD: aEntry.AppendAscii( ", " ); aEntry.Append( aSemiBoldTxt ); break; - case WEIGHT_BOLD: aEntry.AppendAscii( ", " ); aEntry.Append( aBoldTxt ); break; - case WEIGHT_ULTRABOLD: aEntry.AppendAscii( ", " ); aEntry.Append( aUltraBoldTxt ); break; - default: - bWeight = false; - break; - } - switch( rInfo.m_eItalic ) - { - case ITALIC_OBLIQUE: aEntry.AppendAscii( ", " ); aEntry.Append( aObliqueTxt ); break; - case ITALIC_NORMAL: aEntry.AppendAscii( ", " ); aEntry.Append( aItalicTxt ); break; - default: - bItalic = false; - break; - } - switch( rInfo.m_eWidth ) - { - case WIDTH_ULTRA_CONDENSED: aEntry.AppendAscii( ", " ); aEntry.Append( aUltraCondensedTxt ); break; - case WIDTH_EXTRA_CONDENSED: aEntry.AppendAscii( ", " ); aEntry.Append( aExtraCondensedTxt ); break; - case WIDTH_CONDENSED: aEntry.AppendAscii( ", " ); aEntry.Append( aCondensedTxt ); break; - case WIDTH_SEMI_CONDENSED: aEntry.AppendAscii( ", " ); aEntry.Append( aSemiCondensedTxt ); break; - case WIDTH_SEMI_EXPANDED: aEntry.AppendAscii( ", " ); aEntry.Append( aSemiExpandedTxt ); break; - case WIDTH_EXPANDED: aEntry.AppendAscii( ", " ); aEntry.Append( aExpandedTxt ); break; - case WIDTH_EXTRA_EXPANDED: aEntry.AppendAscii( ", " ); aEntry.Append( aExtraExpandedTxt ); break; - case WIDTH_ULTRA_EXPANDED: aEntry.AppendAscii( ", " ); aEntry.Append( aUltraExpandedTxt ); break; - default: - bWidth = false; - break; - } - - if( bAddRegular && ! bItalic && ! bWidth && ! bWeight ) - { - aEntry.AppendAscii( ", " ); - aEntry.Append( aRegularTxt ); - } - - aEntry.AppendAscii( " (" ); - aEntry.Append( rFile ); - aEntry.AppendAscii( ")" ); - return aEntry; -} - -String FontNameDlg::fillFontEntry( const ::std::list< FastPrintFontInfo >& rInfos, const String& rFile ) -{ - String aEntry; - bool bFirst = true; - for( ::std::list< FastPrintFontInfo >::const_iterator it = rInfos.begin(); it != rInfos.end(); ++it ) - { - if( ! bFirst ) - aEntry.AppendAscii( " & " ); - aEntry.Append( String( it->m_aFamilyName ) ); - bFirst = false; - } - - aEntry.AppendAscii( " (" ); - aEntry.Append( rFile ); - aEntry.AppendAscii( ")" ); - return aEntry; -} - -void FontNameDlg::init() -{ - ::std::list< fontID > aFonts; - m_rFontManager.getFontList( aFonts ); - m_aFontBox.Clear(); - m_aRemoveButton.Enable( sal_False ); - m_aRenameButton.Enable( sal_False ); - - ::boost::unordered_map< OUString, int, OUStringHash > aFamilies; - ::std::list< fontID >::iterator font_it; - for( font_it = aFonts.begin(); font_it != aFonts.end(); ++font_it ) - { - if( m_rFontManager.isPrivateFontFile( *font_it ) ) - { - const OUString& rFamily( m_rFontManager.getFontFamily( *font_it ) ); - if( aFamilies.find( rFamily ) == aFamilies.end() ) - aFamilies[rFamily] = 0; - aFamilies[rFamily]++; - } - } - - for( font_it = aFonts.begin(); font_it != aFonts.end(); ++font_it ) - { - if( m_rFontManager.isPrivateFontFile( *font_it ) ) - { - OString aFile( m_rFontManager.getFontFileSysPath( *font_it ) ); - int nLast = aFile.lastIndexOf( '/' ); - if( nLast != -1 ) - aFile = aFile.copy( nLast+1 ); - - FastPrintFontInfo aInfo; - m_rFontManager.getFontFastInfo( *font_it, aInfo ); - std::list< fontID > aDups; - String aEntry; - if( m_rFontManager.getFileDuplicates( *font_it, aDups ) ) - { - FastPrintFontInfo aDupInfo; - std::list< FastPrintFontInfo > aInfos; - aInfos.push_back( aInfo ); - for( std::list< fontID >::iterator dup = aDups.begin(); dup != aDups.end(); ++dup ) - { - m_rFontManager.getFontFastInfo( *dup, aDupInfo ); - aInfos.push_back( aDupInfo ); - aFonts.remove( *dup ); - } - aEntry = fillFontEntry( aInfos, String( ByteString( aFile ), osl_getThreadTextEncoding() ) ); - } - else - aEntry = fillFontEntry( aInfo, String( ByteString( aFile ), osl_getThreadTextEncoding() ), aFamilies[ aInfo.m_aFamilyName ] > 1 ); - sal_uInt16 nEntry = m_aFontBox.InsertEntry( aEntry ); - m_aFontBox.SetEntryData( nEntry, (void*)(sal_IntPtr)(*font_it) ); - } - } -} - -IMPL_LINK( FontNameDlg, SelectHdl, ListBox*, pBox ) -{ - if( pBox == &m_aFontBox ) - { - sal_Bool bEnable = m_aFontBox.GetSelectEntryCount() ? sal_True : sal_False; - m_aRemoveButton.Enable( bEnable ); - m_aRenameButton.Enable( bEnable ); - } - return 0; -} - -IMPL_LINK( FontNameDlg, DelPressedHdl, ListBox*, pBox ) -{ - if( pBox == &m_aFontBox && m_aRemoveButton.IsEnabled() ) - { - ClickBtnHdl( &m_aRemoveButton ); - } - return 0; -} - -IMPL_LINK( FontNameDlg, ClickBtnHdl, Button*, pButton ) -{ - - int i; - - if( pButton == &m_aOKButton ) - { - EndDialog(); - } - else if( pButton == &m_aRemoveButton && AreYouSure( this, RID_QUERY_REMOVEFONTFROMLIST ) && m_aFontBox.GetSelectEntryCount() ) - { - ::std::list< fontID > aRemoveIDs; - for( i = 0; i < m_aFontBox.GetSelectEntryCount(); i++ ) - { - int nSelect = m_aFontBox.GetSelectEntryPos( i ); - aRemoveIDs.push_back( (fontID)(sal_IntPtr)m_aFontBox.GetEntryData( nSelect ) ); - } - m_rFontManager.removeFonts( aRemoveIDs ); - init(); - } - else if( pButton == &m_aImportButton ) - { - FontImportDialog aDialog( this ); - aDialog.Execute(); - init(); - } - else if( pButton == &m_aRenameButton && m_aFontBox.GetSelectEntryCount() ) - { - for( i = 0; i < m_aFontBox.GetSelectEntryCount(); i++ ) - { - fontID aFont = (fontID)(sal_IntPtr)m_aFontBox.GetEntryData( m_aFontBox.GetSelectEntryPos( i ) ); - if( ! m_rFontManager.checkChangeFontPropertiesPossible( aFont ) ) - { - String aErrorText( m_aNoRenameString ); - aErrorText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), m_aFontBox.GetSelectEntry( i ) ); - ErrorBox aBox( this, WB_OK | WB_DEF_OK, aErrorText ); - aBox.Execute(); - continue; - } - ::std::list< fontID > aDuplicates; - m_rFontManager.getFileDuplicates( aFont, aDuplicates ); - aDuplicates.push_front( aFont ); - int nFonts = aDuplicates.size(); - for( int n = 0; n < nFonts; n++ ) - { - aFont = aDuplicates.front(); - aDuplicates.pop_front(); - String aFamily( m_rFontManager.getFontFamily( aFont ) ); - ::std::list< OUString > aAlternatives; - m_rFontManager.getAlternativeFamilyNames( aFont, aAlternatives ); - ::std::list< String > aChoices; - while( aAlternatives.size() ) - { - aChoices.push_back( aAlternatives.front() ); - aAlternatives.pop_front(); - } - String aQueryTxt( m_aRenameString ); - if( nFonts > 1 ) - { - aQueryTxt = m_aRenameTTCString; - aQueryTxt.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%d1" ) ), String::CreateFromInt32( n+1 ) ); - aQueryTxt.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%d2" ) ), String::CreateFromInt32( nFonts ) ); - } - aQueryTxt.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), aFamily ); - QueryString aQuery( this, aQueryTxt, aFamily, aChoices ); - if( aQuery.Execute() ) - { - aFamily.SearchAndReplaceAll( '-', ' ' ); - aFamily.SearchAndReplaceAll( '?', ' ' ); - aFamily.SearchAndReplaceAll( '*', ' ' ); - aFamily = WhitespaceToSpace( aFamily ); - if( aFamily.Len() ) - { - String aXLFD = m_rFontManager.getFontXLFD( aFont ); - aXLFD.SetToken( 2, '-', aFamily ); - m_rFontManager.changeFontProperties( aFont, aXLFD ); - } - } - } - } - init(); - } - return 0; -} - -//-------------------------------------------------- - -FontImportDialog::FontImportDialog( Window* pParent ) : - ModalDialog( pParent, PaResId( RID_FONTIMPORT_DIALOG ) ), - m_aOKBtn( this, PaResId( RID_FIMP_BTN_OK ) ), - m_aCancelBtn( this, PaResId( RID_FIMP_BTN_CANCEL ) ), - m_aSelectAllBtn( this, PaResId( RID_FIMP_BTN_SELECTALL ) ), - m_aNewFontsBox( this, PaResId( RID_FIMP_BOX_NEWFONTS ) ), - m_aFromFL( this, PaResId( RID_FIMP_FL_FROM ) ), - m_aFromDirEdt( this, PaResId( RID_FIMP_EDT_FROM ) ), - m_aFromBtn( this, PaResId( RID_FIMP_BTN_FROM ) ), - m_aSubDirsBox( this, PaResId( RID_FIMP_BOX_SUBDIRS ) ), - m_aTargetOptFL( this, PaResId( RID_FIMP_FL_TARGETOPTS ) ), - m_aLinkOnlyBox( this, PaResId( RID_FIMP_BOX_LINKONLY ) ), - m_aFixedText( this, PaResId( RID_FIMP_TXT_HELP ) ), - m_bOverwriteAll( false ), - m_bOverwriteNone( false ), - m_pProgress( NULL ), - m_aImportOperation( PaResId( RID_FIMP_STR_IMPORTOP ) ), - m_aOverwriteQueryText( PaResId( RID_FIMP_STR_QUERYOVERWRITE ) ), - m_aOverwriteAllText( PaResId( RID_FIMP_STR_OVERWRITEALL ) ), - m_aOverwriteNoneText( PaResId( RID_FIMP_STR_OVERWRITENONE ) ), - m_aNoAfmText( PaResId( RID_FIMP_STR_NOAFM ) ), - m_aAfmCopyFailedText( PaResId( RID_FIMP_STR_AFMCOPYFAILED ) ), - m_aFontCopyFailedText( PaResId( RID_FIMP_STR_FONTCOPYFAILED ) ), - m_aNoWritableFontsDirText( PaResId( RID_FIMP_STR_NOWRITEABLEFONTSDIR ) ), - m_aFontsImportedText( PaResId( RID_FIMP_STR_NUMBEROFFONTSIMPORTED ) ), - m_rFontManager( ::psp::PrintFontManager::get() ) -{ - FreeResource(); - - m_aNewFontsBox.EnableMultiSelection( sal_True ); - - m_aOKBtn.SetClickHdl( LINK( this, FontImportDialog, ClickBtnHdl ) ); - m_aSelectAllBtn.SetClickHdl( LINK( this, FontImportDialog, ClickBtnHdl ) ); - m_aFromBtn.SetClickHdl( LINK( this, FontImportDialog, ClickBtnHdl ) ); - m_aFromDirEdt.SetModifyHdl( LINK( this, FontImportDialog, ModifyHdl ) ); - m_aRefreshTimer.SetTimeoutHdl( LINK( this, FontImportDialog, RefreshTimeoutHdl ) ); - m_aRefreshTimer.SetTimeout( 2000 ); - m_aLinkOnlyBox.Check( sal_False ); - m_aSubDirsBox.Check( sal_True ); - m_aSubDirsBox.SetToggleHdl( LINK( this, FontImportDialog, ToggleHdl ) ); - - Config& rPadminRC( getPadminRC() ); - rPadminRC.SetGroup( "FontImport" ); - m_aFromDirEdt.SetText( rtl::OStringToOUString(rPadminRC.ReadKey("FromPath"), RTL_TEXTENCODING_UTF8) ); - RefreshTimeoutHdl( NULL ); -} - -FontImportDialog::~FontImportDialog() -{ - Config& rPadminRC( getPadminRC() ); - rPadminRC.SetGroup( "FontImport" ); - rPadminRC.WriteKey( "FromPath", rtl::OUStringToOString(m_aFromDirEdt.GetText(), RTL_TEXTENCODING_UTF8) ); -} - -void FontImportDialog::importFontsFailed( ::psp::PrintFontManager::ImportFontCallback::FailCondition eReason ) -{ - String aText; - switch( eReason ) - { - case psp::PrintFontManager::ImportFontCallback::NoWritableDirectory: - aText = m_aNoWritableFontsDirText; - break; - default: - break; - } - ErrorBox aBox( m_pProgress ? (Window*)m_pProgress : (Window*)this, WB_OK | WB_DEF_OK, aText ); - aBox.Execute(); -} - -void FontImportDialog::progress( const ::rtl::OUString& rFile ) -{ - m_pProgress->setValue( ++m_nFont ); - m_pProgress->setFilename( rFile ); -} - -bool FontImportDialog::queryOverwriteFile( const ::rtl::OUString& rFile ) -{ - bool bRet = false; - - if( m_bOverwriteNone ) - return false; - if( m_bOverwriteAll ) - return true; - - String aText( m_aOverwriteQueryText ); - aText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), rFile ); - - QueryBox aQueryBox( m_pProgress ? (Window*)m_pProgress : (Window*)this, WB_YES_NO | WB_DEF_NO, aText ); - aQueryBox.AddButton( m_aOverwriteAllText, 20, 0 ); - aQueryBox.AddButton( m_aOverwriteNoneText, 21, 0 ); - - int nResult = aQueryBox.Execute(); - switch( nResult ) - { - case BUTTONID_YES: bRet = true; break; - case BUTTONID_NO: bRet = false; break; - case 20: bRet = m_bOverwriteAll = true; break; - case 21: bRet = false; m_bOverwriteNone = true; break; - } - - return bRet; -} - -void FontImportDialog::importFontFailed( const ::rtl::OUString& rFile, ::psp::PrintFontManager::ImportFontCallback::FailCondition eReason ) -{ - String aText; - switch( eReason ) - { - case psp::PrintFontManager::ImportFontCallback::NoAfmMetric: - aText = m_aNoAfmText; - break; - case psp::PrintFontManager::ImportFontCallback::AfmCopyFailed: - aText = m_aAfmCopyFailedText; - break; - case psp::PrintFontManager::ImportFontCallback::FontCopyFailed: - aText = m_aFontCopyFailedText; - break; - default: - break; - } - aText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), rFile ); - ErrorBox aBox( m_pProgress ? (Window*)m_pProgress : (Window*)this, WB_OK | WB_DEF_OK, aText ); - aBox.Execute(); -} - -bool FontImportDialog::isCanceled() -{ - return m_pProgress->isCanceled(); -} - -IMPL_LINK( FontImportDialog, ModifyHdl, Edit*, EMPTYARG ) -{ - m_aRefreshTimer.Start(); - return 0; -} - -IMPL_LINK( FontImportDialog, RefreshTimeoutHdl, void*, EMPTYARG ) -{ - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - std::list< String > aFiles; - m_aNewFonts.clear(); - OUString aDirectory( m_aFromDirEdt.GetText() ); - FindFiles( aDirectory, aFiles, String( RTL_CONSTASCII_USTRINGPARAM( "PFA;PFB;TTF;TTC;OTF" ) ), m_aSubDirsBox.IsChecked() ); - OString aDir( OUStringToOString( aDirectory, aEncoding ) ); - aDir += "/"; - while( aFiles.begin() != aFiles.end() ) - { - OString aFont( aDir ); - aFont += OUStringToOString( aFiles.front(), aEncoding ); - aFiles.pop_front(); - ::std::list< FastPrintFontInfo > aInfos; - if( m_rFontManager.getImportableFontProperties( aFont, aInfos ) ) - m_aNewFonts[ aFont ] = aInfos; - } - fillFontBox(); - return 0; -} - -void FontImportDialog::fillFontBox() -{ - rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); - m_aNewFontsBox.Clear(); - - ::boost::unordered_map< OUString, int, OUStringHash > aFamilies; - ::boost::unordered_map< OString, ::std::list< FastPrintFontInfo >, OStringHash >::iterator it; - for( it = m_aNewFonts.begin(); it != m_aNewFonts.end(); ++it ) - { - const OUString& rFamily( it->second.front().m_aFamilyName ); - if( aFamilies.find( rFamily ) == aFamilies.end() ) - aFamilies[rFamily] = 0; - aFamilies[rFamily]++; - } - - for( it = m_aNewFonts.begin(); it != m_aNewFonts.end(); ++it ) - { - OString aFileName( it->first.copy( it->first.lastIndexOf( '/' )+1 ) ); - OUString aFile( OStringToOUString( aFileName, aEncoding ) ); - String aEntry; - if( it->second.size() == 1 ) - aEntry = FontNameDlg::fillFontEntry( it->second.front(), aFile, aFamilies[ it->second.front().m_aFamilyName ] > 1 ); - else - aEntry = FontNameDlg::fillFontEntry( it->second, aFile ); - sal_uInt16 nPos = m_aNewFontsBox.InsertEntry( aEntry ); - m_aNewFontsBox.SetEntryData( nPos, (void*)&(it->first) ); - } -} - -void FontImportDialog::copyFonts() -{ - ::std::list< OString > aFiles; - for( int i = 0; i < m_aNewFontsBox.GetSelectEntryCount(); i++ ) - { - OString* pFile = (OString*)m_aNewFontsBox.GetEntryData( m_aNewFontsBox.GetSelectEntryPos( i ) ); - aFiles.push_back( *pFile ); - } - - int nSuccess = 0; - if( aFiles.size() ) - { - m_nFont = 0; - m_pProgress = new ProgressDialog( this ); - m_pProgress->setRange( 0, aFiles.size() ); - m_pProgress->startOperation( m_aImportOperation ); - m_pProgress->Show( sal_True ); - m_pProgress->setValue( 0 ); - m_pProgress->Invalidate(); - m_pProgress->Sync(); - nSuccess = m_rFontManager.importFonts( aFiles, m_aLinkOnlyBox.IsChecked() ? true : false, this ); - m_pProgress->Show( sal_False ); - delete m_pProgress; - m_pProgress = NULL; - } - String aText( m_aFontsImportedText ); - aText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%d" ) ), String::CreateFromInt32( nSuccess ) ); - InfoBox aBox( this, aText ); - aBox.Execute(); -} - -IMPL_LINK( FontImportDialog, ClickBtnHdl, Button*, pButton ) -{ - if( pButton == &m_aFromBtn ) - { - String aPath( m_aFromDirEdt.GetText() ); - if( chooseDirectory( aPath ) ) - { - m_aFromDirEdt.SetText( aPath ); - RefreshTimeoutHdl( NULL ); - } - } - else if( pButton == &m_aOKBtn ) - { - copyFonts(); - EndDialog( 0 ); - } - else if( pButton == &m_aSelectAllBtn ) - { - m_aNewFontsBox.SetUpdateMode( sal_False ); - for( int i = 0; i < m_aNewFontsBox.GetEntryCount(); i++ ) - m_aNewFontsBox.SelectEntryPos( i, sal_True ); - m_aNewFontsBox.SetUpdateMode( sal_True ); - } - return 0; -} - -IMPL_LINK( FontImportDialog, ToggleHdl, CheckBox*, pBox ) -{ - if( pBox == &m_aSubDirsBox ) - { - RefreshTimeoutHdl( NULL ); - } - - return 0; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/fontentry.hxx b/padmin/source/fontentry.hxx deleted file mode 100644 index 88d05d9820f4..000000000000 --- a/padmin/source/fontentry.hxx +++ /dev/null @@ -1,138 +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. - * - ************************************************************************/ - -#ifndef _PAD_FONTENTRY_HXX_ -#define _PAD_FONTENTRY_HXX_ - -#include "progress.hxx" -#include "helper.hxx" - -#include "vcl/timer.hxx" -#include "vcl/dialog.hxx" -#include "vcl/button.hxx" -#include "vcl/combobox.hxx" -#include "vcl/lstbox.hxx" -#include "vcl/group.hxx" -#include "vcl/fontmanager.hxx" - -namespace padmin { - - class FontImportDialog : - public ModalDialog, - public ::psp::PrintFontManager::ImportFontCallback - { - OKButton m_aOKBtn; - CancelButton m_aCancelBtn; - PushButton m_aSelectAllBtn; - ListBox m_aNewFontsBox; - FixedLine m_aFromFL; - Edit m_aFromDirEdt; - PushButton m_aFromBtn; - CheckBox m_aSubDirsBox; - FixedLine m_aTargetOptFL; - CheckBox m_aLinkOnlyBox; - FixedText m_aFixedText; - bool m_bOverwriteAll; - bool m_bOverwriteNone; - ProgressDialog* m_pProgress; - int m_nFont; - - String m_aImportOperation; - String m_aOverwriteQueryText; - String m_aOverwriteAllText; - String m_aOverwriteNoneText; - String m_aNoAfmText; - String m_aAfmCopyFailedText; - String m_aFontCopyFailedText; - String m_aNoWritableFontsDirText; - String m_aFontsImportedText; - - ::boost::unordered_map< ::rtl::OString, ::std::list< ::psp::FastPrintFontInfo >, ::rtl::OStringHash > - m_aNewFonts; - - Timer m_aRefreshTimer; - DECL_LINK( RefreshTimeoutHdl, void* ); - - - ::psp::PrintFontManager& m_rFontManager; - - DECL_LINK( ClickBtnHdl, Button* ); - DECL_LINK( ModifyHdl, Edit* ); - DECL_LINK( ToggleHdl, CheckBox* ); - - // implement ImportFontCallback - virtual void importFontsFailed( ::psp::PrintFontManager::ImportFontCallback::FailCondition eReason ); - virtual void progress( const ::rtl::OUString& rFile ); - virtual bool queryOverwriteFile( const ::rtl::OUString& rFile ); - virtual void importFontFailed( const ::rtl::OUString& rFile, ::psp::PrintFontManager::ImportFontCallback::FailCondition eReason ); - virtual bool isCanceled(); - - void copyFonts(); - void fillFontBox(); - public: - FontImportDialog( Window* ); - ~FontImportDialog(); - }; - - class FontNameDlg : public ModalDialog - { - private: - OKButton m_aOKButton; - PushButton m_aRenameButton; - PushButton m_aRemoveButton; - PushButton m_aImportButton; - - DelListBox m_aFontBox; - FixedText m_aFixedText; - - String m_aRenameString; - String m_aRenameTTCString; - String m_aNoRenameString; - - ::psp::PrintFontManager& m_rFontManager; - - // maps fontID to XLFD - ::boost::unordered_map< ::psp::fontID, String > - m_aFonts; - void init(); - public: - FontNameDlg( Window* ); - ~FontNameDlg(); - - DECL_LINK( ClickBtnHdl, Button* ); - DECL_LINK( DelPressedHdl, ListBox* ); - DECL_LINK( SelectHdl, ListBox* ); - - static String fillFontEntry( ::psp::FastPrintFontInfo& rInfo, const String& rFile, bool bAddRegular ); - static String fillFontEntry( const ::std::list< ::psp::FastPrintFontInfo >& rInfos, const String& rFile ); - }; -} // namespace - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx index 9b0e62e4812f..3da1b5df4cb3 100644 --- a/padmin/source/padialog.cxx +++ b/padmin/source/padialog.cxx @@ -33,7 +33,6 @@ #include <math.h> #include "padialog.hrc" -#include "fontentry.hxx" #include "helper.hxx" #include "padialog.hxx" #include "adddlg.hxx" diff --git a/padmin/source/padialog.hrc b/padmin/source/padialog.hrc index 9ae1bfeeee26..439cab7315a7 100644 --- a/padmin/source/padialog.hrc +++ b/padmin/source/padialog.hrc @@ -48,7 +48,7 @@ #define RID_PA_TXT_COMMENT_STRING 17 #define RID_PA_STR_DEFPRT 18 #define RID_PA_BTN_ADD 19 -#define RID_PA_BTN_ADDFONTS 20 + #define RID_PA_STR_RENAME 21 #define RID_PA_FL_SEPBUTTON 22 #define RID_PA_FL_CUPSUSAGE 23 @@ -84,12 +84,6 @@ #define RID_ERR_FILEOPENWRITE 1017 #define RID_QRY_PRTNAME 1022 -#define RID_FONTLISTDLG 1026 -#define RID_FLDLG_BTN_OK 1 -#define RID_FLDLG_LB_FONTS 2 -#define RID_FLDLG_BTN_REMOVE 3 -#define RID_FLDLG_TXT 4 - #define RID_METRICOPTIONS_DLG 1029 #define RID_METDLG_BTN_OK 1 #define RID_METDLG_BTN_CANCEL 2 @@ -97,17 +91,6 @@ #define RID_METDLG_BTN_ALL 4 #define RID_METDLG_BTN_CORRECT 5 -#define RID_FONTNAMEDIALOG 1030 -#define RID_FNTNM_FIXED 1 -#define RID_FNTNM_BTN_OK 2 -#define RID_FNTNM_BTN_REMOVE 3 -#define RID_FNTNM_LB_FONTS 4 -#define RID_FNTNM_BTN_IMPORT 5 -#define RID_FNTNM_BTN_RENAME 6 -#define RID_FNTNM_STR_RENAME 7 -#define RID_FNTNM_STR_TTCRENAME 8 -#define RID_FNTNM_STR_NOTRENAMABLE 9 - #define RID_TXT_REFETCH 1031 #define RID_BXT_TESTPAGE 1034 @@ -123,42 +106,18 @@ #define RID_COMMAND_TXT_ADDENTRY 1050 #define RID_ERR_REMOVESGENPRT 1051 #define RID_PA_TXT_NOWRITE 1052 -#define RID_DOUBLEFONTFILE 1053 -#define RID_INVALIDFONTPATH 1054 + + #define RID_TESTPAGESAVE 1055 -#define RID_FNTNM_FONTNAME_TXT 1056 -#define RID_FNTNM_NOFONT_TXT 1057 + + #define RID_QUERY_REMOVEDRIVER 1058 #define RID_QUERY_REMOVEPRINTER 1059 -#define RID_QUERY_REMOVEFONTFROMLIST 1060 #define RID_QUERY_DRIVERUSED 1062 #define RID_ERR_REMOVEDEFAULTDRIVER 1063 -#define RID_ERR_WRITEFONTSDIR 1064 - -#define RID_FONTIMPORT_DIALOG 1065 -#define RID_FIMP_BTN_OK 1 -#define RID_FIMP_BTN_CANCEL 2 -#define RID_FIMP_EDT_FROM 3 -#define RID_FIMP_BTN_FROM 4 -#define RID_FIMP_FL_FROM 5 -#define RID_FIMP_BTN_SELECTALL 6 -#define RID_FIMP_BOX_NEWFONTS 7 -#define RID_FIMP_TXT_HELP 8 -#define RID_FIMP_STR_IMPORTOP 9 -#define RID_FIMP_STR_QUERYOVERWRITE 10 -#define RID_FIMP_STR_OVERWRITEALL 11 -#define RID_FIMP_STR_OVERWRITENONE 12 -#define RID_FIMP_STR_NOAFM 13 -#define RID_FIMP_STR_AFMCOPYFAILED 14 -#define RID_FIMP_STR_FONTCOPYFAILED 15 -#define RID_FIMP_STR_NOWRITEABLEFONTSDIR 16 -#define RID_FIMP_STR_NUMBEROFFONTSIMPORTED 17 -#define RID_FIMP_BOX_LINKONLY 18 -#define RID_FIMP_BOX_SUBDIRS 19 -#define RID_FIMP_FL_TARGETOPTS 20 #define RID_TXT_IMPORTTITLE 1066 -#define RID_TXT_FONTS2IMPORT 1067 + #define RID_TXT_TESTPAGE_MODEL 1068 #define RID_TXT_TESTPAGE_QUEUE 1069 #define RID_TXT_TESTPAGE_DATE 1070 @@ -170,41 +129,11 @@ #define RID_TXT_TESTPAGE_COMMENT 1076 #define RID_TXT_TESTPAGE_NAME 1077 -#define RID_TXT_FONT_ITALIC 1078 -#define RID_TXT_FONT_OBLIQUE 1079 -#define RID_TXT_FONT_THIN 1080 -#define RID_TXT_FONT_ULTRALIGHT 1081 -#define RID_TXT_FONT_LIGHT 1082 -#define RID_TXT_FONT_SEMILIGHT 1083 -#define RID_TXT_FONT_SEMIBOLD 1084 -#define RID_TXT_FONT_BOLD 1085 -#define RID_TXT_FONT_ULTRABOLD 1086 -#define RID_TXT_FONT_ULTRACONDENSED 1087 -#define RID_TXT_FONT_EXTRACONDENSED 1088 -#define RID_TXT_FONT_CONDENSED 1089 -#define RID_TXT_FONT_SEMICONDENSED 1090 -#define RID_TXT_FONT_SEMIEXPANDED 1091 -#define RID_TXT_FONT_EXPANDED 1092 -#define RID_TXT_FONT_EXTRAEXPANDED 1093 -#define RID_TXT_FONT_ULTRAEXPANDED 1094 -#define RID_TXT_FONT_REGULAR 1095 - #define RID_BMP_SMALL_PRINTER 1096 #define RID_BMP_SMALL_FAX 1098 #define RID_BMP_SMALL_PDF 1100 #define RID_BMP_PRINTER 1102 -#define RID_AFMERROR_OK 1300 -#define RID_AFMERROR_NO_FONT_NAME 1301 -#define RID_AFMERROR_NO_FULL_NAME 1302 -#define RID_AFMERROR_NO_FAMILY_NAME 1303 -#define RID_AFMERROR_MOVETO_FAILED 1304 -#define RID_AFMERROR_STREAM_READ_FAILED 1305 -#define RID_AFMERROR_STREAM_WRITE_FAILED 1306 -#define RID_AFMERROR_NOT_A_METRIC 1307 - -#define RID_AFMERROR_BOX_TXT 1350 - #define RID_PROGRESS_DLG 1400 #define RID_PROGRESS_BTN_CANCEL 1 #define RID_PROGRESS_OPERATION_TXT 2 @@ -212,12 +141,6 @@ #define RID_PROGRESS_STATUSBAR 5 #define RID_PROGRESS_FILENAME_TXT 6 -#define RID_OPERATION_FONTINTEGRATE 1402 -#define RID_OPERATION_FONTADD 1403 -#define RID_OPERATION_CONVERTMETRIC 1406 -#define RID_OPERATION_FONTCOLLECT 1407 -#define RID_OPERATION_FONTIMPORT 1408 - #define RID_ADD_PRINTER_DIALOG 2000 #define RID_ADDP_BTN_FINISH 1 #define RID_ADDP_BTN_CANCEL 2 diff --git a/padmin/source/padialog.src b/padmin/source/padialog.src index 194dea7e9b3f..11c33521b648 100644 --- a/padmin/source/padialog.src +++ b/padmin/source/padialog.src @@ -27,130 +27,6 @@ #include "padialog.hrc" -ModalDialog RID_FONTIMPORT_DIALOG -{ - HelpID = "padmin:ModalDialog:RID_FONTIMPORT_DIALOG"; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 230 , 185 ); - Moveable = TRUE ; - Closeable = TRUE ; - - ListBox RID_FIMP_BOX_NEWFONTS - { - HelpID = "padmin:ListBox:RID_FONTIMPORT_DIALOG:RID_FIMP_BOX_NEWFONTS"; - Border = TRUE; - Sort=TRUE; - AutoHScroll = TRUE; - Pos = MAP_APPFONT( 5, 5 ); - Size = MAP_APPFONT( 155, 75 ); - }; - FixedText RID_FIMP_TXT_HELP - { - Pos = MAP_APPFONT( 5, 155 ); - Size = MAP_APPFONT( 220, 24 ); - WordBreak=TRUE; - Text [ en-US ] = "Please select the folder from which you want to import fonts. Add the selected fonts by clicking the OK button."; - }; - FixedLine RID_FIMP_FL_FROM - { - Pos = MAP_APPFONT( 5, 85 ); - Size = MAP_APPFONT( 160, 8 ); - Text [ en-US ] = "Source directory"; - }; - Edit RID_FIMP_EDT_FROM - { - HelpID = "padmin:Edit:RID_FONTIMPORT_DIALOG:RID_FIMP_EDT_FROM"; - Border = TRUE; - Pos = MAP_APPFONT( 10, 97 ); - Size = MAP_APPFONT( 130, 12 ); - }; - PushButton RID_FIMP_BTN_FROM - { - HelpID = "padmin:PushButton:RID_FONTIMPORT_DIALOG:RID_FIMP_BTN_FROM"; - Pos = MAP_APPFONT( 145, 97 ); - Size = MAP_APPFONT( 15, 12 ); - Text = "..."; - }; - CheckBox RID_FIMP_BOX_SUBDIRS - { - HelpID = "padmin:CheckBox:RID_FONTIMPORT_DIALOG:RID_FIMP_BOX_SUBDIRS"; - Pos = MAP_APPFONT( 10, 115 ); - Size = MAP_APPFONT( 145, 10 ); - Text [ en-US ] = "Sea~rch Subdirectories"; - }; - FixedLine RID_FIMP_FL_TARGETOPTS - { - Pos = MAP_APPFONT( 5, 130 ); - Size = MAP_APPFONT( 160, 8 ); - Text [ en-US ] = "Target options"; - }; - - CheckBox RID_FIMP_BOX_LINKONLY - { - HelpID = "padmin:CheckBox:RID_FONTIMPORT_DIALOG:RID_FIMP_BOX_LINKONLY"; - Pos = MAP_APPFONT( 10, 140 ); - Size = MAP_APPFONT( 145, 10 ); - Text [ en-US ] = "Create ~soft links only"; - }; - OKButton RID_FIMP_BTN_OK - { - DefButton = TRUE; - Pos = MAP_APPFONT( 175, 10 ); - Size = MAP_APPFONT( 50, 12 ); - }; - CancelButton RID_FIMP_BTN_CANCEL - { - Pos = MAP_APPFONT( 175, 27 ); - Size = MAP_APPFONT( 50, 12 ); - }; - PushButton RID_FIMP_BTN_SELECTALL - { - HelpID = "padmin:PushButton:RID_FONTIMPORT_DIALOG:RID_FIMP_BTN_SELECTALL"; - Pos = MAP_APPFONT( 175, 44 ); - Size = MAP_APPFONT( 50, 12 ); - Text [ en-US ] = "~Select All"; - }; - String RID_FIMP_STR_IMPORTOP - { - Text [ en-US ] = "Add fonts"; - }; - String RID_FIMP_STR_QUERYOVERWRITE - { - Text [ en-US ] = "Do you really want to overwrite this font file?\n %s"; - }; - String RID_FIMP_STR_OVERWRITEALL - { - Text [ en-US ] = "All"; - }; - String RID_FIMP_STR_OVERWRITENONE - { - Text [ en-US ] = "None"; - }; - - String RID_FIMP_STR_NOAFM - { - Text [ en-US ] = "A format file (with an .afm extension) has not been found for the font\n%s\ntherefore, the font cannot be installed. Format files can be created with ghostscript, for example, and have to be located in the same directory as the font files or its afm subdirectory."; - }; - String RID_FIMP_STR_AFMCOPYFAILED - { - Text [ en-US ] = "The metric file for the font file\n %s\ncould not be copied. The font will not be installed."; - }; - String RID_FIMP_STR_FONTCOPYFAILED - { - Text [ en-US ] = "The font file\n %s\ncould not be copied. The font will not be installed."; - }; - String RID_FIMP_STR_NOWRITEABLEFONTSDIR - { - Text [ en-US ] = "A directory containing a writable fonts.dir file is not located in the Fontpath. Therefore, fonts cannot be installed."; - }; - String RID_FIMP_STR_NUMBEROFFONTSIMPORTED - { - Text [ en-US ] = "%d new fonts were added."; - }; - Text [ en-US ] = "Add Fonts"; -}; - ModalDialog RID_PADIALOG { HelpID = "padmin:ModalDialog:RID_PADIALOG"; @@ -394,73 +270,6 @@ String RID_TXT_TESTPAGE_TIME }; -ModalDialog RID_FONTNAMEDIALOG -{ - HelpID = "padmin:ModalDialog:RID_FONTNAMEDIALOG"; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 255 , 110 ) ; - Moveable = TRUE ; - Closeable = TRUE ; - OKButton RID_FNTNM_BTN_OK - { - DefButton = TRUE ; - Pos = MAP_APPFONT ( 196 , 6 ) ; - Size = MAP_APPFONT ( 50 , 12 ) ; - Text [ en-US ] = "Close"; - }; - PushButton RID_FNTNM_BTN_RENAME - { - HelpID = "padmin:PushButton:RID_FONTNAMEDIALOG:RID_FNTNM_BTN_RENAME"; - Pos = MAP_APPFONT( 196, 31 ); - Size = MAP_APPFONT( 50, 12 ); - Text [ en-US ] = "Re~name..."; - }; - PushButton RID_FNTNM_BTN_REMOVE - { - HelpID = "padmin:PushButton:RID_FONTNAMEDIALOG:RID_FNTNM_BTN_REMOVE"; - Pos = MAP_APPFONT ( 196 , 48 ) ; - Size = MAP_APPFONT ( 50 , 12 ) ; - Text [ en-US ] = "~Remove..."; - }; - PushButton RID_FNTNM_BTN_IMPORT - { - HelpID = "padmin:PushButton:RID_FONTNAMEDIALOG:RID_FNTNM_BTN_IMPORT"; - Pos = MAP_APPFONT ( 196 , 65 ) ; - Size = MAP_APPFONT ( 50 , 12 ) ; - Text [ en-US ] = "~Add..."; - }; - ListBox RID_FNTNM_LB_FONTS - { - HelpID = "padmin:ListBox:RID_FONTNAMEDIALOG:RID_FNTNM_LB_FONTS"; - Border = TRUE ; - Sort = TRUE ; - AutoHScroll = TRUE; - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 185 , 70 ) ; - }; - FixedText RID_FNTNM_FIXED - { - Pos = MAP_APPFONT ( 6 , 81 ) ; - Size = MAP_APPFONT ( 175 , 24 ) ; - WordBreak = TRUE; - Text [ en-US ] = "Note: The fonts are only available to the applications."; - }; - String RID_FNTNM_STR_RENAME - { - Text [ en-US ] = "~New name for %s"; - }; - String RID_FNTNM_STR_TTCRENAME - { - Text [ en-US ] = "~New name for %s (%d1 of %d2)"; - }; - String RID_FNTNM_STR_NOTRENAMABLE - { - Text [ en-US ] = "The font %s cannot be renamed due to missing write permission."; - }; - Text [ en-US ] = "Fonts"; -}; - String RID_BXT_TESTPAGE { Text [ en-US ] = "Test page"; @@ -501,51 +310,6 @@ Bitmap RID_BMP_PRINTER File = "source/printer_large.png"; }; -String RID_AFMERROR_OK -{ - Text [ en-US ] = "No error"; -}; - -String RID_AFMERROR_NO_FONT_NAME -{ - Text [ en-US ] = "The metric does not contain a 'FontName' entry."; -}; - -String RID_AFMERROR_NO_FULL_NAME -{ - Text [ en-US ] = "The metric does not contain a 'FullName' entry."; -}; - -String RID_AFMERROR_NO_FAMILY_NAME -{ - Text [ en-US ] = "The metric does not contain a 'FamilyName' entry."; -}; - -String RID_AFMERROR_MOVETO_FAILED -{ - Text [ en-US ] = "The converted metric could not be written."; -}; - -String RID_AFMERROR_STREAM_READ_FAILED -{ - Text [ en-US ] = "The metric could not be read."; -}; - -String RID_AFMERROR_STREAM_WRITE_FAILED -{ - Text [ en-US ] = "A temporary file could not be created."; -}; - -STRING RID_AFMERROR_NOT_A_METRIC -{ - Text [ en-US ] = "The file does not contain a metric."; -}; - -String RID_AFMERROR_BOX_TXT -{ - Text [ en-US ] = "The metric\n\n%s\n\ncould not be converted for the following reason:\n\n"; -}; - ModelessDialog RID_PROGRESS_DLG { HelpID = "padmin:ModelessDialog:RID_PROGRESS_DLG"; @@ -586,12 +350,6 @@ ModelessDialog RID_PROGRESS_DLG Text [ en-US ] = "Please wait"; }; -String RID_OPERATION_CONVERTMETRIC -{ - Text [ en-US ] = "Font metrics conversion"; -}; - - ModalDialog RID_PPDIMPORT_DLG { HelpID = "padmin:ModalDialog:RID_PPDIMPORT_DLG"; @@ -683,11 +441,6 @@ String RID_QUERY_REMOVEPRINTER Text [ en-US ] = "Do you really want to remove this printer ?"; }; -String RID_QUERY_REMOVEFONTFROMLIST -{ - Text [ en-US ] = "Do you really want to remove the selected fonts ?"; -}; - String RID_QUERY_DRIVERUSED { Text [ en-US ] = "There are still printers using the driver \"%s\". Do you really want to remove it? The corresponding printers will also be removed."; @@ -1110,95 +863,3 @@ TabPage RID_ADDP_PAGE_PDFDRIVER Text [ en-US ] = "A spec~ific driver, to adapt the format to another printer"; }; }; - -String RID_TXT_FONT_ITALIC -{ - Text [ en-US ] = "Italic"; -}; - -String RID_TXT_FONT_OBLIQUE -{ - Text [ en-US ] = "Oblique"; -}; - -String RID_TXT_FONT_THIN -{ - Text [ en-US ] = "Thin"; -}; - -String RID_TXT_FONT_ULTRALIGHT -{ - Text [ en-US ] = "Ultralight"; -}; - -String RID_TXT_FONT_SEMILIGHT -{ - Text [ en-US ] = "Semilight"; -}; - -String RID_TXT_FONT_LIGHT -{ - Text [ en-US ] = "Light"; -}; - -String RID_TXT_FONT_SEMIBOLD -{ - Text [ en-US ] = "Semibold"; -}; - -String RID_TXT_FONT_BOLD -{ - Text [ en-US ] = "Bold"; -}; - -String RID_TXT_FONT_ULTRABOLD -{ - Text [ en-US ] = "Ultrabold"; -}; - -String RID_TXT_FONT_ULTRACONDENSED -{ - Text [ en-US ] = "Ultracondensed"; -}; - -String RID_TXT_FONT_EXTRACONDENSED -{ - Text [ en-US ] = "Extracondensed"; -}; - -String RID_TXT_FONT_CONDENSED -{ - Text [ en-US ] = "Condensed"; -}; - -String RID_TXT_FONT_SEMICONDENSED -{ - Text [ en-US ] = "Semicondensed"; -}; - -String RID_TXT_FONT_SEMIEXPANDED -{ - Text [ en-US ] = "Semiexpanded"; -}; - -String RID_TXT_FONT_EXPANDED -{ - Text [ en-US ] = "Expanded"; -}; - -String RID_TXT_FONT_EXTRAEXPANDED -{ - Text [ en-US ] = "Extraexpanded"; -}; - -String RID_TXT_FONT_ULTRAEXPANDED -{ - Text [ en-US ] = "Ultraexpanded"; -}; - -String RID_TXT_FONT_REGULAR -{ - Text [ en-US ] = "Regular"; -}; - - |