Files
libreoffice/svx/source/dialog/fntctrl.cxx

852 lines
27 KiB
C++
Raw Normal View History

2000-09-18 16:07:07 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:07:07 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 16:07:07 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:07:07 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:07:07 +00:00
*
* 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.
2000-09-18 16:07:07 +00:00
*
* 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).
2000-09-18 16:07:07 +00:00
*
* 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.
2000-09-18 16:07:07 +00:00
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
2000-09-18 16:07:07 +00:00
// include ---------------------------------------------------------------
#include <sfx2/viewsh.hxx> // SfxViewShell
2009-05-21 03:59:23 +00:00
#include <sfx2/printer.hxx> // Printer
2000-09-18 16:07:07 +00:00
#include <vcl/metric.hxx>
#include <vcl/svapp.hxx>
CWS-TOOLING: integrate CWS graphite01 2009-08-06 11:09:01 +0200 hdu r274708 : #i10000# fix build breaker for SYSTEM_GRAPHITE=NO 2009-07-21 12:01:52 +0200 hdu r274174 : #i93645# fix include files for EXT_USE_STLPORT 2009-07-21 11:51:07 +0200 hdu r274173 : #i93645# convert line-endings of files to be patched 2009-07-21 10:49:01 +0200 hdu r274170 : #i93645# adjust makefile.vc8 for HH-RelEng env (thanks ause) 2009-07-20 05:21:32 +0200 kstribley r274105 : attempt to fix Windows build error caused by NULL variable in nmake file 2009-07-16 10:22:36 +0200 hdu r274032 : #i69129# also use solar minor version to find graphite lib 2009-07-16 05:36:06 +0200 kstribley r274029 : allow windows build to have Graphite disabled with SAL_DISABLE_GRAPHITE 2009-07-15 13:59:22 +0200 hdu r274011 : #i69129# default to ENABLE_GRAPHITE=TRUE 2009-07-15 13:19:54 +0200 hdu r274008 : #i93645# ignore compile warnings for graphite 2009-07-15 13:18:25 +0200 hdu r274006 : #i93645# stlport needs libmath, use solar minor version to find matching libs 2009-07-15 09:21:13 +0200 hdu r273989 : #i100000# avoid compile warning 2009-07-14 12:19:08 +0200 hdu r273963 : CWS-TOOLING: rebase CWS graphite01 to trunk@273858 (milestone: DEV300:m52) 2009-07-13 06:54:56 +0200 kstribley r273912 : change to use standard file headers 2009-07-13 05:39:14 +0200 kstribley r273911 : Remove unnecessary change to configure.in as reported by Rene 2009-07-10 16:58:44 +0200 hdu r273902 : #i100000# fix compile for precompiled-header support 2009-07-02 13:48:26 +0200 kstribley r273647 : #69129# fix a graphite bug which could crash with fonts containing obscure GDL positioning rules 2009-07-02 01:44:02 +0200 rene r273616 : #i10000# we need to link with -licuuc 2009-07-01 04:02:20 +0200 kstribley r273540 : restore missing sdf files from base 2009-07-01 04:01:40 +0200 kstribley r273539 : restore missing sdf files from base 2009-07-01 04:01:12 +0200 kstribley r273538 : restore missing sdf files from base 2009-07-01 03:59:41 +0200 kstribley r273537 : restore missing sdf files from base 2009-06-29 10:16:51 +0200 kstribley r273456 : #i69129# fixes a bug which caused occasional incorrect linebreaking when graphite is asked to render a part of a cluster not containing a base 2009-06-27 10:43:58 +0200 kstribley r273445 : #i69129# added kashida support for justified RTL text 2009-06-01 12:57:06 +0200 kstribley r272476 : CWS-TOOLING: rebase CWS graphite01 to trunk@272291 (milestone: DEV300:m49) 2009-05-26 10:50:06 +0200 kstribley r272286 : #i69129# fixes a build error when NDEBUG is not defined 2009-05-25 13:14:06 +0200 kstribley r272237 : #i69129# enable debugging by fixing compile warnings 2009-05-25 13:07:47 +0200 kstribley r272234 : #i69129# added env variable to disable GRAPHITE at run time on linux and fixed a bug with a rare attachment sequence 2009-04-20 17:39:25 +0200 kstribley r271001 : CWS-TOOLING: rebase CWS graphite01 to trunk@270723 (milestone: DEV300:m46) 2009-04-18 07:11:33 +0200 kstribley r270957 : #i101178# attempt to fix buildbot builds by reordering configure.in 2009-04-14 17:37:07 +0200 kstribley r270801 : #i93645# tweak configure to enable graphite by default on windows and linux to assist testing with tinderbox build 2009-04-14 16:33:17 +0200 kstribley r270796 : #i96925# another fix for rtl fallback and add optional debug info in MultiSalLayout 2009-04-08 13:27:55 +0200 kstribley r270641 : #i69129# fix features after a bad merge 2009-04-08 13:26:34 +0200 kstribley r270640 : #i69129# add a patch for WinFont 2009-03-24 12:37:54 +0100 kstribley r269937 : #i69129# fix build error due to locale being included in method for features 2009-03-24 12:36:10 +0100 kstribley r269936 : #i93645# change patch variable and fix configure 2009-03-20 04:18:56 +0100 kstribley r269776 : CWS-TOOLING: rebase CWS graphite01 to trunk@269297 (milestone: DEV300:m43) 2009-03-01 13:10:59 +0100 kstribley r268622 : added a patch to improve handling of a font with bad graphite language feature tables #i93645# 2009-02-12 04:50:51 +0100 kstribley r267631 : #i93645# fix windows build for graphite 2.3.1 and remove unnecessary patch 2009-02-10 04:48:50 +0100 kstribley r267535 : #i93645# fix a build error with stlport on Ubuntu 8.10 x86 2009-02-10 03:51:10 +0100 kstribley r267534 : #i69129# remove legacy config_office 2009-02-07 19:12:54 +0100 kstribley r267482 : #i93645# upgrade to using silgraphite-2.3.1 2009-02-02 18:17:57 +0100 kstribley r267290 : #i69129# backout unwanted checkin 2009-02-02 17:44:03 +0100 kstribley r267281 : #i69129# backout erroneous update to aclocal.m4 2009-02-01 10:05:03 +0100 kstribley r267236 : #i69129# fix build error due to locale being added to set font attributes 2009-02-01 06:02:52 +0100 kstribley r267235 : #i69129# fix erroneous merge 2009-01-31 16:24:56 +0100 kstribley r267234 : #i69129# update configure.in solenv.in in their new locations with enable graphite 2009-01-31 10:53:18 +0100 kstribley r267232 : CWS-TOOLING: rebase CWS graphite01 to trunk@267171 (milestone: DEV300:m41) 2008-12-17 04:17:33 +0100 kstribley r265577 : #i93645# remove superfluous autoreconf check and autoconf patch 2008-12-16 10:07:20 +0100 rene r265529 : fix aclocal.m4 breakage 2008-12-16 05:13:29 +0100 kstribley r265520 : #i93645# change to autoconf && configure 2008-12-16 04:39:48 +0100 kstribley r265519 : #i93645# modified LD_FLAGS so that system graphite isn't pulled in by accident and fixed autoconf problem 2008-12-15 14:16:25 +0100 rene r265497 : check for working STL 2008-12-15 12:53:39 +0100 rene r265473 : revert broken check 2008-12-15 11:59:21 +0100 kstribley r265472 : #i93645# added check for system STL, since this is a requirement for system graphite to work correctly and moved the position of the check further down 2008-12-15 11:55:34 +0100 kstribley r265471 : #i93645# remove references to gr3ooo to allow system graphite to be used 2008-12-12 18:48:18 +0100 rene r265437 : fix link for system-graphite 2008-12-12 18:46:45 +0100 rene r265436 : the tarball is in graphite, remove obsolete check 2008-12-12 18:22:22 +0100 rene r265433 : typo; re-autoconf 2008-12-12 17:35:26 +0100 rene r265432 : actually implement SYSTEM_GRAPHIT checks (as already checked for in makefile.mks) but remove the checks in graphit itself and move to BUILD_TYPE 2008-12-12 08:08:33 +0100 kstribley r265387 : #i69129# 2 of the patched files need windows line endings so patch works on linux as well as windows 2008-12-12 08:04:41 +0100 kstribley r265386 : #i69129# rtl fallback fix which prevents caching of segments with fallback 2008-12-08 04:28:12 +0100 kstribley r264969 : results of running autoconf with graphite config changes #i69129# 2008-12-05 08:12:47 +0100 kstribley r264886 : backout unintential change at r264884 2008-12-05 06:26:33 +0100 kstribley r264884 : #i96925# fixes for uniscribe fallback 2008-12-05 06:11:37 +0100 kstribley r264883 : #i69129# improvements to windows graphite code, including caching of sila table lookup 2008-12-02 13:28:51 +0100 kstribley r264694 : #i93645# add graphite library and append to patch 2008-11-27 06:47:10 +0100 kstribley r264445 : #69129# fix rtl loop bug and rtl caching problem 2008-11-27 06:42:20 +0100 kstribley r264444 : add caching for GraphiteFontAdaptor 2008-11-14 15:57:03 +0100 kstribley r263681 : #69129# add graphite addtional files from cvs 2008-11-14 15:54:47 +0100 kstribley r263680 : #69129# fix for modified resolution api 2008-11-13 16:24:09 +0100 kstribley r263652 : #69129# add skeleton to build graphite module library 2008-11-13 16:22:19 +0100 kstribley r263651 : #69129# add skeleton to build graphite module library 2008-11-13 16:16:10 +0100 kstribley r263650 : #69129# migrate from cvs 2008-11-13 15:26:54 +0100 kstribley r263646 : #69129# add a module for the graphite library
2009-08-17 14:12:14 +00:00
#include <unicode/uchar.h>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
#endif
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
#define _SVSTDARR_ULONGS
#define _SVSTDARR_XUB_STRLEN
#include <svl/svstdarr.hxx>
#endif
#include <svtools/colorcfg.hxx>
#include <svx/fntctrl.hxx>
#include <svx/dialogs.hrc>
2002-08-13 07:42:53 +00:00
#define TEXT_WIDTH 20
2000-09-18 16:07:07 +00:00
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using ::com::sun::star::i18n::XBreakIterator;
2002-08-13 07:42:53 +00:00
// -----------------------------------------------------------------------
// small helper functions to set fonts
// -----------------------------------------------------------------------
namespace
2002-08-06 07:51:00 +00:00
{
2002-08-13 07:42:53 +00:00
void scaleFontWidth(Font& _rFont,const OutputDevice& rOutDev,long& _n100PercentFont)
{
_rFont.SetWidth( 0 );
_n100PercentFont = rOutDev.GetFontMetric( _rFont ).GetWidth();
}
// -----------------------------------------------------------------------
void initFont(Font& _rFont)
{
_rFont.SetTransparent(TRUE);
_rFont.SetAlign(ALIGN_BASELINE);
}
// -----------------------------------------------------------------------
void setFontSize(Font& _rFont)
{
Size aSize( _rFont.GetSize() );
aSize.Height() = ( aSize.Height() * 3 ) / 5;
aSize.Width() = ( aSize.Width() * 3 ) / 5;
_rFont.SetSize( aSize );
}
// -----------------------------------------------------------------------
void calcFontHeightAnyAscent(OutputDevice* _pWin,Font& _rFont,long& _nHeight,long& _nAscent)
{
if ( !_nHeight )
{
_pWin->SetFont( _rFont );
FontMetric aMetric( _pWin->GetFontMetric() );
_nHeight = aMetric.GetLineHeight();
_nAscent = aMetric.GetAscent();
}
}
// -----------------------------------------------------------------------
void setFont( const SvxFont& rNewFont, SvxFont& rImplFont )
{
rImplFont = rNewFont;
rImplFont.SetTransparent( TRUE );
rImplFont.SetAlign( ALIGN_BASELINE );
}
2002-08-06 07:51:00 +00:00
}
2002-08-13 07:42:53 +00:00
// -----------------------------------------------------------------------
2002-08-06 07:51:00 +00:00
// class FontPrevWin_Impl -----------------------------------------------
2000-09-18 16:07:07 +00:00
class FontPrevWin_Impl
2000-09-18 16:07:07 +00:00
{
friend class SvxFontPrevWindow;
SvxFont aFont;
Printer* pPrinter;
BOOL bDelPrinter;
Reference < XBreakIterator > xBreak;
SvULongs aTextWidth;
SvXub_StrLens aScriptChg;
SvUShorts aScriptType;
SvxFont aCJKFont;
2002-08-13 07:42:53 +00:00
SvxFont aCTLFont;
String aText;
String aScriptText;
Color* pColor;
Color* pBackColor;
long nAscent;
sal_Unicode cStartBracket;
sal_Unicode cEndBracket;
long n100PercentFontWidth; // initial -1 -> not set yet
long n100PercentFontWidthCJK;
2002-08-13 07:42:53 +00:00
long n100PercentFontWidthCTL;
UINT16 nFontWidthScale;
BOOL bSelection : 1,
bGetSelection : 1,
bUseResText : 1,
bTwoLines : 1,
bIsCJKUI : 1,
bIsCTLUI : 1,
bUseFontNameAsText : 1,
bTextInited : 1;
void _CheckScript();
public:
inline FontPrevWin_Impl() :
pPrinter( NULL ), bDelPrinter( FALSE ),
pColor( NULL ), pBackColor( 0 ),
cStartBracket( 0 ), cEndBracket( 0 ), nFontWidthScale( 100 ),
bSelection( FALSE ), bGetSelection( FALSE ), bUseResText( FALSE ),
bTwoLines( FALSE ),
bIsCJKUI( FALSE ), bIsCTLUI( FALSE ),
bUseFontNameAsText( FALSE ), bTextInited( FALSE )
{
Invalidate100PercentFontWidth();
}
inline ~FontPrevWin_Impl()
{
delete pColor;
delete pBackColor;
if( bDelPrinter )
delete pPrinter;
}
void CheckScript();
Size CalcTextSize( OutputDevice* pWin, OutputDevice* pPrt, SvxFont &rFont );
void DrawPrev( OutputDevice* pWin, Printer* pPrt, Point &rPt, SvxFont &rFont );
BOOL SetFontWidthScale( UINT16 nScaleInPercent );
inline void Invalidate100PercentFontWidth();
inline BOOL Is100PercentFontWidthValid() const;
void ScaleFontWidth( const OutputDevice& rOutDev );
// scales rNonCJKFont and aCJKFont depending on nFontWidthScale and
// sets the 100%-Font-Widths
2000-09-18 16:07:07 +00:00
};
void FontPrevWin_Impl::CheckScript()
{
if( aText != aScriptText )
_CheckScript();
}
inline void FontPrevWin_Impl::Invalidate100PercentFontWidth()
{
2002-08-13 07:42:53 +00:00
n100PercentFontWidth = n100PercentFontWidthCJK = n100PercentFontWidthCTL = -1;
}
inline BOOL FontPrevWin_Impl::Is100PercentFontWidthValid() const
{
DBG_ASSERT( ( n100PercentFontWidth == -1 && n100PercentFontWidthCJK == -1 ) ||
2002-08-13 07:42:53 +00:00
( n100PercentFontWidth != -1 && n100PercentFontWidthCJK != -1 ) ||
( n100PercentFontWidth == -1 && n100PercentFontWidthCTL == -1 ) ||
( n100PercentFontWidth != -1 && n100PercentFontWidthCTL != -1 ),
"*FontPrevWin_Impl::Is100PercentFontWidthValid(): 100PercentFontWidth's not synchronous" );
return n100PercentFontWidth != -1;
}
// class FontPrevWin_Impl -----------------------------------------------
/*-----------------19.7.2001 08:44------------------
* void FontPrevWin_Impl::_CheckScript()
* evalutates the scripttypes of the actual string.
* Afterwards the positions of script change are notified in aScriptChg,
* the scripttypes in aScriptType.
* The aTextWidth array will be filled with zero.
* --------------------------------------------------*/
void FontPrevWin_Impl::_CheckScript()
{
aScriptText = aText;
2010-10-05 20:01:23 +02:00
size_t nCnt = aScriptChg.size();
if( nCnt )
{
2010-10-05 20:01:23 +02:00
aScriptChg.clear();
aScriptType.Remove( 0, nCnt );
aTextWidth.Remove( 0, nCnt );
nCnt = 0;
}
if( !xBreak.is() )
{
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
2002-08-13 07:42:53 +00:00
xBreak = Reference< XBreakIterator >(xMSF->createInstance(
::rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ),UNO_QUERY);
}
if( xBreak.is() )
{
USHORT nScript = xBreak->getScriptType( aText, 0 );
USHORT nChg = 0;
if( com::sun::star::i18n::ScriptType::WEAK == nScript )
{
nChg = (xub_StrLen)xBreak->endOfScript( aText, nChg, nScript );
if( nChg < aText.Len() )
nScript = xBreak->getScriptType( aText, nChg );
else
nScript = com::sun::star::i18n::ScriptType::LATIN;
}
do
{
nChg = (xub_StrLen)xBreak->endOfScript( aText, nChg, nScript );
CWS-TOOLING: integrate CWS graphite01 2009-08-06 11:09:01 +0200 hdu r274708 : #i10000# fix build breaker for SYSTEM_GRAPHITE=NO 2009-07-21 12:01:52 +0200 hdu r274174 : #i93645# fix include files for EXT_USE_STLPORT 2009-07-21 11:51:07 +0200 hdu r274173 : #i93645# convert line-endings of files to be patched 2009-07-21 10:49:01 +0200 hdu r274170 : #i93645# adjust makefile.vc8 for HH-RelEng env (thanks ause) 2009-07-20 05:21:32 +0200 kstribley r274105 : attempt to fix Windows build error caused by NULL variable in nmake file 2009-07-16 10:22:36 +0200 hdu r274032 : #i69129# also use solar minor version to find graphite lib 2009-07-16 05:36:06 +0200 kstribley r274029 : allow windows build to have Graphite disabled with SAL_DISABLE_GRAPHITE 2009-07-15 13:59:22 +0200 hdu r274011 : #i69129# default to ENABLE_GRAPHITE=TRUE 2009-07-15 13:19:54 +0200 hdu r274008 : #i93645# ignore compile warnings for graphite 2009-07-15 13:18:25 +0200 hdu r274006 : #i93645# stlport needs libmath, use solar minor version to find matching libs 2009-07-15 09:21:13 +0200 hdu r273989 : #i100000# avoid compile warning 2009-07-14 12:19:08 +0200 hdu r273963 : CWS-TOOLING: rebase CWS graphite01 to trunk@273858 (milestone: DEV300:m52) 2009-07-13 06:54:56 +0200 kstribley r273912 : change to use standard file headers 2009-07-13 05:39:14 +0200 kstribley r273911 : Remove unnecessary change to configure.in as reported by Rene 2009-07-10 16:58:44 +0200 hdu r273902 : #i100000# fix compile for precompiled-header support 2009-07-02 13:48:26 +0200 kstribley r273647 : #69129# fix a graphite bug which could crash with fonts containing obscure GDL positioning rules 2009-07-02 01:44:02 +0200 rene r273616 : #i10000# we need to link with -licuuc 2009-07-01 04:02:20 +0200 kstribley r273540 : restore missing sdf files from base 2009-07-01 04:01:40 +0200 kstribley r273539 : restore missing sdf files from base 2009-07-01 04:01:12 +0200 kstribley r273538 : restore missing sdf files from base 2009-07-01 03:59:41 +0200 kstribley r273537 : restore missing sdf files from base 2009-06-29 10:16:51 +0200 kstribley r273456 : #i69129# fixes a bug which caused occasional incorrect linebreaking when graphite is asked to render a part of a cluster not containing a base 2009-06-27 10:43:58 +0200 kstribley r273445 : #i69129# added kashida support for justified RTL text 2009-06-01 12:57:06 +0200 kstribley r272476 : CWS-TOOLING: rebase CWS graphite01 to trunk@272291 (milestone: DEV300:m49) 2009-05-26 10:50:06 +0200 kstribley r272286 : #i69129# fixes a build error when NDEBUG is not defined 2009-05-25 13:14:06 +0200 kstribley r272237 : #i69129# enable debugging by fixing compile warnings 2009-05-25 13:07:47 +0200 kstribley r272234 : #i69129# added env variable to disable GRAPHITE at run time on linux and fixed a bug with a rare attachment sequence 2009-04-20 17:39:25 +0200 kstribley r271001 : CWS-TOOLING: rebase CWS graphite01 to trunk@270723 (milestone: DEV300:m46) 2009-04-18 07:11:33 +0200 kstribley r270957 : #i101178# attempt to fix buildbot builds by reordering configure.in 2009-04-14 17:37:07 +0200 kstribley r270801 : #i93645# tweak configure to enable graphite by default on windows and linux to assist testing with tinderbox build 2009-04-14 16:33:17 +0200 kstribley r270796 : #i96925# another fix for rtl fallback and add optional debug info in MultiSalLayout 2009-04-08 13:27:55 +0200 kstribley r270641 : #i69129# fix features after a bad merge 2009-04-08 13:26:34 +0200 kstribley r270640 : #i69129# add a patch for WinFont 2009-03-24 12:37:54 +0100 kstribley r269937 : #i69129# fix build error due to locale being included in method for features 2009-03-24 12:36:10 +0100 kstribley r269936 : #i93645# change patch variable and fix configure 2009-03-20 04:18:56 +0100 kstribley r269776 : CWS-TOOLING: rebase CWS graphite01 to trunk@269297 (milestone: DEV300:m43) 2009-03-01 13:10:59 +0100 kstribley r268622 : added a patch to improve handling of a font with bad graphite language feature tables #i93645# 2009-02-12 04:50:51 +0100 kstribley r267631 : #i93645# fix windows build for graphite 2.3.1 and remove unnecessary patch 2009-02-10 04:48:50 +0100 kstribley r267535 : #i93645# fix a build error with stlport on Ubuntu 8.10 x86 2009-02-10 03:51:10 +0100 kstribley r267534 : #i69129# remove legacy config_office 2009-02-07 19:12:54 +0100 kstribley r267482 : #i93645# upgrade to using silgraphite-2.3.1 2009-02-02 18:17:57 +0100 kstribley r267290 : #i69129# backout unwanted checkin 2009-02-02 17:44:03 +0100 kstribley r267281 : #i69129# backout erroneous update to aclocal.m4 2009-02-01 10:05:03 +0100 kstribley r267236 : #i69129# fix build error due to locale being added to set font attributes 2009-02-01 06:02:52 +0100 kstribley r267235 : #i69129# fix erroneous merge 2009-01-31 16:24:56 +0100 kstribley r267234 : #i69129# update configure.in solenv.in in their new locations with enable graphite 2009-01-31 10:53:18 +0100 kstribley r267232 : CWS-TOOLING: rebase CWS graphite01 to trunk@267171 (milestone: DEV300:m41) 2008-12-17 04:17:33 +0100 kstribley r265577 : #i93645# remove superfluous autoreconf check and autoconf patch 2008-12-16 10:07:20 +0100 rene r265529 : fix aclocal.m4 breakage 2008-12-16 05:13:29 +0100 kstribley r265520 : #i93645# change to autoconf && configure 2008-12-16 04:39:48 +0100 kstribley r265519 : #i93645# modified LD_FLAGS so that system graphite isn't pulled in by accident and fixed autoconf problem 2008-12-15 14:16:25 +0100 rene r265497 : check for working STL 2008-12-15 12:53:39 +0100 rene r265473 : revert broken check 2008-12-15 11:59:21 +0100 kstribley r265472 : #i93645# added check for system STL, since this is a requirement for system graphite to work correctly and moved the position of the check further down 2008-12-15 11:55:34 +0100 kstribley r265471 : #i93645# remove references to gr3ooo to allow system graphite to be used 2008-12-12 18:48:18 +0100 rene r265437 : fix link for system-graphite 2008-12-12 18:46:45 +0100 rene r265436 : the tarball is in graphite, remove obsolete check 2008-12-12 18:22:22 +0100 rene r265433 : typo; re-autoconf 2008-12-12 17:35:26 +0100 rene r265432 : actually implement SYSTEM_GRAPHIT checks (as already checked for in makefile.mks) but remove the checks in graphit itself and move to BUILD_TYPE 2008-12-12 08:08:33 +0100 kstribley r265387 : #i69129# 2 of the patched files need windows line endings so patch works on linux as well as windows 2008-12-12 08:04:41 +0100 kstribley r265386 : #i69129# rtl fallback fix which prevents caching of segments with fallback 2008-12-08 04:28:12 +0100 kstribley r264969 : results of running autoconf with graphite config changes #i69129# 2008-12-05 08:12:47 +0100 kstribley r264886 : backout unintential change at r264884 2008-12-05 06:26:33 +0100 kstribley r264884 : #i96925# fixes for uniscribe fallback 2008-12-05 06:11:37 +0100 kstribley r264883 : #i69129# improvements to windows graphite code, including caching of sila table lookup 2008-12-02 13:28:51 +0100 kstribley r264694 : #i93645# add graphite library and append to patch 2008-11-27 06:47:10 +0100 kstribley r264445 : #69129# fix rtl loop bug and rtl caching problem 2008-11-27 06:42:20 +0100 kstribley r264444 : add caching for GraphiteFontAdaptor 2008-11-14 15:57:03 +0100 kstribley r263681 : #69129# add graphite addtional files from cvs 2008-11-14 15:54:47 +0100 kstribley r263680 : #69129# fix for modified resolution api 2008-11-13 16:24:09 +0100 kstribley r263652 : #69129# add skeleton to build graphite module library 2008-11-13 16:22:19 +0100 kstribley r263651 : #69129# add skeleton to build graphite module library 2008-11-13 16:16:10 +0100 kstribley r263650 : #69129# migrate from cvs 2008-11-13 15:26:54 +0100 kstribley r263646 : #69129# add a module for the graphite library
2009-08-17 14:12:14 +00:00
if (nChg < aText.Len() && nChg > 0 &&
(com::sun::star::i18n::ScriptType::WEAK ==
xBreak->getScriptType(aText, nChg - 1)))
{
int8_t nType = u_charType(aText.GetChar(nChg) );
if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK ||
nType == U_COMBINING_SPACING_MARK )
{
2010-10-05 20:01:23 +02:00
aScriptChg.push_back( nChg - 1 );
CWS-TOOLING: integrate CWS graphite01 2009-08-06 11:09:01 +0200 hdu r274708 : #i10000# fix build breaker for SYSTEM_GRAPHITE=NO 2009-07-21 12:01:52 +0200 hdu r274174 : #i93645# fix include files for EXT_USE_STLPORT 2009-07-21 11:51:07 +0200 hdu r274173 : #i93645# convert line-endings of files to be patched 2009-07-21 10:49:01 +0200 hdu r274170 : #i93645# adjust makefile.vc8 for HH-RelEng env (thanks ause) 2009-07-20 05:21:32 +0200 kstribley r274105 : attempt to fix Windows build error caused by NULL variable in nmake file 2009-07-16 10:22:36 +0200 hdu r274032 : #i69129# also use solar minor version to find graphite lib 2009-07-16 05:36:06 +0200 kstribley r274029 : allow windows build to have Graphite disabled with SAL_DISABLE_GRAPHITE 2009-07-15 13:59:22 +0200 hdu r274011 : #i69129# default to ENABLE_GRAPHITE=TRUE 2009-07-15 13:19:54 +0200 hdu r274008 : #i93645# ignore compile warnings for graphite 2009-07-15 13:18:25 +0200 hdu r274006 : #i93645# stlport needs libmath, use solar minor version to find matching libs 2009-07-15 09:21:13 +0200 hdu r273989 : #i100000# avoid compile warning 2009-07-14 12:19:08 +0200 hdu r273963 : CWS-TOOLING: rebase CWS graphite01 to trunk@273858 (milestone: DEV300:m52) 2009-07-13 06:54:56 +0200 kstribley r273912 : change to use standard file headers 2009-07-13 05:39:14 +0200 kstribley r273911 : Remove unnecessary change to configure.in as reported by Rene 2009-07-10 16:58:44 +0200 hdu r273902 : #i100000# fix compile for precompiled-header support 2009-07-02 13:48:26 +0200 kstribley r273647 : #69129# fix a graphite bug which could crash with fonts containing obscure GDL positioning rules 2009-07-02 01:44:02 +0200 rene r273616 : #i10000# we need to link with -licuuc 2009-07-01 04:02:20 +0200 kstribley r273540 : restore missing sdf files from base 2009-07-01 04:01:40 +0200 kstribley r273539 : restore missing sdf files from base 2009-07-01 04:01:12 +0200 kstribley r273538 : restore missing sdf files from base 2009-07-01 03:59:41 +0200 kstribley r273537 : restore missing sdf files from base 2009-06-29 10:16:51 +0200 kstribley r273456 : #i69129# fixes a bug which caused occasional incorrect linebreaking when graphite is asked to render a part of a cluster not containing a base 2009-06-27 10:43:58 +0200 kstribley r273445 : #i69129# added kashida support for justified RTL text 2009-06-01 12:57:06 +0200 kstribley r272476 : CWS-TOOLING: rebase CWS graphite01 to trunk@272291 (milestone: DEV300:m49) 2009-05-26 10:50:06 +0200 kstribley r272286 : #i69129# fixes a build error when NDEBUG is not defined 2009-05-25 13:14:06 +0200 kstribley r272237 : #i69129# enable debugging by fixing compile warnings 2009-05-25 13:07:47 +0200 kstribley r272234 : #i69129# added env variable to disable GRAPHITE at run time on linux and fixed a bug with a rare attachment sequence 2009-04-20 17:39:25 +0200 kstribley r271001 : CWS-TOOLING: rebase CWS graphite01 to trunk@270723 (milestone: DEV300:m46) 2009-04-18 07:11:33 +0200 kstribley r270957 : #i101178# attempt to fix buildbot builds by reordering configure.in 2009-04-14 17:37:07 +0200 kstribley r270801 : #i93645# tweak configure to enable graphite by default on windows and linux to assist testing with tinderbox build 2009-04-14 16:33:17 +0200 kstribley r270796 : #i96925# another fix for rtl fallback and add optional debug info in MultiSalLayout 2009-04-08 13:27:55 +0200 kstribley r270641 : #i69129# fix features after a bad merge 2009-04-08 13:26:34 +0200 kstribley r270640 : #i69129# add a patch for WinFont 2009-03-24 12:37:54 +0100 kstribley r269937 : #i69129# fix build error due to locale being included in method for features 2009-03-24 12:36:10 +0100 kstribley r269936 : #i93645# change patch variable and fix configure 2009-03-20 04:18:56 +0100 kstribley r269776 : CWS-TOOLING: rebase CWS graphite01 to trunk@269297 (milestone: DEV300:m43) 2009-03-01 13:10:59 +0100 kstribley r268622 : added a patch to improve handling of a font with bad graphite language feature tables #i93645# 2009-02-12 04:50:51 +0100 kstribley r267631 : #i93645# fix windows build for graphite 2.3.1 and remove unnecessary patch 2009-02-10 04:48:50 +0100 kstribley r267535 : #i93645# fix a build error with stlport on Ubuntu 8.10 x86 2009-02-10 03:51:10 +0100 kstribley r267534 : #i69129# remove legacy config_office 2009-02-07 19:12:54 +0100 kstribley r267482 : #i93645# upgrade to using silgraphite-2.3.1 2009-02-02 18:17:57 +0100 kstribley r267290 : #i69129# backout unwanted checkin 2009-02-02 17:44:03 +0100 kstribley r267281 : #i69129# backout erroneous update to aclocal.m4 2009-02-01 10:05:03 +0100 kstribley r267236 : #i69129# fix build error due to locale being added to set font attributes 2009-02-01 06:02:52 +0100 kstribley r267235 : #i69129# fix erroneous merge 2009-01-31 16:24:56 +0100 kstribley r267234 : #i69129# update configure.in solenv.in in their new locations with enable graphite 2009-01-31 10:53:18 +0100 kstribley r267232 : CWS-TOOLING: rebase CWS graphite01 to trunk@267171 (milestone: DEV300:m41) 2008-12-17 04:17:33 +0100 kstribley r265577 : #i93645# remove superfluous autoreconf check and autoconf patch 2008-12-16 10:07:20 +0100 rene r265529 : fix aclocal.m4 breakage 2008-12-16 05:13:29 +0100 kstribley r265520 : #i93645# change to autoconf && configure 2008-12-16 04:39:48 +0100 kstribley r265519 : #i93645# modified LD_FLAGS so that system graphite isn't pulled in by accident and fixed autoconf problem 2008-12-15 14:16:25 +0100 rene r265497 : check for working STL 2008-12-15 12:53:39 +0100 rene r265473 : revert broken check 2008-12-15 11:59:21 +0100 kstribley r265472 : #i93645# added check for system STL, since this is a requirement for system graphite to work correctly and moved the position of the check further down 2008-12-15 11:55:34 +0100 kstribley r265471 : #i93645# remove references to gr3ooo to allow system graphite to be used 2008-12-12 18:48:18 +0100 rene r265437 : fix link for system-graphite 2008-12-12 18:46:45 +0100 rene r265436 : the tarball is in graphite, remove obsolete check 2008-12-12 18:22:22 +0100 rene r265433 : typo; re-autoconf 2008-12-12 17:35:26 +0100 rene r265432 : actually implement SYSTEM_GRAPHIT checks (as already checked for in makefile.mks) but remove the checks in graphit itself and move to BUILD_TYPE 2008-12-12 08:08:33 +0100 kstribley r265387 : #i69129# 2 of the patched files need windows line endings so patch works on linux as well as windows 2008-12-12 08:04:41 +0100 kstribley r265386 : #i69129# rtl fallback fix which prevents caching of segments with fallback 2008-12-08 04:28:12 +0100 kstribley r264969 : results of running autoconf with graphite config changes #i69129# 2008-12-05 08:12:47 +0100 kstribley r264886 : backout unintential change at r264884 2008-12-05 06:26:33 +0100 kstribley r264884 : #i96925# fixes for uniscribe fallback 2008-12-05 06:11:37 +0100 kstribley r264883 : #i69129# improvements to windows graphite code, including caching of sila table lookup 2008-12-02 13:28:51 +0100 kstribley r264694 : #i93645# add graphite library and append to patch 2008-11-27 06:47:10 +0100 kstribley r264445 : #69129# fix rtl loop bug and rtl caching problem 2008-11-27 06:42:20 +0100 kstribley r264444 : add caching for GraphiteFontAdaptor 2008-11-14 15:57:03 +0100 kstribley r263681 : #69129# add graphite addtional files from cvs 2008-11-14 15:54:47 +0100 kstribley r263680 : #69129# fix for modified resolution api 2008-11-13 16:24:09 +0100 kstribley r263652 : #69129# add skeleton to build graphite module library 2008-11-13 16:22:19 +0100 kstribley r263651 : #69129# add skeleton to build graphite module library 2008-11-13 16:16:10 +0100 kstribley r263650 : #69129# migrate from cvs 2008-11-13 15:26:54 +0100 kstribley r263646 : #69129# add a module for the graphite library
2009-08-17 14:12:14 +00:00
}
else
{
2010-10-05 20:01:23 +02:00
aScriptChg.push_back( nChg );
CWS-TOOLING: integrate CWS graphite01 2009-08-06 11:09:01 +0200 hdu r274708 : #i10000# fix build breaker for SYSTEM_GRAPHITE=NO 2009-07-21 12:01:52 +0200 hdu r274174 : #i93645# fix include files for EXT_USE_STLPORT 2009-07-21 11:51:07 +0200 hdu r274173 : #i93645# convert line-endings of files to be patched 2009-07-21 10:49:01 +0200 hdu r274170 : #i93645# adjust makefile.vc8 for HH-RelEng env (thanks ause) 2009-07-20 05:21:32 +0200 kstribley r274105 : attempt to fix Windows build error caused by NULL variable in nmake file 2009-07-16 10:22:36 +0200 hdu r274032 : #i69129# also use solar minor version to find graphite lib 2009-07-16 05:36:06 +0200 kstribley r274029 : allow windows build to have Graphite disabled with SAL_DISABLE_GRAPHITE 2009-07-15 13:59:22 +0200 hdu r274011 : #i69129# default to ENABLE_GRAPHITE=TRUE 2009-07-15 13:19:54 +0200 hdu r274008 : #i93645# ignore compile warnings for graphite 2009-07-15 13:18:25 +0200 hdu r274006 : #i93645# stlport needs libmath, use solar minor version to find matching libs 2009-07-15 09:21:13 +0200 hdu r273989 : #i100000# avoid compile warning 2009-07-14 12:19:08 +0200 hdu r273963 : CWS-TOOLING: rebase CWS graphite01 to trunk@273858 (milestone: DEV300:m52) 2009-07-13 06:54:56 +0200 kstribley r273912 : change to use standard file headers 2009-07-13 05:39:14 +0200 kstribley r273911 : Remove unnecessary change to configure.in as reported by Rene 2009-07-10 16:58:44 +0200 hdu r273902 : #i100000# fix compile for precompiled-header support 2009-07-02 13:48:26 +0200 kstribley r273647 : #69129# fix a graphite bug which could crash with fonts containing obscure GDL positioning rules 2009-07-02 01:44:02 +0200 rene r273616 : #i10000# we need to link with -licuuc 2009-07-01 04:02:20 +0200 kstribley r273540 : restore missing sdf files from base 2009-07-01 04:01:40 +0200 kstribley r273539 : restore missing sdf files from base 2009-07-01 04:01:12 +0200 kstribley r273538 : restore missing sdf files from base 2009-07-01 03:59:41 +0200 kstribley r273537 : restore missing sdf files from base 2009-06-29 10:16:51 +0200 kstribley r273456 : #i69129# fixes a bug which caused occasional incorrect linebreaking when graphite is asked to render a part of a cluster not containing a base 2009-06-27 10:43:58 +0200 kstribley r273445 : #i69129# added kashida support for justified RTL text 2009-06-01 12:57:06 +0200 kstribley r272476 : CWS-TOOLING: rebase CWS graphite01 to trunk@272291 (milestone: DEV300:m49) 2009-05-26 10:50:06 +0200 kstribley r272286 : #i69129# fixes a build error when NDEBUG is not defined 2009-05-25 13:14:06 +0200 kstribley r272237 : #i69129# enable debugging by fixing compile warnings 2009-05-25 13:07:47 +0200 kstribley r272234 : #i69129# added env variable to disable GRAPHITE at run time on linux and fixed a bug with a rare attachment sequence 2009-04-20 17:39:25 +0200 kstribley r271001 : CWS-TOOLING: rebase CWS graphite01 to trunk@270723 (milestone: DEV300:m46) 2009-04-18 07:11:33 +0200 kstribley r270957 : #i101178# attempt to fix buildbot builds by reordering configure.in 2009-04-14 17:37:07 +0200 kstribley r270801 : #i93645# tweak configure to enable graphite by default on windows and linux to assist testing with tinderbox build 2009-04-14 16:33:17 +0200 kstribley r270796 : #i96925# another fix for rtl fallback and add optional debug info in MultiSalLayout 2009-04-08 13:27:55 +0200 kstribley r270641 : #i69129# fix features after a bad merge 2009-04-08 13:26:34 +0200 kstribley r270640 : #i69129# add a patch for WinFont 2009-03-24 12:37:54 +0100 kstribley r269937 : #i69129# fix build error due to locale being included in method for features 2009-03-24 12:36:10 +0100 kstribley r269936 : #i93645# change patch variable and fix configure 2009-03-20 04:18:56 +0100 kstribley r269776 : CWS-TOOLING: rebase CWS graphite01 to trunk@269297 (milestone: DEV300:m43) 2009-03-01 13:10:59 +0100 kstribley r268622 : added a patch to improve handling of a font with bad graphite language feature tables #i93645# 2009-02-12 04:50:51 +0100 kstribley r267631 : #i93645# fix windows build for graphite 2.3.1 and remove unnecessary patch 2009-02-10 04:48:50 +0100 kstribley r267535 : #i93645# fix a build error with stlport on Ubuntu 8.10 x86 2009-02-10 03:51:10 +0100 kstribley r267534 : #i69129# remove legacy config_office 2009-02-07 19:12:54 +0100 kstribley r267482 : #i93645# upgrade to using silgraphite-2.3.1 2009-02-02 18:17:57 +0100 kstribley r267290 : #i69129# backout unwanted checkin 2009-02-02 17:44:03 +0100 kstribley r267281 : #i69129# backout erroneous update to aclocal.m4 2009-02-01 10:05:03 +0100 kstribley r267236 : #i69129# fix build error due to locale being added to set font attributes 2009-02-01 06:02:52 +0100 kstribley r267235 : #i69129# fix erroneous merge 2009-01-31 16:24:56 +0100 kstribley r267234 : #i69129# update configure.in solenv.in in their new locations with enable graphite 2009-01-31 10:53:18 +0100 kstribley r267232 : CWS-TOOLING: rebase CWS graphite01 to trunk@267171 (milestone: DEV300:m41) 2008-12-17 04:17:33 +0100 kstribley r265577 : #i93645# remove superfluous autoreconf check and autoconf patch 2008-12-16 10:07:20 +0100 rene r265529 : fix aclocal.m4 breakage 2008-12-16 05:13:29 +0100 kstribley r265520 : #i93645# change to autoconf && configure 2008-12-16 04:39:48 +0100 kstribley r265519 : #i93645# modified LD_FLAGS so that system graphite isn't pulled in by accident and fixed autoconf problem 2008-12-15 14:16:25 +0100 rene r265497 : check for working STL 2008-12-15 12:53:39 +0100 rene r265473 : revert broken check 2008-12-15 11:59:21 +0100 kstribley r265472 : #i93645# added check for system STL, since this is a requirement for system graphite to work correctly and moved the position of the check further down 2008-12-15 11:55:34 +0100 kstribley r265471 : #i93645# remove references to gr3ooo to allow system graphite to be used 2008-12-12 18:48:18 +0100 rene r265437 : fix link for system-graphite 2008-12-12 18:46:45 +0100 rene r265436 : the tarball is in graphite, remove obsolete check 2008-12-12 18:22:22 +0100 rene r265433 : typo; re-autoconf 2008-12-12 17:35:26 +0100 rene r265432 : actually implement SYSTEM_GRAPHIT checks (as already checked for in makefile.mks) but remove the checks in graphit itself and move to BUILD_TYPE 2008-12-12 08:08:33 +0100 kstribley r265387 : #i69129# 2 of the patched files need windows line endings so patch works on linux as well as windows 2008-12-12 08:04:41 +0100 kstribley r265386 : #i69129# rtl fallback fix which prevents caching of segments with fallback 2008-12-08 04:28:12 +0100 kstribley r264969 : results of running autoconf with graphite config changes #i69129# 2008-12-05 08:12:47 +0100 kstribley r264886 : backout unintential change at r264884 2008-12-05 06:26:33 +0100 kstribley r264884 : #i96925# fixes for uniscribe fallback 2008-12-05 06:11:37 +0100 kstribley r264883 : #i69129# improvements to windows graphite code, including caching of sila table lookup 2008-12-02 13:28:51 +0100 kstribley r264694 : #i93645# add graphite library and append to patch 2008-11-27 06:47:10 +0100 kstribley r264445 : #69129# fix rtl loop bug and rtl caching problem 2008-11-27 06:42:20 +0100 kstribley r264444 : add caching for GraphiteFontAdaptor 2008-11-14 15:57:03 +0100 kstribley r263681 : #69129# add graphite addtional files from cvs 2008-11-14 15:54:47 +0100 kstribley r263680 : #69129# fix for modified resolution api 2008-11-13 16:24:09 +0100 kstribley r263652 : #69129# add skeleton to build graphite module library 2008-11-13 16:22:19 +0100 kstribley r263651 : #69129# add skeleton to build graphite module library 2008-11-13 16:16:10 +0100 kstribley r263650 : #69129# migrate from cvs 2008-11-13 15:26:54 +0100 kstribley r263646 : #69129# add a module for the graphite library
2009-08-17 14:12:14 +00:00
}
}
else
{
2010-10-05 20:01:23 +02:00
aScriptChg.push_back( nChg );
CWS-TOOLING: integrate CWS graphite01 2009-08-06 11:09:01 +0200 hdu r274708 : #i10000# fix build breaker for SYSTEM_GRAPHITE=NO 2009-07-21 12:01:52 +0200 hdu r274174 : #i93645# fix include files for EXT_USE_STLPORT 2009-07-21 11:51:07 +0200 hdu r274173 : #i93645# convert line-endings of files to be patched 2009-07-21 10:49:01 +0200 hdu r274170 : #i93645# adjust makefile.vc8 for HH-RelEng env (thanks ause) 2009-07-20 05:21:32 +0200 kstribley r274105 : attempt to fix Windows build error caused by NULL variable in nmake file 2009-07-16 10:22:36 +0200 hdu r274032 : #i69129# also use solar minor version to find graphite lib 2009-07-16 05:36:06 +0200 kstribley r274029 : allow windows build to have Graphite disabled with SAL_DISABLE_GRAPHITE 2009-07-15 13:59:22 +0200 hdu r274011 : #i69129# default to ENABLE_GRAPHITE=TRUE 2009-07-15 13:19:54 +0200 hdu r274008 : #i93645# ignore compile warnings for graphite 2009-07-15 13:18:25 +0200 hdu r274006 : #i93645# stlport needs libmath, use solar minor version to find matching libs 2009-07-15 09:21:13 +0200 hdu r273989 : #i100000# avoid compile warning 2009-07-14 12:19:08 +0200 hdu r273963 : CWS-TOOLING: rebase CWS graphite01 to trunk@273858 (milestone: DEV300:m52) 2009-07-13 06:54:56 +0200 kstribley r273912 : change to use standard file headers 2009-07-13 05:39:14 +0200 kstribley r273911 : Remove unnecessary change to configure.in as reported by Rene 2009-07-10 16:58:44 +0200 hdu r273902 : #i100000# fix compile for precompiled-header support 2009-07-02 13:48:26 +0200 kstribley r273647 : #69129# fix a graphite bug which could crash with fonts containing obscure GDL positioning rules 2009-07-02 01:44:02 +0200 rene r273616 : #i10000# we need to link with -licuuc 2009-07-01 04:02:20 +0200 kstribley r273540 : restore missing sdf files from base 2009-07-01 04:01:40 +0200 kstribley r273539 : restore missing sdf files from base 2009-07-01 04:01:12 +0200 kstribley r273538 : restore missing sdf files from base 2009-07-01 03:59:41 +0200 kstribley r273537 : restore missing sdf files from base 2009-06-29 10:16:51 +0200 kstribley r273456 : #i69129# fixes a bug which caused occasional incorrect linebreaking when graphite is asked to render a part of a cluster not containing a base 2009-06-27 10:43:58 +0200 kstribley r273445 : #i69129# added kashida support for justified RTL text 2009-06-01 12:57:06 +0200 kstribley r272476 : CWS-TOOLING: rebase CWS graphite01 to trunk@272291 (milestone: DEV300:m49) 2009-05-26 10:50:06 +0200 kstribley r272286 : #i69129# fixes a build error when NDEBUG is not defined 2009-05-25 13:14:06 +0200 kstribley r272237 : #i69129# enable debugging by fixing compile warnings 2009-05-25 13:07:47 +0200 kstribley r272234 : #i69129# added env variable to disable GRAPHITE at run time on linux and fixed a bug with a rare attachment sequence 2009-04-20 17:39:25 +0200 kstribley r271001 : CWS-TOOLING: rebase CWS graphite01 to trunk@270723 (milestone: DEV300:m46) 2009-04-18 07:11:33 +0200 kstribley r270957 : #i101178# attempt to fix buildbot builds by reordering configure.in 2009-04-14 17:37:07 +0200 kstribley r270801 : #i93645# tweak configure to enable graphite by default on windows and linux to assist testing with tinderbox build 2009-04-14 16:33:17 +0200 kstribley r270796 : #i96925# another fix for rtl fallback and add optional debug info in MultiSalLayout 2009-04-08 13:27:55 +0200 kstribley r270641 : #i69129# fix features after a bad merge 2009-04-08 13:26:34 +0200 kstribley r270640 : #i69129# add a patch for WinFont 2009-03-24 12:37:54 +0100 kstribley r269937 : #i69129# fix build error due to locale being included in method for features 2009-03-24 12:36:10 +0100 kstribley r269936 : #i93645# change patch variable and fix configure 2009-03-20 04:18:56 +0100 kstribley r269776 : CWS-TOOLING: rebase CWS graphite01 to trunk@269297 (milestone: DEV300:m43) 2009-03-01 13:10:59 +0100 kstribley r268622 : added a patch to improve handling of a font with bad graphite language feature tables #i93645# 2009-02-12 04:50:51 +0100 kstribley r267631 : #i93645# fix windows build for graphite 2.3.1 and remove unnecessary patch 2009-02-10 04:48:50 +0100 kstribley r267535 : #i93645# fix a build error with stlport on Ubuntu 8.10 x86 2009-02-10 03:51:10 +0100 kstribley r267534 : #i69129# remove legacy config_office 2009-02-07 19:12:54 +0100 kstribley r267482 : #i93645# upgrade to using silgraphite-2.3.1 2009-02-02 18:17:57 +0100 kstribley r267290 : #i69129# backout unwanted checkin 2009-02-02 17:44:03 +0100 kstribley r267281 : #i69129# backout erroneous update to aclocal.m4 2009-02-01 10:05:03 +0100 kstribley r267236 : #i69129# fix build error due to locale being added to set font attributes 2009-02-01 06:02:52 +0100 kstribley r267235 : #i69129# fix erroneous merge 2009-01-31 16:24:56 +0100 kstribley r267234 : #i69129# update configure.in solenv.in in their new locations with enable graphite 2009-01-31 10:53:18 +0100 kstribley r267232 : CWS-TOOLING: rebase CWS graphite01 to trunk@267171 (milestone: DEV300:m41) 2008-12-17 04:17:33 +0100 kstribley r265577 : #i93645# remove superfluous autoreconf check and autoconf patch 2008-12-16 10:07:20 +0100 rene r265529 : fix aclocal.m4 breakage 2008-12-16 05:13:29 +0100 kstribley r265520 : #i93645# change to autoconf && configure 2008-12-16 04:39:48 +0100 kstribley r265519 : #i93645# modified LD_FLAGS so that system graphite isn't pulled in by accident and fixed autoconf problem 2008-12-15 14:16:25 +0100 rene r265497 : check for working STL 2008-12-15 12:53:39 +0100 rene r265473 : revert broken check 2008-12-15 11:59:21 +0100 kstribley r265472 : #i93645# added check for system STL, since this is a requirement for system graphite to work correctly and moved the position of the check further down 2008-12-15 11:55:34 +0100 kstribley r265471 : #i93645# remove references to gr3ooo to allow system graphite to be used 2008-12-12 18:48:18 +0100 rene r265437 : fix link for system-graphite 2008-12-12 18:46:45 +0100 rene r265436 : the tarball is in graphite, remove obsolete check 2008-12-12 18:22:22 +0100 rene r265433 : typo; re-autoconf 2008-12-12 17:35:26 +0100 rene r265432 : actually implement SYSTEM_GRAPHIT checks (as already checked for in makefile.mks) but remove the checks in graphit itself and move to BUILD_TYPE 2008-12-12 08:08:33 +0100 kstribley r265387 : #i69129# 2 of the patched files need windows line endings so patch works on linux as well as windows 2008-12-12 08:04:41 +0100 kstribley r265386 : #i69129# rtl fallback fix which prevents caching of segments with fallback 2008-12-08 04:28:12 +0100 kstribley r264969 : results of running autoconf with graphite config changes #i69129# 2008-12-05 08:12:47 +0100 kstribley r264886 : backout unintential change at r264884 2008-12-05 06:26:33 +0100 kstribley r264884 : #i96925# fixes for uniscribe fallback 2008-12-05 06:11:37 +0100 kstribley r264883 : #i69129# improvements to windows graphite code, including caching of sila table lookup 2008-12-02 13:28:51 +0100 kstribley r264694 : #i93645# add graphite library and append to patch 2008-11-27 06:47:10 +0100 kstribley r264445 : #69129# fix rtl loop bug and rtl caching problem 2008-11-27 06:42:20 +0100 kstribley r264444 : add caching for GraphiteFontAdaptor 2008-11-14 15:57:03 +0100 kstribley r263681 : #69129# add graphite addtional files from cvs 2008-11-14 15:54:47 +0100 kstribley r263680 : #69129# fix for modified resolution api 2008-11-13 16:24:09 +0100 kstribley r263652 : #69129# add skeleton to build graphite module library 2008-11-13 16:22:19 +0100 kstribley r263651 : #69129# add skeleton to build graphite module library 2008-11-13 16:16:10 +0100 kstribley r263650 : #69129# migrate from cvs 2008-11-13 15:26:54 +0100 kstribley r263646 : #69129# add a module for the graphite library
2009-08-17 14:12:14 +00:00
}
aScriptType.Insert( nScript, nCnt );
aTextWidth.Insert( ULONG(0), nCnt++ );
if( nChg < aText.Len() )
nScript = xBreak->getScriptType( aText, nChg );
else
break;
} while( TRUE );
}
}
/*-----------------19.7.2001 08:48------------------
* Size FontPrevWin_Impl::CalcTextSize(..)
* fills the aTextWidth array with the text width of every part
* of the actual string without a script change inside.
* For Latin parts the given rFont will be used,
* for Asian parts the aCJKFont.
* The returned size contains the whole string.
* The member nAscent is calculated to the maximal ascent of all used fonts.
* --------------------------------------------------*/
Size FontPrevWin_Impl::CalcTextSize( OutputDevice* pWin, OutputDevice* _pPrinter,
SvxFont &rFont )
{
USHORT nScript;
USHORT nIdx = 0;
xub_StrLen nStart = 0;
xub_StrLen nEnd;
2010-10-05 20:01:23 +02:00
size_t nCnt = aScriptChg.size();
if( nCnt )
{
nEnd = aScriptChg[ nIdx ];
nScript = aScriptType[ nIdx ];
}
else
{
nEnd = aText.Len();
nScript = com::sun::star::i18n::ScriptType::LATIN;
}
long nTxtWidth = 0;
long nCJKHeight = 0;
2002-08-13 07:42:53 +00:00
long nCTLHeight = 0;
long nHeight = 0;
nAscent = 0;
long nCJKAscent = 0;
2002-08-13 07:42:53 +00:00
long nCTLAscent = 0;
do
{
SvxFont& rFnt = (nScript==com::sun::star::i18n::ScriptType::ASIAN) ? aCJKFont : ((nScript==com::sun::star::i18n::ScriptType::COMPLEX) ? aCTLFont : rFont);
ULONG nWidth = rFnt.GetTxtSize( _pPrinter, aText, nStart, nEnd-nStart ).
Width();
aTextWidth[ nIdx++ ] = nWidth;
nTxtWidth += nWidth;
2002-08-13 07:42:53 +00:00
switch(nScript)
{
case com::sun::star::i18n::ScriptType::ASIAN:
2002-08-13 07:42:53 +00:00
calcFontHeightAnyAscent(pWin,aCJKFont,nCJKHeight,nCJKAscent);
break;
case com::sun::star::i18n::ScriptType::COMPLEX:
2002-08-13 07:42:53 +00:00
calcFontHeightAnyAscent(pWin,aCTLFont,nCTLHeight,nCTLAscent);
break;
default:
calcFontHeightAnyAscent(pWin,rFont,nHeight,nAscent);
}
2002-08-13 07:42:53 +00:00
if( nEnd < aText.Len() && nIdx < nCnt )
{
nStart = nEnd;
nEnd = aScriptChg[ nIdx ];
nScript = aScriptType[ nIdx ];
}
else
break;
}
while( TRUE );
nHeight -= nAscent;
nCJKHeight -= nCJKAscent;
2002-08-13 07:42:53 +00:00
nCTLHeight -= nCTLAscent;
if( nHeight < nCJKHeight )
nHeight = nCJKHeight;
if( nAscent < nCJKAscent )
nAscent = nCJKAscent;
2002-08-13 07:42:53 +00:00
if( nHeight < nCTLHeight )
nHeight = nCTLHeight;
if( nAscent < nCTLAscent )
nAscent = nCTLAscent;
nHeight += nAscent;
Size aTxtSize( nTxtWidth, nHeight );
return aTxtSize;
}
/*-----------------19.7.2001 08:54------------------
* void FontPrevWin_Impl::DrawPrev(..)
* calls SvxFont::DrawPrev(..) for every part of the string without a script
* change inside, for Asian parts the aCJKFont will be used, otherwise the
* given rFont.
* --------------------------------------------------*/
void FontPrevWin_Impl::DrawPrev( OutputDevice* pWin, Printer* _pPrinter,
Point &rPt, SvxFont &rFont )
{
Font aOldFont = _pPrinter->GetFont();
USHORT nScript;
USHORT nIdx = 0;
xub_StrLen nStart = 0;
xub_StrLen nEnd;
2010-10-05 20:01:23 +02:00
size_t nCnt = aScriptChg.size();
if( nCnt )
{
nEnd = aScriptChg[ nIdx ];
nScript = aScriptType[ nIdx ];
}
else
{
nEnd = aText.Len();
nScript = com::sun::star::i18n::ScriptType::LATIN;
}
do
{
SvxFont& rFnt = (nScript==com::sun::star::i18n::ScriptType::ASIAN) ? aCJKFont : ((nScript==com::sun::star::i18n::ScriptType::COMPLEX) ? aCTLFont : rFont);
_pPrinter->SetFont( rFnt );
rFnt.DrawPrev( pWin, _pPrinter, rPt, aText, nStart, nEnd - nStart );
rPt.X() += aTextWidth[ nIdx++ ];
if( nEnd < aText.Len() && nIdx < nCnt )
{
nStart = nEnd;
nEnd = aScriptChg[ nIdx ];
nScript = aScriptType[ nIdx ];
}
else
break;
}
while( TRUE );
_pPrinter->SetFont( aOldFont );
}
// -----------------------------------------------------------------------
BOOL FontPrevWin_Impl::SetFontWidthScale( UINT16 nScale )
{
if( nFontWidthScale != nScale )
{
nFontWidthScale = nScale;
return TRUE;
}
return FALSE;
}
2002-08-13 07:42:53 +00:00
// -----------------------------------------------------------------------
void FontPrevWin_Impl::ScaleFontWidth( const OutputDevice& rOutDev )
{
if( !Is100PercentFontWidthValid() )
{
2002-08-13 07:42:53 +00:00
scaleFontWidth(aFont,rOutDev,n100PercentFontWidth);
scaleFontWidth(aCJKFont,rOutDev,n100PercentFontWidthCJK);
scaleFontWidth(aCTLFont,rOutDev,n100PercentFontWidthCTL);
}
aFont.SetWidth( n100PercentFontWidth * nFontWidthScale / 100 );
aCJKFont.SetWidth( n100PercentFontWidthCJK * nFontWidthScale / 100 );
2002-08-13 07:42:53 +00:00
aCTLFont.SetWidth( n100PercentFontWidthCTL * nFontWidthScale / 100 );
}
2000-09-18 16:07:07 +00:00
// class SvxFontPrevWindow -----------------------------------------------
void SvxFontPrevWindow::InitSettings( BOOL bForeground, BOOL bBackground )
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
if ( bForeground )
{
svtools::ColorConfig aColorConfig;
Color aTextColor( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor );
2000-09-18 16:07:07 +00:00
if ( IsControlForeground() )
aTextColor = GetControlForeground();
SetTextColor( aTextColor );
}
if ( bBackground )
{
if ( IsControlBackground() )
SetBackground( GetControlBackground() );
else
SetBackground( rStyleSettings.GetWindowColor() );
}
Invalidate();
}
// -----------------------------------------------------------------------
SvxFontPrevWindow::SvxFontPrevWindow( Window* pParent, const ResId& rId ) :
Window ( pParent, rId )
2000-09-18 16:07:07 +00:00
{
pImpl = new FontPrevWin_Impl;
SfxViewShell* pSh = SfxViewShell::Current();
if ( pSh )
pImpl->pPrinter = pSh->GetPrinter();
2000-09-18 16:07:07 +00:00
if ( !pImpl->pPrinter )
2000-09-18 16:07:07 +00:00
{
pImpl->pPrinter = new Printer;
pImpl->bDelPrinter = TRUE;
2000-09-18 16:07:07 +00:00
}
SetMapMode( MapMode( MAP_TWIP ) );
2002-08-13 07:42:53 +00:00
initFont(pImpl->aFont);
initFont(pImpl->aCJKFont);
initFont(pImpl->aCTLFont);
2000-09-18 16:07:07 +00:00
InitSettings( TRUE, TRUE );
2001-05-16 10:52:02 +00:00
SetBorderStyle( WINDOW_BORDER_MONO );
LanguageType eLanguage = Application::GetSettings().GetUILanguage();
switch( eLanguage )
{
case LANGUAGE_CHINESE:
case LANGUAGE_JAPANESE:
case LANGUAGE_KOREAN:
case LANGUAGE_KOREAN_JOHAB:
case LANGUAGE_CHINESE_SIMPLIFIED:
case LANGUAGE_CHINESE_HONGKONG:
case LANGUAGE_CHINESE_SINGAPORE:
case LANGUAGE_CHINESE_MACAU:
case LANGUAGE_CHINESE_TRADITIONAL:
pImpl->bIsCJKUI = sal_True;
break;
// TODO: CTL Locale
// pImpl->bIsCTLUI = sal_True;
// break;
default:
pImpl->bIsCJKUI = pImpl->bIsCTLUI = sal_False;
break;
}
2000-09-18 16:07:07 +00:00
}
// -----------------------------------------------------------------------
SvxFontPrevWindow::~SvxFontPrevWindow()
{
delete pImpl;
2000-09-18 16:07:07 +00:00
}
2002-08-13 07:42:53 +00:00
// -----------------------------------------------------------------------
SvxFont& SvxFontPrevWindow::GetCTLFont()
{
return pImpl->aCTLFont;
}
2000-09-18 16:07:07 +00:00
// -----------------------------------------------------------------------
SvxFont& SvxFontPrevWindow::GetCJKFont()
{
return pImpl->aCJKFont;
}
// -----------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SvxFontPrevWindow::StateChanged( StateChangedType nType )
{
if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
InitSettings( TRUE, FALSE );
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
InitSettings( FALSE, TRUE );
Window::StateChanged( nType );
}
// -----------------------------------------------------------------------
void SvxFontPrevWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
InitSettings( TRUE, TRUE );
else
Window::DataChanged( rDCEvt );
}
SvxFont& SvxFontPrevWindow::GetFont()
{
pImpl->Invalidate100PercentFontWidth(); // because the user might change the size
return pImpl->aFont;
}
const SvxFont& SvxFontPrevWindow::GetFont() const
{
return pImpl->aFont;
}
2000-09-18 16:07:07 +00:00
// -----------------------------------------------------------------------
void SvxFontPrevWindow::SetPreviewText( const ::rtl::OUString& rString )
{
pImpl->aText = rString;
pImpl->bTextInited = TRUE;
}
// -----------------------------------------------------------------------
void SvxFontPrevWindow::SetFontNameAsPreviewText()
{
pImpl->bUseFontNameAsText = TRUE;
}
// -----------------------------------------------------------------------
2002-08-06 07:51:00 +00:00
void SvxFontPrevWindow::SetFont( const SvxFont& rOutFont )
2000-09-18 16:07:07 +00:00
{
2002-08-13 07:42:53 +00:00
setFont( rOutFont, pImpl->aFont );
2002-08-06 07:51:00 +00:00
pImpl->Invalidate100PercentFontWidth();
2002-08-06 07:51:00 +00:00
Invalidate();
}
// -----------------------------------------------------------------------
2002-08-13 07:42:53 +00:00
void SvxFontPrevWindow::SetFont( const SvxFont& rNormalOutFont, const SvxFont& rCJKOutFont, const SvxFont& rCTLFont )
2002-08-06 07:51:00 +00:00
{
2002-08-13 07:42:53 +00:00
setFont( rNormalOutFont, pImpl->aFont );
setFont( rCJKOutFont, pImpl->aCJKFont );
setFont( rCTLFont, pImpl->aCTLFont );
2002-08-06 07:51:00 +00:00
pImpl->Invalidate100PercentFontWidth();
Invalidate();
}
// -----------------------------------------------------------------------
void SvxFontPrevWindow::SetCJKFont( const SvxFont &rCJKOutFont )
{
2002-08-13 07:42:53 +00:00
setFont( rCJKOutFont, pImpl->aCJKFont );
pImpl->Invalidate100PercentFontWidth();
Invalidate();
}
// -----------------------------------------------------------------------------
void SvxFontPrevWindow::SetCTLFont( const SvxFont &rCTLOutFont )
{
setFont( rCTLOutFont, pImpl->aCTLFont );
2002-08-06 07:51:00 +00:00
pImpl->Invalidate100PercentFontWidth();
2000-09-18 16:07:07 +00:00
Invalidate();
}
// -----------------------------------------------------------------------
void SvxFontPrevWindow::SetColor(const Color &rColor)
{
delete pImpl->pColor;
pImpl->pColor = new Color( rColor );
Invalidate();
}
CWS-TOOLING: integrate CWS os132 2009-07-21 15:24:18 +0200 os r274201 : #i103696# SwXTextPortion/SwXParagraph excluded 2009-07-15 13:19:17 +0200 os r274007 : #i103564# typo 2009-07-15 13:09:30 +0200 os r274005 : #i103564# SwFrames::hasElements 2009-07-15 13:02:16 +0200 os r274003 : #i103564# SwXBookmark::getPropertySetInfo fixed 2009-06-26 10:11:00 +0200 os r273395 : CWS-TOOLING: rebase CWS os132 to trunk@272827 (milestone: DEV300:m50) 2009-06-23 08:52:24 +0200 os r273256 : #i102764# patch: attribute ListBoxes correctly handled in ::Reset() 2009-06-23 08:51:31 +0200 os r273255 : #i102764# ResetColor() added to remove background color 2009-06-22 14:57:38 +0200 os r273233 : #i102619# prevent access to already destroyed shell 2009-06-18 13:26:51 +0200 os r273112 : #i99508# ::insertTextContent: re-route to ::attach() 2009-06-18 10:59:53 +0200 os r273107 : #i85405# patch to enable 'Print grid' CheckBox correctly 2009-06-18 10:54:02 +0200 os r273106 : #i85133# dispose connection in GetColumnFmt to prevent connection locking 2009-06-18 10:24:31 +0200 os r273104 : #99535# ExportGraphic changed 2009-06-18 10:24:03 +0200 os r273103 : #99535# ExportGraphic changed 2009-06-18 10:23:11 +0200 os r273102 : #i102841# redlining mode switches to insert mode (cmc) 2009-06-17 14:05:42 +0200 os r273070 : #i102111# do not save already saved HTML documents before switching to source veiw 2009-06-17 13:18:20 +0200 os r273063 : #i101825# set rembered start position at the real start not at the initial start 2009-06-17 08:24:10 +0200 os r273048 : #99535# no dierect access to the file picker interface 2009-06-16 15:00:12 +0200 os r273020 : #i99937# notification of user options changes re-introduced 2009-06-15 14:36:03 +0200 os r272987 : #i98032# unreplaced text in protected areas must not be attributed either 2009-06-15 14:20:26 +0200 os r272985 : #i98032# replace list has to be initialised 2009-06-04 13:29:02 +0200 os r272624 : #i97810# set focus into column page 2009-06-04 11:01:14 +0200 os r272617 : #i98164# dialog resize to ease localisation 2009-06-04 10:59:44 +0200 os r272616 : #i98164# dialog resize to ease localisation 2009-05-28 16:05:03 +0200 os r272413 : #i98172# ConvertFieldsToText: take care of tabs with attributes 2009-05-28 11:12:45 +0200 os r272385 : #i59361# dialog controls resized 2009-05-28 11:03:14 +0200 os r272383 : #i59174# dialog controls moved
2009-08-06 12:44:16 +00:00
// -----------------------------------------------------------------------
void SvxFontPrevWindow::ResetColor()
{
delete pImpl->pColor;
pImpl->pColor = 0;
Invalidate();
}
2000-09-18 16:07:07 +00:00
// -----------------------------------------------------------------------
void SvxFontPrevWindow::SetBackColor(const Color &rColor)
{
delete pImpl->pBackColor;
pImpl->pBackColor = new Color( rColor );
Invalidate();
}
// -----------------------------------------------------------------------
2000-09-18 16:07:07 +00:00
void SvxFontPrevWindow::UseResourceText( BOOL bUse )
{
pImpl->bUseResText = bUse;
}
// -----------------------------------------------------------------------
void SvxFontPrevWindow::Paint( const Rectangle& )
2000-09-18 16:07:07 +00:00
{
Printer* pPrinter = pImpl->pPrinter;
SvxFont& rFont = pImpl->aFont;
SvxFont& rCJKFont = pImpl->aCJKFont;
// TODO: SvxFont& rCTLFont = pImpl->aCTLFont;
2000-09-18 16:07:07 +00:00
if ( pImpl->bUseResText )
pImpl->aText = GetText();
else if ( !pImpl->bSelection && !pImpl->bTextInited )
2000-09-18 16:07:07 +00:00
{
SfxViewShell* pSh = SfxViewShell::Current();
if ( pSh && !pImpl->bGetSelection && !pImpl->bUseFontNameAsText )
2000-09-18 16:07:07 +00:00
{
pImpl->aText = pSh->GetSelectionText();
pImpl->bGetSelection = TRUE;
pImpl->bSelection = pImpl->aText.Len() != 0;
2000-09-18 16:07:07 +00:00
}
if ( !pImpl->bSelection || pImpl->bUseFontNameAsText )
{
pImpl->aText = rFont.GetName();
if( pImpl->bIsCJKUI )
pImpl->aText += rCJKFont.GetName();
//TODO bIsCTLUI
}
2000-09-18 16:07:07 +00:00
if ( !pImpl->aText.Len() )
pImpl->aText = GetText();
// remove line feeds and carriage returns from string
bool bNotEmpty = false;
for ( xub_StrLen i = 0; i < pImpl->aText.Len(); ++i )
{
if ( 0xa == pImpl->aText.GetChar( i ) ||
0xd == pImpl->aText.GetChar( i ) )
pImpl->aText.SetChar( i, ' ' );
else
bNotEmpty = true;
}
if ( !bNotEmpty )
pImpl->aText = GetText();
2000-09-18 16:07:07 +00:00
2002-08-13 07:42:53 +00:00
if ( pImpl->aText.Len() > (TEXT_WIDTH-1) )
pImpl->aText.Erase( pImpl->aText.Search( sal_Unicode( ' ' ), TEXT_WIDTH ) );
2000-09-18 16:07:07 +00:00
}
// calculate text width scaling
pImpl->ScaleFontWidth( *this/*, rFont*/ );
pImpl->CheckScript();
Size aTxtSize = pImpl->CalcTextSize( this, pPrinter, rFont );
2000-09-18 16:07:07 +00:00
const Size aLogSize( GetOutputSize() );
long nX = aLogSize.Width() / 2 - aTxtSize.Width() / 2;
long nY = aLogSize.Height() / 2 - aTxtSize.Height() / 2;
if ( nY + pImpl->nAscent > aLogSize.Height() )
nY = aLogSize.Height() - pImpl->nAscent;
2000-09-18 16:07:07 +00:00
if ( pImpl->pBackColor )
{
Rectangle aRect( Point( 0, 0 ), aLogSize );
Color aLineCol = GetLineColor();
Color aFillCol = GetFillColor();
SetLineColor();
SetFillColor( *pImpl->pBackColor );
DrawRect( aRect );
SetLineColor( aLineCol );
SetFillColor( aFillCol );
}
2000-09-18 16:07:07 +00:00
if ( pImpl->pColor )
{
Rectangle aRect( Point( nX, nY ), aTxtSize );
Color aLineCol = GetLineColor();
Color aFillCol = GetFillColor();
SetLineColor();
SetFillColor( *pImpl->pColor );
DrawRect( aRect );
SetLineColor( aLineCol );
SetFillColor( aFillCol );
}
long nStdAscent = pImpl->nAscent;
2000-12-04 14:34:19 +00:00
nY += nStdAscent;
if(pImpl->bTwoLines)
{
SvxFont aSmallFont( rFont );
2002-08-13 07:42:53 +00:00
Size aOldSize = pImpl->aCJKFont.GetSize();
setFontSize(aSmallFont);
setFontSize(pImpl->aCJKFont);
2000-12-04 14:34:19 +00:00
long nStartBracketWidth = 0;
long nEndBracketWidth = 0;
long nTextWidth = 0;
if(pImpl->cStartBracket)
{
String sBracket(pImpl->cStartBracket);
nStartBracketWidth = rFont.GetTxtSize( pPrinter, sBracket ).Width();
2000-12-04 14:34:19 +00:00
}
if(pImpl->cEndBracket)
{
String sBracket(pImpl->cEndBracket);
nEndBracketWidth = rFont.GetTxtSize( pPrinter, sBracket ).Width();
2000-12-04 14:34:19 +00:00
}
nTextWidth = pImpl->CalcTextSize( this, pPrinter, aSmallFont ).Width();
2000-12-04 14:34:19 +00:00
long nResultWidth = nStartBracketWidth;
nResultWidth += nEndBracketWidth;
nResultWidth += nTextWidth;
long _nX = (aLogSize.Width() - nResultWidth) / 2;
DrawLine( Point( 0, nY ), Point( _nX, nY ) );
DrawLine( Point( _nX + nResultWidth, nY ), Point( aLogSize.Width(), nY ) );
2000-12-04 14:34:19 +00:00
long nSmallAscent = pImpl->nAscent;
2000-12-04 14:34:19 +00:00
long nOffset = (nStdAscent - nSmallAscent ) / 2;
if(pImpl->cStartBracket)
{
String sBracket(pImpl->cStartBracket);
rFont.DrawPrev( this, pPrinter, Point( _nX, nY - nOffset - 4), sBracket );
_nX += nStartBracketWidth;
2000-12-04 14:34:19 +00:00
}
Point aTmpPoint1( _nX, nY - nSmallAscent - 2 );
Point aTmpPoint2( _nX, nY );
2001-10-12 12:00:07 +00:00
pImpl->DrawPrev( this, pPrinter, aTmpPoint1, aSmallFont );
pImpl->DrawPrev( this, pPrinter, aTmpPoint2, aSmallFont );
2000-12-04 14:34:19 +00:00
_nX += nTextWidth;
2000-12-04 14:34:19 +00:00
if(pImpl->cEndBracket)
{
Point aTmpPoint( _nX + 1, nY - nOffset - 4);
2000-12-04 14:34:19 +00:00
String sBracket(pImpl->cEndBracket);
2001-10-12 12:00:07 +00:00
rFont.DrawPrev( this, pPrinter, aTmpPoint, sBracket );
2000-12-04 14:34:19 +00:00
}
2002-08-13 07:42:53 +00:00
pImpl->aCJKFont.SetSize( aOldSize );
2000-12-04 14:34:19 +00:00
}
else
{
Color aLineCol = GetLineColor();
SetLineColor( rFont.GetColor() );
2000-12-04 14:34:19 +00:00
DrawLine( Point( 0, nY ), Point( nX, nY ) );
DrawLine( Point( nX + aTxtSize.Width(), nY ), Point( aLogSize.Width(), nY ) );
SetLineColor( aLineCol );
2001-10-12 12:00:07 +00:00
Point aTmpPoint( nX, nY );
pImpl->DrawPrev( this, pPrinter, aTmpPoint, rFont );
2000-12-04 14:34:19 +00:00
}
2000-09-18 16:07:07 +00:00
}
2000-12-04 14:34:19 +00:00
/* -----------------------------04.12.00 16:26--------------------------------
2000-09-18 16:07:07 +00:00
2000-12-04 14:34:19 +00:00
---------------------------------------------------------------------------*/
BOOL SvxFontPrevWindow::IsTwoLines() const
{
return pImpl->bTwoLines;
}
/* -----------------------------04.12.00 16:26--------------------------------
---------------------------------------------------------------------------*/
void SvxFontPrevWindow::SetTwoLines(BOOL bSet)
{
pImpl->bTwoLines = bSet;}
/* -----------------------------04.12.00 16:26--------------------------------
---------------------------------------------------------------------------*/
void SvxFontPrevWindow::SetBrackets(sal_Unicode cStart, sal_Unicode cEnd)
{
pImpl->cStartBracket = cStart;
pImpl->cEndBracket = cEnd;
}
2000-09-18 16:07:07 +00:00
// -----------------------------------------------------------------------
void SvxFontPrevWindow::SetFontWidthScale( UINT16 n )
{
if( pImpl->SetFontWidthScale( n ) )
Invalidate();
}
// -----------------------------------------------------------------------
void SvxFontPrevWindow::AutoCorrectFontColor( void )
{
Color aFontColor( GetTextColor() );
if( COL_AUTO == pImpl->aFont.GetColor().GetColor() )
pImpl->aFont.SetColor( aFontColor );
if( COL_AUTO == pImpl->aCJKFont.GetColor().GetColor() )
pImpl->aCJKFont.SetColor( aFontColor );
2002-08-13 07:42:53 +00:00
if( COL_AUTO == pImpl->aCTLFont.GetColor().GetColor() )
pImpl->aCTLFont.SetColor( aFontColor );
}