Files
libreoffice/sw/source/core/txtnode/swfont.cxx

1554 lines
52 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 sw34bf06: #o12311627# use <rtl_random> methods to create unique ids for list styles and list ids http://svn.apache.org/viewvc?view=revision&revision=1172112 sw34bf06 #i114725#,#i115828# - method <SwDoc::ClearDoc()> - clear list structures completely http://svn.apache.org/viewvc?view=revision&revision=1172122 i#118572 - remove ui string and help content regarding usage of Java Mail in Writer's Mail Merge as Java Mail is not used. http://svn.apache.org/viewvc?view=revision&revision=1197035 Patches contributed by Mathias Bauer cws mba34issues01: #i117718#: provide filter name in case storage of medium does not allow to detect one http://svn.apache.org/viewvc?view=revision&revision=1172350 cws mba34issues01: #i117721#: directly provide parameters retrieved from SfxMedium http://svn.apache.org/viewvc?view=revision&revision=1172353 gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 cws mba34issues01: #i117723#: convert assertion into trace http://svn.apache.org/viewvc?view=revision&revision=1172355 cws mba34issues01: #i117699#: keep layout alive until swdoc dies http://svn.apache.org/viewvc?view=revision&revision=1172362 cws mba34issues01: #i117943#: missing color attributes in RTF clipboard http://svn.apache.org/viewvc?view=revision&revision=1172363 Patch contributed by Henning Brinkmann imported patch i#103878 http://svn.apache.org/viewvc?view=revision&revision=1172109 Patches contributed by Michael Stahl sw34bf06: #i117955#: WW8 export: disable storing of section breaks in endnotes http://svn.apache.org/viewvc?view=revision&revision=1172119 Patch contributed by imacat Fixed the Asian language work count. http://svn.apache.org/viewvc?view=revision&revision=1241345 Patch contributed by Pedro Giffuni i#20878 - Add comment with BZ issue for reference. http://svn.apache.org/viewvc?view=revision&revision=1244517 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 add writerperfect dependency.
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
#include <hintids.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
2000-11-20 08:16:31 +00:00
#include <vcl/outdev.hxx>
#include <unotools/localedatawrapper.hxx>
#include <editeng/unolingu.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/wrlmitem.hxx>
#include <editeng/blinkitem.hxx>
#include <editeng/nhypitem.hxx>
#include <editeng/kernitem.hxx>
#include <editeng/cmapitem.hxx>
#include <editeng/langitem.hxx>
#include <editeng/escapementitem.hxx>
#include <editeng/autokernitem.hxx>
#include <editeng/shdditem.hxx>
#include <editeng/charreliefitem.hxx>
#include <editeng/contouritem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/charsetcoloritem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <editeng/udlnitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/postitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/emphasismarkitem.hxx>
#include <editeng/charscaleitem.hxx>
#include <editeng/charrotateitem.hxx>
#include <editeng/twolinesitem.hxx>
#include <editeng/charhiddenitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/shaditem.hxx>
#include <IDocumentSettingAccess.hxx>
#include <vcl/window.hxx>
2000-09-18 23:08:29 +00:00
#include <charatr.hxx>
#include <viewsh.hxx>
#include <swfont.hxx>
#include <fntcache.hxx>
#include <txtfrm.hxx>
#include <scriptinfo.hxx>
2000-09-18 23:08:29 +00:00
#ifdef DBG_UTIL
// global Variable
SvStatistics g_SvStat;
2000-09-18 23:08:29 +00:00
#endif
using namespace ::com::sun::star;
// Hintergrundbrush setzen, z.B. bei Zeichenvorlagen
2000-09-18 23:08:29 +00:00
void SwFont::SetBackColor( Color* pNewColor )
{
delete pBackColor;
pBackColor = pNewColor;
bFntChg = true;
2000-09-18 23:08:29 +00:00
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
}
void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder )
{
if( pTopBorder )
m_aTopBorder = *pTopBorder;
else
{
m_aTopBorder = boost::none;
m_nTopBorderDist = 0;
}
bFntChg = true;
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
}
void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder )
{
if( pBottomBorder )
m_aBottomBorder = *pBottomBorder;
else
{
m_aBottomBorder = boost::none;
m_nBottomBorderDist = 0;
}
bFntChg = true;
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
}
void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder )
{
if( pRightBorder )
m_aRightBorder = *pRightBorder;
else
{
m_aRightBorder = boost::none;
m_nRightBorderDist = 0;
}
bFntChg = true;
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
}
void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
{
if( pLeftBorder )
m_aLeftBorder = *pLeftBorder;
else
{
m_aLeftBorder = boost::none;
m_nLeftBorderDist = 0;
}
bFntChg = true;
aSub[SW_LATIN].pMagic = aSub[SW_CJK].pMagic = aSub[SW_CTL].pMagic = 0;
}
const boost::optional<editeng::SvxBorderLine>&
SwFont::GetAbsTopBorder( const bool bVertLayout ) const
{
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;
}
}
const boost::optional<editeng::SvxBorderLine>&
SwFont::GetAbsBottomBorder( const bool bVertLayout ) const
{
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;
}
}
const boost::optional<editeng::SvxBorderLine>&
SwFont::GetAbsLeftBorder( const bool bVertLayout ) const
{
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;
}
}
const boost::optional<editeng::SvxBorderLine>&
SwFont::GetAbsRightBorder( const bool bVertLayout ) const
{
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;
}
}
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(
const SvxShadowItemSide nShadow, const bool bVertLayout,
const bool bSkipLeft, const bool bSkipRight ) const
{
sal_uInt16 nSpace = 0;
const sal_uInt16 nOrient = GetOrientation( bVertLayout );
const SvxShadowLocation aLoc = GetAbsShadowLocation( bVertLayout );
switch( nShadow )
{
case SvxShadowItemSide::TOP:
if(( aLoc == SVX_SHADOW_TOPLEFT ||
aLoc == SVX_SHADOW_TOPRIGHT ) &&
( nOrient == 0 || nOrient == 1800 ||
( nOrient == 900 && !bSkipRight ) ||
( nOrient == 2700 && !bSkipLeft )))
{
nSpace = m_nShadowWidth;
}
break;
case SvxShadowItemSide::BOTTOM:
if(( aLoc == SVX_SHADOW_BOTTOMLEFT ||
aLoc == SVX_SHADOW_BOTTOMRIGHT ) &&
( nOrient == 0 || nOrient == 1800 ||
( nOrient == 900 && !bSkipLeft ) ||
( nOrient == 2700 && !bSkipRight )))
{
nSpace = m_nShadowWidth;
}
break;
case SvxShadowItemSide::LEFT:
if(( aLoc == SVX_SHADOW_TOPLEFT ||
aLoc == SVX_SHADOW_BOTTOMLEFT ) &&
( nOrient == 900 || nOrient == 2700 ||
( nOrient == 0 && !bSkipLeft ) ||
( nOrient == 1800 && !bSkipRight )))
{
nSpace = m_nShadowWidth;
}
break;
case SvxShadowItemSide::RIGHT:
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;
}
// maps directions for vertical layout
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;
case 2700 :
nDir = 1800;
break;
#if OSL_DEBUG_LEVEL > 0
default :
OSL_FAIL( "Unsupported direction" );
break;
#endif
2001-08-31 05:22:48 +00:00
}
}
return nDir;
}
// maps the absolute direction set at the font to its logical conterpart
// in the rotated environment
sal_uInt16 UnMapDirection( sal_uInt16 nDir, const bool bVertFormat )
{
if ( bVertFormat )
{
switch ( nDir )
{
case 0 :
nDir = 900;
break;
case 1800 :
nDir = 2700;
break;
case 2700 :
nDir = 0;
break;
#if OSL_DEBUG_LEVEL > 0
default :
OSL_FAIL( "Unsupported direction" );
break;
#endif
}
}
return nDir;
}
sal_uInt16 SwFont::GetOrientation( const bool bVertFormat ) const
{
return UnMapDirection( aSub[nActual].GetOrientation(), bVertFormat );
}
void SwFont::SetVertical( sal_uInt16 nDir, const bool bVertFormat )
{
// map direction if frame has vertical layout
nDir = MapDirection( nDir, bVertFormat );
2001-08-31 05:22:48 +00:00
if( nDir != aSub[0].GetOrientation() )
{
bFntChg = true;
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
}
}
/*
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;
*/
2000-09-18 23:08:29 +00:00
// nEsc ist der Prozentwert
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 )
return std::max<sal_uInt16>( nAscent, nOrgAscent );
2000-09-18 23:08:29 +00:00
}
return nOrgAscent;
}
void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
const IDocumentSettingAccess *pIDocumentSettingAccess )
2000-09-18 23:08:29 +00:00
{
delete pBackColor;
pBackColor = NULL;
2000-09-18 23:08:29 +00:00
if( pAttrSet )
{
const SfxPoolItem* pItem;
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_FONT,
true, &pItem ))
2000-09-18 23:08:29 +00: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() );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_FONTSIZE,
true, &pItem ))
2000-09-18 23:08:29 +00: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 );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_POSTURE,
true, &pItem ))
aSub[SW_LATIN].Font::SetItalic( static_cast<const SvxPostureItem*>(pItem)->GetPosture() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_WEIGHT,
true, &pItem ))
aSub[SW_LATIN].Font::SetWeight( static_cast<const SvxWeightItem*>(pItem)->GetWeight() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_LANGUAGE,
true, &pItem ))
aSub[SW_LATIN].SetLanguage( static_cast<const SvxLanguageItem*>(pItem)->GetLanguage() );
2000-09-18 23:08:29 +00:00
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONT,
true, &pItem ))
2000-09-18 23:08:29 +00: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() );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_FONTSIZE,
true, &pItem ))
2000-09-18 23:08:29 +00: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 );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_POSTURE,
true, &pItem ))
aSub[SW_CJK].Font::SetItalic( static_cast<const SvxPostureItem*>(pItem)->GetPosture() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_WEIGHT,
true, &pItem ))
aSub[SW_CJK].Font::SetWeight( static_cast<const SvxWeightItem*>(pItem)->GetWeight() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CJK_LANGUAGE,
true, &pItem ))
{
LanguageType eNewLang = static_cast<const SvxLanguageItem*>(pItem)->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
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONT,
true, &pItem ))
2000-09-18 23:08:29 +00: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() );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_FONTSIZE,
true, &pItem ))
2000-09-18 23:08:29 +00: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 );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_POSTURE,
true, &pItem ))
aSub[SW_CTL].Font::SetItalic( static_cast<const SvxPostureItem*>(pItem)->GetPosture() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_WEIGHT,
true, &pItem ))
aSub[SW_CTL].Font::SetWeight( static_cast<const SvxWeightItem*>(pItem)->GetWeight() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CTL_LANGUAGE,
true, &pItem ))
aSub[SW_CTL].SetLanguage( static_cast<const SvxLanguageItem*>(pItem)->GetLanguage() );
2000-09-18 23:08:29 +00:00
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_UNDERLINE,
true, &pItem ))
{
SetUnderline( static_cast<const SvxUnderlineItem*>(pItem)->GetLineStyle() );
SetUnderColor( static_cast<const SvxUnderlineItem*>(pItem)->GetColor() );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_OVERLINE,
true, &pItem ))
{
SetOverline( static_cast<const SvxOverlineItem*>(pItem)->GetLineStyle() );
SetOverColor( static_cast<const SvxOverlineItem*>(pItem)->GetColor() );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CROSSEDOUT,
true, &pItem ))
SetStrikeout( static_cast<const SvxCrossedOutItem*>(pItem)->GetStrikeout() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_COLOR,
true, &pItem ))
SetColor( static_cast<const SvxColorItem*>(pItem)->GetValue() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_EMPHASIS_MARK,
true, &pItem ))
SetEmphasisMark( static_cast<const SvxEmphasisMarkItem*>(pItem)->GetEmphasisMark() );
2000-10-30 11:51:04 +00:00
SetTransparent( true );
2000-09-18 23:08:29 +00:00
SetAlign( ALIGN_BASELINE );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CONTOUR,
true, &pItem ))
SetOutline( static_cast<const SvxContourItem*>(pItem)->GetValue() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
true, &pItem ))
SetShadow( static_cast<const SvxShadowedItem*>(pItem)->GetValue() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_RELIEF,
true, &pItem ))
SetRelief( (FontRelief)static_cast<const SvxCharReliefItem*>(pItem)->GetValue() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOWED,
true, &pItem ))
SetPropWidth(static_cast<const SvxShadowedItem*>(pItem)->GetValue() ? 50 : 100 );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_AUTOKERN,
true, &pItem ))
2001-04-10 13:24:56 +00:00
{
if( static_cast<const SvxAutoKernItem*>(pItem)->GetValue() )
{
SetAutoKern( ( !pIDocumentSettingAccess ||
!pIDocumentSettingAccess->get(DocumentSettingId::KERN_ASIAN_PUNCTUATION) ) ?
FontKerning::FontSpecific :
FontKerning::Asian );
}
2001-04-10 13:24:56 +00:00
else
SetAutoKern( FontKerning::NONE );
2001-04-10 13:24:56 +00:00
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_WORDLINEMODE,
true, &pItem ))
SetWordLineMode( static_cast<const SvxWordLineModeItem*>(pItem)->GetValue() );
2000-09-18 23:08:29 +00:00
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_ESCAPEMENT,
true, &pItem ))
2000-09-18 23:08:29 +00: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() );
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_CASEMAP,
true, &pItem ))
SetCaseMap( static_cast<const SvxCaseMapItem*>(pItem)->GetCaseMap() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_KERNING,
true, &pItem ))
SetFixKerning( static_cast<const SvxKerningItem*>(pItem)->GetValue() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_NOHYPHEN,
true, &pItem ))
SetNoHyph( static_cast<const SvxNoHyphenItem*>(pItem)->GetValue() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BLINK,
true, &pItem ))
SetBlink( static_cast<const SvxBlinkItem*>(pItem)->GetValue() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_ROTATE,
true, &pItem ))
SetVertical( static_cast<const SvxCharRotateItem*>(pItem)->GetValue() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
true, &pItem ))
pBackColor = new Color( static_cast<const SvxBrushItem*>(pItem)->GetColor() );
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT,
true, &pItem ))
SetHighlightColor(static_cast<const SvxBrushItem*>(pItem)->GetColor());
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BOX,
true, &pItem ))
{
const SvxBoxItem* pBoxItem = static_cast<const SvxBoxItem*>(pItem);
SetTopBorder(pBoxItem->GetTop());
SetBottomBorder(pBoxItem->GetBottom());
SetRightBorder(pBoxItem->GetRight());
SetLeftBorder(pBoxItem->GetLeft());
SetTopBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::TOP));
SetBottomBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::BOTTOM));
SetRightBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::RIGHT));
SetLeftBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::LEFT));
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOW,
true, &pItem ))
{
const SvxShadowItem* pShadowItem = static_cast<const SvxShadowItem*>(pItem);
SetShadowColor(pShadowItem->GetColor());
SetShadowWidth(pShadowItem->GetWidth());
SetShadowLocation(pShadowItem->GetLocation());
}
const SfxPoolItem* pTwoLinesItem = 0;
if( SfxItemState::SET ==
pAttrSet->GetItemState( RES_CHRATR_TWO_LINES, true, &pTwoLinesItem ))
if ( static_cast<const SvxTwoLinesItem*>(pTwoLinesItem)->GetValue() )
SetVertical( 0 );
2000-09-18 23:08:29 +00:00
}
else
{
Invalidate();
bNoHyph = false;
bBlink = false;
2000-09-18 23:08:29 +00:00
}
bPaintBlank = false;
bPaintWrong = false;
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;
m_aHighlightColor = rFont.m_aHighlightColor;
m_aTopBorder = rFont.m_aTopBorder;
m_aBottomBorder = rFont.m_aBottomBorder;
m_aRightBorder = rFont.m_aRightBorder;
m_aLeftBorder = rFont.m_aLeftBorder;
m_nTopBorderDist = rFont.m_nTopBorderDist;
m_nBottomBorderDist = rFont.m_nBottomBorderDist;
m_nRightBorderDist = rFont.m_nRightBorderDist;
m_nLeftBorderDist = rFont.m_nLeftBorderDist;
m_aShadowColor = rFont.m_aShadowColor;
m_nShadowWidth = rFont.m_nShadowWidth;
m_aShadowLocation = rFont.m_aShadowLocation;
aUnderColor = rFont.GetUnderColor();
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;
Resolves: #i33737# enable in-place editing of Input Fields (cherry picked from commit c2afeb1c3f11e8f420b59f3786eb8626c99ff595) Conflicts: sw/inc/IDocumentContentOperations.hxx sw/inc/crsrsh.hxx sw/inc/doc.hxx sw/inc/editsh.hxx sw/inc/expfld.hxx sw/inc/fldbas.hxx sw/inc/fmtfld.hxx sw/inc/hintids.hxx sw/inc/ndtxt.hxx sw/inc/txatbase.hxx sw/inc/txtfld.hxx sw/inc/txtrfmrk.hxx sw/inc/txttxmrk.hxx sw/inc/viscrs.hxx sw/source/core/bastyp/init.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/crsr/crstrvl.cxx sw/source/core/crsr/findattr.cxx sw/source/core/crsr/findtxt.cxx sw/source/core/crsr/swcrsr.cxx sw/source/core/crsr/viscrs.cxx sw/source/core/doc/dbgoutsw.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/docruby.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/visiturl.cxx sw/source/core/docnode/nodes.cxx sw/source/core/edit/edatmisc.cxx sw/source/core/edit/edattr.cxx sw/source/core/edit/edfld.cxx sw/source/core/edit/edfldexp.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/fields/reffld.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/inc/docfld.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/swfont.hxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/laycache.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/text/atrhndl.hxx sw/source/core/text/atrstck.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/porfld.cxx sw/source/core/text/porfld.hxx sw/source/core/text/txtfld.cxx sw/source/core/tox/tox.cxx sw/source/core/tox/txmsrt.cxx sw/source/core/txtnode/atrfld.cxx sw/source/core/txtnode/ndhints.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txatbase.cxx sw/source/core/txtnode/txatritr.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/SwUndoField.cxx sw/source/core/undo/rolbck.cxx sw/source/core/undo/unsect.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/unocrsrhelper.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unorefmk.cxx sw/source/core/view/vprint.cxx sw/source/filter/ascii/ascatr.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/rtf/rtffly.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/ui/app/applab.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin2.cxx sw/source/ui/envelp/envfmt.cxx sw/source/ui/fldui/fldedt.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/lingu/hhcwrp.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textfld.cxx sw/source/ui/shells/textidx.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/uiview/formatclipboard.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewstat.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh2.cxx Change-Id: I6758d6719e1fd523797cc6ee2648ffcb47d52595
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;
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;
}
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;
Resolves: #i33737# enable in-place editing of Input Fields (cherry picked from commit c2afeb1c3f11e8f420b59f3786eb8626c99ff595) Conflicts: sw/inc/IDocumentContentOperations.hxx sw/inc/crsrsh.hxx sw/inc/doc.hxx sw/inc/editsh.hxx sw/inc/expfld.hxx sw/inc/fldbas.hxx sw/inc/fmtfld.hxx sw/inc/hintids.hxx sw/inc/ndtxt.hxx sw/inc/txatbase.hxx sw/inc/txtfld.hxx sw/inc/txtrfmrk.hxx sw/inc/txttxmrk.hxx sw/inc/viscrs.hxx sw/source/core/bastyp/init.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/crsr/crstrvl.cxx sw/source/core/crsr/findattr.cxx sw/source/core/crsr/findtxt.cxx sw/source/core/crsr/swcrsr.cxx sw/source/core/crsr/viscrs.cxx sw/source/core/doc/dbgoutsw.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/docruby.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/visiturl.cxx sw/source/core/docnode/nodes.cxx sw/source/core/edit/edatmisc.cxx sw/source/core/edit/edattr.cxx sw/source/core/edit/edfld.cxx sw/source/core/edit/edfldexp.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/fields/reffld.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/inc/docfld.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/swfont.hxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/laycache.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/text/atrhndl.hxx sw/source/core/text/atrstck.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/porfld.cxx sw/source/core/text/porfld.hxx sw/source/core/text/txtfld.cxx sw/source/core/tox/tox.cxx sw/source/core/tox/txmsrt.cxx sw/source/core/txtnode/atrfld.cxx sw/source/core/txtnode/ndhints.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txatbase.cxx sw/source/core/txtnode/txatritr.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/SwUndoField.cxx sw/source/core/undo/rolbck.cxx sw/source/core/undo/unsect.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/unocrsrhelper.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unorefmk.cxx sw/source/core/view/vprint.cxx sw/source/filter/ascii/ascatr.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/rtf/rtffly.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/ui/app/applab.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin2.cxx sw/source/ui/envelp/envfmt.cxx sw/source/ui/fldui/fldedt.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/lingu/hhcwrp.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textfld.cxx sw/source/ui/shells/textidx.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/uiview/formatclipboard.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewstat.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh2.cxx Change-Id: I6758d6719e1fd523797cc6ee2648ffcb47d52595
2013-11-18 11:29:24 +00:00
m_nInputFieldCount = 0;
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();
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() );
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
}
{
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 );
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
}
if ( pAttrSet->GetCharHidden().GetValue() )
SetUnderline( UNDERLINE_DOTTED );
else
SetUnderline( pAttrSet->GetUnderline().GetLineStyle() );
SetUnderColor( pAttrSet->GetUnderline().GetColor() );
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() );
SetTransparent( true );
2000-09-18 23:08:29 +00:00
SetAlign( ALIGN_BASELINE );
SetOutline( pAttrSet->GetContour().GetValue() );
SetShadow( pAttrSet->GetShadowed().GetValue() );
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() )
{
SetAutoKern( ( !pIDocumentSettingAccess ||
!pIDocumentSettingAccess->get(DocumentSettingId::KERN_ASIAN_PUNCTUATION) ) ?
FontKerning::FontSpecific :
FontKerning::Asian );
}
2001-04-10 13:24:56 +00:00
else
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;
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BACKGROUND,
true, &pItem ))
pBackColor = new Color( static_cast<const SvxBrushItem*>(pItem)->GetColor() );
2000-09-18 23:08:29 +00:00
else
pBackColor = NULL;
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_HIGHLIGHT,
true, &pItem ))
SetHighlightColor(static_cast<const SvxBrushItem*>(pItem)->GetColor());
else
SetHighlightColor(COL_TRANSPARENT);
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_BOX,
true, &pItem ))
{
const SvxBoxItem* pBoxItem = static_cast<const SvxBoxItem*>(pItem);
SetTopBorder(pBoxItem->GetTop());
SetBottomBorder(pBoxItem->GetBottom());
SetRightBorder(pBoxItem->GetRight());
SetLeftBorder(pBoxItem->GetLeft());
SetTopBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::TOP));
SetBottomBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::BOTTOM));
SetRightBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::RIGHT));
SetLeftBorderDist(pBoxItem->GetDistance(SvxBoxItemLine::LEFT));
}
else
{
SetTopBorder(0);
SetBottomBorder(0);
SetRightBorder(0);
SetLeftBorder(0);
SetTopBorderDist(0);
SetBottomBorderDist(0);
SetRightBorderDist(0);
SetLeftBorderDist(0);
}
if( SfxItemState::SET == pAttrSet->GetItemState( RES_CHRATR_SHADOW,
true, &pItem ))
{
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);
}
const SvxTwoLinesItem& rTwoLinesItem = pAttrSet->Get2Lines();
if ( ! rTwoLinesItem.GetValue() )
SetVertical( pAttrSet->GetCharRotate().GetValue() );
else
SetVertical( 0 );
if( pIDocumentSettingAccess && pIDocumentSettingAccess->get( DocumentSettingId::SMALL_CAPS_PERCENTAGE_66 ))
{
aSub[ SW_LATIN ].smallCapsPercentage66 = true;
aSub[ SW_CJK ].smallCapsPercentage66 = true;
aSub[ SW_CTL ].smallCapsPercentage66 = true;
}
2000-09-18 23:08:29 +00: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;
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;
m_aHighlightColor = rFont.m_aHighlightColor;
m_aTopBorder = rFont.m_aTopBorder;
m_aBottomBorder = rFont.m_aBottomBorder;
m_aRightBorder = rFont.m_aRightBorder;
m_aLeftBorder = rFont.m_aLeftBorder;
m_nTopBorderDist = rFont.m_nTopBorderDist;
m_nBottomBorderDist = rFont.m_nBottomBorderDist;
m_nRightBorderDist = rFont.m_nRightBorderDist;
m_nLeftBorderDist = rFont.m_nLeftBorderDist;
m_aShadowColor = rFont.m_aShadowColor;
m_nShadowWidth = rFont.m_nShadowWidth;
m_aShadowLocation = rFont.m_aShadowLocation;
aUnderColor = rFont.GetUnderColor();
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;
Resolves: #i33737# enable in-place editing of Input Fields (cherry picked from commit c2afeb1c3f11e8f420b59f3786eb8626c99ff595) Conflicts: sw/inc/IDocumentContentOperations.hxx sw/inc/crsrsh.hxx sw/inc/doc.hxx sw/inc/editsh.hxx sw/inc/expfld.hxx sw/inc/fldbas.hxx sw/inc/fmtfld.hxx sw/inc/hintids.hxx sw/inc/ndtxt.hxx sw/inc/txatbase.hxx sw/inc/txtfld.hxx sw/inc/txtrfmrk.hxx sw/inc/txttxmrk.hxx sw/inc/viscrs.hxx sw/source/core/bastyp/init.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/crsr/crstrvl.cxx sw/source/core/crsr/findattr.cxx sw/source/core/crsr/findtxt.cxx sw/source/core/crsr/swcrsr.cxx sw/source/core/crsr/viscrs.cxx sw/source/core/doc/dbgoutsw.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docfld.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/docredln.cxx sw/source/core/doc/docruby.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/visiturl.cxx sw/source/core/docnode/nodes.cxx sw/source/core/edit/edatmisc.cxx sw/source/core/edit/edattr.cxx sw/source/core/edit/edfld.cxx sw/source/core/edit/edfldexp.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/edit/ednumber.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/fldbas.cxx sw/source/core/fields/reffld.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/inc/docfld.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/swfont.hxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/laycache.cxx sw/source/core/layout/trvlfrm.cxx sw/source/core/text/atrhndl.hxx sw/source/core/text/atrstck.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/porfld.cxx sw/source/core/text/porfld.hxx sw/source/core/text/txtfld.cxx sw/source/core/tox/tox.cxx sw/source/core/tox/txmsrt.cxx sw/source/core/txtnode/atrfld.cxx sw/source/core/txtnode/ndhints.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/txtnode/thints.cxx sw/source/core/txtnode/txatbase.cxx sw/source/core/txtnode/txatritr.cxx sw/source/core/txtnode/txtedt.cxx sw/source/core/undo/SwUndoField.cxx sw/source/core/undo/rolbck.cxx sw/source/core/undo/unsect.cxx sw/source/core/undo/untbl.cxx sw/source/core/unocore/unocrsrhelper.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unorefmk.cxx sw/source/core/view/vprint.cxx sw/source/filter/ascii/ascatr.cxx sw/source/filter/html/htmlatr.cxx sw/source/filter/rtf/rtffly.cxx sw/source/filter/ww1/fltshell.cxx sw/source/filter/ww1/w1filter.cxx sw/source/filter/ww8/wrtw8esh.cxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/ww8atr.cxx sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par3.cxx sw/source/filter/ww8/ww8par5.cxx sw/source/ui/app/applab.cxx sw/source/ui/docvw/edtwin.cxx sw/source/ui/docvw/edtwin2.cxx sw/source/ui/envelp/envfmt.cxx sw/source/ui/fldui/fldedt.cxx sw/source/ui/fldui/fldmgr.cxx sw/source/ui/inc/wrtsh.hxx sw/source/ui/lingu/hhcwrp.cxx sw/source/ui/shells/basesh.cxx sw/source/ui/shells/drwtxtex.cxx sw/source/ui/shells/grfsh.cxx sw/source/ui/shells/tabsh.cxx sw/source/ui/shells/textfld.cxx sw/source/ui/shells/textidx.cxx sw/source/ui/shells/textsh.cxx sw/source/ui/shells/textsh1.cxx sw/source/ui/shells/txtattr.cxx sw/source/ui/uiview/formatclipboard.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uiview/view2.cxx sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewstat.cxx sw/source/ui/uiview/viewtab.cxx sw/source/ui/wrtsh/wrtsh1.cxx sw/source/ui/wrtsh/wrtsh2.cxx Change-Id: I6758d6719e1fd523797cc6ee2648ffcb47d52595
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;
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;
}
void SwFont::GoMagic( SwViewShell *pSh, sal_uInt8 nWhich )
2000-09-18 23:08:29 +00:00
{
SwFntAccess aFntAccess( aSub[nWhich].pMagic, aSub[nWhich].nFntIndex,
&aSub[nWhich], pSh, true );
2000-09-18 23:08:29 +00:00
}
bool SwSubFont::IsSymbol( SwViewShell *pSh )
2000-09-18 23:08:29 +00:00
{
SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, false );
2000-09-18 23:08:29 +00:00
return aFntAccess.Get()->IsSymbol();
}
bool SwSubFont::ChgFnt( SwViewShell const *pSh, OutputDevice& rOut )
2000-09-18 23:08:29 +00:00
{
if ( pLastFont )
pLastFont->Unlock();
SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh, true );
2000-09-18 23:08:29 +00:00
SV_STAT( nChangeFont );
pLastFont = aFntAccess.Get();
pLastFont->SetDevFont( pSh, rOut );
2000-09-18 23:08:29 +00:00
pLastFont->Lock();
return UNDERLINE_NONE != GetUnderline() ||
UNDERLINE_NONE != GetOverline() ||
STRIKEOUT_NONE != GetStrikeout();
2000-09-18 23:08:29 +00:00
}
void SwFont::ChgPhysFnt( SwViewShell *pSh, OutputDevice& rOut )
2000-09-18 23:08:29 +00:00
{
if( bOrgChg && aSub[nActual].IsEsc() )
{
const sal_uInt8 nOldProp = aSub[nActual].GetPropr();
2000-09-18 23:08:29 +00:00
SetProportion( 100 );
ChgFnt( pSh, rOut );
2000-09-18 23:08:29 +00:00
SwFntAccess aFntAccess( aSub[nActual].pMagic, aSub[nActual].nFntIndex,
&aSub[nActual], pSh );
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 );
bOrgChg = false;
2000-09-18 23:08:29 +00:00
}
if( bFntChg )
{
ChgFnt( pSh, rOut );
2000-09-18 23:08:29 +00:00
bFntChg = bOrgChg;
}
if( rOut.GetTextLineColor() != aUnderColor )
rOut.SetTextLineColor( aUnderColor );
if( rOut.GetOverlineColor() != aOverColor )
rOut.SetOverlineColor( aOverColor );
2000-09-18 23:08:29 +00: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)
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;
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 );
2000-09-18 23:08:29 +00:00
if ( nKernx < GetFixKerning() )
return GetFixKerning();
return nKernx;
}
sal_uInt16 SwSubFont::GetAscent( SwViewShell *pSh, const OutputDevice& rOut )
2000-09-18 23:08:29 +00:00
{
SwFntAccess aFntAccess( pMagic, nFntIndex, this, pSh );
const sal_uInt16 nAscent = aFntAccess.Get()->GetFontAscent( pSh, rOut );
return GetEscapement() ? CalcEscAscent( nAscent ) : nAscent;
2000-09-18 23:08:29 +00: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 );
const sal_uInt16 nHeight = aFntAccess.Get()->GetFontHeight( pSh, rOut );
2000-09-18 23:08:29 +00:00
if ( GetEscapement() )
{
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;
}
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() ) )
ChgFnt( rInf.GetShell(), rInf.GetOut() );
2000-09-18 23:08:29 +00:00
SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );
Size aTextSize;
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 )
aTextSize = GetCapitalSize( rInf );
2000-09-18 23:08:29 +00:00
else
{
SV_STAT( nGetTextSize );
long nOldKern = rInf.GetKern();
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() )
aTextSize = pLastFont->GetTextSize( rInf );
2000-09-18 23:08:29 +00:00
else
2001-04-09 09:44:17 +00:00
{
OUString aTmp = CalcCaseMap( rInf.GetText() );
const OUString oldStr = rInf.GetText();
bool bCaseMapLengthDiffers(aTmp.getLength() != oldStr.getLength());
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
// a single snippet since its size may differ, too.
sal_Int32 nOldIdx(rInf.GetIdx());
sal_Int32 nOldLen(rInf.GetLen());
const OUString aSnippet(oldStr.copy(nOldIdx, nOldLen));
OUString aNewText(CalcCaseMap(aSnippet));
rInf.SetText( aNewText );
rInf.SetIdx( 0 );
rInf.SetLen( aNewText.getLength() );
aTextSize = pLastFont->GetTextSize( rInf );
rInf.SetIdx( nOldIdx );
rInf.SetLen( nOldLen );
}
else
{
rInf.SetText( aTmp );
aTextSize = pLastFont->GetTextSize( rInf );
}
rInf.SetText(oldStr);
2001-04-09 09:44:17 +00:00
}
rInf.SetKern( nOldKern );
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() )
{
const sal_uInt16 nAscent = pLastFont->GetFontAscent( rInf.GetShell(),
rInf.GetOut() );
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
if (1==rInf.GetLen() && CH_TXT_ATR_FIELDSTART==rInf.GetText()[rInf.GetIdx()])
{
sal_Int32 nOldIdx(rInf.GetIdx());
sal_Int32 nOldLen(rInf.GetLen());
OUString aNewText(CH_TXT_ATR_SUBST_FIELDSTART);
rInf.SetText( aNewText );
rInf.SetIdx( 0 );
rInf.SetLen( aNewText.getLength() );
aTextSize = pLastFont->GetTextSize( rInf );
rInf.SetIdx( nOldIdx );
rInf.SetLen( nOldLen );
}
else if (1==rInf.GetLen() && CH_TXT_ATR_FIELDEND==rInf.GetText()[ rInf.GetIdx() ])
{
sal_Int32 nOldIdx(rInf.GetIdx());
sal_Int32 nOldLen(rInf.GetLen());
OUString aNewText(CH_TXT_ATR_SUBST_FIELDEND);
rInf.SetText( aNewText );
rInf.SetIdx( 0 );
rInf.SetLen( aNewText.getLength() );
aTextSize = pLastFont->GetTextSize( rInf );
rInf.SetIdx( nOldIdx );
rInf.SetLen( nOldLen );
}
return aTextSize;
2000-09-18 23:08:29 +00:00
}
void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const bool bGrey )
2000-09-18 23:08:29 +00:00
{
rInf.SetGreyWave( bGrey );
sal_Int32 nLn = rInf.GetText().getLength();
2000-09-18 23:08:29 +00:00
if( !rInf.GetLen() || !nLn )
return;
if( COMPLETE_STRING == rInf.GetLen() )
2000-09-18 23:08:29 +00:00
rInf.SetLen( nLn );
FontUnderline nOldUnder = UNDERLINE_NONE;
SwUnderlineFont* pUnderFnt = 0;
2000-09-18 23:08:29 +00:00
if( rInf.GetUnderFnt() )
2000-09-18 23:08:29 +00:00
{
nOldUnder = GetUnderline();
SetUnderline( UNDERLINE_NONE );
pUnderFnt = rInf.GetUnderFnt();
2000-09-18 23:08:29 +00:00
}
if( !pLastFont || pLastFont->GetOwner()!=pMagic )
ChgFnt( rInf.GetShell(), rInf.GetOut() );
2000-09-18 23:08:29 +00:00
SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );
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 );
rInf.SetPos( aPos );
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
{
const OUString oldStr = rInf.GetText();
OUString aString( CalcCaseMap(oldStr) );
bool bCaseMapLengthDiffers(aString.getLength() != oldStr.getLength());
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
// a single snippet since its size may differ, too.
sal_Int32 nOldIdx(rInf.GetIdx());
sal_Int32 nOldLen(rInf.GetLen());
const OUString aSnippet(oldStr.copy(nOldIdx, nOldLen));
OUString aNewText = CalcCaseMap(aSnippet);
rInf.SetText( aNewText );
rInf.SetIdx( 0 );
rInf.SetLen( aNewText.getLength() );
pLastFont->DrawText( rInf );
rInf.SetIdx( nOldIdx );
rInf.SetLen( nOldLen );
}
else
{
rInf.SetText( aString );
pLastFont->DrawText( rInf );
}
rInf.SetText(oldStr);
2000-09-18 23:08:29 +00:00
}
}
if( pUnderFnt && nOldUnder != UNDERLINE_NONE )
2000-09-18 23:08:29 +00:00
{
Size aFontSize = _GetTextSize( rInf );
const OUString oldStr = rInf.GetText();
OUString aStr(" ");
sal_Int32 nOldIdx = rInf.GetIdx();
sal_Int32 nOldLen = rInf.GetLen();
2000-09-18 23:08:29 +00:00
long nSpace = 0;
if( rInf.GetSpace() )
{
sal_Int32 nTmpEnd = nOldIdx + nOldLen;
if (nTmpEnd > oldStr.getLength())
nTmpEnd = oldStr.getLength();
const SwScriptInfo* pSI = rInf.GetScriptInfo();
const bool bAsianFont =
( rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() );
for( sal_Int32 nTmp = nOldIdx; nTmp < nTmpEnd; ++nTmp )
{
if (CH_BLANK == oldStr[nTmp] || bAsianFont ||
( nTmp + 1 < oldStr.getLength() && pSI &&
i18n::ScriptType::ASIAN == pSI->ScriptType( nTmp + 1 ) ) )
++nSpace;
}
// 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;
nSpace *= rInf.GetSpace() / SPACING_PRECISION_FACTOR;
2000-09-18 23:08:29 +00: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 );
rInf.SetUnderFnt( 0 );
// set position for underline font
rInf.SetPos( pUnderFnt->GetPos() );
pUnderFnt->GetFont()._DrawStretchText( rInf );
rInf.SetUnderFnt( pUnderFnt );
rInf.SetText(oldStr);
2000-09-18 23:08:29 +00:00
rInf.SetIdx( nOldIdx );
rInf.SetLen( nOldLen );
}
rInf.SetPos(aOldPos);
2000-09-18 23:08:29 +00:00
}
void SwSubFont::_DrawStretchText( SwDrawTextInfo &rInf )
{
if( !rInf.GetLen() || !rInf.GetText().getLength() )
2000-09-18 23:08:29 +00:00
return;
FontUnderline nOldUnder = UNDERLINE_NONE;
SwUnderlineFont* pUnderFnt = 0;
2000-09-18 23:08:29 +00:00
if( rInf.GetUnderFnt() )
2000-09-18 23:08:29 +00:00
{
nOldUnder = GetUnderline();
SetUnderline( UNDERLINE_NONE );
pUnderFnt = rInf.GetUnderFnt();
2000-09-18 23:08:29 +00:00
}
if ( !pLastFont || pLastFont->GetOwner() != pMagic )
ChgFnt( rInf.GetShell(), rInf.GetOut() );
2000-09-18 23:08:29 +00:00
SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );
rInf.ApplyAutoColor();
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 );
rInf.SetKern( CheckKerning() + rInf.GetSperren() / SPACING_PRECISION_FACTOR );
rInf.SetPos( aPos );
2000-09-18 23:08:29 +00:00
if( IsCapital() )
DrawStretchCapital( rInf );
else
{
SV_STAT( nDrawStretchText );
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 );
rInf.SetPos( aPos );
2002-03-21 09:46:39 +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() );
}
if( pUnderFnt && nOldUnder != UNDERLINE_NONE )
2000-09-18 23:08:29 +00:00
{
const OUString oldStr = rInf.GetText();
OUString aStr(" ");
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 );
rInf.SetUnderFnt( 0 );
// set position for underline font
rInf.SetPos( pUnderFnt->GetPos() );
pUnderFnt->GetFont()._DrawStretchText( rInf );
rInf.SetUnderFnt( pUnderFnt );
rInf.SetText(oldStr);
2000-09-18 23:08:29 +00:00
rInf.SetIdx( nOldIdx );
rInf.SetLen( nOldLen );
}
rInf.SetPos(aOldPos);
2000-09-18 23:08:29 +00:00
}
sal_Int32 SwSubFont::_GetCrsrOfst( SwDrawTextInfo& rInf )
2000-09-18 23:08:29 +00:00
{
if ( !pLastFont || pLastFont->GetOwner()!=pMagic )
ChgFnt( rInf.GetShell(), rInf.GetOut() );
2000-09-18 23:08:29 +00:00
SwDigitModeModifier aDigitModeModifier( rInf.GetOut(), rInf.GetFont()->GetLanguage() );
sal_Int32 nLn = rInf.GetLen() == COMPLETE_STRING ? rInf.GetText().getLength()
2001-04-09 09:44:17 +00:00
: rInf.GetLen();
rInf.SetLen( nLn );
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
{
const OUString oldText = rInf.GetText();
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
{
OUString aTmp = CalcCaseMap( rInf.GetText() );
2001-04-09 09:44:17 +00:00
rInf.SetText( aTmp );
nCrsr = pLastFont->GetCrsrOfst( rInf );
}
rInf.SetKern( nOldKern );
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;
const sal_uInt16 nDir = UnMapDirection(
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 -
pLastFont->GetFontHeight( rInf.GetShell(), rInf.GetOut() ) +
pLastFont->GetFontAscent( rInf.GetShell(), rInf.GetOut() );
2001-04-18 11:23:54 +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 :
nOfst = pLastFont->GetFontAscent( rInf.GetShell(), rInf.GetOut() ) -
2001-04-18 11:23:54 +00:00
nOrgAscent;
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;
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;
}
}
}
// used during painting of small capitals
void SwDrawTextInfo::Shift( sal_uInt16 nDir )
{
#ifdef DBG_UTIL
OSL_ENSURE( m_bPos, "DrawTextInfo: Undefined Position" );
OSL_ENSURE( m_bSize, "DrawTextInfo: Undefined Width" );
#endif
const bool bBidiPor = ( GetFrm() && GetFrm()->IsRightToLeft() ) !=
( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & GetpOut()->GetLayoutMode() ) );
nDir = bBidiPor ?
1800 :
UnMapDirection( nDir, GetFrm() && GetFrm()->IsVertical() );
switch ( nDir )
{
case 0 :
m_aPos.X() += GetSize().Width();
break;
case 900 :
OSL_ENSURE( m_aPos.Y() >= GetSize().Width(), "Going underground" );
m_aPos.Y() -= GetSize().Width();
break;
case 1800 :
m_aPos.X() -= GetSize().Width();
break;
case 2700 :
m_aPos.Y() += GetSize().Width();
break;
}
}
/**
* @note Used for the "continuous underline" feature.
**/
SwUnderlineFont::SwUnderlineFont( SwFont& rFnt, const Point& rPoint )
: aPos( rPoint ), pFnt( &rFnt )
{
};
SwUnderlineFont::~SwUnderlineFont()
{
delete pFnt;
}
/// Helper for filters to find true lineheight of a font
long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess,
const SwAttrSet &rSet,
const vcl::RenderContext &rOut, sal_Int16 nScript)
{
SwFont aFont(&rSet, &rIDocumentSettingAccess);
sal_uInt8 nActual;
switch (nScript)
{
default:
case i18n::ScriptType::LATIN:
nActual = SW_LATIN;
break;
case i18n::ScriptType::ASIAN:
nActual = SW_CJK;
break;
case i18n::ScriptType::COMPLEX:
nActual = SW_CTL;
break;
}
aFont.SetActual(nActual);
vcl::RenderContext &rMutableOut = const_cast<vcl::RenderContext &>(rOut);
const vcl::Font aOldFont(rMutableOut.GetFont());
rMutableOut.SetFont(aFont.GetActualFont());
long nHeight = rMutableOut.GetTextHeight();
rMutableOut.SetFont(aOldFont);
return nHeight;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */