diff options
author | Niklas Nebel <nn@openoffice.org> | 2001-06-25 19:37:39 +0000 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2001-06-25 19:37:39 +0000 |
commit | 640b0124f0bd4ddeedac85eafc247bbe289b7294 (patch) | |
tree | f20fe77cfedaba6bf4169c37dad3a6117facf5fb /sc | |
parent | d3c566b773991713d97ed1955eb01ee9b8aefdd0 (diff) |
#87795# support CJK character compression
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/column2.cxx | 7 | ||||
-rw-r--r-- | sc/source/core/data/documen9.cxx | 26 | ||||
-rw-r--r-- | sc/source/ui/view/output2.cxx | 6 |
3 files changed, 33 insertions, 6 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index d5df6320e172..01f4e94afaf3 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: column2.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: nn $ $Date: 2001-06-18 16:48:35 $ + * last change: $Author: nn $ $Date: 2001-06-25 20:37:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -810,6 +810,8 @@ long ScColumn::GetNeededSize( USHORT nRow, OutputDevice* pDev, MapMode aOld = pDev->GetMapMode(); pDev->SetMapMode( aHMMMode ); pEngine->SetRefDevice( pDev ); + pEngine->SetForbiddenCharsTable( pDocument->GetForbiddenCharacters() ); + pEngine->SetAsianCompressionMode( pDocument->GetAsianCompression() ); SfxItemSet* pSet = new SfxItemSet( pEngine->GetEmptyItemSet() ); pPattern->FillEditItemSet( pSet, pCondSet ); pEngine->SetDefaults( pSet ); @@ -1371,6 +1373,7 @@ void ScColumn::RemoveEditAttribs( USHORT nStartRow, USHORT nEndRow ) // EE_CNTRL_ONLINESPELLING falls schon Fehler drin sind pEngine->SetControlWord( pEngine->GetControlWord() | EE_CNTRL_ONLINESPELLING ); pEngine->SetForbiddenCharsTable( pDocument->GetForbiddenCharacters() ); + pEngine->SetAsianCompressionMode( pDocument->GetAsianCompression() ); } pEngine->SetText( *pData ); USHORT nParCount = pEngine->GetParagraphCount(); diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index a57bc6a060e9..a198597a159c 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -2,9 +2,9 @@ * * $RCSfile: documen9.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: nn $ $Date: 2001-06-20 14:29:55 $ + * last change: $Author: nn $ $Date: 2001-06-25 20:37:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -288,6 +288,7 @@ void ScDocument::InitDrawLayer( SfxObjectShell* pDocShell ) pDrawLayer->EnableAdjust(FALSE); pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters ); + pDrawLayer->SetCharCompressType( GetAsianCompression() ); } } @@ -881,4 +882,25 @@ void ScDocument::SetForbiddenCharacters( const vos::ORef<SvxForbiddenCharactersT pDrawLayer->SetForbiddenCharsTable( xForbiddenCharacters ); } +BOOL ScDocument::IsValidAsianCompression() const +{ + return ( nAsianCompression != SC_ASIANCOMPRESSION_INVALID ); +} + +BYTE ScDocument::GetAsianCompression() const +{ + if ( nAsianCompression == SC_ASIANCOMPRESSION_INVALID ) + return 0; + else + return nAsianCompression; +} + +void ScDocument::SetAsianCompression(BYTE nNew) +{ + nAsianCompression = nNew; + if ( pEditEngine ) + pEditEngine->SetAsianCompressionMode( nAsianCompression ); + if ( pDrawLayer ) + pDrawLayer->SetCharCompressType( nAsianCompression ); +} diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index f1ff4958dc48..911c8ed45c52 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: output2.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: nn $ $Date: 2001-06-18 16:46:44 $ + * last change: $Author: nn $ $Date: 2001-06-25 20:37:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1642,6 +1642,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) nCtrl &= ~EE_CNTRL_MARKFIELDS; pEngine->SetControlWord( nCtrl ); pEngine->SetForbiddenCharsTable( pDoc->GetForbiddenCharacters() ); + pEngine->SetAsianCompressionMode( pDoc->GetAsianCompression() ); } else lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE) @@ -2415,6 +2416,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) nCtrl &= ~EE_CNTRL_MARKFIELDS; pEngine->SetControlWord( nCtrl ); pEngine->SetForbiddenCharsTable( pDoc->GetForbiddenCharacters() ); + pEngine->SetAsianCompressionMode( pDoc->GetAsianCompression() ); } else lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE) |