*** orig/svx/inc/svx/fntctrl.hxx Wed Apr 11 23:52:50 2007 --- new/svx/inc/svx/fntctrl.hxx Wed Apr 2 09:37:26 2008 *************** *** 48,53 **** --- 48,57 ---- #include "svx/svxdllapi.h" #endif + #ifndef _RTL_USTRING_HXX_ + #include + #endif + // forward --------------------------------------------------------------- class FontPrevWin_Impl; *************** *** 91,96 **** --- 95,104 ---- void SetFontWidthScale( UINT16 nScaleInPercent ); void AutoCorrectFontColor( void ); + + void SetPreviewText( const ::rtl::OUString& rString ); + + void SetFontNameAsPreviewText(); }; #endif // #ifndef _SVX_FNTCTRL_HXX *** orig/svx/inc/svx/svxids.hrc Sat Nov 24 01:04:14 2007 --- new/svx/inc/svx/svxids.hrc Mon Mar 31 13:54:09 2008 *************** *** 52,58 **** // ID-Bereiche -------------------------------------------------------------- // Slot-Id's ! #define SID_SVX_FIRSTFREE 1068 #define SID_SVX_END (SID_LIB_START + 1199) // -------------------------------------------------------------------------- --- 52,58 ---- // ID-Bereiche -------------------------------------------------------------- // Slot-Id's ! #define SID_SVX_FIRSTFREE 1069 #define SID_SVX_END (SID_LIB_START + 1199) // -------------------------------------------------------------------------- *************** *** 1310,1315 **** --- 1310,1316 ---- #define SID_LANGUAGE_STATUS ( SID_SVX_START + 1065 ) #define SID_CHAR_DLG_FOR_PARAGRAPH ( SID_SVX_START + 1066 ) #define SID_SET_DOCUMENT_LANGUAGE ( SID_SVX_START + 1067 ) + #define SID_CHAR_DLG_PREVIEW_STRING ( SID_SVX_START + 1068 ) // -------------------------------------------------------------------------- // Overflow check for slot IDs *** orig/svx/source/dialog/chardlg.cxx Fri Jul 6 15:32:56 2007 --- new/svx/source/dialog/chardlg.cxx Wed Apr 2 09:37:41 2008 *************** *** 148,153 **** --- 148,157 ---- #include #endif + #ifndef _SFXSTRITEM_HXX + #include + #endif + #ifndef _SVX_CHARSCALEITEM_HXX #include #endif *************** *** 289,294 **** --- 293,311 ---- SvxFont& rCTLFont = GetPreviewCTLFont(); USHORT nWhich; + nWhich = GetWhich( SID_CHAR_DLG_PREVIEW_STRING ); + if( ISITEMSET ) + { + const SfxStringItem& rItem = ( SfxStringItem& ) rSet.Get( nWhich ); + ::rtl::OUString aString = rItem.GetValue(); + if( aString.getLength() != 0 ) + { + m_aPreviewWin.SetPreviewText( aString ); + } + else + m_aPreviewWin.SetFontNameAsPreviewText(); + } + // Underline FontUnderline eUnderline; nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); *** orig/svx/source/dialog/fntctrl.cxx Thu Sep 6 01:41:56 2007 --- new/svx/source/dialog/fntctrl.cxx Wed Apr 2 09:38:19 2008 *************** *** 171,177 **** bUseResText : 1, bTwoLines : 1, bIsCJKUI : 1, ! bIsCTLUI : 1; void _CheckScript(); public: --- 171,179 ---- bUseResText : 1, bTwoLines : 1, bIsCJKUI : 1, ! bIsCTLUI : 1, ! bUseFontNameAsText : 1, ! bTextInited : 1; void _CheckScript(); public: *************** *** 181,187 **** cStartBracket( 0 ), cEndBracket( 0 ), nFontWidthScale( 100 ), bSelection( FALSE ), bGetSelection( FALSE ), bUseResText( FALSE ), bTwoLines( FALSE ), ! bIsCJKUI( FALSE ), bIsCTLUI( FALSE ) { Invalidate100PercentFontWidth(); } --- 183,191 ---- cStartBracket( 0 ), cEndBracket( 0 ), nFontWidthScale( 100 ), bSelection( FALSE ), bGetSelection( FALSE ), bUseResText( FALSE ), bTwoLines( FALSE ), ! bIsCJKUI( FALSE ), bIsCTLUI( FALSE ), ! bUseFontNameAsText( FALSE ), ! bTextInited(FALSE) { Invalidate100PercentFontWidth(); } *************** *** 568,573 **** --- 572,592 ---- // ----------------------------------------------------------------------- + void SvxFontPrevWindow::SetPreviewText( const ::rtl::OUString& rString ) + { + pImpl->aText = rString; + pImpl->bTextInited = TRUE; + } + + // ----------------------------------------------------------------------- + + void SvxFontPrevWindow::SetFontNameAsPreviewText() + { + pImpl->bUseFontNameAsText = TRUE; + } + + // ----------------------------------------------------------------------- + void SvxFontPrevWindow::SetFont( const SvxFont& rOutFont ) { setFont( rOutFont, pImpl->aFont ); *************** *** 643,653 **** if ( pImpl->bUseResText ) pImpl->aText = GetText(); ! else if ( !pImpl->bSelection ) { SfxViewShell* pSh = SfxViewShell::Current(); ! if ( pSh && !pImpl->bGetSelection ) { pImpl->aText = pSh->GetSelectionText(); pImpl->bGetSelection = TRUE; --- 662,672 ---- if ( pImpl->bUseResText ) pImpl->aText = GetText(); ! else if ( !pImpl->bSelection && !pImpl->bTextInited ) { SfxViewShell* pSh = SfxViewShell::Current(); ! if ( pSh && !pImpl->bGetSelection && !pImpl->bUseFontNameAsText ) { pImpl->aText = pSh->GetSelectionText(); pImpl->bGetSelection = TRUE; *************** *** 655,661 **** } ! if ( !pImpl->bSelection ) { pImpl->aText = rFont.GetName(); if( pImpl->bIsCJKUI ) --- 674,680 ---- } ! if ( ( !pImpl->bSelection || pImpl->bUseFontNameAsText ) && !pImpl->bTextInited ) { pImpl->aText = rFont.GetName(); if( pImpl->bIsCJKUI )