diff options
author | Philipp Lohmann <pl@openoffice.org> | 2001-06-27 15:03:31 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2001-06-27 15:03:31 +0000 |
commit | b37ca4dd40f948a154927dba8647a145d781eb8b (patch) | |
tree | 06d0038d0e2ef77db7a19941aa623b87776c1819 /padmin/source | |
parent | 8774b4171c9c774a9e4d1690fd8e5e3b365a888d (diff) |
#85520# notify a user that a font cannot be renamed
Diffstat (limited to 'padmin/source')
-rw-r--r-- | padmin/source/fontentry.cxx | 13 | ||||
-rw-r--r-- | padmin/source/fontentry.hxx | 6 | ||||
-rw-r--r-- | padmin/source/padialog.hrc | 5 | ||||
-rw-r--r-- | padmin/source/padialog.src | 9 |
4 files changed, 25 insertions, 8 deletions
diff --git a/padmin/source/fontentry.cxx b/padmin/source/fontentry.cxx index c46729945274..fb5196852e92 100644 --- a/padmin/source/fontentry.cxx +++ b/padmin/source/fontentry.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fontentry.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: pl $ $Date: 2001-06-27 13:37:56 $ + * last change: $Author: pl $ $Date: 2001-06-27 16:03:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -197,6 +197,7 @@ FontNameDlg::FontNameDlg( Window *pParent ) : m_aImportButton( this, PaResId( RID_FNTNM_BTN_IMPORT ) ), 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(); @@ -415,6 +416,14 @@ IMPL_LINK( FontNameDlg, ClickBtnHdl, Button*, pButton ) for( i = 0; i < m_aFontBox.GetSelectEntryCount(); i++ ) { fontID aFont = (fontID)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 ); diff --git a/padmin/source/fontentry.hxx b/padmin/source/fontentry.hxx index 8d3d6aca2bc5..358589ff38bb 100644 --- a/padmin/source/fontentry.hxx +++ b/padmin/source/fontentry.hxx @@ -2,9 +2,9 @@ * * $RCSfile: fontentry.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: pl $ $Date: 2001-06-27 13:37:56 $ + * last change: $Author: pl $ $Date: 2001-06-27 16:03:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -165,6 +165,8 @@ namespace padmin { String m_aRenameString; String m_aRenameTTCString; + String m_aNoRenameString; + ::psp::PrintFontManager& m_rFontManager; // maps fontID to XLFD diff --git a/padmin/source/padialog.hrc b/padmin/source/padialog.hrc index abb9a57577c3..33069c969a37 100644 --- a/padmin/source/padialog.hrc +++ b/padmin/source/padialog.hrc @@ -2,9 +2,9 @@ * * $RCSfile: padialog.hrc,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: pl $ $Date: 2001-06-26 19:27:24 $ + * last change: $Author: pl $ $Date: 2001-06-27 16:03:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -138,6 +138,7 @@ #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 diff --git a/padmin/source/padialog.src b/padmin/source/padialog.src index 3e83d879402c..0a1a70618e51 100644 --- a/padmin/source/padialog.src +++ b/padmin/source/padialog.src @@ -2,9 +2,9 @@ * * $RCSfile: padialog.src,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: pl $ $Date: 2001-06-27 13:37:56 $ + * last change: $Author: pl $ $Date: 2001-06-27 16:03:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1350,6 +1350,11 @@ ModalDialog RID_FONTNAMEDIALOG Text = "~Neuer Name fr %s (%d1 von %d2)"; Text [ English ] = "~New name for %s (%d1 of %d2)"; }; + String RID_FNTNM_STR_NOTRENAMABLE + { + Text = "Die Schrift %s kann aufgrund mangelnder Schreibrechte nicht umbenannt werden."; + Text [ English ] = "The font %s cannot be renamed due to missing write permission."; + }; Text[ english_us ] = "Fonts"; Text[ portuguese ] = "Tipos de letra"; Text[ russian ] = ""; |