#80317#, #80319# CJK font controller

This commit is contained in:
Dieter Loeschky 2000-11-24 16:06:13 +00:00
parent 76b0cf991d
commit 032e630152
4 changed files with 59 additions and 28 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: drawdoc4.cxx,v $
*
* $Revision: 1.7 $
* $Revision: 1.8 $
*
* last change: $Author: cl $ $Date: 2000-11-17 10:56:37 $
* last change: $Author: dl $ $Date: 2000-11-24 17:03:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -317,14 +317,10 @@ void SdDrawDocument::CreateLayoutTemplates()
aSvxFontItem.GetCharSet() = gsl_getSystemTextEncoding();
rISet.Put(aSvxFontItem);
SvxFontItem aSvxFontItemCJK( EE_CHAR_FONTINFO_CJK );
aSvxFontItemCJK.GetFamily() = FAMILY_ROMAN;
aSvxFontItemCJK.GetFamilyName() = UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "MS Mincho" ) );
aSvxFontItemCJK.GetCharSet() = gsl_getSystemTextEncoding();
aSvxFontItemCJK.GetFamilyName() = UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( "Arial Unicode MS;Andale WT UI;MS PGothic;HG Mincho;MS Mincho;SimSun;Song;PmingLiU;Ming;Batang;Myeomgjo;Gulim" ) );
rISet.Put(aSvxFontItemCJK);
SvxFontItem aSvxFontItemCTL( EE_CHAR_FONTINFO_CTL );
aSvxFontItemCTL.GetFamily() = FAMILY_ROMAN;
aSvxFontItemCTL.GetFamilyName() = System::GetStandardFont(STDFONT_ROMAN).GetName();
aSvxFontItemCTL.GetCharSet() = gsl_getSystemTextEncoding();
aSvxFontItemCTL.GetFamilyName() = UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( "Simplified Arabic;David" ) );
rISet.Put(aSvxFontItemCTL);
rISet.Put( SvxFontHeightItem( 846, 100, EE_CHAR_FONTHEIGHT ) ); // 24 pt

View file

@ -2,9 +2,9 @@
*
* $RCSfile: stlpool.cxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: dl $ $Date: 2000-11-16 13:54:33 $
* last change: $Author: dl $ $Date: 2000-11-24 17:03:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -283,13 +283,10 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName)
aSvxFontItem.GetFamilyName() = System::GetStandardFont(STDFONT_ROMAN).GetName();
aSvxFontItem.GetCharSet() = gsl_getSystemTextEncoding();
SvxFontItem aSvxFontItemCJK( EE_CHAR_FONTINFO_CJK );
aSvxFontItemCJK.GetFamily() = FAMILY_ROMAN;
aSvxFontItemCJK.GetFamilyName() = UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "MS Mincho" ) );
aSvxFontItemCJK.GetCharSet() = gsl_getSystemTextEncoding();
aSvxFontItemCJK.GetFamilyName() = UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "Arial Unicode MS;Andale WT UI;MS PGothic;HG Mincho;MS Mincho;SimSun;Song;PmingLiU;Ming;Batang;Myeomgjo;Gulim" ) );
SvxFontItem aSvxFontItemCTL( EE_CHAR_FONTINFO_CTL );
aSvxFontItemCTL.GetFamily() = FAMILY_ROMAN;
aSvxFontItemCTL.GetFamilyName() = System::GetStandardFont(STDFONT_ROMAN).GetName();
aSvxFontItemCTL.GetCharSet() = gsl_getSystemTextEncoding();
aSvxFontItemCTL.GetFamilyName() = UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM( "Simplified Arabic;David" ) );
Font aBulletFont( GetBulletFont() );

View file

@ -2,9 +2,9 @@
*
* $RCSfile: drtxtob.cxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 16:48:43 $
* last change: $Author: dl $ $Date: 2000-11-24 17:01:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -98,6 +98,9 @@
#ifndef _SFXINTITEM_HXX //autogen
#include <svtools/intitem.hxx>
#endif
#ifndef _SVX_SRIPTTYPEITEM_HXX //autogen
#include <svx/scripttypeitem.hxx>
#endif
#pragma hdrstop
@ -202,6 +205,8 @@ void SdDrawTextObjectBar::GetAttrState( SfxItemSet& rSet )
SfxWhichIter aIter( rSet );
USHORT nWhich = aIter.FirstWhich();
BOOL bTemplate = FALSE;
SfxItemSet aAttrSet( pView->GetDoc()->GetPool() );
pView->GetAttributes( aAttrSet );
while ( nWhich )
{
@ -211,6 +216,25 @@ void SdDrawTextObjectBar::GetAttrState( SfxItemSet& rSet )
switch ( nSlotId )
{
case SID_ATTR_CHAR_FONT:
case SID_ATTR_CHAR_FONTHEIGHT:
case SID_ATTR_CHAR_WEIGHT:
case SID_ATTR_CHAR_POSTURE:
{
SfxItemPool& rPool = GetPool();
SvxScriptSetItem aSetItem( nSlotId, rPool );
aSetItem.GetItemSet().Put( aAttrSet, FALSE );
USHORT nScriptType = pView->GetScriptType();
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
rSet.Put( *pI, nWhich );
else
rSet.InvalidateItem( nWhich );
}
break;
case SID_STYLE_APPLY:
case SID_STYLE_FAMILY2:
{
@ -313,9 +337,6 @@ void SdDrawTextObjectBar::GetAttrState( SfxItemSet& rSet )
nWhich = aIter.NextWhich();
}
SfxItemSet aAttrSet( pView->GetDoc()->GetPool() );
pView->GetAttributes( aAttrSet );
rSet.Put( aAttrSet, FALSE ); // <- FALSE, damit DontCare-Status uebernommen wird
/*

View file

@ -2,9 +2,9 @@
*
* $RCSfile: drtxtob1.cxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: ka $ $Date: 2000-09-21 16:12:20 $
* last change: $Author: dl $ $Date: 2000-11-24 17:02:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -132,6 +132,10 @@
#ifndef _SFXINTITEM_HXX //autogen
#include <svtools/intitem.hxx>
#endif
#ifndef _SVX_SRIPTTYPEITEM_HXX //autogen
#include <svx/scripttypeitem.hxx>
#endif
#pragma hdrstop
@ -334,12 +338,12 @@ void SdDrawTextObjectBar::Execute( SfxRequest &rReq )
default:
{
if( !pArgs||
nSlot == SID_ATTR_CHAR_WEIGHT ) // Weight besitzt Argument !?
SfxItemSet aEditAttr( pView->GetDoc()->GetPool() );
pView->GetAttributes( aEditAttr );
SfxItemSet aNewAttr(*(aEditAttr.GetPool()), aEditAttr.GetRanges());
if( !pArgs )
{
SfxItemSet aEditAttr( pView->GetDoc()->GetPool() );
pView->GetAttributes( aEditAttr );
SfxItemSet aNewAttr(*(aEditAttr.GetPool()), aEditAttr.GetRanges());
//aNewAttr.InvalidateAllItems(); <- Macht Probleme (#35465#)
switch ( nSlot )
@ -519,6 +523,19 @@ void SdDrawTextObjectBar::Execute( SfxRequest &rReq )
rReq.Done( aNewAttr );
pArgs = rReq.GetArgs();
}
else if ( nSlot == SID_ATTR_CHAR_FONT ||
nSlot == SID_ATTR_CHAR_FONTHEIGHT ||
nSlot == SID_ATTR_CHAR_POSTURE ||
nSlot == SID_ATTR_CHAR_WEIGHT )
{
USHORT nScriptType = pView->GetScriptType();
SfxItemPool& rPool = pView->GetDoc()->GetPool();
SvxScriptSetItem aSvxScriptSetItem( nSlot, rPool );
aSvxScriptSetItem.PutItemForScriptType( nScriptType, pArgs->Get( rPool.GetWhich( nSlot ) ) );
aNewAttr.Put( aSvxScriptSetItem );
rReq.Done( aNewAttr );
pArgs = rReq.GetArgs();
}
pView->SetAttributes(*pArgs);