#90598# now exporting new paragraph attributes: allow hanging punctuation, and use asian rules for first and last character
This commit is contained in:
parent
b8793100fd
commit
84458a9a08
3 changed files with 58 additions and 11 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: eppt.cxx,v $
|
||||
*
|
||||
* $Revision: 1.29 $
|
||||
* $Revision: 1.30 $
|
||||
*
|
||||
* last change: $Author: sj $ $Date: 2001-06-20 11:52:54 $
|
||||
* last change: $Author: sj $ $Date: 2001-08-23 13:55:55 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -2192,6 +2192,7 @@ PPTExParaSheet::PPTExParaSheet( int nInstance, sal_uInt16 nDefaultTab, PPTExBull
|
|||
rLev.mnTextOfs = nTextOfs;
|
||||
rLev.mnBulletOfs = nBulletOfs;
|
||||
rLev.mnDefaultTab = nDefaultTab;
|
||||
rLev.mnAsianSettings = 2;
|
||||
|
||||
rLev.mbExtendedBulletsUsed = FALSE;
|
||||
rLev.mnBulletId = 0xffff;
|
||||
|
@ -2238,6 +2239,18 @@ void PPTExParaSheet::SetStyleSheet( const ::com::sun::star::uno::Reference< ::co
|
|||
rLev.mnLowerDist = aParagraphObj.mnLineSpacingBottom;
|
||||
if ( aParagraphObj.meLineSpacingTop == ::com::sun::star::beans::PropertyState_DIRECT_VALUE )
|
||||
rLev.mnUpperDist = aParagraphObj.mnLineSpacingTop;
|
||||
if ( aParagraphObj.meForbiddenRules == ::com::sun::star::beans::PropertyState_DIRECT_VALUE )
|
||||
{
|
||||
rLev.mnAsianSettings &=~1;
|
||||
if ( aParagraphObj.mbForbiddenRules )
|
||||
rLev.mnAsianSettings |= 1;
|
||||
}
|
||||
if ( aParagraphObj.meParagraphPunctation == ::com::sun::star::beans::PropertyState_DIRECT_VALUE )
|
||||
{
|
||||
rLev.mnAsianSettings &=~4;
|
||||
if ( aParagraphObj.mbParagraphPunctation )
|
||||
rLev.mnAsianSettings |= 4;
|
||||
}
|
||||
|
||||
rLev.mbIsBullet = aParagraphObj.mbIsBullet; //( ( aParagraphObj.nBulletFlags & 1 ) != 0 );
|
||||
|
||||
|
@ -2321,7 +2334,7 @@ void PPTExParaSheet::Write( SvStream& rSt, PptEscherEx* pEx, sal_uInt16 nLev, sa
|
|||
rSt << rLev.mnDefaultTab
|
||||
<< (sal_uInt16)0
|
||||
<< (sal_uInt16)0
|
||||
<< (sal_uInt16)2
|
||||
<< rLev.mnAsianSettings
|
||||
<< (sal_uInt16)0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: eppt.hxx,v $
|
||||
*
|
||||
* $Revision: 1.24 $
|
||||
* $Revision: 1.25 $
|
||||
*
|
||||
* last change: $Author: sj $ $Date: 2001-08-13 16:32:47 $
|
||||
* last change: $Author: sj $ $Date: 2001-08-23 13:55:55 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -485,6 +485,9 @@ enum PPTExTextAttr
|
|||
ParaAttr_TextOfs,
|
||||
ParaAttr_BulletOfs,
|
||||
ParaAttr_DefaultTab,
|
||||
ParaAttr_AsianLB_1,
|
||||
ParaAttr_AsianLB_2,
|
||||
ParaAttr_AsianLB_3,
|
||||
CharAttr_Bold,
|
||||
CharAttr_Italic,
|
||||
CharAttr_Underline,
|
||||
|
@ -523,7 +526,7 @@ struct PPTExCharSheet
|
|||
|
||||
struct PPTExParaLevel
|
||||
{
|
||||
sal_Bool mbIsBullet;
|
||||
sal_Bool mbIsBullet;
|
||||
sal_uInt16 mnBulletChar;
|
||||
sal_uInt16 mnBulletFont;
|
||||
sal_uInt16 mnBulletHeight;
|
||||
|
@ -542,6 +545,7 @@ struct PPTExParaLevel
|
|||
sal_uInt16 mnBulletStart;
|
||||
sal_uInt32 mnMappedNumType;
|
||||
sal_uInt32 mnNumberingType;
|
||||
sal_uInt16 mnAsianSettings;
|
||||
|
||||
};
|
||||
|
||||
|
@ -804,11 +808,15 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph
|
|||
::com::sun::star::beans::PropertyState meLineSpacing;
|
||||
::com::sun::star::beans::PropertyState meLineSpacingTop;
|
||||
::com::sun::star::beans::PropertyState meLineSpacingBottom;
|
||||
::com::sun::star::beans::PropertyState meForbiddenRules;
|
||||
::com::sun::star::beans::PropertyState meParagraphPunctation;
|
||||
|
||||
sal_uInt16 mnTextAdjust;
|
||||
sal_Int16 mnLineSpacing;
|
||||
sal_Int16 mnLineSpacingTop;
|
||||
sal_Int16 mnLineSpacingBottom;
|
||||
sal_Bool mbForbiddenRules;
|
||||
sal_Bool mbParagraphPunctation;
|
||||
|
||||
ParagraphObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & rXTextContentRef,
|
||||
ParaFlags, FontCollection& rFontCollection,
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: epptso.cxx,v $
|
||||
*
|
||||
* $Revision: 1.45 $
|
||||
* $Revision: 1.46 $
|
||||
*
|
||||
* last change: $Author: sj $ $Date: 2001-08-15 12:45:44 $
|
||||
* last change: $Author: sj $ $Date: 2001-08-23 13:55:55 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -1664,12 +1664,19 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj )
|
|||
( mpStyleSheet->IsHardAttribute( nInstance, pPara->bDepth, ParaAttr_LineFeed, nLineSpacing ) ) )
|
||||
nPropertyFlags |= 0x00001000;
|
||||
}
|
||||
if ( ( pPara->meLineSpacingBottom == ::com::sun::star::beans::PropertyState_DIRECT_VALUE ) ||
|
||||
( mpStyleSheet->IsHardAttribute( nInstance, pPara->bDepth, ParaAttr_LowerDist, pPara->mnLineSpacingBottom ) ) )
|
||||
nPropertyFlags |= 0x00004000;
|
||||
if ( ( pPara->meLineSpacingTop == ::com::sun::star::beans::PropertyState_DIRECT_VALUE ) ||
|
||||
( mpStyleSheet->IsHardAttribute( nInstance, pPara->bDepth, ParaAttr_UpperDist, pPara->mnLineSpacingTop ) ) )
|
||||
nPropertyFlags |= 0x00002000;
|
||||
if ( ( pPara->meLineSpacingBottom == ::com::sun::star::beans::PropertyState_DIRECT_VALUE ) ||
|
||||
( mpStyleSheet->IsHardAttribute( nInstance, pPara->bDepth, ParaAttr_LowerDist, pPara->mnLineSpacingBottom ) ) )
|
||||
nPropertyFlags |= 0x00004000;
|
||||
if ( ( pPara->meForbiddenRules == ::com::sun::star::beans::PropertyState_DIRECT_VALUE ) ||
|
||||
( mpStyleSheet->IsHardAttribute( nInstance, pPara->bDepth, ParaAttr_UpperDist, pPara->mbForbiddenRules ) ) )
|
||||
nPropertyFlags |= 0x00020000;
|
||||
if ( ( pPara->meParagraphPunctation == ::com::sun::star::beans::PropertyState_DIRECT_VALUE ) ||
|
||||
( mpStyleSheet->IsHardAttribute( nInstance, pPara->bDepth, ParaAttr_UpperDist, pPara->mbParagraphPunctation ) ) )
|
||||
nPropertyFlags |= 0x00080000;
|
||||
|
||||
|
||||
sal_Int32 nBuRealSize = pPara->nBulletRealSize;
|
||||
sal_Int16 nBulletFlags = pPara->nBulletFlags;
|
||||
|
@ -1706,6 +1713,15 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj )
|
|||
rOut << (sal_uInt16)( pPara->mnLineSpacingTop );
|
||||
if ( nPropertyFlags & 0x00004000 )
|
||||
rOut << (sal_uInt16)( pPara->mnLineSpacingBottom );
|
||||
if ( nPropertyFlags & 0x000e0000 )
|
||||
{
|
||||
sal_uInt16 nAsianSettings = 0;
|
||||
if ( pPara->mbForbiddenRules )
|
||||
nAsianSettings |= 1;
|
||||
if ( pPara->mbParagraphPunctation )
|
||||
nAsianSettings |= 4;
|
||||
rOut << nAsianSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2786,6 +2802,14 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Boo
|
|||
mnLineSpacingTop = (sal_Int16)(-( nSpacing / 4.40972 ) );
|
||||
}
|
||||
meLineSpacingTop = ePropState;
|
||||
|
||||
if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "ParaIsForbiddenRules" ) ), bGetPropStateValue ) )
|
||||
mAny >>= mbForbiddenRules;
|
||||
meForbiddenRules = ePropState;
|
||||
|
||||
if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "ParaIsHangingPunctuation" ) ), bGetPropStateValue ) )
|
||||
mAny >>= mbParagraphPunctation;
|
||||
meParagraphPunctation = ePropState;
|
||||
}
|
||||
|
||||
void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj )
|
||||
|
@ -2797,6 +2821,8 @@ void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj )
|
|||
mnLineSpacingBottom = rParagraphObj.mnLineSpacingBottom;
|
||||
mbFirstParagraph = rParagraphObj.mbFirstParagraph;
|
||||
mbLastParagraph = rParagraphObj.mbLastParagraph;
|
||||
mbParagraphPunctation = rParagraphObj.mbParagraphPunctation;
|
||||
mbForbiddenRules = rParagraphObj.mbForbiddenRules;
|
||||
|
||||
for ( void* pPtr = rParagraphObj.First(); pPtr; pPtr = rParagraphObj.Next() )
|
||||
Insert( new PortionObj( *(PortionObj*)pPtr ), LIST_APPEND );
|
||||
|
|
Loading…
Reference in a new issue