2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2011-03-31 10:05:04 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2001-09-27 16:23:38 +00:00
|
|
|
#include <hintids.hxx>
|
|
|
|
|
2012-06-21 17:39:01 +01:00
|
|
|
#include <com/sun/star/i18n/ScriptType.hpp>
|
2000-11-20 08:16:31 +00:00
|
|
|
#include <vcl/outdev.hxx>
|
|
|
|
#include <unotools/localedatawrapper.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/unolingu.hxx>
|
2013-02-12 13:41:53 -05:00
|
|
|
#include <editeng/brushitem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/wrlmitem.hxx>
|
2013-02-12 13:41:53 -05:00
|
|
|
#include <editeng/blinkitem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/nhypitem.hxx>
|
|
|
|
#include <editeng/kernitem.hxx>
|
|
|
|
#include <editeng/cmapitem.hxx>
|
|
|
|
#include <editeng/langitem.hxx>
|
2013-02-12 13:41:53 -05:00
|
|
|
#include <editeng/escapementitem.hxx>
|
|
|
|
#include <editeng/autokernitem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/shdditem.hxx>
|
|
|
|
#include <editeng/charreliefitem.hxx>
|
2013-02-12 13:41:53 -05:00
|
|
|
#include <editeng/contouritem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/colritem.hxx>
|
2013-02-12 13:41:53 -05:00
|
|
|
#include <editeng/charsetcoloritem.hxx>
|
|
|
|
#include <editeng/crossedoutitem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/udlnitem.hxx>
|
|
|
|
#include <editeng/wghtitem.hxx>
|
|
|
|
#include <editeng/postitem.hxx>
|
|
|
|
#include <editeng/fhgtitem.hxx>
|
|
|
|
#include <editeng/fontitem.hxx>
|
2013-02-12 13:41:53 -05:00
|
|
|
#include <editeng/emphasismarkitem.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/charscaleitem.hxx>
|
|
|
|
#include <editeng/charrotateitem.hxx>
|
|
|
|
#include <editeng/twolinesitem.hxx>
|
|
|
|
#include <editeng/charhiddenitem.hxx>
|
2013-07-07 20:33:40 +02:00
|
|
|
#include <editeng/boxitem.hxx>
|
2013-08-21 21:30:41 +02:00
|
|
|
#include <editeng/shaditem.hxx>
|
2006-08-14 15:47:31 +00:00
|
|
|
#include <IDocumentSettingAccess.hxx>
|
2001-10-02 12:51:59 +00:00
|
|
|
#include <vcl/window.hxx>
|
2000-09-18 23:08:29 +00:00
|
|
|
#include <charatr.hxx>
|
2013-10-22 15:58:57 +03:00
|
|
|
#include <viewsh.hxx>
|
2001-09-27 16:23:38 +00:00
|
|
|
#include <swfont.hxx>
|
2013-10-22 15:58:57 +03:00
|
|
|
#include <fntcache.hxx>
|
|
|
|
#include <txtfrm.hxx>
|
2003-10-30 09:21:39 +00:00
|
|
|
#include <scriptinfo.hxx>
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
// global Variable
|
|
|
|
SvStatistics g_SvStat;
|
2000-09-18 23:08:29 +00:00
|
|
|
#endif
|
|
|
|
|
2007-09-27 08:27:11 +00:00
|
|
|
using namespace ::com::sun::star;
|
2001-12-12 11:47:19 +00:00
|
|
|
|
2014-04-21 19:28:47 -04:00
|
|
|
// Hintergrundbrush setzen, z.B. bei Zeichenvorlagen
|
2000-09-18 23:08:29 +00:00
|
|
|
void SwFont::SetBackColor( Color* pNewColor )
|
|
|
|
{
|
|
|
|
delete pBackColor;
|
|
|
|
pBackColor = pNewColor;
|
2014-04-25 14:00:35 +02:00
|
|
|
bFntChg = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
|
|
|
|
}
|
|
|
|
|
2013-07-07 20:33:40 +02:00
|
|
|
void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder )
|
|
|
|
{
|
|
|
|
if( pTopBorder )
|
2013-07-08 17:16:13 +02:00
|
|
|
m_aTopBorder = *pTopBorder;
|
2013-07-07 20:33:40 +02:00
|
|
|
else
|
2013-08-06 10:58:09 +02:00
|
|
|
{
|
2013-07-08 17:16:13 +02:00
|
|
|
m_aTopBorder = boost::none;
|
2013-08-06 10:58:09 +02:00
|
|
|
m_nTopBorderDist = 0;
|
|
|
|
}
|
2014-04-25 14:00:35 +02:00
|
|
|
bFntChg = true;
|
2013-07-25 10:24:57 +02:00
|
|
|
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
|
2013-07-07 20:33:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder )
|
|
|
|
{
|
|
|
|
if( pBottomBorder )
|
2013-07-08 17:16:13 +02:00
|
|
|
m_aBottomBorder = *pBottomBorder;
|
2013-07-07 20:33:40 +02:00
|
|
|
else
|
2013-08-06 10:58:09 +02:00
|
|
|
{
|
2013-07-08 17:16:13 +02:00
|
|
|
m_aBottomBorder = boost::none;
|
2013-08-06 10:58:09 +02:00
|
|
|
m_nBottomBorderDist = 0;
|
|
|
|
}
|
2014-04-25 14:00:35 +02:00
|
|
|
bFntChg = true;
|
2013-07-25 10:24:57 +02:00
|
|
|
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
|
2013-07-07 20:33:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder )
|
|
|
|
{
|
|
|
|
if( pRightBorder )
|
2013-07-08 17:16:13 +02:00
|
|
|
m_aRightBorder = *pRightBorder;
|
2013-07-07 20:33:40 +02:00
|
|
|
else
|
2013-08-06 10:58:09 +02:00
|
|
|
{
|
2013-07-08 17:16:13 +02:00
|
|
|
m_aRightBorder = boost::none;
|
2013-08-06 10:58:09 +02:00
|
|
|
m_nRightBorderDist = 0;
|
|
|
|
}
|
2014-04-25 14:00:35 +02:00
|
|
|
bFntChg = true;
|
2013-07-25 10:24:57 +02:00
|
|
|
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
|
2013-07-07 20:33:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
|
|
|
|
{
|
|
|
|
if( pLeftBorder )
|
2013-07-08 17:16:13 +02:00
|
|
|
m_aLeftBorder = *pLeftBorder;
|
2013-07-07 20:33:40 +02:00
|
|
|
else
|
2013-08-06 10:58:09 +02:00
|
|
|
{
|
2013-07-08 17:16:13 +02:00
|
|
|
m_aLeftBorder = boost::none;
|
2013-08-06 10:58:09 +02:00
|
|
|
m_nLeftBorderDist = 0;
|
|
|
|
}
|
2014-04-25 14:00:35 +02:00
|
|
|
bFntChg = true;
|
2013-07-25 10:24:57 +02:00
|
|
|
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
|
2013-07-07 20:33:40 +02:00
|
|
|
}
|
|
|
|
|
2013-08-21 13:17:07 +02:00
|
|
|
const boost::optional<editeng::SvxBorderLine>&
|
|
|
|
SwFont::GetAbsTopBorder( const bool bVertLayout ) const
|
2013-07-30 15:39:03 +02:00
|
|
|
{
|
|
|
|
switch( GetOrientation( bVertLayout ) )
|
|
|
|
{
|
|
|
|
case 0 :
|
|
|
|
return m_aTopBorder;
|
|
|
|
break;
|
|
|
|
case 900 :
|
|
|
|
return m_aRightBorder;
|
|
|
|
break;
|
|
|
|
case 1800 :
|
|
|
|
return m_aBottomBorder;
|
|
|
|
break;
|
|
|
|
case 2700 :
|
|
|
|
return m_aLeftBorder;
|
|
|
|
break;
|
|
|
|
default :
|
|
|
|
assert(false);
|
|
|
|
return m_aTopBorder;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-21 13:17:07 +02:00
|
|
|
const boost::optional<editeng::SvxBorderLine>&
|
|
|
|
SwFont::GetAbsBottomBorder( const bool bVertLayout ) const
|
2013-07-30 15:39:03 +02:00
|
|
|
{
|
|
|
|
switch( GetOrientation( bVertLayout ) )
|
|
|
|
{
|
|
|
|
case 0 :
|
|
|
|
return m_aBottomBorder;
|
|
|
|
break;
|
|
|
|
case 900 :
|
|
|
|
return m_aLeftBorder;
|
|
|
|
break;
|
|
|
|
case 1800 :
|
|
|
|
return m_aTopBorder;
|
|
|
|
break;
|
|
|
|
case 2700 :
|
|
|
|
return m_aRightBorder;
|
|
|
|
break;
|
|
|
|
default :
|
|
|
|
assert(false);
|
|
|
|
return m_aBottomBorder;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-21 13:17:07 +02:00
|
|
|
const boost::optional<editeng::SvxBorderLine>&
|
|
|
|
SwFont::GetAbsLeftBorder( const bool bVertLayout ) const
|
2013-07-30 15:39:03 +02:00
|
|
|
{
|
|
|
|
switch( GetOrientation( bVertLayout ) )
|
|
|
|
{
|
|
|
|
case 0 :
|
|
|
|
return m_aLeftBorder;
|
|
|
|
break;
|
|
|
|
case 900 :
|
|
|
|
return m_aTopBorder;
|
|
|
|
break;
|
|
|
|
case 1800 :
|
|
|
|
return m_aRightBorder;
|
|
|
|
break;
|
|
|
|
case 2700 :
|
|
|
|
return m_aBottomBorder;
|
|
|
|
break;
|
|
|
|
default :
|
|
|
|
assert(false);
|
|
|
|
return m_aLeftBorder;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-21 13:17:07 +02:00
|
|
|
const boost::optional<editeng::SvxBorderLine>&
|
|
|
|
SwFont::GetAbsRightBorder( const bool bVertLayout ) const
|
2013-07-30 15:39:03 +02:00
|
|
|
{
|
|
|
|
switch( GetOrientation( bVertLayout ) )
|
|
|
|
{
|
|
|
|
case 0 :
|
|
|
|
return m_aRightBorder;
|
|
|
|
break;
|
|
|
|
case 900 :
|
|
|
|
return m_aBottomBorder;
|
|
|
|
break;
|
|
|
|
case 1800 :
|
|
|
|
return m_aLeftBorder;
|
|
|
|
break;
|
|
|
|
case 2700 :
|
|
|
|
return m_aTopBorder;
|
|
|
|
break;
|
|
|
|
default :
|
|
|
|
assert(false);
|
|
|
|
return m_aRightBorder;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-21 21:30:41 +02:00
|
|
|
SvxShadowLocation SwFont::GetAbsShadowLocation( const bool bVertLayout ) const
|
|
|
|
{
|
|
|
|
SvxShadowLocation aLocation = SVX_SHADOW_NONE;
|
|
|
|
switch( GetOrientation( bVertLayout ) )
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
aLocation = m_aShadowLocation;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 900:
|
|
|
|
switch ( m_aShadowLocation )
|
|
|
|
{
|
|
|
|
case SVX_SHADOW_TOPLEFT:
|
|
|
|
aLocation = SVX_SHADOW_BOTTOMLEFT;
|
|
|
|
break;
|
|
|
|
case SVX_SHADOW_TOPRIGHT:
|
|
|
|
aLocation = SVX_SHADOW_TOPLEFT;
|
|
|
|
break;
|
|
|
|
case SVX_SHADOW_BOTTOMLEFT:
|
|
|
|
aLocation = SVX_SHADOW_BOTTOMRIGHT;
|
|
|
|
break;
|
|
|
|
case SVX_SHADOW_BOTTOMRIGHT:
|
|
|
|
aLocation = SVX_SHADOW_TOPRIGHT;
|
|
|
|
break;
|
|
|
|
case SVX_SHADOW_NONE:
|
|
|
|
case SVX_SHADOW_END:
|
|
|
|
aLocation = m_aShadowLocation;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 1800:
|
|
|
|
switch ( m_aShadowLocation )
|
|
|
|
{
|
|
|
|
case SVX_SHADOW_TOPLEFT:
|
|
|
|
aLocation = SVX_SHADOW_BOTTOMRIGHT;
|
|
|
|
break;
|
|
|
|
case SVX_SHADOW_TOPRIGHT:
|
|
|
|
aLocation = SVX_SHADOW_BOTTOMLEFT;
|
|
|
|
break;
|
|
|
|
case SVX_SHADOW_BOTTOMLEFT:
|
|
|
|
aLocation = SVX_SHADOW_TOPRIGHT;
|
|
|
|
break;
|
|
|
|
case SVX_SHADOW_BOTTOMRIGHT:
|
|
|
|
aLocation = SVX_SHADOW_TOPLEFT;
|
|
|
|
break;
|
|
|
|
case SVX_SHADOW_NONE:
|
|
|
|
case SVX_SHADOW_END:
|
|
|
|
aLocation = m_aShadowLocation;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2700:
|
|
|
|
switch ( m_aShadowLocation )
|
|
|
|
{
|
|
|
|
case SVX_SHADOW_TOPLEFT:
|
|
|
|
aLocation = SVX_SHADOW_TOPRIGHT;
|
|
|
|
break;
|
|
|
|
case SVX_SHADOW_TOPRIGHT:
|
|
|
|
aLocation = SVX_SHADOW_BOTTOMRIGHT;
|
|
|
|
break;
|
|
|
|
case SVX_SHADOW_BOTTOMLEFT:
|
|
|
|
aLocation = SVX_SHADOW_TOPLEFT;
|
|
|
|
break;
|
|
|
|
case SVX_SHADOW_BOTTOMRIGHT:
|
|
|
|
aLocation = SVX_SHADOW_BOTTOMLEFT;
|
|
|
|
break;
|
|
|
|
case SVX_SHADOW_NONE:
|
|
|
|
case SVX_SHADOW_END:
|
|
|
|
aLocation = m_aShadowLocation;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
assert(false);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return aLocation;
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_uInt16 SwFont::CalcShadowSpace(
|
2015-04-07 14:28:22 +02:00
|
|
|
const SvxShadowItemSide nShadow, const bool bVertLayout,
|
2013-08-21 21:30:41 +02:00
|
|
|
const bool bSkipLeft, const bool bSkipRight ) const
|
|
|
|
{
|
|
|
|
sal_uInt16 nSpace = 0;
|
|
|
|
const sal_uInt16 nOrient = GetOrientation( bVertLayout );
|
|
|
|
const SvxShadowLocation aLoc = GetAbsShadowLocation( bVertLayout );
|
|
|
|
switch( nShadow )
|
|
|
|
{
|
2015-04-07 14:28:22 +02:00
|
|
|
case SvxShadowItemSide::TOP:
|
2013-08-21 21:30:41 +02:00
|
|
|
if(( aLoc == SVX_SHADOW_TOPLEFT ||
|
|
|
|
aLoc == SVX_SHADOW_TOPRIGHT ) &&
|
|
|
|
( nOrient == 0 || nOrient == 1800 ||
|
|
|
|
( nOrient == 900 && !bSkipRight ) ||
|
|
|
|
( nOrient == 2700 && !bSkipLeft )))
|
|
|
|
{
|
|
|
|
nSpace = m_nShadowWidth;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2015-04-07 14:28:22 +02:00
|
|
|
case SvxShadowItemSide::BOTTOM:
|
2013-08-21 21:30:41 +02:00
|
|
|
if(( aLoc == SVX_SHADOW_BOTTOMLEFT ||
|
|
|
|
aLoc == SVX_SHADOW_BOTTOMRIGHT ) &&
|
|
|
|
( nOrient == 0 || nOrient == 1800 ||
|
|
|
|
( nOrient == 900 && !bSkipLeft ) ||
|
|
|
|
( nOrient == 2700 && !bSkipRight )))
|
|
|
|
{
|
|
|
|
nSpace = m_nShadowWidth;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2015-04-07 14:28:22 +02:00
|
|
|
case SvxShadowItemSide::LEFT:
|
2013-08-21 21:30:41 +02:00
|
|
|
if(( aLoc == SVX_SHADOW_TOPLEFT ||
|
|
|
|
aLoc == SVX_SHADOW_BOTTOMLEFT ) &&
|
|
|
|
( nOrient == 900 || nOrient == 2700 ||
|
|
|
|
( nOrient == 0 && !bSkipLeft ) ||
|
|
|
|
( nOrient == 1800 && !bSkipRight )))
|
|
|
|
{
|
|
|
|
nSpace = m_nShadowWidth;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2015-04-07 14:28:22 +02:00
|
|
|
case SvxShadowItemSide::RIGHT:
|
2013-08-21 21:30:41 +02:00
|
|
|
if(( aLoc == SVX_SHADOW_TOPRIGHT ||
|
|
|
|
aLoc == SVX_SHADOW_BOTTOMRIGHT ) &&
|
|
|
|
( nOrient == 900 || nOrient == 2700 ||
|
|
|
|
( nOrient == 0 && !bSkipRight ) ||
|
|
|
|
( nOrient == 1800 && !bSkipLeft )))
|
|
|
|
{
|
|
|
|
nSpace = m_nShadowWidth;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
assert(false);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return nSpace;
|
|
|
|
}
|
|
|
|
|
2001-10-30 08:37:25 +00:00
|
|
|
// maps directions for vertical layout
|
2014-04-25 14:00:35 +02:00
|
|
|
sal_uInt16 MapDirection( sal_uInt16 nDir, const bool bVertFormat )
|
2001-08-31 05:22:48 +00:00
|
|
|
{
|
|
|
|
if ( bVertFormat )
|
|
|
|
{
|
|
|
|
switch ( nDir )
|
|
|
|
{
|
|
|
|
case 0 :
|
|
|
|
nDir = 2700;
|
|
|
|
break;
|
|
|
|
case 900 :
|
|
|
|
nDir = 0;
|
|
|
|
break;
|
2001-10-29 15:45:52 +00:00
|
|
|
case 2700 :
|
|
|
|
nDir = 1800;
|
|
|
|
break;
|
2011-11-24 00:52:07 +01:00
|
|
|
#if OSL_DEBUG_LEVEL > 0
|
2001-10-29 15:45:52 +00:00
|
|
|
default :
|
2011-03-19 14:13:18 +01:00
|
|
|
OSL_FAIL( "Unsupported direction" );
|
2001-10-29 15:45:52 +00:00
|
|
|
break;
|
|
|
|
#endif
|
2001-08-31 05:22:48 +00:00
|
|
|
}
|
|
|
|
}
|
2001-10-29 10:23:31 +00:00
|
|
|
return nDir;
|
|
|
|
}
|
|
|
|
|
2001-10-30 08:37:25 +00:00
|
|
|
// maps the absolute direction set at the font to its logical conterpart
|
|
|
|
// in the rotated environment
|
2014-04-25 14:00:35 +02:00
|
|
|
sal_uInt16 UnMapDirection( sal_uInt16 nDir, const bool bVertFormat )
|
2001-10-30 08:37:25 +00:00
|
|
|
{
|
|
|
|
if ( bVertFormat )
|
|
|
|
{
|
|
|
|
switch ( nDir )
|
|
|
|
{
|
|
|
|
case 0 :
|
|
|
|
nDir = 900;
|
|
|
|
break;
|
|
|
|
case 1800 :
|
|
|
|
nDir = 2700;
|
|
|
|
break;
|
|
|
|
case 2700 :
|
|
|
|
nDir = 0;
|
|
|
|
break;
|
2011-11-24 00:52:07 +01:00
|
|
|
#if OSL_DEBUG_LEVEL > 0
|
2001-10-30 08:37:25 +00:00
|
|
|
default :
|
2011-03-19 14:13:18 +01:00
|
|
|
OSL_FAIL( "Unsupported direction" );
|
2001-10-30 08:37:25 +00:00
|
|
|
break;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return nDir;
|
|
|
|
}
|
|
|
|
|
2014-04-25 14:00:35 +02:00
|
|
|
sal_uInt16 SwFont::GetOrientation( const bool bVertFormat ) const
|
2002-10-24 05:32:01 +00:00
|
|
|
{
|
|
|
|
return UnMapDirection( aSub[nActual].GetOrientation(), bVertFormat );
|
|
|
|
}
|
|
|
|
|
2014-04-25 14:00:35 +02:00
|
|
|
void SwFont::SetVertical( sal_uInt16 nDir, const bool bVertFormat )
|
2001-10-29 10:23:31 +00:00
|
|
|
{
|
|
|
|
// map direction if frame has vertical layout
|
|
|
|
nDir = MapDirection( nDir, bVertFormat );
|
2001-08-31 05:22:48 +00:00
|
|
|
|
|
|
|
if( nDir != aSub[0].GetOrientation() )
|
|
|
|
{
|
2014-04-25 14:00:35 +02:00
|
|
|
bFntChg = true;
|
2003-03-27 14:45:43 +00:00
|
|
|
aSub[0].SetVertical( nDir, bVertFormat );
|
|
|
|
aSub[1].SetVertical( nDir, bVertFormat || nDir > 1000 );
|
|
|
|
aSub[2].SetVertical( nDir, bVertFormat );
|
2001-08-31 05:22:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-21 19:28:47 -04:00
|
|
|
/*
|
2000-09-18 23:08:29 +00:00
|
|
|
Escapement:
|
|
|
|
frEsc: Fraction, Grad des Escapements
|
|
|
|
Esc = resultierendes Escapement
|
|
|
|
A1 = Original-Ascent (nOrgAscent)
|
|
|
|
A2 = verkleinerter Ascent (nEscAscent)
|
|
|
|
Ax = resultierender Ascent (GetAscent())
|
|
|
|
H1 = Original-Hoehe (nOrgHeight)
|
|
|
|
H2 = verkleinerter Hoehe (nEscHeight)
|
|
|
|
Hx = resultierender Hoehe (GetHeight())
|
|
|
|
Bx = resultierende Baseline fuer die Textausgabe (CalcPos())
|
|
|
|
(Vorsicht: Y - A1!)
|
|
|
|
|
|
|
|
Escapement:
|
|
|
|
Esc = H1 * frEsc;
|
|
|
|
|
|
|
|
Hochstellung:
|
|
|
|
Ax = A2 + Esc;
|
|
|
|
Hx = H2 + Esc;
|
|
|
|
Bx = A1 - Esc;
|
|
|
|
|
|
|
|
Tiefstellung:
|
|
|
|
Ax = A1;
|
|
|
|
Hx = A1 + Esc + (H2 - A2);
|
|
|
|
Bx = A1 + Esc;
|
2014-04-21 19:28:47 -04:00
|
|
|
*/
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
// nEsc ist der Prozentwert
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 SwSubFont::CalcEscAscent( const sal_uInt16 nOldAscent ) const
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if( DFLT_ESC_AUTO_SUPER != GetEscapement() &&
|
|
|
|
DFLT_ESC_AUTO_SUB != GetEscapement() )
|
|
|
|
{
|
|
|
|
const long nAscent = nOldAscent +
|
|
|
|
( (long) nOrgHeight * GetEscapement() ) / 100L;
|
|
|
|
if ( nAscent>0 )
|
2014-08-22 21:21:19 +02:00
|
|
|
return std::max<sal_uInt16>( nAscent, nOrgAscent );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
return nOrgAscent;
|
|
|
|
}
|
|
|
|
|
2006-08-14 15:47:31 +00:00
|
|
|
void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
|
|
|
|
const IDocumentSettingAccess *pIDocumentSettingAccess )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2001-07-06 14:20:58 +00:00
|
|
|
delete pBackColor;
|
|
|
|
pBackColor = NULL;
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
if( pAttrSet )
|
|
|
|
{
|
|
|
|
const SfxPoolItem* pItem;
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_FONT,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2014-11-25 15:40:07 +02:00
|
|
|
const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem);
|
2000-09-18 23:08:29 +00:00
|
|
|
aSub[SW_LATIN].SetFamily( pFont->GetFamily() );
|
|
|
|
aSub[SW_LATIN].Font::SetName( pFont->GetFamilyName() );
|
|
|
|
aSub[SW_LATIN].Font::SetStyleName( pFont->GetStyleName() );
|
|
|
|
aSub[SW_LATIN].Font::SetPitch( pFont->GetPitch() );
|
|
|
|
aSub[SW_LATIN].Font::SetCharSet( pFont->GetCharSet() );
|
|
|
|
}
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_FONTSIZE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2014-11-25 15:40:07 +02:00
|
|
|
const SvxFontHeightItem *pHeight = static_cast<const SvxFontHeightItem *>(pItem);
|
2000-09-18 23:08:29 +00:00
|
|
|
aSub[SW_LATIN].SvxFont::SetPropr( 100 );
|
|
|
|
aSub[SW_LATIN].aSize = aSub[SW_LATIN].Font::GetSize();
|
|
|
|
Size aTmpSize = aSub[SW_LATIN].aSize;
|
|
|
|
aTmpSize.Height() = pHeight->GetHeight();
|
|
|
|
aSub[SW_LATIN].SetSize( aTmpSize );
|
|
|
|
}
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_POSTURE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
aSub[SW_LATIN].Font::SetItalic( static_cast<const SvxPostureItem*>(pItem)->GetPosture() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_WEIGHT,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
aSub[SW_LATIN].Font::SetWeight( static_cast<const SvxWeightItem*>(pItem)->GetWeight() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_LANGUAGE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
aSub[SW_LATIN].SetLanguage( static_cast<const SvxLanguageItem*>(pItem)->GetLanguage() );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONT,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2014-11-25 15:40:07 +02:00
|
|
|
const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem);
|
2000-09-18 23:08:29 +00:00
|
|
|
aSub[SW_CJK].SetFamily( pFont->GetFamily() );
|
|
|
|
aSub[SW_CJK].Font::SetName( pFont->GetFamilyName() );
|
|
|
|
aSub[SW_CJK].Font::SetStyleName( pFont->GetStyleName() );
|
|
|
|
aSub[SW_CJK].Font::SetPitch( pFont->GetPitch() );
|
|
|
|
aSub[SW_CJK].Font::SetCharSet( pFont->GetCharSet() );
|
|
|
|
}
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONTSIZE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2014-11-25 15:40:07 +02:00
|
|
|
const SvxFontHeightItem *pHeight = static_cast<const SvxFontHeightItem *>(pItem);
|
2000-09-18 23:08:29 +00:00
|
|
|
aSub[SW_CJK].SvxFont::SetPropr( 100 );
|
|
|
|
aSub[SW_CJK].aSize = aSub[SW_CJK].Font::GetSize();
|
|
|
|
Size aTmpSize = aSub[SW_CJK].aSize;
|
|
|
|
aTmpSize.Height() = pHeight->GetHeight();
|
|
|
|
aSub[SW_CJK].SetSize( aTmpSize );
|
|
|
|
}
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_POSTURE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
aSub[SW_CJK].Font::SetItalic( static_cast<const SvxPostureItem*>(pItem)->GetPosture() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_WEIGHT,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
aSub[SW_CJK].Font::SetWeight( static_cast<const SvxWeightItem*>(pItem)->GetWeight() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_LANGUAGE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2001-03-06 14:06:18 +00:00
|
|
|
{
|
2014-11-24 10:39:39 +02:00
|
|
|
LanguageType eNewLang = static_cast<const SvxLanguageItem*>(pItem)->GetLanguage();
|
2001-03-06 14:06:18 +00:00
|
|
|
aSub[SW_CJK].SetLanguage( eNewLang );
|
|
|
|
aSub[SW_LATIN].SetCJKContextLanguage( eNewLang );
|
|
|
|
aSub[SW_CJK].SetCJKContextLanguage( eNewLang );
|
|
|
|
aSub[SW_CTL].SetCJKContextLanguage( eNewLang );
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONT,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2014-11-25 15:40:07 +02:00
|
|
|
const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem);
|
2000-09-18 23:08:29 +00:00
|
|
|
aSub[SW_CTL].SetFamily( pFont->GetFamily() );
|
|
|
|
aSub[SW_CTL].Font::SetName( pFont->GetFamilyName() );
|
|
|
|
aSub[SW_CTL].Font::SetStyleName( pFont->GetStyleName() );
|
|
|
|
aSub[SW_CTL].Font::SetPitch( pFont->GetPitch() );
|
|
|
|
aSub[SW_CTL].Font::SetCharSet( pFont->GetCharSet() );
|
|
|
|
}
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONTSIZE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2014-11-25 15:40:07 +02:00
|
|
|
const SvxFontHeightItem *pHeight = static_cast<const SvxFontHeightItem *>(pItem);
|
2000-09-18 23:08:29 +00:00
|
|
|
aSub[SW_CTL].SvxFont::SetPropr( 100 );
|
|
|
|
aSub[SW_CTL].aSize = aSub[SW_CTL].Font::GetSize();
|
|
|
|
Size aTmpSize = aSub[SW_CTL].aSize;
|
|
|
|
aTmpSize.Height() = pHeight->GetHeight();
|
|
|
|
aSub[SW_CTL].SetSize( aTmpSize );
|
|
|
|
}
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_POSTURE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
aSub[SW_CTL].Font::SetItalic( static_cast<const SvxPostureItem*>(pItem)->GetPosture() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_WEIGHT,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
aSub[SW_CTL].Font::SetWeight( static_cast<const SvxWeightItem*>(pItem)->GetWeight() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_LANGUAGE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
aSub[SW_CTL].SetLanguage( static_cast<const SvxLanguageItem*>(pItem)->GetLanguage() );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_UNDERLINE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2000-11-24 14:56:32 +00:00
|
|
|
{
|
2014-11-24 10:39:39 +02:00
|
|
|
SetUnderline( static_cast<const SvxUnderlineItem*>(pItem)->GetLineStyle() );
|
|
|
|
SetUnderColor( static_cast<const SvxUnderlineItem*>(pItem)->GetColor() );
|
2000-11-24 14:56:32 +00:00
|
|
|
}
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_OVERLINE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2009-01-05 17:49:45 +00:00
|
|
|
{
|
2014-11-24 10:39:39 +02:00
|
|
|
SetOverline( static_cast<const SvxOverlineItem*>(pItem)->GetLineStyle() );
|
|
|
|
SetOverColor( static_cast<const SvxOverlineItem*>(pItem)->GetColor() );
|
2009-01-05 17:49:45 +00:00
|
|
|
}
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CROSSEDOUT,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetStrikeout( static_cast<const SvxCrossedOutItem*>(pItem)->GetStrikeout() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_COLOR,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetColor( static_cast<const SvxColorItem*>(pItem)->GetValue() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_EMPHASIS_MARK,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetEmphasisMark( static_cast<const SvxEmphasisMarkItem*>(pItem)->GetEmphasisMark() );
|
2000-10-30 11:51:04 +00:00
|
|
|
|
2014-04-25 14:00:35 +02:00
|
|
|
SetTransparent( true );
|
2000-09-18 23:08:29 +00:00
|
|
|
SetAlign( ALIGN_BASELINE );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CONTOUR,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetOutline( static_cast<const SvxContourItem*>(pItem)->GetValue() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetShadow( static_cast<const SvxShadowedItem*>(pItem)->GetValue() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_RELIEF,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetRelief( (FontRelief)static_cast<const SvxCharReliefItem*>(pItem)->GetValue() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetPropWidth(static_cast<const SvxShadowedItem*>(pItem)->GetValue() ? 50 : 100 );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_AUTOKERN,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2001-04-10 13:24:56 +00:00
|
|
|
{
|
2014-11-24 10:39:39 +02:00
|
|
|
if( static_cast<const SvxAutoKernItem*>(pItem)->GetValue() )
|
2006-08-14 15:47:31 +00:00
|
|
|
{
|
|
|
|
SetAutoKern( ( !pIDocumentSettingAccess ||
|
2015-03-11 15:04:54 +02:00
|
|
|
!pIDocumentSettingAccess->get(DocumentSettingId::KERN_ASIAN_PUNCTUATION) ) ?
|
2015-05-13 10:53:15 +02:00
|
|
|
FontKerning::FontSpecific :
|
|
|
|
FontKerning::Asian );
|
2006-08-14 15:47:31 +00:00
|
|
|
}
|
2001-04-10 13:24:56 +00:00
|
|
|
else
|
2015-05-13 10:53:15 +02:00
|
|
|
SetAutoKern( FontKerning::NONE );
|
2001-04-10 13:24:56 +00:00
|
|
|
}
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_WORDLINEMODE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetWordLineMode( static_cast<const SvxWordLineModeItem*>(pItem)->GetValue() );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_ESCAPEMENT,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2014-11-25 15:40:07 +02:00
|
|
|
const SvxEscapementItem *pEsc = static_cast<const SvxEscapementItem *>(pItem);
|
2000-09-18 23:08:29 +00:00
|
|
|
SetEscapement( pEsc->GetEsc() );
|
|
|
|
if( aSub[SW_LATIN].IsEsc() )
|
|
|
|
SetProportion( pEsc->GetProp() );
|
|
|
|
}
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CASEMAP,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetCaseMap( static_cast<const SvxCaseMapItem*>(pItem)->GetCaseMap() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_KERNING,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetFixKerning( static_cast<const SvxKerningItem*>(pItem)->GetValue() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_NOHYPHEN,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetNoHyph( static_cast<const SvxNoHyphenItem*>(pItem)->GetValue() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BLINK,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetBlink( static_cast<const SvxBlinkItem*>(pItem)->GetValue() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_ROTATE,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetVertical( static_cast<const SvxCharRotateItem*>(pItem)->GetValue() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
pBackColor = new Color( static_cast<const SvxBrushItem*>(pItem)->GetColor() );
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetHighlightColor(static_cast<const SvxBrushItem*>(pItem)->GetColor());
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BOX,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2013-07-07 20:33:40 +02:00
|
|
|
{
|
2013-08-06 10:58:09 +02:00
|
|
|
const SvxBoxItem* pBoxItem = static_cast<const SvxBoxItem*>(pItem);
|
|
|
|
SetTopBorder(pBoxItem->GetTop());
|
|
|
|
SetBottomBorder(pBoxItem->GetBottom());
|
|
|
|
SetRightBorder(pBoxItem->GetRight());
|
|
|
|
SetLeftBorder(pBoxItem->GetLeft());
|
2015-03-30 11:20:37 +02:00
|
|
|
SetTopBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::TOP));
|
|
|
|
SetBottomBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::BOTTOM));
|
|
|
|
SetRightBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::RIGHT));
|
|
|
|
SetLeftBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::LEFT));
|
2013-07-07 20:33:40 +02:00
|
|
|
}
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOW,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2013-08-21 21:30:41 +02:00
|
|
|
{
|
|
|
|
const SvxShadowItem* pShadowItem = static_cast<const SvxShadowItem*>(pItem);
|
|
|
|
SetShadowColor(pShadowItem->GetColor());
|
|
|
|
SetShadowWidth(pShadowItem->GetWidth());
|
|
|
|
SetShadowLocation(pShadowItem->GetLocation());
|
|
|
|
}
|
2001-03-19 14:58:50 +00:00
|
|
|
const SfxPoolItem* pTwoLinesItem = 0;
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET ==
|
2014-02-19 21:49:02 +01:00
|
|
|
pAttrSet->GetItemState( RES_CHRATR_TWO_LINES, true, &pTwoLinesItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
if ( static_cast<const SvxTwoLinesItem*>(pTwoLinesItem)->GetValue() )
|
2001-03-19 14:58:50 +00:00
|
|
|
SetVertical( 0 );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Invalidate();
|
2014-04-25 14:00:35 +02:00
|
|
|
bNoHyph = false;
|
|
|
|
bBlink = false;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2014-04-25 14:00:35 +02:00
|
|
|
bPaintBlank = false;
|
|
|
|
bPaintWrong = false;
|
2010-11-25 17:08:45 +01:00
|
|
|
OSL_ENSURE( aSub[SW_LATIN].IsTransparent(), "SwFont: Transparent revolution" );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SwFont::SwFont( const SwFont &rFont )
|
|
|
|
{
|
|
|
|
aSub[SW_LATIN] = rFont.aSub[SW_LATIN];
|
|
|
|
aSub[SW_CJK] = rFont.aSub[SW_CJK];
|
|
|
|
aSub[SW_CTL] = rFont.aSub[SW_CTL];
|
|
|
|
nActual = rFont.nActual;
|
|
|
|
pBackColor = rFont.pBackColor ? new Color( *rFont.pBackColor ) : NULL;
|
2013-10-04 09:12:07 +02:00
|
|
|
m_aHighlightColor = rFont.m_aHighlightColor;
|
2013-07-08 17:16:13 +02:00
|
|
|
m_aTopBorder = rFont.m_aTopBorder;
|
|
|
|
m_aBottomBorder = rFont.m_aBottomBorder;
|
|
|
|
m_aRightBorder = rFont.m_aRightBorder;
|
|
|
|
m_aLeftBorder = rFont.m_aLeftBorder;
|
2013-08-06 10:58:09 +02:00
|
|
|
m_nTopBorderDist = rFont.m_nTopBorderDist;
|
|
|
|
m_nBottomBorderDist = rFont.m_nBottomBorderDist;
|
|
|
|
m_nRightBorderDist = rFont.m_nRightBorderDist;
|
|
|
|
m_nLeftBorderDist = rFont.m_nLeftBorderDist;
|
2013-08-21 21:30:41 +02:00
|
|
|
m_aShadowColor = rFont.m_aShadowColor;
|
|
|
|
m_nShadowWidth = rFont.m_nShadowWidth;
|
|
|
|
m_aShadowLocation = rFont.m_aShadowLocation;
|
2000-11-24 14:56:32 +00:00
|
|
|
aUnderColor = rFont.GetUnderColor();
|
2009-01-05 17:49:45 +00:00
|
|
|
aOverColor = rFont.GetOverColor();
|
CWS-TOOLING: integrate CWS odfmetadata3
2009-09-11 Michael Stahl merge DEV300_m58
2009-09-07 Michael Stahl SwFmtFld::Modify(): do nothing on RES_OBJECTDYING
2009-08-27 Michael Stahl #i91565#, #i91566#: TextPortionEnumerationTest.java: add test document
2009-08-27 Michael Stahl #i91565#, #i91566#: add complex test: TextPortionEnumerationTest.java
2009-08-27 Michael Stahl CLiteral::initialize(): zero-length literals probably not an error
2009-08-27 Michael Stahl #i91565#, #i91566#: offapi: new InContentMetadata and MetadataField services
adapt TextPortion for InContentMetadata
2009-08-27 Michael Stahl #i91564#: xmloff: load/store xml:id and RDFa for text:bookmark(-start).
2009-08-27 Michael Stahl #i91564#: sw core: add support for xml:id at bookmarks:
sw::mark::Bookmark: derive from Metadatable.
SwHistoryBookmark, SaveBookmark: store a MetadatableUndo.
ndcopy.cxx: lcl_CopyBookmarks(): copy the xml:id.
SwXBookmark: derive from MetadatableMixin.
2009-08-27 Michael Stahl #i91565#, #i91566#: xmloff: refactor ruby import so nested meta(-field) works:
remove XMLRubyHint_Impl.
XMLImpRubyContext_Impl::~XMLImpRubyContext_Impl(): insert ruby directly.
2009-08-27 Michael Stahl #i91565#, #i91566#: xmloff: fix text:meta(-field) import/export:
new XMLTextParagraphExport::exportTextField() overload for XTextField.
CreateAndInsertMark(): set xml:id after insertion.
fix meta(-field) service names, bugs etc.
2009-08-27 Michael Stahl #i91565#, #i91566#: sw text formatting: paint background of meta(-field) body:
SwFont: add member m_nMetaCount.
txttypes.hxx: add POR_META.
atrstck.cxx: handle RES_TXTATR_META(FIELD).
itrform2.cxx: SwTxtFormatter::WhichTxtPor(): create new class SwMetaPortion.
2009-08-27 Michael Stahl #i91566#: sw text formatting: display meta-field prefix and suffix:
SwAttrIter::GetAttr(): replace with call to GetTxtAttrForCharAt().
SwTxtFormatter::NewExtraPortion(): handle meta-field prefix.
SwTxtFormatter: new member m_nHintEndIndex.
SwTxtFormatter::WhichFirstPortion(): call TryNewNoLengthPortion().
SwTxtFormatter::TryNewNoLengthPortion(): new; handle suffix of meta-field.
SwTxtFormatter::UnderFlow(): UGLY HACK: decrement m_nHintEndIndex.
SwFldPortion: add flag m_bNoLength: portion has zero length (for suffix).
2009-08-27 Michael Stahl #i91565#, #i91566#: extend text:meta(-field) uno wrapper with XText interface:
unoobj.hxx: new CursorType CURSOR_META.
unoobj2.cxx: refactor SwXText implementation to ensure that when the SwXText
belongs to a SwXMeta, content is always inserted inside the meta(-field).
unoobj.cxx: new SwXTextCursor::ForceIntoMeta(): cursor stays in meta(-field).
unometa.hxx: SwXMeta implements XText, forwarding to a member SwXMetaText.
DocInsertStringSplitCR(), SwX*::attachToRange(), SwX*::DeleteAndInsert():
use FORCEHINTEXPAND hack to ensure insert into the meta(-field) at the end.
2009-08-27 Michael Stahl #i91565#, #i91566#: add text:meta(-field) uno wrapper to sw:
fmtmeta.hxx, fmtatr2.cxx: new class sw::MetaField, new sw::MetaFieldManager.
doc.hxx, docnew.cxx: new SwDoc::GetMetaFieldManager().
unocoll.hxx,.cxx: new SW_SERVICE_FIELDTYPE_METAFIELD, SW_SERVICE_TYPE_META.
unomap.hxx,.cxx: new PROPERTY_MAP_METAFIELD.
unoprnms.hxx: new UNO_NAME_META.
unoport.hxx: new PORTION_META; add "InContentMetadata" prop to SwXTextPortion.
new unometa.hxx: new class SwXMeta and SwXMetaField.
unofield.cxx: SwXFieldEnumeration: include meta-fields.
unoportenum.cxx: handle RES_TXTATR_META(FIELD) by using a portion list stack.
unotext.cxx: SwXText::insertTextContent(): handle meta(-field) as attribute.
2009-08-27 Michael Stahl #i91565#, #i91566#: ndhints.cxx: remove sort number from SwTxtAttrNesting
2009-08-27 Michael Stahl #i91565#, #i91566#: add support for hints with end and CH_TXTATR to sw core:
doc.hxx, docedt.cxx: replace SwDoc::Delete(), DeleteAndJoin(), ReplaceRange()
with wrappers that split at left-overlapped end+CH_TXTATR hints.
txatbase.hxx: new member SwTxtAttr::m_bHasDummyChar.
ndtxt.hxx: rename SwTxtNode::GetTxtAttr() to GetTxtAttrForCharAt().
ndtxt.cxx: SwTxtNode::CopyText(): copy end+CH_TXTATR hints iff copy CH_TXTATR.
txtatr2.cxx, thints.cxx: SwTxtMeta gets a CH_TXTATR.
2009-08-27 Michael Stahl #i91565#, #i91566#: add text:meta(-field) to sw core:
txatbase.hxx: new member SwTxtAttr::m_bNesting.
hintids.hxx: new ids RES_TXTATR_META, RES_TXTATR_METAFIELD.
txtatr.hxx: new base class SwTxtAttrNesting.
new hint SwTxtMeta.
SwTxtRuby derives from SwTxtAttrNesting.
txtinet.hxx: SwTxtINetFmt derives from SwTxtAttrNesting.
new header fmtmeta.hxx: new pool item SwFmtMeta. new class sw::Meta.
ndhints.hxx, thints.cxx: new method SwpHints::TryInsertNesting().
thints.cxx: refactoring: BuildPortions() no longer handles Ruby/Hyperlink,
but TryInsertNesting(), which also handles meta(-field).
SwTxtNode::InsertItem(): check if the hint is actually inserted.
ndhints.cxx: sort nesting hints based on sort number.
ndtxt.cxx: lcl_CopyHint(): handle copy of meta/meta-field.
2009-08-27 Michael Stahl enable expanding hints with m_bLockExpandFlag set:
add new InsertFlag: INS_FORCEHINTEXPAND.
add new SetAttrMode: SETATTR_FORCEHINTEXPAND.
rename SwEditShell::Insert() to Insert2() because changed signature fails
to compile when SwWrtShell tries to overwrite these non-virtual members...
SwWrtShell::Insert() sets FOCEHINTEXPAND if range was selected/deleted.
adapt SwUndoInsert to store flags.
2009-08-27 Michael Stahl change formal parameters of item insertion methods to type SetAttrMode
2009-08-27 Michael Stahl fix incorrect resetting of text attributes in SwUndoInsSection, SwUndoInserts
2009-08-27 Michael Stahl clean up SwTxtNode::CutImpl() and lcl_CopyHint()
2009-08-27 Michael Stahl rename SwDoc::Copy() to CopyRange(), and _Copy() to CopyImpl()
2009-08-27 Michael Stahl rename SwNodes::Move() to MoveRange(), and remove unused parameter
2009-08-27 Michael Stahl rename SwDoc::Move() to MoveRange()/MoveNodeRange()
2009-08-27 Michael Stahl rename SwDoc::Insert() to InsertString(), and remove sal_Unicode variant
2009-08-27 Michael Stahl rename SwDoc::Insert() to InsertPoolItem()/InsertItemSet()/InsertSwSection()
2009-08-27 Michael Stahl rename SwDoc::Replace() to ReplaceRange()
2009-08-27 Michael Stahl remove SwDoc::Overwrite() sal_Unicode variant
2009-08-27 Michael Stahl split up SwDoc::DeleteAndJoin(): factor out DeleteAndJoinWithRedline()
2009-08-27 Michael Stahl rename overloaded SwDoc::Delete() to DeleteRange()/DeleteTOXMark()
2009-08-27 Michael Stahl rename SwTxtNode::Copy() to CopyText()
2009-08-27 Michael Stahl rename SwTxtNode::Cut() to CutText(), and _Cut() to CutImpl()
2009-08-27 Michael Stahl rename SwTxtNode::Delete() to DeleteAttribute()/DeleteAttributes()
2009-08-27 Michael Stahl rename SwTxtNode::Replace() to ReplaceText(), and remove the xub_Unicode variant
2009-08-27 Michael Stahl rename SwTxtNode::Erase() to EraseText()
2009-08-27 Michael Stahl rename SwTxtNode::Insert() to InsertText(), and remove the xub_Unicode variant
2009-08-27 Michael Stahl clean up SwTxtNode::Update()
2009-08-27 Michael Stahl remove SwTxtAttr::RemoveFromPool() and make destructor non-public,
to be invoked by new method SwTxtAttr::Destroy()
2009-08-27 Michael Stahl ensure that SwDoc::Insert() for item (set) returns success indicator:
replace SwRegHistory constructor with method InsertItems(), returning bool.
refactor InsAttr() so that it checks if InsertItems() succeeds.
2009-08-27 Michael Stahl move SwXTextPortionEnumeration from unoobj.hxx to unoport.hxx
2009-08-27 Michael Stahl add missing SolarMutex in SwXTextPortion methods
2009-08-27 Michael Stahl SwXTextPortion: new member m_xTextField (so the TextField property need not
be returned indirectly via SwUnoCursorHelper).
factor out function CreateSwXTextField().
2009-08-27 Michael Stahl SwXTextPortion: remove PORTION_CONTROL_CHAR and implementation of XTextField
2009-08-27 Michael Stahl remove obsolete hint SwTxtHardBlank and formats SwFmtHardBlank/SwFmtSoftHyph
2009-08-27 Michael Stahl clean up SwTxtAttr and friends:
remove many accessor methods for obsolete (due to autofmt) char format items.
remove unused flag SwTxtAttr::m_bDontMergeAttr.
MakeRedlineTxtAttr() now dedicated function, no longer calls MakeTxtAttr().
2009-08-27 Michael Stahl remove obsolete attribute SwTxt2Lines
2009-08-27 Michael Stahl SwXTextPortionEnumeration: finish refactoring CreatePortions
change ExportHints so it always returns a text portion for hint w/ CH_TXTATR.
remove special case for handling end of paragraph.
unfortunately had to refactor the fieldmarks export as well (got in the way).
2009-08-27 Michael Stahl SwXTextPortionEnumeration: refactor CreatePortions: frames export
extract function ExportFrames() from CreatePortions().
remove (un)dead code that calls evil MovePara(fnParaCurr, fnParaEnd)
2009-08-27 Michael Stahl clean up SwXParaFrameEnumeration
2009-08-27 Michael Stahl CollectFrameAtNode: replace SwDependArr with STL based FrameDependList_t
2009-08-27 Michael Stahl SwXTextPortionEnumeration: tweak refmark/toxmark export
so ExportHints returns the portion for point marks
2009-08-27 Michael Stahl clean up SwXTextPortionEnumeration:
prefix members, remove casts, replace SvWeirdArray with STL, etc.
make CreatePortions() method a function, and remove lots of members.
extract fieldmarks function from CreatePortions.
2009-08-27 Michael Stahl remove FOREACHUNOPAM_START/END macros
2009-08-27 Michael Stahl clean up SwXTextPortion:
prefix members, remove casts, etc.
remove SwXRubyPortion: replace it with another SwXTextPortion constructor
2009-08-27 Michael Stahl #i102541# SwXReferenceMark::InsertRefMark(): use flag SETATTR_DONTEXPAND
2009-08-27 Michael Stahl rename SwTxtNode::Insert to SwTxtNode::InsertHint, and
fix constness in SwTxtNode::InsertItem
2009-08-27 Michael Stahl turn SwTxtNode::MakeTxtAttr() methods into global functions in ndhints.hxx
2009-08-27 Michael Stahl remove obsolete sw/inc/bookmrk.hxx
2009-08-27 Michael Stahl pam.cxx: fix ComparePosition functions (returned wrong result in one case)
2009-08-27 Michael Stahl #i103613# only import RDF metadata on normal open of a document
2009-09-11 kz CWS-TOOLING: integrate CWS impress176
2009-09-08 20:18:24 +0200 sj r275957 : fixed warning (shadowed variable)
2009-09-08 18:02:05 +0200 cl r275948 : #i104315# added missing tab pages
2009-09-08 17:35:18 +0200 cl r275947 : #i104866# fixed angle import
2009-09-08 17:32:53 +0200 cl r275946 : #i104841# fixed angle import
2009-09-08 17:01:25 +0200 cl r275943 : #i103935# fixed the SID_EVENTCONFIG mess
2009-09-08 14:32:57 +0200 sj r275928 : #i104685# only comments
2009-09-07 12:37:36 +0200 sj r275886 : #i104683# fixed import of bold/italic attributes for normal text shapes
2009-09-04 15:07:46 +0200 sj r275808 : #104689# fixed bullet color problem
2009-09-03 15:25:07 +0200 sj r275753 : #160200# added vertical alignment of table cells
2009-09-11 kz CWS-TOOLING: integrate CWS dv14
2009-09-10 15:16:32 +0200 sg r276035 : #160513# updated wfs scheme to accept ports
2009-09-10 07:41:47 +0200 dv r276019 : #i104942# Better renaming algorithmen
2009-08-31 13:41:11 +0200 dv r275604 : #160505# Setting APP1PRODUCTNAME must not overwrite APP1PRODUCTDEF
2009-09-11 kz CWS-TOOLING: integrate CWS jl131
2009-09-02 16:42:40 +0200 jl r275720 : #i97896#
2009-08-31 13:01:53 +0200 jl r275599 : CWS-TOOLING: rebase CWS jl131 to trunk@275331 (milestone: DEV300:m56)
2009-07-31 14:35:30 +0200 jl r274531 : CWS-TOOLING: rebase CWS jl131 to trunk@274203 (milestone: DEV300:m53)
2009-07-23 14:20:32 +0200 jl r274272 : #i79839# better error text when trying to modify shared layer without having write permission, eg. unopkg add --shared, unopkg remove --shared, unopkg reinstall --shared
2009-07-22 16:38:02 +0200 jl r274252 : #i97896# localize error message for lock file
2009-07-22 16:37:22 +0200 jl r274251 : #i80462# unprecise wording in updatedialog
2009-07-22 16:36:06 +0200 jl r274250 : #i97896# localize error message for lock file
2009-07-22 16:35:20 +0200 jl r274249 : #i97896# localize error message for lock file
2009-07-22 15:07:30 +0200 jl r274242 : #i98873# minimum java version is 1.5 since OOo 3.0
2009-09-11 kz CWS-TOOLING: integrate CWS changehc
2009-08-31 19:38:50 +0200 pl r275633 : remove dbug printf
2009-08-31 17:41:50 +0200 pl r275623 : CWS-TOOLING: rebase CWS changehc to trunk@275331 (milestone: DEV300:m56)
2009-07-15 19:45:46 +0200 pl r274028 : #i35482# use HC flag to decide high contrast mode
2009-07-15 17:40:52 +0200 pl r274020 : #i35482# use HC flag to decide high contrast mode
2009-07-15 17:39:50 +0200 pl r274019 : #i35482# update autohc correctly in MergeSystemSettings
2009-07-15 17:38:57 +0200 pl r274018 : #i35482# update autohc correctly in MergeSystemSettings
2009-09-11 kz CWS-TOOLING: integrate CWS notes10
2009-08-24 07:25:57 +0200 mod r275287 : 2009-07-26 02:38:32 +0200 mod r274343 : #i#i103645#
2009-07-26 02:01:53 +0200 mod r274342 : #i103645#
2009-07-26 01:52:42 +0200 mod r274341 : #i103490#
2009-07-22 08:31:48 +0200 mod r274215 : #i103373#
2009-07-15 00:55:11 +0200 mod r273987 : #i101419#
2009-07-14 07:07:55 +0200 mod r273956 : #i101419#
2009-07-14 07:07:43 +0200 mod r273955 : #i101419#
2009-07-14 07:02:10 +0200 mod r273954 : changes from notes9
2009-07-14 06:14:25 +0200 mod r273953 : #i103476#
2009-09-11 kz CWS-TOOLING: integrate CWS ab70
2009-09-10 15:12:54 +0200 jsk r276034 : #i85434# - mandatory automatic update test
2009-09-10 15:11:06 +0200 jsk r276033 : #i85434# - mandatory automatic update test
2009-09-02 09:49:24 +0200 ab r275698 : #i85434# Dialog Import
2009-09-11 kz CWS-TOOLING: integrate CWS hb32bugs02
2009-09-02 Henning Brinkmann #i102420# revert changes
2009-08-26 Henning Brinkmann merged DEV300_m56
2009-08-19 Henning Brinkmann merged DEV300_m55
2009-08-14 Henning Brinkmann merged changes from wntmsci12
2009-08-12 Henning Brinkmann Implemented NoSpaceEdit constructor and destructor in .cxx to allow compile with debug on wntmsci12.
2009-08-12 Henning Brinkmann Added some SW_DLLPUBLIC to make compilable on wntmsci12.
2009-08-11 Henning Brinkmann #i102420# dbg_out: surround output for SwNodes with <nodes-array>.
2009-08-10 Henning Brinkmann #i102420# rewritten debug output for SwNodes.
2009-08-07 Henning Brinkmann #i102420# debug _MoveNodes: output the destination, too. Break after two iterations.
2009-08-07 Henning Brinkmann #i102420# _MoveNodes: Additionally check if destination index is inside source => false
Check if current range was already handled => loop
Debug output current range
2009-08-06 Henning Brinkmann merged DEV300_m54
2009-08-06 Henning Brinkmann added master fix
2009-08-06 Henning Brinkmann debug output for SwNodeRange
2009-08-04 Henning Brinkmann #i102844# robustness: check for NULL pointer to prevent crash
2009-08-03 Henning Brinkmann #i103475# applied patch and verified
2009-08-03 Henning Brinkmann Removed code preventing build of sw with DEBUG.
2009-09-11 convert-repo update tags
2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300
2009-09-05 22:49:00 +0200 ydario r275858 : #i99588# applied os2port06 diff to DEV300 tree.
2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23
2009-08-29 07:07:53 +0200 tono r275555 : i#104522: mingw port graphite
2009-08-29 07:07:26 +0200 tono r275554 : i#104522: mingw port printf format fix
2009-09-10 kz CWS-TOOLING: integrate CWS mh232
2009-08-26 03:52:57 +0200 mh r275385 : #i102182# FreeBSD patch
2009-08-26 03:43:20 +0200 mh r275384 : #i101333# patch for FreeBSD
2009-08-26 03:11:20 +0200 mh r275383 : #i39230
2009-08-26 03:07:51 +0200 mh r275382 : #i39230# more space for initials field
2009-08-26 02:41:19 +0200 mh r275380 : #i39230# use vos::osecurity for reading the user name
2009-08-18 22:06:00 +0200 mh r275130 : #i104243#, line ending problem with newer perl
2009-08-18 21:53:21 +0200 mh r275129 : #i39230# read initials via getpwnam
2009-08-18 21:34:05 +0200 mh r275128 : enable CAIROCANVAS for Linux and Mac, #i88613#
2009-08-17 18:02:59 +0200 mh r275067 : #i95498# make compile with gcc3
2009-09-10 kz CWS-TOOLING: integrate CWS tkr24
2009-09-07 14:31:06 +0200 is r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT
2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping>
2009-09-11 convert-repo update tags
2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300
2009-09-05 22:49:00 +0200 ydario r275858 : #i99588# applied os2port06 diff to DEV300 tree.
2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23
2009-08-29 07:07:53 +0200 tono r275555 : i#104522: mingw port graphite
2009-08-29 07:07:26 +0200 tono r275554 : i#104522: mingw port printf format fix
2009-09-10 kz CWS-TOOLING: integrate CWS mh232
2009-08-26 03:52:57 +0200 mh r275385 : #i102182# FreeBSD patch
2009-08-26 03:43:20 +0200 mh r275384 : #i101333# patch for FreeBSD
2009-08-26 03:11:20 +0200 mh r275383 : #i39230
2009-08-26 03:07:51 +0200 mh r275382 : #i39230# more space for initials field
2009-08-26 02:41:19 +0200 mh r275380 : #i39230# use vos::osecurity for reading the user name
2009-08-18 22:06:00 +0200 mh r275130 : #i104243#, line ending problem with newer perl
2009-08-18 21:53:21 +0200 mh r275129 : #i39230# read initials via getpwnam
2009-08-18 21:34:05 +0200 mh r275128 : enable CAIROCANVAS for Linux and Mac, #i88613#
2009-08-17 18:02:59 +0200 mh r275067 : #i95498# make compile with gcc3
2009-09-10 kz CWS-TOOLING: integrate CWS tkr24
2009-09-07 14:31:06 +0200 is r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT
2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping>
2009-09-11 14:29:45 +00:00
|
|
|
nToxCnt = 0;
|
|
|
|
nRefCnt = 0;
|
|
|
|
m_nMetaCount = 0;
|
2013-11-18 11:29:24 +00:00
|
|
|
m_nInputFieldCount = 0;
|
2000-09-18 23:08:29 +00:00
|
|
|
bFntChg = rFont.bFntChg;
|
|
|
|
bOrgChg = rFont.bOrgChg;
|
|
|
|
bPaintBlank = rFont.bPaintBlank;
|
2014-04-25 14:00:35 +02:00
|
|
|
bPaintWrong = false;
|
2000-09-18 23:08:29 +00:00
|
|
|
bURL = rFont.bURL;
|
|
|
|
bGreyWave = rFont.bGreyWave;
|
|
|
|
bNoColReplace = rFont.bNoColReplace;
|
|
|
|
bNoHyph = rFont.bNoHyph;
|
|
|
|
bBlink = rFont.bBlink;
|
|
|
|
}
|
|
|
|
|
2006-08-14 15:47:31 +00:00
|
|
|
SwFont::SwFont( const SwAttrSet* pAttrSet,
|
|
|
|
const IDocumentSettingAccess* pIDocumentSettingAccess )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
nActual = SW_LATIN;
|
CWS-TOOLING: integrate CWS odfmetadata3
2009-09-11 Michael Stahl merge DEV300_m58
2009-09-07 Michael Stahl SwFmtFld::Modify(): do nothing on RES_OBJECTDYING
2009-08-27 Michael Stahl #i91565#, #i91566#: TextPortionEnumerationTest.java: add test document
2009-08-27 Michael Stahl #i91565#, #i91566#: add complex test: TextPortionEnumerationTest.java
2009-08-27 Michael Stahl CLiteral::initialize(): zero-length literals probably not an error
2009-08-27 Michael Stahl #i91565#, #i91566#: offapi: new InContentMetadata and MetadataField services
adapt TextPortion for InContentMetadata
2009-08-27 Michael Stahl #i91564#: xmloff: load/store xml:id and RDFa for text:bookmark(-start).
2009-08-27 Michael Stahl #i91564#: sw core: add support for xml:id at bookmarks:
sw::mark::Bookmark: derive from Metadatable.
SwHistoryBookmark, SaveBookmark: store a MetadatableUndo.
ndcopy.cxx: lcl_CopyBookmarks(): copy the xml:id.
SwXBookmark: derive from MetadatableMixin.
2009-08-27 Michael Stahl #i91565#, #i91566#: xmloff: refactor ruby import so nested meta(-field) works:
remove XMLRubyHint_Impl.
XMLImpRubyContext_Impl::~XMLImpRubyContext_Impl(): insert ruby directly.
2009-08-27 Michael Stahl #i91565#, #i91566#: xmloff: fix text:meta(-field) import/export:
new XMLTextParagraphExport::exportTextField() overload for XTextField.
CreateAndInsertMark(): set xml:id after insertion.
fix meta(-field) service names, bugs etc.
2009-08-27 Michael Stahl #i91565#, #i91566#: sw text formatting: paint background of meta(-field) body:
SwFont: add member m_nMetaCount.
txttypes.hxx: add POR_META.
atrstck.cxx: handle RES_TXTATR_META(FIELD).
itrform2.cxx: SwTxtFormatter::WhichTxtPor(): create new class SwMetaPortion.
2009-08-27 Michael Stahl #i91566#: sw text formatting: display meta-field prefix and suffix:
SwAttrIter::GetAttr(): replace with call to GetTxtAttrForCharAt().
SwTxtFormatter::NewExtraPortion(): handle meta-field prefix.
SwTxtFormatter: new member m_nHintEndIndex.
SwTxtFormatter::WhichFirstPortion(): call TryNewNoLengthPortion().
SwTxtFormatter::TryNewNoLengthPortion(): new; handle suffix of meta-field.
SwTxtFormatter::UnderFlow(): UGLY HACK: decrement m_nHintEndIndex.
SwFldPortion: add flag m_bNoLength: portion has zero length (for suffix).
2009-08-27 Michael Stahl #i91565#, #i91566#: extend text:meta(-field) uno wrapper with XText interface:
unoobj.hxx: new CursorType CURSOR_META.
unoobj2.cxx: refactor SwXText implementation to ensure that when the SwXText
belongs to a SwXMeta, content is always inserted inside the meta(-field).
unoobj.cxx: new SwXTextCursor::ForceIntoMeta(): cursor stays in meta(-field).
unometa.hxx: SwXMeta implements XText, forwarding to a member SwXMetaText.
DocInsertStringSplitCR(), SwX*::attachToRange(), SwX*::DeleteAndInsert():
use FORCEHINTEXPAND hack to ensure insert into the meta(-field) at the end.
2009-08-27 Michael Stahl #i91565#, #i91566#: add text:meta(-field) uno wrapper to sw:
fmtmeta.hxx, fmtatr2.cxx: new class sw::MetaField, new sw::MetaFieldManager.
doc.hxx, docnew.cxx: new SwDoc::GetMetaFieldManager().
unocoll.hxx,.cxx: new SW_SERVICE_FIELDTYPE_METAFIELD, SW_SERVICE_TYPE_META.
unomap.hxx,.cxx: new PROPERTY_MAP_METAFIELD.
unoprnms.hxx: new UNO_NAME_META.
unoport.hxx: new PORTION_META; add "InContentMetadata" prop to SwXTextPortion.
new unometa.hxx: new class SwXMeta and SwXMetaField.
unofield.cxx: SwXFieldEnumeration: include meta-fields.
unoportenum.cxx: handle RES_TXTATR_META(FIELD) by using a portion list stack.
unotext.cxx: SwXText::insertTextContent(): handle meta(-field) as attribute.
2009-08-27 Michael Stahl #i91565#, #i91566#: ndhints.cxx: remove sort number from SwTxtAttrNesting
2009-08-27 Michael Stahl #i91565#, #i91566#: add support for hints with end and CH_TXTATR to sw core:
doc.hxx, docedt.cxx: replace SwDoc::Delete(), DeleteAndJoin(), ReplaceRange()
with wrappers that split at left-overlapped end+CH_TXTATR hints.
txatbase.hxx: new member SwTxtAttr::m_bHasDummyChar.
ndtxt.hxx: rename SwTxtNode::GetTxtAttr() to GetTxtAttrForCharAt().
ndtxt.cxx: SwTxtNode::CopyText(): copy end+CH_TXTATR hints iff copy CH_TXTATR.
txtatr2.cxx, thints.cxx: SwTxtMeta gets a CH_TXTATR.
2009-08-27 Michael Stahl #i91565#, #i91566#: add text:meta(-field) to sw core:
txatbase.hxx: new member SwTxtAttr::m_bNesting.
hintids.hxx: new ids RES_TXTATR_META, RES_TXTATR_METAFIELD.
txtatr.hxx: new base class SwTxtAttrNesting.
new hint SwTxtMeta.
SwTxtRuby derives from SwTxtAttrNesting.
txtinet.hxx: SwTxtINetFmt derives from SwTxtAttrNesting.
new header fmtmeta.hxx: new pool item SwFmtMeta. new class sw::Meta.
ndhints.hxx, thints.cxx: new method SwpHints::TryInsertNesting().
thints.cxx: refactoring: BuildPortions() no longer handles Ruby/Hyperlink,
but TryInsertNesting(), which also handles meta(-field).
SwTxtNode::InsertItem(): check if the hint is actually inserted.
ndhints.cxx: sort nesting hints based on sort number.
ndtxt.cxx: lcl_CopyHint(): handle copy of meta/meta-field.
2009-08-27 Michael Stahl enable expanding hints with m_bLockExpandFlag set:
add new InsertFlag: INS_FORCEHINTEXPAND.
add new SetAttrMode: SETATTR_FORCEHINTEXPAND.
rename SwEditShell::Insert() to Insert2() because changed signature fails
to compile when SwWrtShell tries to overwrite these non-virtual members...
SwWrtShell::Insert() sets FOCEHINTEXPAND if range was selected/deleted.
adapt SwUndoInsert to store flags.
2009-08-27 Michael Stahl change formal parameters of item insertion methods to type SetAttrMode
2009-08-27 Michael Stahl fix incorrect resetting of text attributes in SwUndoInsSection, SwUndoInserts
2009-08-27 Michael Stahl clean up SwTxtNode::CutImpl() and lcl_CopyHint()
2009-08-27 Michael Stahl rename SwDoc::Copy() to CopyRange(), and _Copy() to CopyImpl()
2009-08-27 Michael Stahl rename SwNodes::Move() to MoveRange(), and remove unused parameter
2009-08-27 Michael Stahl rename SwDoc::Move() to MoveRange()/MoveNodeRange()
2009-08-27 Michael Stahl rename SwDoc::Insert() to InsertString(), and remove sal_Unicode variant
2009-08-27 Michael Stahl rename SwDoc::Insert() to InsertPoolItem()/InsertItemSet()/InsertSwSection()
2009-08-27 Michael Stahl rename SwDoc::Replace() to ReplaceRange()
2009-08-27 Michael Stahl remove SwDoc::Overwrite() sal_Unicode variant
2009-08-27 Michael Stahl split up SwDoc::DeleteAndJoin(): factor out DeleteAndJoinWithRedline()
2009-08-27 Michael Stahl rename overloaded SwDoc::Delete() to DeleteRange()/DeleteTOXMark()
2009-08-27 Michael Stahl rename SwTxtNode::Copy() to CopyText()
2009-08-27 Michael Stahl rename SwTxtNode::Cut() to CutText(), and _Cut() to CutImpl()
2009-08-27 Michael Stahl rename SwTxtNode::Delete() to DeleteAttribute()/DeleteAttributes()
2009-08-27 Michael Stahl rename SwTxtNode::Replace() to ReplaceText(), and remove the xub_Unicode variant
2009-08-27 Michael Stahl rename SwTxtNode::Erase() to EraseText()
2009-08-27 Michael Stahl rename SwTxtNode::Insert() to InsertText(), and remove the xub_Unicode variant
2009-08-27 Michael Stahl clean up SwTxtNode::Update()
2009-08-27 Michael Stahl remove SwTxtAttr::RemoveFromPool() and make destructor non-public,
to be invoked by new method SwTxtAttr::Destroy()
2009-08-27 Michael Stahl ensure that SwDoc::Insert() for item (set) returns success indicator:
replace SwRegHistory constructor with method InsertItems(), returning bool.
refactor InsAttr() so that it checks if InsertItems() succeeds.
2009-08-27 Michael Stahl move SwXTextPortionEnumeration from unoobj.hxx to unoport.hxx
2009-08-27 Michael Stahl add missing SolarMutex in SwXTextPortion methods
2009-08-27 Michael Stahl SwXTextPortion: new member m_xTextField (so the TextField property need not
be returned indirectly via SwUnoCursorHelper).
factor out function CreateSwXTextField().
2009-08-27 Michael Stahl SwXTextPortion: remove PORTION_CONTROL_CHAR and implementation of XTextField
2009-08-27 Michael Stahl remove obsolete hint SwTxtHardBlank and formats SwFmtHardBlank/SwFmtSoftHyph
2009-08-27 Michael Stahl clean up SwTxtAttr and friends:
remove many accessor methods for obsolete (due to autofmt) char format items.
remove unused flag SwTxtAttr::m_bDontMergeAttr.
MakeRedlineTxtAttr() now dedicated function, no longer calls MakeTxtAttr().
2009-08-27 Michael Stahl remove obsolete attribute SwTxt2Lines
2009-08-27 Michael Stahl SwXTextPortionEnumeration: finish refactoring CreatePortions
change ExportHints so it always returns a text portion for hint w/ CH_TXTATR.
remove special case for handling end of paragraph.
unfortunately had to refactor the fieldmarks export as well (got in the way).
2009-08-27 Michael Stahl SwXTextPortionEnumeration: refactor CreatePortions: frames export
extract function ExportFrames() from CreatePortions().
remove (un)dead code that calls evil MovePara(fnParaCurr, fnParaEnd)
2009-08-27 Michael Stahl clean up SwXParaFrameEnumeration
2009-08-27 Michael Stahl CollectFrameAtNode: replace SwDependArr with STL based FrameDependList_t
2009-08-27 Michael Stahl SwXTextPortionEnumeration: tweak refmark/toxmark export
so ExportHints returns the portion for point marks
2009-08-27 Michael Stahl clean up SwXTextPortionEnumeration:
prefix members, remove casts, replace SvWeirdArray with STL, etc.
make CreatePortions() method a function, and remove lots of members.
extract fieldmarks function from CreatePortions.
2009-08-27 Michael Stahl remove FOREACHUNOPAM_START/END macros
2009-08-27 Michael Stahl clean up SwXTextPortion:
prefix members, remove casts, etc.
remove SwXRubyPortion: replace it with another SwXTextPortion constructor
2009-08-27 Michael Stahl #i102541# SwXReferenceMark::InsertRefMark(): use flag SETATTR_DONTEXPAND
2009-08-27 Michael Stahl rename SwTxtNode::Insert to SwTxtNode::InsertHint, and
fix constness in SwTxtNode::InsertItem
2009-08-27 Michael Stahl turn SwTxtNode::MakeTxtAttr() methods into global functions in ndhints.hxx
2009-08-27 Michael Stahl remove obsolete sw/inc/bookmrk.hxx
2009-08-27 Michael Stahl pam.cxx: fix ComparePosition functions (returned wrong result in one case)
2009-08-27 Michael Stahl #i103613# only import RDF metadata on normal open of a document
2009-09-11 kz CWS-TOOLING: integrate CWS impress176
2009-09-08 20:18:24 +0200 sj r275957 : fixed warning (shadowed variable)
2009-09-08 18:02:05 +0200 cl r275948 : #i104315# added missing tab pages
2009-09-08 17:35:18 +0200 cl r275947 : #i104866# fixed angle import
2009-09-08 17:32:53 +0200 cl r275946 : #i104841# fixed angle import
2009-09-08 17:01:25 +0200 cl r275943 : #i103935# fixed the SID_EVENTCONFIG mess
2009-09-08 14:32:57 +0200 sj r275928 : #i104685# only comments
2009-09-07 12:37:36 +0200 sj r275886 : #i104683# fixed import of bold/italic attributes for normal text shapes
2009-09-04 15:07:46 +0200 sj r275808 : #104689# fixed bullet color problem
2009-09-03 15:25:07 +0200 sj r275753 : #160200# added vertical alignment of table cells
2009-09-11 kz CWS-TOOLING: integrate CWS dv14
2009-09-10 15:16:32 +0200 sg r276035 : #160513# updated wfs scheme to accept ports
2009-09-10 07:41:47 +0200 dv r276019 : #i104942# Better renaming algorithmen
2009-08-31 13:41:11 +0200 dv r275604 : #160505# Setting APP1PRODUCTNAME must not overwrite APP1PRODUCTDEF
2009-09-11 kz CWS-TOOLING: integrate CWS jl131
2009-09-02 16:42:40 +0200 jl r275720 : #i97896#
2009-08-31 13:01:53 +0200 jl r275599 : CWS-TOOLING: rebase CWS jl131 to trunk@275331 (milestone: DEV300:m56)
2009-07-31 14:35:30 +0200 jl r274531 : CWS-TOOLING: rebase CWS jl131 to trunk@274203 (milestone: DEV300:m53)
2009-07-23 14:20:32 +0200 jl r274272 : #i79839# better error text when trying to modify shared layer without having write permission, eg. unopkg add --shared, unopkg remove --shared, unopkg reinstall --shared
2009-07-22 16:38:02 +0200 jl r274252 : #i97896# localize error message for lock file
2009-07-22 16:37:22 +0200 jl r274251 : #i80462# unprecise wording in updatedialog
2009-07-22 16:36:06 +0200 jl r274250 : #i97896# localize error message for lock file
2009-07-22 16:35:20 +0200 jl r274249 : #i97896# localize error message for lock file
2009-07-22 15:07:30 +0200 jl r274242 : #i98873# minimum java version is 1.5 since OOo 3.0
2009-09-11 kz CWS-TOOLING: integrate CWS changehc
2009-08-31 19:38:50 +0200 pl r275633 : remove dbug printf
2009-08-31 17:41:50 +0200 pl r275623 : CWS-TOOLING: rebase CWS changehc to trunk@275331 (milestone: DEV300:m56)
2009-07-15 19:45:46 +0200 pl r274028 : #i35482# use HC flag to decide high contrast mode
2009-07-15 17:40:52 +0200 pl r274020 : #i35482# use HC flag to decide high contrast mode
2009-07-15 17:39:50 +0200 pl r274019 : #i35482# update autohc correctly in MergeSystemSettings
2009-07-15 17:38:57 +0200 pl r274018 : #i35482# update autohc correctly in MergeSystemSettings
2009-09-11 kz CWS-TOOLING: integrate CWS notes10
2009-08-24 07:25:57 +0200 mod r275287 : 2009-07-26 02:38:32 +0200 mod r274343 : #i#i103645#
2009-07-26 02:01:53 +0200 mod r274342 : #i103645#
2009-07-26 01:52:42 +0200 mod r274341 : #i103490#
2009-07-22 08:31:48 +0200 mod r274215 : #i103373#
2009-07-15 00:55:11 +0200 mod r273987 : #i101419#
2009-07-14 07:07:55 +0200 mod r273956 : #i101419#
2009-07-14 07:07:43 +0200 mod r273955 : #i101419#
2009-07-14 07:02:10 +0200 mod r273954 : changes from notes9
2009-07-14 06:14:25 +0200 mod r273953 : #i103476#
2009-09-11 kz CWS-TOOLING: integrate CWS ab70
2009-09-10 15:12:54 +0200 jsk r276034 : #i85434# - mandatory automatic update test
2009-09-10 15:11:06 +0200 jsk r276033 : #i85434# - mandatory automatic update test
2009-09-02 09:49:24 +0200 ab r275698 : #i85434# Dialog Import
2009-09-11 kz CWS-TOOLING: integrate CWS hb32bugs02
2009-09-02 Henning Brinkmann #i102420# revert changes
2009-08-26 Henning Brinkmann merged DEV300_m56
2009-08-19 Henning Brinkmann merged DEV300_m55
2009-08-14 Henning Brinkmann merged changes from wntmsci12
2009-08-12 Henning Brinkmann Implemented NoSpaceEdit constructor and destructor in .cxx to allow compile with debug on wntmsci12.
2009-08-12 Henning Brinkmann Added some SW_DLLPUBLIC to make compilable on wntmsci12.
2009-08-11 Henning Brinkmann #i102420# dbg_out: surround output for SwNodes with <nodes-array>.
2009-08-10 Henning Brinkmann #i102420# rewritten debug output for SwNodes.
2009-08-07 Henning Brinkmann #i102420# debug _MoveNodes: output the destination, too. Break after two iterations.
2009-08-07 Henning Brinkmann #i102420# _MoveNodes: Additionally check if destination index is inside source => false
Check if current range was already handled => loop
Debug output current range
2009-08-06 Henning Brinkmann merged DEV300_m54
2009-08-06 Henning Brinkmann added master fix
2009-08-06 Henning Brinkmann debug output for SwNodeRange
2009-08-04 Henning Brinkmann #i102844# robustness: check for NULL pointer to prevent crash
2009-08-03 Henning Brinkmann #i103475# applied patch and verified
2009-08-03 Henning Brinkmann Removed code preventing build of sw with DEBUG.
2009-09-11 convert-repo update tags
2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300
2009-09-05 22:49:00 +0200 ydario r275858 : #i99588# applied os2port06 diff to DEV300 tree.
2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23
2009-08-29 07:07:53 +0200 tono r275555 : i#104522: mingw port graphite
2009-08-29 07:07:26 +0200 tono r275554 : i#104522: mingw port printf format fix
2009-09-10 kz CWS-TOOLING: integrate CWS mh232
2009-08-26 03:52:57 +0200 mh r275385 : #i102182# FreeBSD patch
2009-08-26 03:43:20 +0200 mh r275384 : #i101333# patch for FreeBSD
2009-08-26 03:11:20 +0200 mh r275383 : #i39230
2009-08-26 03:07:51 +0200 mh r275382 : #i39230# more space for initials field
2009-08-26 02:41:19 +0200 mh r275380 : #i39230# use vos::osecurity for reading the user name
2009-08-18 22:06:00 +0200 mh r275130 : #i104243#, line ending problem with newer perl
2009-08-18 21:53:21 +0200 mh r275129 : #i39230# read initials via getpwnam
2009-08-18 21:34:05 +0200 mh r275128 : enable CAIROCANVAS for Linux and Mac, #i88613#
2009-08-17 18:02:59 +0200 mh r275067 : #i95498# make compile with gcc3
2009-09-10 kz CWS-TOOLING: integrate CWS tkr24
2009-09-07 14:31:06 +0200 is r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT
2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping>
2009-09-11 convert-repo update tags
2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300
2009-09-05 22:49:00 +0200 ydario r275858 : #i99588# applied os2port06 diff to DEV300 tree.
2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23
2009-08-29 07:07:53 +0200 tono r275555 : i#104522: mingw port graphite
2009-08-29 07:07:26 +0200 tono r275554 : i#104522: mingw port printf format fix
2009-09-10 kz CWS-TOOLING: integrate CWS mh232
2009-08-26 03:52:57 +0200 mh r275385 : #i102182# FreeBSD patch
2009-08-26 03:43:20 +0200 mh r275384 : #i101333# patch for FreeBSD
2009-08-26 03:11:20 +0200 mh r275383 : #i39230
2009-08-26 03:07:51 +0200 mh r275382 : #i39230# more space for initials field
2009-08-26 02:41:19 +0200 mh r275380 : #i39230# use vos::osecurity for reading the user name
2009-08-18 22:06:00 +0200 mh r275130 : #i104243#, line ending problem with newer perl
2009-08-18 21:53:21 +0200 mh r275129 : #i39230# read initials via getpwnam
2009-08-18 21:34:05 +0200 mh r275128 : enable CAIROCANVAS for Linux and Mac, #i88613#
2009-08-17 18:02:59 +0200 mh r275067 : #i95498# make compile with gcc3
2009-09-10 kz CWS-TOOLING: integrate CWS tkr24
2009-09-07 14:31:06 +0200 is r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT
2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping>
2009-09-11 14:29:45 +00:00
|
|
|
nToxCnt = 0;
|
|
|
|
nRefCnt = 0;
|
|
|
|
m_nMetaCount = 0;
|
2013-11-18 11:29:24 +00:00
|
|
|
m_nInputFieldCount = 0;
|
2014-04-25 14:00:35 +02:00
|
|
|
bPaintBlank = false;
|
|
|
|
bPaintWrong = false;
|
|
|
|
bURL = false;
|
|
|
|
bGreyWave = false;
|
|
|
|
bNoColReplace = false;
|
2000-09-18 23:08:29 +00:00
|
|
|
bNoHyph = pAttrSet->GetNoHyphenHere().GetValue();
|
|
|
|
bBlink = pAttrSet->GetBlink().GetValue();
|
2014-04-25 14:00:35 +02:00
|
|
|
bOrgChg = true;
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
const SvxFontItem& rFont = pAttrSet->GetFont();
|
|
|
|
aSub[SW_LATIN].SetFamily( rFont.GetFamily() );
|
|
|
|
aSub[SW_LATIN].SetName( rFont.GetFamilyName() );
|
|
|
|
aSub[SW_LATIN].SetStyleName( rFont.GetStyleName() );
|
|
|
|
aSub[SW_LATIN].SetPitch( rFont.GetPitch() );
|
|
|
|
aSub[SW_LATIN].SetCharSet( rFont.GetCharSet() );
|
|
|
|
aSub[SW_LATIN].SvxFont::SetPropr( 100 ); // 100% der FontSize
|
|
|
|
Size aTmpSize = aSub[SW_LATIN].aSize;
|
|
|
|
aTmpSize.Height() = pAttrSet->GetSize().GetHeight();
|
|
|
|
aSub[SW_LATIN].SetSize( aTmpSize );
|
|
|
|
aSub[SW_LATIN].SetItalic( pAttrSet->GetPosture().GetPosture() );
|
|
|
|
aSub[SW_LATIN].SetWeight( pAttrSet->GetWeight().GetWeight() );
|
|
|
|
aSub[SW_LATIN].SetLanguage( pAttrSet->GetLanguage().GetLanguage() );
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
const SvxFontItem& rFont = pAttrSet->GetCJKFont();
|
|
|
|
aSub[SW_CJK].SetFamily( rFont.GetFamily() );
|
|
|
|
aSub[SW_CJK].SetName( rFont.GetFamilyName() );
|
|
|
|
aSub[SW_CJK].SetStyleName( rFont.GetStyleName() );
|
|
|
|
aSub[SW_CJK].SetPitch( rFont.GetPitch() );
|
|
|
|
aSub[SW_CJK].SetCharSet( rFont.GetCharSet() );
|
|
|
|
aSub[SW_CJK].SvxFont::SetPropr( 100 ); // 100% der FontSize
|
|
|
|
Size aTmpSize = aSub[SW_CJK].aSize;
|
|
|
|
aTmpSize.Height() = pAttrSet->GetCJKSize().GetHeight();
|
|
|
|
aSub[SW_CJK].SetSize( aTmpSize );
|
|
|
|
aSub[SW_CJK].SetItalic( pAttrSet->GetCJKPosture().GetPosture() );
|
|
|
|
aSub[SW_CJK].SetWeight( pAttrSet->GetCJKWeight().GetWeight() );
|
2001-03-06 14:06:18 +00:00
|
|
|
LanguageType eNewLang = pAttrSet->GetCJKLanguage().GetLanguage();
|
|
|
|
aSub[SW_CJK].SetLanguage( eNewLang );
|
|
|
|
aSub[SW_LATIN].SetCJKContextLanguage( eNewLang );
|
|
|
|
aSub[SW_CJK].SetCJKContextLanguage( eNewLang );
|
|
|
|
aSub[SW_CTL].SetCJKContextLanguage( eNewLang );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2001-01-15 13:02:57 +00:00
|
|
|
const SvxFontItem& rFont = pAttrSet->GetCTLFont();
|
2000-09-18 23:08:29 +00:00
|
|
|
aSub[SW_CTL].SetFamily( rFont.GetFamily() );
|
|
|
|
aSub[SW_CTL].SetName( rFont.GetFamilyName() );
|
|
|
|
aSub[SW_CTL].SetStyleName( rFont.GetStyleName() );
|
|
|
|
aSub[SW_CTL].SetPitch( rFont.GetPitch() );
|
|
|
|
aSub[SW_CTL].SetCharSet( rFont.GetCharSet() );
|
|
|
|
aSub[SW_CTL].SvxFont::SetPropr( 100 ); // 100% der FontSize
|
|
|
|
Size aTmpSize = aSub[SW_CTL].aSize;
|
2002-03-21 09:46:39 +00:00
|
|
|
aTmpSize.Height() = pAttrSet->GetCTLSize().GetHeight();
|
2000-09-18 23:08:29 +00:00
|
|
|
aSub[SW_CTL].SetSize( aTmpSize );
|
2000-12-12 14:16:19 +00:00
|
|
|
aSub[SW_CTL].SetItalic( pAttrSet->GetCTLPosture().GetPosture() );
|
|
|
|
aSub[SW_CTL].SetWeight( pAttrSet->GetCTLWeight().GetWeight() );
|
|
|
|
aSub[SW_CTL].SetLanguage( pAttrSet->GetCTLLanguage().GetLanguage() );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2004-02-26 14:34:35 +00:00
|
|
|
if ( pAttrSet->GetCharHidden().GetValue() )
|
|
|
|
SetUnderline( UNDERLINE_DOTTED );
|
|
|
|
else
|
2013-08-01 17:23:50 +02:00
|
|
|
SetUnderline( pAttrSet->GetUnderline().GetLineStyle() );
|
2000-11-24 14:56:32 +00:00
|
|
|
SetUnderColor( pAttrSet->GetUnderline().GetColor() );
|
2009-01-05 17:49:45 +00:00
|
|
|
SetOverline( pAttrSet->GetOverline().GetLineStyle() );
|
|
|
|
SetOverColor( pAttrSet->GetOverline().GetColor() );
|
2000-10-30 11:51:04 +00:00
|
|
|
SetEmphasisMark( pAttrSet->GetEmphasisMark().GetEmphasisMark() );
|
2000-09-18 23:08:29 +00:00
|
|
|
SetStrikeout( pAttrSet->GetCrossedOut().GetStrikeout() );
|
|
|
|
SetColor( pAttrSet->GetColor().GetValue() );
|
2014-04-25 14:00:35 +02:00
|
|
|
SetTransparent( true );
|
2000-09-18 23:08:29 +00:00
|
|
|
SetAlign( ALIGN_BASELINE );
|
|
|
|
SetOutline( pAttrSet->GetContour().GetValue() );
|
|
|
|
SetShadow( pAttrSet->GetShadowed().GetValue() );
|
2002-08-14 05:43:49 +00:00
|
|
|
SetPropWidth( pAttrSet->GetCharScaleW().GetValue() );
|
2001-03-12 09:01:09 +00:00
|
|
|
SetRelief( (FontRelief)pAttrSet->GetCharRelief().GetValue() );
|
2001-04-10 13:24:56 +00:00
|
|
|
if( pAttrSet->GetAutoKern().GetValue() )
|
2006-08-14 15:47:31 +00:00
|
|
|
{
|
|
|
|
SetAutoKern( ( !pIDocumentSettingAccess ||
|
2015-03-11 15:04:54 +02:00
|
|
|
!pIDocumentSettingAccess->get(DocumentSettingId::KERN_ASIAN_PUNCTUATION) ) ?
|
2015-05-13 10:53:15 +02:00
|
|
|
FontKerning::FontSpecific :
|
|
|
|
FontKerning::Asian );
|
2006-08-14 15:47:31 +00:00
|
|
|
}
|
2001-04-10 13:24:56 +00:00
|
|
|
else
|
2015-05-13 10:53:15 +02:00
|
|
|
SetAutoKern( FontKerning::NONE );
|
2000-09-18 23:08:29 +00:00
|
|
|
SetWordLineMode( pAttrSet->GetWordLineMode().GetValue() );
|
|
|
|
const SvxEscapementItem &rEsc = pAttrSet->GetEscapement();
|
|
|
|
SetEscapement( rEsc.GetEsc() );
|
|
|
|
if( aSub[SW_LATIN].IsEsc() )
|
|
|
|
SetProportion( rEsc.GetProp() );
|
|
|
|
SetCaseMap( pAttrSet->GetCaseMap().GetCaseMap() );
|
|
|
|
SetFixKerning( pAttrSet->GetKerning().GetValue() );
|
|
|
|
const SfxPoolItem* pItem;
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
pBackColor = new Color( static_cast<const SvxBrushItem*>(pItem)->GetColor() );
|
2000-09-18 23:08:29 +00:00
|
|
|
else
|
|
|
|
pBackColor = NULL;
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2014-11-24 10:39:39 +02:00
|
|
|
SetHighlightColor(static_cast<const SvxBrushItem*>(pItem)->GetColor());
|
2013-09-29 10:24:53 +02:00
|
|
|
else
|
2013-10-04 09:12:07 +02:00
|
|
|
SetHighlightColor(COL_TRANSPARENT);
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BOX,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2013-07-07 20:33:40 +02:00
|
|
|
{
|
2013-08-06 10:58:09 +02:00
|
|
|
const SvxBoxItem* pBoxItem = static_cast<const SvxBoxItem*>(pItem);
|
|
|
|
SetTopBorder(pBoxItem->GetTop());
|
|
|
|
SetBottomBorder(pBoxItem->GetBottom());
|
|
|
|
SetRightBorder(pBoxItem->GetRight());
|
|
|
|
SetLeftBorder(pBoxItem->GetLeft());
|
2015-03-30 11:20:37 +02:00
|
|
|
SetTopBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::TOP));
|
|
|
|
SetBottomBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::BOTTOM));
|
|
|
|
SetRightBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::RIGHT));
|
|
|
|
SetLeftBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::LEFT));
|
2013-07-07 20:33:40 +02:00
|
|
|
}
|
|
|
|
else
|
2013-08-21 21:30:41 +02:00
|
|
|
{
|
|
|
|
SetTopBorder(0);
|
|
|
|
SetBottomBorder(0);
|
|
|
|
SetRightBorder(0);
|
|
|
|
SetLeftBorder(0);
|
|
|
|
SetTopBorderDist(0);
|
|
|
|
SetBottomBorderDist(0);
|
|
|
|
SetRightBorderDist(0);
|
|
|
|
SetLeftBorderDist(0);
|
|
|
|
}
|
|
|
|
|
2014-09-10 17:53:41 +02:00
|
|
|
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOW,
|
2014-02-19 21:49:02 +01:00
|
|
|
true, &pItem ))
|
2013-08-21 21:30:41 +02:00
|
|
|
{
|
|
|
|
const SvxShadowItem* pShadowItem = static_cast<const SvxShadowItem*>(pItem);
|
|
|
|
SetShadowColor(pShadowItem->GetColor());
|
|
|
|
SetShadowWidth(pShadowItem->GetWidth());
|
|
|
|
SetShadowLocation(pShadowItem->GetLocation());
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SetShadowColor(COL_TRANSPARENT);
|
|
|
|
SetShadowWidth(0);
|
|
|
|
SetShadowLocation(SVX_SHADOW_NONE);
|
|
|
|
}
|
2013-07-07 20:33:40 +02:00
|
|
|
|
2001-03-19 14:58:50 +00:00
|
|
|
const SvxTwoLinesItem& rTwoLinesItem = pAttrSet->Get2Lines();
|
|
|
|
if ( ! rTwoLinesItem.GetValue() )
|
|
|
|
SetVertical( pAttrSet->GetCharRotate().GetValue() );
|
|
|
|
else
|
|
|
|
SetVertical( 0 );
|
2015-03-11 15:04:54 +02:00
|
|
|
if( pIDocumentSettingAccess && pIDocumentSettingAccess->get( DocumentSettingId::SMALL_CAPS_PERCENTAGE_66 ))
|
2011-05-20 14:44:03 +02:00
|
|
|
{
|
|
|
|
aSub[ SW_LATIN ].smallCapsPercentage66 = true;
|
|
|
|
aSub[ SW_CJK ].smallCapsPercentage66 = true;
|
|
|
|
aSub[ SW_CTL ].smallCapsPercentage66 = true;
|
|
|
|
}
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
2013-07-07 20:33:40 +02:00
|
|
|
SwFont::~SwFont()
|
|
|
|
{
|
|
|
|
delete pBackColor;
|
|
|
|
}
|
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
SwSubFont& SwSubFont::operator=( const SwSubFont &rFont )
|
|
|
|
{
|
|
|
|
SvxFont::operator=( rFont );
|
|
|
|
pMagic = rFont.pMagic;
|
|
|
|
nFntIndex = rFont.nFntIndex;
|
|
|
|
nOrgHeight = rFont.nOrgHeight;
|
|
|
|
nOrgAscent = rFont.nOrgAscent;
|
2001-02-13 07:56:40 +00:00
|
|
|
nPropWidth = rFont.nPropWidth;
|
2000-09-18 23:08:29 +00:00
|
|
|
aSize = rFont.aSize;
|
2011-05-20 14:44:03 +02:00
|
|
|
smallCapsPercentage66 = rFont.smallCapsPercentage66;
|
2000-09-18 23:08:29 +00:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
SwFont& SwFont::operator=( const SwFont &rFont )
|
|
|
|
{
|
|
|
|
aSub[SW_LATIN] = rFont.aSub[SW_LATIN];
|
|
|
|
aSub[SW_CJK] = rFont.aSub[SW_CJK];
|
|
|
|
aSub[SW_CTL] = rFont.aSub[SW_CTL];
|
|
|
|
nActual = rFont.nActual;
|
|
|
|
delete pBackColor;
|
|
|
|
pBackColor = rFont.pBackColor ? new Color( *rFont.pBackColor ) : NULL;
|
2013-10-04 09:12:07 +02:00
|
|
|
m_aHighlightColor = rFont.m_aHighlightColor;
|
2013-07-08 17:16:13 +02:00
|
|
|
m_aTopBorder = rFont.m_aTopBorder;
|
|
|
|
m_aBottomBorder = rFont.m_aBottomBorder;
|
|
|
|
m_aRightBorder = rFont.m_aRightBorder;
|
|
|
|
m_aLeftBorder = rFont.m_aLeftBorder;
|
2013-08-06 10:58:09 +02:00
|
|
|
m_nTopBorderDist = rFont.m_nTopBorderDist;
|
|
|
|
m_nBottomBorderDist = rFont.m_nBottomBorderDist;
|
|
|
|
m_nRightBorderDist = rFont.m_nRightBorderDist;
|
|
|
|
m_nLeftBorderDist = rFont.m_nLeftBorderDist;
|
2013-08-21 21:30:41 +02:00
|
|
|
m_aShadowColor = rFont.m_aShadowColor;
|
|
|
|
m_nShadowWidth = rFont.m_nShadowWidth;
|
|
|
|
m_aShadowLocation = rFont.m_aShadowLocation;
|
2000-11-24 14:56:32 +00:00
|
|
|
aUnderColor = rFont.GetUnderColor();
|
2009-01-05 17:49:45 +00:00
|
|
|
aOverColor = rFont.GetOverColor();
|
CWS-TOOLING: integrate CWS odfmetadata3
2009-09-11 Michael Stahl merge DEV300_m58
2009-09-07 Michael Stahl SwFmtFld::Modify(): do nothing on RES_OBJECTDYING
2009-08-27 Michael Stahl #i91565#, #i91566#: TextPortionEnumerationTest.java: add test document
2009-08-27 Michael Stahl #i91565#, #i91566#: add complex test: TextPortionEnumerationTest.java
2009-08-27 Michael Stahl CLiteral::initialize(): zero-length literals probably not an error
2009-08-27 Michael Stahl #i91565#, #i91566#: offapi: new InContentMetadata and MetadataField services
adapt TextPortion for InContentMetadata
2009-08-27 Michael Stahl #i91564#: xmloff: load/store xml:id and RDFa for text:bookmark(-start).
2009-08-27 Michael Stahl #i91564#: sw core: add support for xml:id at bookmarks:
sw::mark::Bookmark: derive from Metadatable.
SwHistoryBookmark, SaveBookmark: store a MetadatableUndo.
ndcopy.cxx: lcl_CopyBookmarks(): copy the xml:id.
SwXBookmark: derive from MetadatableMixin.
2009-08-27 Michael Stahl #i91565#, #i91566#: xmloff: refactor ruby import so nested meta(-field) works:
remove XMLRubyHint_Impl.
XMLImpRubyContext_Impl::~XMLImpRubyContext_Impl(): insert ruby directly.
2009-08-27 Michael Stahl #i91565#, #i91566#: xmloff: fix text:meta(-field) import/export:
new XMLTextParagraphExport::exportTextField() overload for XTextField.
CreateAndInsertMark(): set xml:id after insertion.
fix meta(-field) service names, bugs etc.
2009-08-27 Michael Stahl #i91565#, #i91566#: sw text formatting: paint background of meta(-field) body:
SwFont: add member m_nMetaCount.
txttypes.hxx: add POR_META.
atrstck.cxx: handle RES_TXTATR_META(FIELD).
itrform2.cxx: SwTxtFormatter::WhichTxtPor(): create new class SwMetaPortion.
2009-08-27 Michael Stahl #i91566#: sw text formatting: display meta-field prefix and suffix:
SwAttrIter::GetAttr(): replace with call to GetTxtAttrForCharAt().
SwTxtFormatter::NewExtraPortion(): handle meta-field prefix.
SwTxtFormatter: new member m_nHintEndIndex.
SwTxtFormatter::WhichFirstPortion(): call TryNewNoLengthPortion().
SwTxtFormatter::TryNewNoLengthPortion(): new; handle suffix of meta-field.
SwTxtFormatter::UnderFlow(): UGLY HACK: decrement m_nHintEndIndex.
SwFldPortion: add flag m_bNoLength: portion has zero length (for suffix).
2009-08-27 Michael Stahl #i91565#, #i91566#: extend text:meta(-field) uno wrapper with XText interface:
unoobj.hxx: new CursorType CURSOR_META.
unoobj2.cxx: refactor SwXText implementation to ensure that when the SwXText
belongs to a SwXMeta, content is always inserted inside the meta(-field).
unoobj.cxx: new SwXTextCursor::ForceIntoMeta(): cursor stays in meta(-field).
unometa.hxx: SwXMeta implements XText, forwarding to a member SwXMetaText.
DocInsertStringSplitCR(), SwX*::attachToRange(), SwX*::DeleteAndInsert():
use FORCEHINTEXPAND hack to ensure insert into the meta(-field) at the end.
2009-08-27 Michael Stahl #i91565#, #i91566#: add text:meta(-field) uno wrapper to sw:
fmtmeta.hxx, fmtatr2.cxx: new class sw::MetaField, new sw::MetaFieldManager.
doc.hxx, docnew.cxx: new SwDoc::GetMetaFieldManager().
unocoll.hxx,.cxx: new SW_SERVICE_FIELDTYPE_METAFIELD, SW_SERVICE_TYPE_META.
unomap.hxx,.cxx: new PROPERTY_MAP_METAFIELD.
unoprnms.hxx: new UNO_NAME_META.
unoport.hxx: new PORTION_META; add "InContentMetadata" prop to SwXTextPortion.
new unometa.hxx: new class SwXMeta and SwXMetaField.
unofield.cxx: SwXFieldEnumeration: include meta-fields.
unoportenum.cxx: handle RES_TXTATR_META(FIELD) by using a portion list stack.
unotext.cxx: SwXText::insertTextContent(): handle meta(-field) as attribute.
2009-08-27 Michael Stahl #i91565#, #i91566#: ndhints.cxx: remove sort number from SwTxtAttrNesting
2009-08-27 Michael Stahl #i91565#, #i91566#: add support for hints with end and CH_TXTATR to sw core:
doc.hxx, docedt.cxx: replace SwDoc::Delete(), DeleteAndJoin(), ReplaceRange()
with wrappers that split at left-overlapped end+CH_TXTATR hints.
txatbase.hxx: new member SwTxtAttr::m_bHasDummyChar.
ndtxt.hxx: rename SwTxtNode::GetTxtAttr() to GetTxtAttrForCharAt().
ndtxt.cxx: SwTxtNode::CopyText(): copy end+CH_TXTATR hints iff copy CH_TXTATR.
txtatr2.cxx, thints.cxx: SwTxtMeta gets a CH_TXTATR.
2009-08-27 Michael Stahl #i91565#, #i91566#: add text:meta(-field) to sw core:
txatbase.hxx: new member SwTxtAttr::m_bNesting.
hintids.hxx: new ids RES_TXTATR_META, RES_TXTATR_METAFIELD.
txtatr.hxx: new base class SwTxtAttrNesting.
new hint SwTxtMeta.
SwTxtRuby derives from SwTxtAttrNesting.
txtinet.hxx: SwTxtINetFmt derives from SwTxtAttrNesting.
new header fmtmeta.hxx: new pool item SwFmtMeta. new class sw::Meta.
ndhints.hxx, thints.cxx: new method SwpHints::TryInsertNesting().
thints.cxx: refactoring: BuildPortions() no longer handles Ruby/Hyperlink,
but TryInsertNesting(), which also handles meta(-field).
SwTxtNode::InsertItem(): check if the hint is actually inserted.
ndhints.cxx: sort nesting hints based on sort number.
ndtxt.cxx: lcl_CopyHint(): handle copy of meta/meta-field.
2009-08-27 Michael Stahl enable expanding hints with m_bLockExpandFlag set:
add new InsertFlag: INS_FORCEHINTEXPAND.
add new SetAttrMode: SETATTR_FORCEHINTEXPAND.
rename SwEditShell::Insert() to Insert2() because changed signature fails
to compile when SwWrtShell tries to overwrite these non-virtual members...
SwWrtShell::Insert() sets FOCEHINTEXPAND if range was selected/deleted.
adapt SwUndoInsert to store flags.
2009-08-27 Michael Stahl change formal parameters of item insertion methods to type SetAttrMode
2009-08-27 Michael Stahl fix incorrect resetting of text attributes in SwUndoInsSection, SwUndoInserts
2009-08-27 Michael Stahl clean up SwTxtNode::CutImpl() and lcl_CopyHint()
2009-08-27 Michael Stahl rename SwDoc::Copy() to CopyRange(), and _Copy() to CopyImpl()
2009-08-27 Michael Stahl rename SwNodes::Move() to MoveRange(), and remove unused parameter
2009-08-27 Michael Stahl rename SwDoc::Move() to MoveRange()/MoveNodeRange()
2009-08-27 Michael Stahl rename SwDoc::Insert() to InsertString(), and remove sal_Unicode variant
2009-08-27 Michael Stahl rename SwDoc::Insert() to InsertPoolItem()/InsertItemSet()/InsertSwSection()
2009-08-27 Michael Stahl rename SwDoc::Replace() to ReplaceRange()
2009-08-27 Michael Stahl remove SwDoc::Overwrite() sal_Unicode variant
2009-08-27 Michael Stahl split up SwDoc::DeleteAndJoin(): factor out DeleteAndJoinWithRedline()
2009-08-27 Michael Stahl rename overloaded SwDoc::Delete() to DeleteRange()/DeleteTOXMark()
2009-08-27 Michael Stahl rename SwTxtNode::Copy() to CopyText()
2009-08-27 Michael Stahl rename SwTxtNode::Cut() to CutText(), and _Cut() to CutImpl()
2009-08-27 Michael Stahl rename SwTxtNode::Delete() to DeleteAttribute()/DeleteAttributes()
2009-08-27 Michael Stahl rename SwTxtNode::Replace() to ReplaceText(), and remove the xub_Unicode variant
2009-08-27 Michael Stahl rename SwTxtNode::Erase() to EraseText()
2009-08-27 Michael Stahl rename SwTxtNode::Insert() to InsertText(), and remove the xub_Unicode variant
2009-08-27 Michael Stahl clean up SwTxtNode::Update()
2009-08-27 Michael Stahl remove SwTxtAttr::RemoveFromPool() and make destructor non-public,
to be invoked by new method SwTxtAttr::Destroy()
2009-08-27 Michael Stahl ensure that SwDoc::Insert() for item (set) returns success indicator:
replace SwRegHistory constructor with method InsertItems(), returning bool.
refactor InsAttr() so that it checks if InsertItems() succeeds.
2009-08-27 Michael Stahl move SwXTextPortionEnumeration from unoobj.hxx to unoport.hxx
2009-08-27 Michael Stahl add missing SolarMutex in SwXTextPortion methods
2009-08-27 Michael Stahl SwXTextPortion: new member m_xTextField (so the TextField property need not
be returned indirectly via SwUnoCursorHelper).
factor out function CreateSwXTextField().
2009-08-27 Michael Stahl SwXTextPortion: remove PORTION_CONTROL_CHAR and implementation of XTextField
2009-08-27 Michael Stahl remove obsolete hint SwTxtHardBlank and formats SwFmtHardBlank/SwFmtSoftHyph
2009-08-27 Michael Stahl clean up SwTxtAttr and friends:
remove many accessor methods for obsolete (due to autofmt) char format items.
remove unused flag SwTxtAttr::m_bDontMergeAttr.
MakeRedlineTxtAttr() now dedicated function, no longer calls MakeTxtAttr().
2009-08-27 Michael Stahl remove obsolete attribute SwTxt2Lines
2009-08-27 Michael Stahl SwXTextPortionEnumeration: finish refactoring CreatePortions
change ExportHints so it always returns a text portion for hint w/ CH_TXTATR.
remove special case for handling end of paragraph.
unfortunately had to refactor the fieldmarks export as well (got in the way).
2009-08-27 Michael Stahl SwXTextPortionEnumeration: refactor CreatePortions: frames export
extract function ExportFrames() from CreatePortions().
remove (un)dead code that calls evil MovePara(fnParaCurr, fnParaEnd)
2009-08-27 Michael Stahl clean up SwXParaFrameEnumeration
2009-08-27 Michael Stahl CollectFrameAtNode: replace SwDependArr with STL based FrameDependList_t
2009-08-27 Michael Stahl SwXTextPortionEnumeration: tweak refmark/toxmark export
so ExportHints returns the portion for point marks
2009-08-27 Michael Stahl clean up SwXTextPortionEnumeration:
prefix members, remove casts, replace SvWeirdArray with STL, etc.
make CreatePortions() method a function, and remove lots of members.
extract fieldmarks function from CreatePortions.
2009-08-27 Michael Stahl remove FOREACHUNOPAM_START/END macros
2009-08-27 Michael Stahl clean up SwXTextPortion:
prefix members, remove casts, etc.
remove SwXRubyPortion: replace it with another SwXTextPortion constructor
2009-08-27 Michael Stahl #i102541# SwXReferenceMark::InsertRefMark(): use flag SETATTR_DONTEXPAND
2009-08-27 Michael Stahl rename SwTxtNode::Insert to SwTxtNode::InsertHint, and
fix constness in SwTxtNode::InsertItem
2009-08-27 Michael Stahl turn SwTxtNode::MakeTxtAttr() methods into global functions in ndhints.hxx
2009-08-27 Michael Stahl remove obsolete sw/inc/bookmrk.hxx
2009-08-27 Michael Stahl pam.cxx: fix ComparePosition functions (returned wrong result in one case)
2009-08-27 Michael Stahl #i103613# only import RDF metadata on normal open of a document
2009-09-11 kz CWS-TOOLING: integrate CWS impress176
2009-09-08 20:18:24 +0200 sj r275957 : fixed warning (shadowed variable)
2009-09-08 18:02:05 +0200 cl r275948 : #i104315# added missing tab pages
2009-09-08 17:35:18 +0200 cl r275947 : #i104866# fixed angle import
2009-09-08 17:32:53 +0200 cl r275946 : #i104841# fixed angle import
2009-09-08 17:01:25 +0200 cl r275943 : #i103935# fixed the SID_EVENTCONFIG mess
2009-09-08 14:32:57 +0200 sj r275928 : #i104685# only comments
2009-09-07 12:37:36 +0200 sj r275886 : #i104683# fixed import of bold/italic attributes for normal text shapes
2009-09-04 15:07:46 +0200 sj r275808 : #104689# fixed bullet color problem
2009-09-03 15:25:07 +0200 sj r275753 : #160200# added vertical alignment of table cells
2009-09-11 kz CWS-TOOLING: integrate CWS dv14
2009-09-10 15:16:32 +0200 sg r276035 : #160513# updated wfs scheme to accept ports
2009-09-10 07:41:47 +0200 dv r276019 : #i104942# Better renaming algorithmen
2009-08-31 13:41:11 +0200 dv r275604 : #160505# Setting APP1PRODUCTNAME must not overwrite APP1PRODUCTDEF
2009-09-11 kz CWS-TOOLING: integrate CWS jl131
2009-09-02 16:42:40 +0200 jl r275720 : #i97896#
2009-08-31 13:01:53 +0200 jl r275599 : CWS-TOOLING: rebase CWS jl131 to trunk@275331 (milestone: DEV300:m56)
2009-07-31 14:35:30 +0200 jl r274531 : CWS-TOOLING: rebase CWS jl131 to trunk@274203 (milestone: DEV300:m53)
2009-07-23 14:20:32 +0200 jl r274272 : #i79839# better error text when trying to modify shared layer without having write permission, eg. unopkg add --shared, unopkg remove --shared, unopkg reinstall --shared
2009-07-22 16:38:02 +0200 jl r274252 : #i97896# localize error message for lock file
2009-07-22 16:37:22 +0200 jl r274251 : #i80462# unprecise wording in updatedialog
2009-07-22 16:36:06 +0200 jl r274250 : #i97896# localize error message for lock file
2009-07-22 16:35:20 +0200 jl r274249 : #i97896# localize error message for lock file
2009-07-22 15:07:30 +0200 jl r274242 : #i98873# minimum java version is 1.5 since OOo 3.0
2009-09-11 kz CWS-TOOLING: integrate CWS changehc
2009-08-31 19:38:50 +0200 pl r275633 : remove dbug printf
2009-08-31 17:41:50 +0200 pl r275623 : CWS-TOOLING: rebase CWS changehc to trunk@275331 (milestone: DEV300:m56)
2009-07-15 19:45:46 +0200 pl r274028 : #i35482# use HC flag to decide high contrast mode
2009-07-15 17:40:52 +0200 pl r274020 : #i35482# use HC flag to decide high contrast mode
2009-07-15 17:39:50 +0200 pl r274019 : #i35482# update autohc correctly in MergeSystemSettings
2009-07-15 17:38:57 +0200 pl r274018 : #i35482# update autohc correctly in MergeSystemSettings
2009-09-11 kz CWS-TOOLING: integrate CWS notes10
2009-08-24 07:25:57 +0200 mod r275287 : 2009-07-26 02:38:32 +0200 mod r274343 : #i#i103645#
2009-07-26 02:01:53 +0200 mod r274342 : #i103645#
2009-07-26 01:52:42 +0200 mod r274341 : #i103490#
2009-07-22 08:31:48 +0200 mod r274215 : #i103373#
2009-07-15 00:55:11 +0200 mod r273987 : #i101419#
2009-07-14 07:07:55 +0200 mod r273956 : #i101419#
2009-07-14 07:07:43 +0200 mod r273955 : #i101419#
2009-07-14 07:02:10 +0200 mod r273954 : changes from notes9
2009-07-14 06:14:25 +0200 mod r273953 : #i103476#
2009-09-11 kz CWS-TOOLING: integrate CWS ab70
2009-09-10 15:12:54 +0200 jsk r276034 : #i85434# - mandatory automatic update test
2009-09-10 15:11:06 +0200 jsk r276033 : #i85434# - mandatory automatic update test
2009-09-02 09:49:24 +0200 ab r275698 : #i85434# Dialog Import
2009-09-11 kz CWS-TOOLING: integrate CWS hb32bugs02
2009-09-02 Henning Brinkmann #i102420# revert changes
2009-08-26 Henning Brinkmann merged DEV300_m56
2009-08-19 Henning Brinkmann merged DEV300_m55
2009-08-14 Henning Brinkmann merged changes from wntmsci12
2009-08-12 Henning Brinkmann Implemented NoSpaceEdit constructor and destructor in .cxx to allow compile with debug on wntmsci12.
2009-08-12 Henning Brinkmann Added some SW_DLLPUBLIC to make compilable on wntmsci12.
2009-08-11 Henning Brinkmann #i102420# dbg_out: surround output for SwNodes with <nodes-array>.
2009-08-10 Henning Brinkmann #i102420# rewritten debug output for SwNodes.
2009-08-07 Henning Brinkmann #i102420# debug _MoveNodes: output the destination, too. Break after two iterations.
2009-08-07 Henning Brinkmann #i102420# _MoveNodes: Additionally check if destination index is inside source => false
Check if current range was already handled => loop
Debug output current range
2009-08-06 Henning Brinkmann merged DEV300_m54
2009-08-06 Henning Brinkmann added master fix
2009-08-06 Henning Brinkmann debug output for SwNodeRange
2009-08-04 Henning Brinkmann #i102844# robustness: check for NULL pointer to prevent crash
2009-08-03 Henning Brinkmann #i103475# applied patch and verified
2009-08-03 Henning Brinkmann Removed code preventing build of sw with DEBUG.
2009-09-11 convert-repo update tags
2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300
2009-09-05 22:49:00 +0200 ydario r275858 : #i99588# applied os2port06 diff to DEV300 tree.
2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23
2009-08-29 07:07:53 +0200 tono r275555 : i#104522: mingw port graphite
2009-08-29 07:07:26 +0200 tono r275554 : i#104522: mingw port printf format fix
2009-09-10 kz CWS-TOOLING: integrate CWS mh232
2009-08-26 03:52:57 +0200 mh r275385 : #i102182# FreeBSD patch
2009-08-26 03:43:20 +0200 mh r275384 : #i101333# patch for FreeBSD
2009-08-26 03:11:20 +0200 mh r275383 : #i39230
2009-08-26 03:07:51 +0200 mh r275382 : #i39230# more space for initials field
2009-08-26 02:41:19 +0200 mh r275380 : #i39230# use vos::osecurity for reading the user name
2009-08-18 22:06:00 +0200 mh r275130 : #i104243#, line ending problem with newer perl
2009-08-18 21:53:21 +0200 mh r275129 : #i39230# read initials via getpwnam
2009-08-18 21:34:05 +0200 mh r275128 : enable CAIROCANVAS for Linux and Mac, #i88613#
2009-08-17 18:02:59 +0200 mh r275067 : #i95498# make compile with gcc3
2009-09-10 kz CWS-TOOLING: integrate CWS tkr24
2009-09-07 14:31:06 +0200 is r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT
2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping>
2009-09-11 convert-repo update tags
2009-09-10 kz CWS-TOOLING: integrate CWS os2port06dev300
2009-09-05 22:49:00 +0200 ydario r275858 : #i99588# applied os2port06 diff to DEV300 tree.
2009-09-10 kz CWS-TOOLING: integrate CWS mingwport23
2009-08-29 07:07:53 +0200 tono r275555 : i#104522: mingw port graphite
2009-08-29 07:07:26 +0200 tono r275554 : i#104522: mingw port printf format fix
2009-09-10 kz CWS-TOOLING: integrate CWS mh232
2009-08-26 03:52:57 +0200 mh r275385 : #i102182# FreeBSD patch
2009-08-26 03:43:20 +0200 mh r275384 : #i101333# patch for FreeBSD
2009-08-26 03:11:20 +0200 mh r275383 : #i39230
2009-08-26 03:07:51 +0200 mh r275382 : #i39230# more space for initials field
2009-08-26 02:41:19 +0200 mh r275380 : #i39230# use vos::osecurity for reading the user name
2009-08-18 22:06:00 +0200 mh r275130 : #i104243#, line ending problem with newer perl
2009-08-18 21:53:21 +0200 mh r275129 : #i39230# read initials via getpwnam
2009-08-18 21:34:05 +0200 mh r275128 : enable CAIROCANVAS for Linux and Mac, #i88613#
2009-08-17 18:02:59 +0200 mh r275067 : #i95498# make compile with gcc3
2009-09-10 kz CWS-TOOLING: integrate CWS tkr24
2009-09-07 14:31:06 +0200 is r275898 : #160081# adding NO_LICENSE_INTO_COPYRIGHT
2009-09-10 releng #i10000# change KeyMapping to SingletonRef<framework::KeyMapping>
2009-09-11 14:29:45 +00:00
|
|
|
nToxCnt = 0;
|
|
|
|
nRefCnt = 0;
|
|
|
|
m_nMetaCount = 0;
|
2013-11-18 11:29:24 +00:00
|
|
|
m_nInputFieldCount = 0;
|
2000-09-18 23:08:29 +00:00
|
|
|
bFntChg = rFont.bFntChg;
|
|
|
|
bOrgChg = rFont.bOrgChg;
|
|
|
|
bPaintBlank = rFont.bPaintBlank;
|
2014-04-25 14:00:35 +02:00
|
|
|
bPaintWrong = false;
|
2000-09-18 23:08:29 +00:00
|
|
|
bURL = rFont.bURL;
|
|
|
|
bGreyWave = rFont.bGreyWave;
|
|
|
|
bNoColReplace = rFont.bNoColReplace;
|
|
|
|
bNoHyph = rFont.bNoHyph;
|
|
|
|
bBlink = rFont.bBlink;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2013-10-26 19:50:13 +02:00
|
|
|
void SwFont::GoMagic( SwViewShell *pSh, sal_uInt8 nWhich )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
SwFntAccess aFntAccess( aSub[nWhich].pMagic, aSub[nWhich].nFntIndex,
|
2014-04-25 14:00:35 +02:00
|
|
|
&aSub[nWhich], pSh, true );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
2014-04-25 14:00:35 +02:00
|
|
|
bool SwSubFont::IsSymbol( SwViewShell *pSh )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2014-04-25 14:00:35 +02:00
|
|
|
SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, false );
|
2000-09-18 23:08:29 +00:00
|
|
|
return aFntAccess.Get()->IsSymbol();
|
|
|
|
}
|
|
|
|
|
2014-08-15 19:09:49 +02:00
|
|
|
bool SwSubFont::ChgFnt( SwViewShell const *pSh, OutputDevice& rOut )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if ( pLastFont )
|
|
|
|
pLastFont->Unlock();
|
2014-04-25 14:00:35 +02:00
|
|
|
SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, true );
|
2000-09-18 23:08:29 +00:00
|
|
|
SV_STAT( nChangeFont );
|
|
|
|
|
|
|
|
pLastFont = aFntAccess.Get();
|
|
|
|
|
2003-10-15 08:58:49 +00:00
|
|
|
pLastFont->SetDevFont( pSh, rOut );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
pLastFont->Lock();
|
2009-01-05 17:49:45 +00:00
|
|
|
return UNDERLINE_NONE != GetUnderline() ||
|
|
|
|
UNDERLINE_NONE != GetOverline() ||
|
|
|
|
STRIKEOUT_NONE != GetStrikeout();
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
2013-10-26 19:50:13 +02:00
|
|
|
void SwFont::ChgPhysFnt( SwViewShell *pSh, OutputDevice& rOut )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if( bOrgChg && aSub[nActual].IsEsc() )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt8 nOldProp = aSub[nActual].GetPropr();
|
2000-09-18 23:08:29 +00:00
|
|
|
SetProportion( 100 );
|
2003-10-15 08:58:49 +00:00
|
|
|
ChgFnt( pSh, rOut );
|
2000-09-18 23:08:29 +00:00
|
|
|
SwFntAccess aFntAccess( aSub[nActual].pMagic, aSub[nActual].nFntIndex,
|
|
|
|
&aSub[nActual], pSh );
|
2003-10-15 08:58:49 +00:00
|
|
|
aSub[nActual].nOrgHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut );
|
|
|
|
aSub[nActual].nOrgAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
|
2000-09-18 23:08:29 +00:00
|
|
|
SetProportion( nOldProp );
|
2014-04-25 14:00:35 +02:00
|
|
|
bOrgChg = false;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if( bFntChg )
|
|
|
|
{
|
2003-10-15 08:58:49 +00:00
|
|
|
ChgFnt( pSh, rOut );
|
2000-09-18 23:08:29 +00:00
|
|
|
bFntChg = bOrgChg;
|
|
|
|
}
|
2003-10-15 08:58:49 +00:00
|
|
|
if( rOut.GetTextLineColor() != aUnderColor )
|
|
|
|
rOut.SetTextLineColor( aUnderColor );
|
2009-01-05 17:49:45 +00:00
|
|
|
if( rOut.GetOverlineColor() != aOverColor )
|
|
|
|
rOut.SetOverlineColor( aOverColor );
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
2014-04-21 19:28:47 -04:00
|
|
|
// Height = MaxAscent + MaxDescent
|
|
|
|
// MaxAscent = Max (T1_ascent, T2_ascent + (Esc * T1_height) );
|
|
|
|
// MaxDescent = Max (T1_height-T1_ascent,
|
|
|
|
// T2_height-T2_ascent - (Esc * T1_height)
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 SwSubFont::CalcEscHeight( const sal_uInt16 nOldHeight,
|
|
|
|
const sal_uInt16 nOldAscent ) const
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if( DFLT_ESC_AUTO_SUPER != GetEscapement() &&
|
|
|
|
DFLT_ESC_AUTO_SUB != GetEscapement() )
|
|
|
|
{
|
|
|
|
long nDescent = nOldHeight - nOldAscent -
|
|
|
|
( (long) nOrgHeight * GetEscapement() ) / 100L;
|
2014-08-22 21:21:19 +02:00
|
|
|
const sal_uInt16 nDesc = nDescent>0
|
|
|
|
? std::max<sal_uInt16>( nDescent, nOrgHeight - nOrgAscent)
|
|
|
|
: nOrgHeight - nOrgAscent;
|
2000-09-18 23:08:29 +00:00
|
|
|
return ( nDesc + CalcEscAscent( nOldAscent ) );
|
|
|
|
}
|
|
|
|
return nOrgHeight;
|
|
|
|
}
|
|
|
|
|
|
|
|
short SwSubFont::_CheckKerning( )
|
|
|
|
{
|
|
|
|
short nKernx = - short( Font::GetSize().Height() / 6 );
|
2004-02-04 13:08:55 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( nKernx < GetFixKerning() )
|
|
|
|
return GetFixKerning();
|
|
|
|
return nKernx;
|
|
|
|
}
|
|
|
|
|
2013-10-26 19:50:13 +02:00
|
|
|
sal_uInt16 SwSubFont::GetAscent( SwViewShell *pSh, const OutputDevice& rOut )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh );
|
2014-08-22 21:21:19 +02:00
|
|
|
const sal_uInt16 nAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
|
|
|
|
return GetEscapement() ? CalcEscAscent( nAscent ) : nAscent;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
2013-10-26 19:50:13 +02:00
|
|
|
sal_uInt16 SwSubFont::GetHeight( SwViewShell *pSh, const OutputDevice& rOut )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
SV_STAT( nGetTextSize );
|
|
|
|
SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh );
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt16 nHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut );
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( GetEscapement() )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt16 nAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
|
2000-09-18 23:08:29 +00:00
|
|
|
return CalcEscHeight( nHeight, nAscent ); // + nLeading;
|
|
|
|
}
|
|
|
|
return nHeight; // + nLeading;
|
|
|
|
}
|
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
Size SwSubFont::_GetTextSize( SwDrawTextInfo& rInf )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
// Robust: Eigentlich sollte der Font bereits eingestellt sein, aber
|
|
|
|
// sicher ist sicher ...
|
|
|
|
if ( !pLastFont || pLastFont->GetOwner()!=pMagic ||
|
2001-04-09 09:44:17 +00:00
|
|
|
!IsSameInstance( rInf.GetpOut()->GetFont() ) )
|
2003-10-15 08:58:49 +00:00
|
|
|
ChgFnt( rInf.GetShell(), rInf.GetOut() );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2009-01-05 15:33:41 +00:00
|
|
|
SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );
|
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
Size aTextSize;
|
2014-01-14 16:50:42 +00:00
|
|
|
sal_Int32 nLn = ( rInf.GetLen() == COMPLETE_STRING ? rInf.GetText().getLength()
|
2001-04-09 09:44:17 +00:00
|
|
|
: rInf.GetLen() );
|
|
|
|
rInf.SetLen( nLn );
|
2000-09-18 23:08:29 +00:00
|
|
|
if( IsCapital() && nLn )
|
2015-05-20 13:05:49 +02:00
|
|
|
aTextSize = GetCapitalSize( rInf );
|
2000-09-18 23:08:29 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
SV_STAT( nGetTextSize );
|
2005-04-18 13:41:30 +00:00
|
|
|
long nOldKern = rInf.GetKern();
|
2015-05-20 13:05:49 +02:00
|
|
|
const OUString oldText = rInf.GetText();
|
2001-04-09 09:44:17 +00:00
|
|
|
rInf.SetKern( CheckKerning() );
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( !IsCaseMap() )
|
2015-05-20 13:05:49 +02:00
|
|
|
aTextSize = pLastFont->GetTextSize( rInf );
|
2000-09-18 23:08:29 +00:00
|
|
|
else
|
2001-04-09 09:44:17 +00:00
|
|
|
{
|
2013-09-12 10:38:48 +01:00
|
|
|
OUString aTmp = CalcCaseMap( rInf.GetText() );
|
2013-12-06 21:18:37 +01:00
|
|
|
const OUString oldStr = rInf.GetText();
|
|
|
|
bool bCaseMapLengthDiffers(aTmp.getLength() != oldStr.getLength());
|
2003-04-08 14:32:36 +00:00
|
|
|
|
|
|
|
if(bCaseMapLengthDiffers && rInf.GetLen())
|
|
|
|
{
|
|
|
|
// #108203#
|
|
|
|
// If the length of the original string and the CaseMapped one
|
|
|
|
// are different, it is necessary to handle the given text part as
|
2013-08-20 18:26:05 +01:00
|
|
|
// a single snippet since its size may differ, too.
|
2014-01-14 16:50:42 +00:00
|
|
|
sal_Int32 nOldIdx(rInf.GetIdx());
|
|
|
|
sal_Int32 nOldLen(rInf.GetLen());
|
2013-12-06 21:18:37 +01:00
|
|
|
const OUString aSnippet(oldStr.copy(nOldIdx, nOldLen));
|
2013-09-12 10:38:48 +01:00
|
|
|
OUString aNewText(CalcCaseMap(aSnippet));
|
2003-04-08 14:32:36 +00:00
|
|
|
|
|
|
|
rInf.SetText( aNewText );
|
|
|
|
rInf.SetIdx( 0 );
|
2013-09-12 10:38:48 +01:00
|
|
|
rInf.SetLen( aNewText.getLength() );
|
2003-04-08 14:32:36 +00:00
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
aTextSize = pLastFont->GetTextSize( rInf );
|
2003-04-08 14:32:36 +00:00
|
|
|
|
|
|
|
rInf.SetIdx( nOldIdx );
|
|
|
|
rInf.SetLen( nOldLen );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
rInf.SetText( aTmp );
|
2015-05-20 13:05:49 +02:00
|
|
|
aTextSize = pLastFont->GetTextSize( rInf );
|
2003-04-08 14:32:36 +00:00
|
|
|
}
|
|
|
|
|
2013-12-06 21:18:37 +01:00
|
|
|
rInf.SetText(oldStr);
|
2001-04-09 09:44:17 +00:00
|
|
|
}
|
|
|
|
rInf.SetKern( nOldKern );
|
2015-05-20 13:05:49 +02:00
|
|
|
rInf.SetText(oldText);
|
2000-09-18 23:08:29 +00:00
|
|
|
// 15142: Ein Wort laenger als eine Zeile, beim Zeilenumbruch
|
|
|
|
// hochgestellt, muss seine effektive Hoehe melden.
|
|
|
|
if( GetEscapement() )
|
|
|
|
{
|
2011-01-17 15:06:54 +01:00
|
|
|
const sal_uInt16 nAscent = pLastFont->GetFontAscent( rInf.GetShell(),
|
2003-10-15 08:58:49 +00:00
|
|
|
rInf.GetOut() );
|
2015-05-20 13:05:49 +02:00
|
|
|
aTextSize.Height() =
|
|
|
|
(long)CalcEscHeight( (sal_uInt16)aTextSize.Height(), nAscent);
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
2001-04-09 09:44:17 +00:00
|
|
|
|
2013-04-16 15:28:39 +02:00
|
|
|
if (1==rInf.GetLen() && CH_TXT_ATR_FIELDSTART==rInf.GetText()[rInf.GetIdx()])
|
2008-09-04 09:22:32 +00:00
|
|
|
{
|
2014-01-14 16:50:42 +00:00
|
|
|
sal_Int32 nOldIdx(rInf.GetIdx());
|
|
|
|
sal_Int32 nOldLen(rInf.GetLen());
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString aNewText(CH_TXT_ATR_SUBST_FIELDSTART);
|
2008-09-04 09:22:32 +00:00
|
|
|
rInf.SetText( aNewText );
|
|
|
|
rInf.SetIdx( 0 );
|
2012-07-02 16:02:38 +01:00
|
|
|
rInf.SetLen( aNewText.getLength() );
|
2015-05-20 13:05:49 +02:00
|
|
|
aTextSize = pLastFont->GetTextSize( rInf );
|
2008-09-04 09:22:32 +00:00
|
|
|
rInf.SetIdx( nOldIdx );
|
|
|
|
rInf.SetLen( nOldLen );
|
|
|
|
}
|
2013-04-16 15:28:39 +02:00
|
|
|
else if (1==rInf.GetLen() && CH_TXT_ATR_FIELDEND==rInf.GetText()[ rInf.GetIdx() ])
|
2008-09-04 09:22:32 +00:00
|
|
|
{
|
2014-01-14 16:50:42 +00:00
|
|
|
sal_Int32 nOldIdx(rInf.GetIdx());
|
|
|
|
sal_Int32 nOldLen(rInf.GetLen());
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString aNewText(CH_TXT_ATR_SUBST_FIELDEND);
|
2008-09-04 09:22:32 +00:00
|
|
|
rInf.SetText( aNewText );
|
|
|
|
rInf.SetIdx( 0 );
|
2012-07-02 16:02:38 +01:00
|
|
|
rInf.SetLen( aNewText.getLength() );
|
2015-05-20 13:05:49 +02:00
|
|
|
aTextSize = pLastFont->GetTextSize( rInf );
|
2008-09-04 09:22:32 +00:00
|
|
|
rInf.SetIdx( nOldIdx );
|
|
|
|
rInf.SetLen( nOldLen );
|
|
|
|
}
|
|
|
|
|
2015-05-20 13:05:49 +02:00
|
|
|
return aTextSize;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
2014-04-25 14:00:35 +02:00
|
|
|
void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const bool bGrey )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
rInf.SetGreyWave( bGrey );
|
2013-10-28 15:41:25 +02:00
|
|
|
sal_Int32 nLn = rInf.GetText().getLength();
|
2000-09-18 23:08:29 +00:00
|
|
|
if( !rInf.GetLen() || !nLn )
|
|
|
|
return;
|
2014-01-14 16:50:42 +00:00
|
|
|
if( COMPLETE_STRING == rInf.GetLen() )
|
2000-09-18 23:08:29 +00:00
|
|
|
rInf.SetLen( nLn );
|
|
|
|
|
2007-09-27 08:27:11 +00:00
|
|
|
FontUnderline nOldUnder = UNDERLINE_NONE;
|
2002-11-14 07:55:47 +00:00
|
|
|
SwUnderlineFont* pUnderFnt = 0;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2001-10-02 12:51:59 +00:00
|
|
|
if( rInf.GetUnderFnt() )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
nOldUnder = GetUnderline();
|
|
|
|
SetUnderline( UNDERLINE_NONE );
|
2001-10-02 12:51:59 +00:00
|
|
|
pUnderFnt = rInf.GetUnderFnt();
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if( !pLastFont || pLastFont->GetOwner()!=pMagic )
|
2003-10-15 08:58:49 +00:00
|
|
|
ChgFnt( rInf.GetShell(), rInf.GetOut() );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2009-01-05 15:33:41 +00:00
|
|
|
SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );
|
|
|
|
|
2014-01-21 11:16:20 +01:00
|
|
|
const Point aOldPos(rInf.GetPos());
|
2000-09-18 23:08:29 +00:00
|
|
|
Point aPos( rInf.GetPos() );
|
|
|
|
|
|
|
|
if( GetEscapement() )
|
2001-04-18 11:23:54 +00:00
|
|
|
CalcEsc( rInf, aPos );
|
|
|
|
|
2013-05-25 14:33:46 +02:00
|
|
|
rInf.SetPos( aPos );
|
2005-04-18 13:41:30 +00:00
|
|
|
rInf.SetKern( CheckKerning() + rInf.GetSperren() / SPACING_PRECISION_FACTOR );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
if( IsCapital() )
|
|
|
|
DrawCapital( rInf );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SV_STAT( nDrawText );
|
|
|
|
if ( !IsCaseMap() )
|
|
|
|
pLastFont->DrawText( rInf );
|
|
|
|
else
|
|
|
|
{
|
2013-12-06 21:18:37 +01:00
|
|
|
const OUString oldStr = rInf.GetText();
|
|
|
|
OUString aString( CalcCaseMap(oldStr) );
|
|
|
|
bool bCaseMapLengthDiffers(aString.getLength() != oldStr.getLength());
|
2003-04-08 14:32:36 +00:00
|
|
|
|
|
|
|
if(bCaseMapLengthDiffers && rInf.GetLen())
|
|
|
|
{
|
|
|
|
// #108203#
|
|
|
|
// If the length of the original string and the CaseMapped one
|
|
|
|
// are different, it is necessary to handle the given text part as
|
2013-08-20 18:26:05 +01:00
|
|
|
// a single snippet since its size may differ, too.
|
2014-01-14 16:50:42 +00:00
|
|
|
sal_Int32 nOldIdx(rInf.GetIdx());
|
|
|
|
sal_Int32 nOldLen(rInf.GetLen());
|
2013-12-06 21:18:37 +01:00
|
|
|
const OUString aSnippet(oldStr.copy(nOldIdx, nOldLen));
|
2013-09-12 10:38:48 +01:00
|
|
|
OUString aNewText = CalcCaseMap(aSnippet);
|
2003-04-08 14:32:36 +00:00
|
|
|
|
|
|
|
rInf.SetText( aNewText );
|
|
|
|
rInf.SetIdx( 0 );
|
2013-09-12 10:38:48 +01:00
|
|
|
rInf.SetLen( aNewText.getLength() );
|
2003-04-08 14:32:36 +00:00
|
|
|
|
|
|
|
pLastFont->DrawText( rInf );
|
|
|
|
|
|
|
|
rInf.SetIdx( nOldIdx );
|
|
|
|
rInf.SetLen( nOldLen );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
rInf.SetText( aString );
|
|
|
|
pLastFont->DrawText( rInf );
|
|
|
|
}
|
|
|
|
|
2013-12-06 21:18:37 +01:00
|
|
|
rInf.SetText(oldStr);
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2002-11-14 07:55:47 +00:00
|
|
|
if( pUnderFnt && nOldUnder != UNDERLINE_NONE )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2015-05-20 13:05:49 +02:00
|
|
|
Size aFontSize = _GetTextSize( rInf );
|
2013-12-06 21:18:37 +01:00
|
|
|
const OUString oldStr = rInf.GetText();
|
2013-09-12 10:38:48 +01:00
|
|
|
OUString aStr(" ");
|
2001-10-02 12:51:59 +00:00
|
|
|
|
2014-01-14 16:50:42 +00:00
|
|
|
sal_Int32 nOldIdx = rInf.GetIdx();
|
|
|
|
sal_Int32 nOldLen = rInf.GetLen();
|
2000-09-18 23:08:29 +00:00
|
|
|
long nSpace = 0;
|
|
|
|
if( rInf.GetSpace() )
|
|
|
|
{
|
2014-01-14 16:50:42 +00:00
|
|
|
sal_Int32 nTmpEnd = nOldIdx + nOldLen;
|
2013-12-06 21:18:37 +01:00
|
|
|
if (nTmpEnd > oldStr.getLength())
|
|
|
|
nTmpEnd = oldStr.getLength();
|
2001-12-12 11:47:19 +00:00
|
|
|
|
|
|
|
const SwScriptInfo* pSI = rInf.GetScriptInfo();
|
|
|
|
|
2012-12-12 22:38:09 +09:00
|
|
|
const bool bAsianFont =
|
2001-12-12 11:47:19 +00:00
|
|
|
( rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() );
|
2013-10-28 12:21:40 +02:00
|
|
|
for( sal_Int32 nTmp = nOldIdx; nTmp < nTmpEnd; ++nTmp )
|
2005-04-18 13:41:30 +00:00
|
|
|
{
|
2013-12-06 21:18:37 +01:00
|
|
|
if (CH_BLANK == oldStr[nTmp] || bAsianFont ||
|
|
|
|
( nTmp + 1 < oldStr.getLength() && pSI &&
|
2007-09-27 08:27:11 +00:00
|
|
|
i18n::ScriptType::ASIAN == pSI->ScriptType( nTmp + 1 ) ) )
|
2002-10-24 05:01:16 +00:00
|
|
|
++nSpace;
|
2005-04-18 13:41:30 +00:00
|
|
|
}
|
2001-12-12 11:47:19 +00:00
|
|
|
|
|
|
|
// if next portion if a hole portion we do not consider any
|
|
|
|
// extra space added because the last character was ASIAN
|
|
|
|
if ( nSpace && rInf.IsSpaceStop() && bAsianFont )
|
|
|
|
--nSpace;
|
2002-10-22 06:00:48 +00:00
|
|
|
|
2005-04-18 13:41:30 +00:00
|
|
|
nSpace *= rInf.GetSpace() / SPACING_PRECISION_FACTOR;
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
2002-11-14 07:55:47 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
rInf.SetWidth( sal_uInt16(aFontSize.Width() + nSpace) );
|
2000-09-18 23:08:29 +00:00
|
|
|
rInf.SetText( aStr );
|
|
|
|
rInf.SetIdx( 0 );
|
|
|
|
rInf.SetLen( 2 );
|
|
|
|
SetUnderline( nOldUnder );
|
2001-10-02 12:51:59 +00:00
|
|
|
rInf.SetUnderFnt( 0 );
|
|
|
|
|
2002-11-14 07:55:47 +00:00
|
|
|
// set position for underline font
|
|
|
|
rInf.SetPos( pUnderFnt->GetPos() );
|
|
|
|
|
|
|
|
pUnderFnt->GetFont()._DrawStretchText( rInf );
|
2001-10-02 12:51:59 +00:00
|
|
|
|
|
|
|
rInf.SetUnderFnt( pUnderFnt );
|
2013-12-06 21:18:37 +01:00
|
|
|
rInf.SetText(oldStr);
|
2000-09-18 23:08:29 +00:00
|
|
|
rInf.SetIdx( nOldIdx );
|
|
|
|
rInf.SetLen( nOldLen );
|
|
|
|
}
|
2002-11-14 07:55:47 +00:00
|
|
|
|
2014-01-21 11:16:20 +01:00
|
|
|
rInf.SetPos(aOldPos);
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf )
|
|
|
|
{
|
2013-04-16 15:28:39 +02:00
|
|
|
if( !rInf.GetLen() || !rInf.GetText().getLength() )
|
2000-09-18 23:08:29 +00:00
|
|
|
return;
|
|
|
|
|
2007-09-27 08:27:11 +00:00
|
|
|
FontUnderline nOldUnder = UNDERLINE_NONE;
|
2002-11-14 07:55:47 +00:00
|
|
|
SwUnderlineFont* pUnderFnt = 0;
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2001-10-02 12:51:59 +00:00
|
|
|
if( rInf.GetUnderFnt() )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
nOldUnder = GetUnderline();
|
|
|
|
SetUnderline( UNDERLINE_NONE );
|
2001-10-02 12:51:59 +00:00
|
|
|
pUnderFnt = rInf.GetUnderFnt();
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( !pLastFont || pLastFont->GetOwner() != pMagic )
|
2003-10-15 08:58:49 +00:00
|
|
|
ChgFnt( rInf.GetShell(), rInf.GetOut() );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2009-01-05 15:33:41 +00:00
|
|
|
SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );
|
|
|
|
|
2002-06-07 13:19:05 +00:00
|
|
|
rInf.ApplyAutoColor();
|
|
|
|
|
2014-01-21 11:16:20 +01:00
|
|
|
const Point aOldPos(rInf.GetPos());
|
2000-09-18 23:08:29 +00:00
|
|
|
Point aPos( rInf.GetPos() );
|
|
|
|
|
|
|
|
if( GetEscapement() )
|
2001-04-18 11:23:54 +00:00
|
|
|
CalcEsc( rInf, aPos );
|
|
|
|
|
2005-04-18 13:41:30 +00:00
|
|
|
rInf.SetKern( CheckKerning() + rInf.GetSperren() / SPACING_PRECISION_FACTOR );
|
2002-11-14 07:55:47 +00:00
|
|
|
rInf.SetPos( aPos );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
|
|
|
if( IsCapital() )
|
|
|
|
DrawStretchCapital( rInf );
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SV_STAT( nDrawStretchText );
|
2001-10-29 10:23:31 +00:00
|
|
|
|
2002-03-21 09:46:39 +00:00
|
|
|
if ( rInf.GetFrm() )
|
|
|
|
{
|
|
|
|
if ( rInf.GetFrm()->IsRightToLeft() )
|
|
|
|
rInf.GetFrm()->SwitchLTRtoRTL( aPos );
|
|
|
|
|
|
|
|
if ( rInf.GetFrm()->IsVertical() )
|
|
|
|
rInf.GetFrm()->SwitchHorizontalToVertical( aPos );
|
2013-05-31 17:51:36 +02:00
|
|
|
|
|
|
|
rInf.SetPos( aPos );
|
2002-03-21 09:46:39 +00:00
|
|
|
}
|
2001-10-29 10:23:31 +00:00
|
|
|
|
2000-09-18 23:08:29 +00:00
|
|
|
if ( !IsCaseMap() )
|
|
|
|
rInf.GetOut().DrawStretchText( aPos, rInf.GetWidth(),
|
|
|
|
rInf.GetText(), rInf.GetIdx(), rInf.GetLen() );
|
|
|
|
else
|
|
|
|
rInf.GetOut().DrawStretchText( aPos, rInf.GetWidth(), CalcCaseMap(
|
|
|
|
rInf.GetText() ), rInf.GetIdx(), rInf.GetLen() );
|
|
|
|
}
|
|
|
|
|
2002-11-14 07:55:47 +00:00
|
|
|
if( pUnderFnt && nOldUnder != UNDERLINE_NONE )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
2013-12-06 21:18:37 +01:00
|
|
|
const OUString oldStr = rInf.GetText();
|
2013-09-12 10:38:48 +01:00
|
|
|
OUString aStr(" ");
|
2014-01-14 16:50:42 +00:00
|
|
|
sal_Int32 nOldIdx = rInf.GetIdx();
|
|
|
|
sal_Int32 nOldLen = rInf.GetLen();
|
2000-09-18 23:08:29 +00:00
|
|
|
rInf.SetText( aStr );
|
|
|
|
rInf.SetIdx( 0 );
|
|
|
|
rInf.SetLen( 2 );
|
|
|
|
SetUnderline( nOldUnder );
|
2001-10-02 12:51:59 +00:00
|
|
|
rInf.SetUnderFnt( 0 );
|
|
|
|
|
2002-11-14 07:55:47 +00:00
|
|
|
// set position for underline font
|
|
|
|
rInf.SetPos( pUnderFnt->GetPos() );
|
|
|
|
|
|
|
|
pUnderFnt->GetFont()._DrawStretchText( rInf );
|
2001-10-02 12:51:59 +00:00
|
|
|
|
|
|
|
rInf.SetUnderFnt( pUnderFnt );
|
2013-12-06 21:18:37 +01:00
|
|
|
rInf.SetText(oldStr);
|
2000-09-18 23:08:29 +00:00
|
|
|
rInf.SetIdx( nOldIdx );
|
|
|
|
rInf.SetLen( nOldLen );
|
|
|
|
}
|
2002-11-14 07:55:47 +00:00
|
|
|
|
2014-01-21 11:16:20 +01:00
|
|
|
rInf.SetPos(aOldPos);
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
|
2014-01-14 16:50:42 +00:00
|
|
|
sal_Int32 SwSubFont::_GetCrsrOfst( SwDrawTextInfo& rInf )
|
2000-09-18 23:08:29 +00:00
|
|
|
{
|
|
|
|
if ( !pLastFont || pLastFont->GetOwner()!=pMagic )
|
2003-10-15 08:58:49 +00:00
|
|
|
ChgFnt( rInf.GetShell(), rInf.GetOut() );
|
2000-09-18 23:08:29 +00:00
|
|
|
|
2009-01-05 15:33:41 +00:00
|
|
|
SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );
|
|
|
|
|
2014-01-14 16:50:42 +00:00
|
|
|
sal_Int32 nLn = rInf.GetLen() == COMPLETE_STRING ? rInf.GetText().getLength()
|
2001-04-09 09:44:17 +00:00
|
|
|
: rInf.GetLen();
|
|
|
|
rInf.SetLen( nLn );
|
2014-01-14 16:50:42 +00:00
|
|
|
sal_Int32 nCrsr = 0;
|
2000-09-18 23:08:29 +00:00
|
|
|
if( IsCapital() && nLn )
|
2001-04-09 09:44:17 +00:00
|
|
|
nCrsr = GetCapitalCrsrOfst( rInf );
|
2000-09-18 23:08:29 +00:00
|
|
|
else
|
|
|
|
{
|
2015-05-20 13:05:49 +02:00
|
|
|
const OUString oldText = rInf.GetText();
|
2005-04-18 13:41:30 +00:00
|
|
|
long nOldKern = rInf.GetKern();
|
2001-04-09 09:44:17 +00:00
|
|
|
rInf.SetKern( CheckKerning() );
|
2000-09-18 23:08:29 +00:00
|
|
|
SV_STAT( nGetTextSize );
|
|
|
|
if ( !IsCaseMap() )
|
2001-04-09 09:44:17 +00:00
|
|
|
nCrsr = pLastFont->GetCrsrOfst( rInf );
|
2000-09-18 23:08:29 +00:00
|
|
|
else
|
2001-04-09 09:44:17 +00:00
|
|
|
{
|
2013-10-16 11:18:56 +02:00
|
|
|
OUString aTmp = CalcCaseMap( rInf.GetText() );
|
2001-04-09 09:44:17 +00:00
|
|
|
rInf.SetText( aTmp );
|
|
|
|
nCrsr = pLastFont->GetCrsrOfst( rInf );
|
|
|
|
}
|
|
|
|
rInf.SetKern( nOldKern );
|
2015-05-20 13:05:49 +02:00
|
|
|
rInf.SetText(oldText);
|
2000-09-18 23:08:29 +00:00
|
|
|
}
|
|
|
|
return nCrsr;
|
|
|
|
}
|
|
|
|
|
2001-04-18 11:23:54 +00:00
|
|
|
void SwSubFont::CalcEsc( SwDrawTextInfo& rInf, Point& rPos )
|
|
|
|
{
|
|
|
|
long nOfst;
|
|
|
|
|
2014-08-22 21:21:19 +02:00
|
|
|
const sal_uInt16 nDir = UnMapDirection(
|
2001-10-30 08:37:25 +00:00
|
|
|
GetOrientation(), rInf.GetFrm() && rInf.GetFrm()->IsVertical() );
|
|
|
|
|
2001-04-19 11:53:59 +00:00
|
|
|
switch ( GetEscapement() )
|
2001-04-18 11:23:54 +00:00
|
|
|
{
|
|
|
|
case DFLT_ESC_AUTO_SUB :
|
|
|
|
nOfst = nOrgHeight - nOrgAscent -
|
2003-10-15 08:58:49 +00:00
|
|
|
pLastFont->GetFontHeight( rInf.GetShell(), rInf.GetOut() ) +
|
|
|
|
pLastFont->GetFontAscent( rInf.GetShell(), rInf.GetOut() );
|
2001-04-18 11:23:54 +00:00
|
|
|
|
2001-10-30 08:37:25 +00:00
|
|
|
switch ( nDir )
|
2001-04-18 11:23:54 +00:00
|
|
|
{
|
|
|
|
case 0 :
|
|
|
|
rPos.Y() += nOfst;
|
|
|
|
break;
|
|
|
|
case 900 :
|
|
|
|
rPos.X() += nOfst;
|
|
|
|
break;
|
|
|
|
case 2700 :
|
|
|
|
rPos.X() -= nOfst;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case DFLT_ESC_AUTO_SUPER :
|
2003-10-15 08:58:49 +00:00
|
|
|
nOfst = pLastFont->GetFontAscent( rInf.GetShell(), rInf.GetOut() ) -
|
2001-04-18 11:23:54 +00:00
|
|
|
nOrgAscent;
|
|
|
|
|
2001-10-30 08:37:25 +00:00
|
|
|
switch ( nDir )
|
2001-04-18 11:23:54 +00:00
|
|
|
{
|
|
|
|
case 0 :
|
|
|
|
rPos.Y() += nOfst;
|
|
|
|
break;
|
|
|
|
case 900 :
|
|
|
|
rPos.X() += nOfst;
|
|
|
|
break;
|
|
|
|
case 2700 :
|
|
|
|
rPos.X() -= nOfst;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
default :
|
|
|
|
nOfst = ((long)nOrgHeight * GetEscapement()) / 100L;
|
|
|
|
|
2001-10-30 08:37:25 +00:00
|
|
|
switch ( nDir )
|
2001-04-18 11:23:54 +00:00
|
|
|
{
|
|
|
|
case 0 :
|
|
|
|
rPos.Y() -= nOfst;
|
|
|
|
break;
|
|
|
|
case 900 :
|
|
|
|
rPos.X() -= nOfst;
|
|
|
|
break;
|
|
|
|
case 2700 :
|
|
|
|
rPos.X() += nOfst;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2001-10-02 12:51:59 +00:00
|
|
|
|
2002-10-24 05:32:01 +00:00
|
|
|
// used during painting of small capitals
|
2011-01-17 15:06:54 +01:00
|
|
|
void SwDrawTextInfo::Shift( sal_uInt16 nDir )
|
2002-10-24 05:32:01 +00:00
|
|
|
{
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
|
|
|
OSL_ENSURE( m_bPos, "DrawTextInfo: Undefined Position" );
|
|
|
|
OSL_ENSURE( m_bSize, "DrawTextInfo: Undefined Width" );
|
2010-11-25 17:08:45 +01:00
|
|
|
#endif
|
2002-10-24 05:32:01 +00:00
|
|
|
|
2012-12-12 22:38:09 +09:00
|
|
|
const bool bBidiPor = ( GetFrm() && GetFrm()->IsRightToLeft() ) !=
|
2014-10-06 14:48:16 +02:00
|
|
|
( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & GetpOut()->GetLayoutMode() ) );
|
2002-10-24 05:32:01 +00:00
|
|
|
|
|
|
|
nDir = bBidiPor ?
|
|
|
|
1800 :
|
|
|
|
UnMapDirection( nDir, GetFrm() && GetFrm()->IsVertical() );
|
|
|
|
|
|
|
|
switch ( nDir )
|
|
|
|
{
|
|
|
|
case 0 :
|
2013-04-18 09:38:05 +02:00
|
|
|
m_aPos.X() += GetSize().Width();
|
2002-10-24 05:32:01 +00:00
|
|
|
break;
|
|
|
|
case 900 :
|
2013-04-18 09:38:05 +02:00
|
|
|
OSL_ENSURE( m_aPos.Y() >= GetSize().Width(), "Going underground" );
|
|
|
|
m_aPos.Y() -= GetSize().Width();
|
2002-10-24 05:32:01 +00:00
|
|
|
break;
|
|
|
|
case 1800 :
|
2013-04-18 09:38:05 +02:00
|
|
|
m_aPos.X() -= GetSize().Width();
|
2002-10-24 05:32:01 +00:00
|
|
|
break;
|
|
|
|
case 2700 :
|
2013-04-18 09:38:05 +02:00
|
|
|
m_aPos.Y() += GetSize().Width();
|
2002-10-24 05:32:01 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-31 17:50:25 +02:00
|
|
|
/**
|
|
|
|
* @note Used for the "continuous underline" feature.
|
|
|
|
**/
|
2002-11-14 07:55:47 +00:00
|
|
|
SwUnderlineFont::SwUnderlineFont( SwFont& rFnt, const Point& rPoint )
|
2007-09-27 08:27:11 +00:00
|
|
|
: aPos( rPoint ), pFnt( &rFnt )
|
2002-11-14 07:55:47 +00:00
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
SwUnderlineFont::~SwUnderlineFont()
|
|
|
|
{
|
|
|
|
delete pFnt;
|
|
|
|
}
|
|
|
|
|
2013-08-31 22:30:22 +02:00
|
|
|
/// Helper for filters to find true lineheight of a font
|
2006-08-14 15:47:31 +00:00
|
|
|
long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess,
|
|
|
|
const SwAttrSet &rSet,
|
2015-05-11 08:37:50 +02:00
|
|
|
const vcl::RenderContext &rOut, sal_Int16 nScript)
|
2002-12-10 08:42:08 +00:00
|
|
|
{
|
2006-08-14 15:47:31 +00:00
|
|
|
SwFont aFont(&rSet, &rIDocumentSettingAccess);
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt8 nActual;
|
2002-12-10 08:42:08 +00:00
|
|
|
switch (nScript)
|
|
|
|
{
|
|
|
|
default:
|
2007-09-27 08:27:11 +00:00
|
|
|
case i18n::ScriptType::LATIN:
|
2002-12-10 08:42:08 +00:00
|
|
|
nActual = SW_LATIN;
|
|
|
|
break;
|
2007-09-27 08:27:11 +00:00
|
|
|
case i18n::ScriptType::ASIAN:
|
2002-12-10 08:42:08 +00:00
|
|
|
nActual = SW_CJK;
|
|
|
|
break;
|
2007-09-27 08:27:11 +00:00
|
|
|
case i18n::ScriptType::COMPLEX:
|
2002-12-10 08:42:08 +00:00
|
|
|
nActual = SW_CTL;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
aFont.SetActual(nActual);
|
|
|
|
|
2015-05-11 08:37:50 +02:00
|
|
|
vcl::RenderContext &rMutableOut = const_cast<vcl::RenderContext &>(rOut);
|
2014-09-16 10:09:58 +02:00
|
|
|
const vcl::Font aOldFont(rMutableOut.GetFont());
|
2002-12-10 08:42:08 +00:00
|
|
|
|
|
|
|
rMutableOut.SetFont(aFont.GetActualFont());
|
|
|
|
long nHeight = rMutableOut.GetTextHeight();
|
|
|
|
|
|
|
|
rMutableOut.SetFont(aOldFont);
|
|
|
|
return nHeight;
|
|
|
|
}
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|