26#include <com/sun/star/beans/XPropertySet.hpp>
32 sal_uInt16 nFontHeight = 24;
34 for (
int nDepth = 0; nDepth < 5; nDepth++ )
50 case 0 : nFontHeight = 32;
break;
51 case 1 : nFontHeight = 28;
break;
52 case 2 : nFontHeight = 24;
break;
53 default :nFontHeight = 20;
break;
77 PortionObj aPortionObj( rXPropSet, rFontCollection );
81 if ( aPortionObj.
meCharColor == css::beans::PropertyState_DIRECT_VALUE )
83 if ( aPortionObj.
meCharEscapement == css::beans::PropertyState_DIRECT_VALUE )
85 if ( aPortionObj.
meCharHeight == css::beans::PropertyState_DIRECT_VALUE )
87 if ( aPortionObj.
meFontName == css::beans::PropertyState_DIRECT_VALUE )
95 const css::uno::Reference< css::beans::XPropertySet > & rPagePropSet )
99 sal_uInt32 nCharFlags = 0xefffff;
101 nCharFlags = 0x7ffff;
110 bool bIsDark =
false;
135 mnInstance ( nInstance )
137 bool bHasBullet =
false;
139 sal_uInt16 nUpperDist = 0;
140 sal_uInt16 nBulletChar = 0x2022;
141 sal_uInt16 nBulletOfs = 0;
142 sal_uInt16 nTextOfs = 0;
144 for (
int nDepth = 0; nDepth < 5; nDepth++ )
170 nBulletChar = 0x2022;
172 nTextOfs = bHasBullet ? 0xd8 : 0;
177 nBulletChar = 0x2013;
184 nBulletChar = 0x2022;
191 nBulletChar = 0x2013;
234 if ( aParagraphObj.
meTextAdjust == css::beans::PropertyState_DIRECT_VALUE )
236 if ( aParagraphObj.
meLineSpacing == css::beans::PropertyState_DIRECT_VALUE )
239 if ( nLineSpacing > 0 )
241 bool bFixedLineSpacing =
false;
242 uno::Any aAny = rXPropSet->getPropertyValue(
"FontIndependentLineSpacing");
243 if( !(aAny >>= bFixedLineSpacing) || !bFixedLineSpacing )
247 nLineSpacing =
static_cast<sal_Int16
>(
static_cast<double>(nLineSpacing) * pDesc->
Scaling + 0.5 );
252 if ( rCharLevel.
mnFontHeight >
static_cast<sal_uInt16
>(
static_cast<double>(-nLineSpacing) * 0.001 * 72.0 / 2.54 ) )
256 nLineSpacing =
static_cast<sal_Int16
>( 100.0 * pDesc->
Scaling + 0.5 );
267 if ( aParagraphObj.
meLineSpacingTop == css::beans::PropertyState_DIRECT_VALUE )
269 if ( aParagraphObj.
meForbiddenRules == css::beans::PropertyState_DIRECT_VALUE )
282 if ( aParagraphObj.
meBiDi == css::beans::PropertyState_DIRECT_VALUE )
291 aParagraphObj.
meBullet == css::beans::PropertyState_DIRECT_VALUE))
294 for ( sal_Int16
i = 0;
i < 5;
i++ )
304 rLevel.
mnBulletFont =
static_cast<sal_uInt16
>(rFontCollection.
GetId( aFontDescEntry ));
317 const css::uno::Reference< css::beans::XPropertySet > & rPagePropSet )
342 sal_uInt32 nParaFlags = 0x3ffdff;
343 sal_uInt16 nBulletFlags = ( rLev.
mbIsBullet ) ? 0xf : 0xe;
346 nParaFlags &= 0x207fff;
348 nParaFlags &= 0x7fff;
350 if ( nBulletColor == sal_uInt32(
COL_AUTO) )
352 bool bIsDark =
false;
356 nBulletColor = bIsDark ? 0xffffff : 0x000000;
358 nBulletColor &= 0xffffff;
359 nBulletColor |= 0xfe000000;
373 if ( bSimpleText || nLev )
375 if ( nParaFlags & 0x200000 )
409 mpCharSheet[ nInstance ]->SetStyleSheet( rXPropSet, rFontCollection, nLevel );
410 mpParaSheet[ nInstance ]->SetStyleSheet( rXPropSet, rFontCollection, nLevel,
mpCharSheet[ nInstance ]->maCharLevel[ nLevel ] );
420 sal_uInt32 nFlag = 0;
458 return ( (
nValue & nFlag ) == 0 );
460 return ( (
nValue & nFlag ) != 0 );
472 sal_uInt16
const nFlags = 0x60
476 sal_uInt32 nCharFlags = rCharStyle.
mnFlags;
constexpr auto convertMm100ToMasterUnit(N n)
void SetAlpha(sal_uInt8 nAlpha)
const FontCollectionEntry * GetById(sal_uInt32 nId)
sal_uInt32 GetId(FontCollectionEntry &rFontDescriptor)
std::unique_ptr< PPTExCharSheet > mpCharSheet[PPTEX_STYLESHEETENTRIES]
std::unique_ptr< PPTExParaSheet > mpParaSheet[PPTEX_STYLESHEETENTRIES]
bool IsHardAttribute(sal_uInt32 nInstance, sal_uInt32 nLevel, PPTExTextAttr eAttr, sal_uInt32 nValue)
void SetStyleSheet(const css::uno::Reference< css::beans::XPropertySet > &, FontCollection &rFontCollection, int nInstance, int nLevel)
static sal_uInt32 SizeOfTxCFStyleAtom()
void WriteTxCFStyleAtom(SvStream &rSt)
PPTExStyleSheet(sal_uInt16 nDefaultTab, PPTExBulletProvider *pBuProv)
css::beans::PropertyState meLineSpacingBottom
sal_Int16 mnLineSpacingBottom
bool mbParagraphPunctation
css::beans::PropertyState meBiDi
void ImplGetNumberingLevel(PPTExBulletProvider *pBuProv, sal_Int16 nDepth, bool bIsBullet, bool bGetPropStateValue)
css::beans::PropertyState meBullet
css::beans::PropertyState meLineSpacingTop
css::beans::PropertyState meForbiddenRules
sal_Int16 mnLineSpacingTop
void CalculateGraphicBulletSize(sal_uInt16 nFontHeight)
css::beans::PropertyState meParagraphPunctation
css::beans::PropertyState meTextAdjust
css::beans::PropertyState meLineSpacing
css::beans::PropertyState meCharColor
css::beans::PropertyState meCharEscapement
css::beans::PropertyState meAsianOrComplexFont
css::beans::PropertyState meCharHeight
css::beans::PropertyState meFontName
sal_Int16 mnCharEscapement
sal_uInt16 mnAsianOrComplexFont
static bool GetPropertyValue(css::uno::Any &rAny, const css::uno::Reference< css::beans::XPropertySet > &, const OUString &rPropertyName, bool bTestPropertyAvailability=false)
SvStream & WriteInt32(sal_Int32 nInt32)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
SvStream & WriteUInt32(sal_uInt32 nUInt32)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
@ CharAttr_AsianOrComplexFont
#define PPTEX_STYLESHEETENTRIES
#define EPP_TEXTTYPE_CenterBody
#define EPP_PST_ExtendedParagraphMasterAtom
#define EPP_TEXTTYPE_Body
#define EPP_TEXTTYPE_Notes
#define EPP_TEXTTYPE_QuarterBody
#define EPP_TxCFStyleAtom
#define EPP_TEXTTYPE_Title
#define EPP_TEXTTYPE_Other
#define EPP_TEXTTYPE_notUsed
#define EPP_TEXTTYPE_HalfBody
#define EPP_TEXTTYPE_CenterTitle
sal_uInt16 mnAsianOrComplexFont
void Write(SvStream &rSt, sal_uInt16 nLev, bool bSimpleText, const css::uno::Reference< css::beans::XPropertySet > &rPagePropSet)
PPTExCharLevel maCharLevel[5]
PPTExCharSheet(int nInstance)
void SetStyleSheet(const css::uno::Reference< css::beans::XPropertySet > &, FontCollection &rFontCollection, int nLevel)
sal_uInt32 mnMappedNumType
sal_uInt32 mnNumberingType
sal_uInt16 mnAsianSettings
sal_uInt16 mnBulletHeight
bool mbExtendedBulletsUsed
PPTExBulletProvider * pBuProv
PPTExParaLevel maParaLevel[5]
void SetStyleSheet(const css::uno::Reference< css::beans::XPropertySet > &, FontCollection &rFontCollection, int nLevel, const PPTExCharLevel &rCharLevel)
PPTExParaSheet(int nInstance, sal_uInt16 nDefaultTab, PPTExBulletProvider *pProv)
void Write(SvStream &rSt, sal_uInt16 nLev, bool bSimpleText, const css::uno::Reference< css::beans::XPropertySet > &rPagePropSet)
SvxNumType nNumberingType
css::awt::FontDescriptor aFontDesc
sal_uInt32 nMappedNumType
bool bExtendedBulletsUsed
sal_Int16 nBulletRealSize