diff options
Diffstat (limited to 'sw/source/filter/html/htmlctxt.cxx')
-rw-r--r-- | sw/source/filter/html/htmlctxt.cxx | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index b3a62fe4d189..e60f6800cd58 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -62,28 +62,28 @@ class _HTMLAttrContext_SaveDoc // wenn Attributierung nicht // beibehalten werden soll. - USHORT nContextStMin; // In Umgebung gueltige Stack- + sal_uInt16 nContextStMin; // In Umgebung gueltige Stack- // Untergrenze, wenn der Stack // geschuetzt werden soll. - USHORT nContextStAttrMin; // In Umgebung gueltige Stack- + sal_uInt16 nContextStAttrMin; // In Umgebung gueltige Stack- // Untergrenze, wenn die Attribute // nicht beibehalten werden sollen. - BOOL bStripTrailingPara : 1; // letzen Absatz entfernen? - BOOL bKeepNumRules : 1; // Numerierung beibehalten? - BOOL bPopStack : 1; // Stack-Elemente oberhalb des + sal_Bool bStripTrailingPara : 1; // letzen Absatz entfernen? + sal_Bool bKeepNumRules : 1; // Numerierung beibehalten? + sal_Bool bPopStack : 1; // Stack-Elemente oberhalb des // zu schliessenden entfernen? - BOOL bFixHeaderDist : 1; - BOOL bFixFooterDist : 1; + sal_Bool bFixHeaderDist : 1; + sal_Bool bFixFooterDist : 1; public: _HTMLAttrContext_SaveDoc() : pPos( 0 ), pAttrTab( 0 ), nContextStMin( USHRT_MAX ), nContextStAttrMin( USHRT_MAX ), - bStripTrailingPara( FALSE ), bKeepNumRules( FALSE ), - bPopStack( FALSE ), - bFixHeaderDist( FALSE ), bFixFooterDist( FALSE ) + bStripTrailingPara( sal_False ), bKeepNumRules( sal_False ), + bPopStack( sal_False ), + bFixHeaderDist( sal_False ), bFixFooterDist( sal_False ) {} ~_HTMLAttrContext_SaveDoc() { delete pPos; delete pAttrTab; } @@ -96,28 +96,28 @@ public: void SetNumInfo( const SwHTMLNumRuleInfo& rInf ) { aNumRuleInfo.Set(rInf); } const SwHTMLNumRuleInfo& GetNumInfo() const { return aNumRuleInfo; } - _HTMLAttrTable *GetAttrTab( BOOL bCreate= FALSE ); + _HTMLAttrTable *GetAttrTab( sal_Bool bCreate= sal_False ); - void SetContextStMin( USHORT nMin ) { nContextStMin = nMin; } - USHORT GetContextStMin() const { return nContextStMin; } + void SetContextStMin( sal_uInt16 nMin ) { nContextStMin = nMin; } + sal_uInt16 GetContextStMin() const { return nContextStMin; } - void SetContextStAttrMin( USHORT nMin ) { nContextStAttrMin = nMin; } - USHORT GetContextStAttrMin() const { return nContextStAttrMin; } + void SetContextStAttrMin( sal_uInt16 nMin ) { nContextStAttrMin = nMin; } + sal_uInt16 GetContextStAttrMin() const { return nContextStAttrMin; } - void SetStripTrailingPara( BOOL bSet ) { bStripTrailingPara = bSet; } - BOOL GetStripTrailingPara() const { return bStripTrailingPara; } + void SetStripTrailingPara( sal_Bool bSet ) { bStripTrailingPara = bSet; } + sal_Bool GetStripTrailingPara() const { return bStripTrailingPara; } - void SetKeepNumRules( BOOL bSet ) { bKeepNumRules = bSet; } - BOOL GetKeepNumRules() const { return bKeepNumRules; } + void SetKeepNumRules( sal_Bool bSet ) { bKeepNumRules = bSet; } + sal_Bool GetKeepNumRules() const { return bKeepNumRules; } - void SetFixHeaderDist( BOOL bSet ) { bFixHeaderDist = bSet; } - BOOL GetFixHeaderDist() const { return bFixHeaderDist; } + void SetFixHeaderDist( sal_Bool bSet ) { bFixHeaderDist = bSet; } + sal_Bool GetFixHeaderDist() const { return bFixHeaderDist; } - void SetFixFooterDist( BOOL bSet ) { bFixFooterDist = bSet; } - BOOL GetFixFooterDist() const { return bFixFooterDist; } + void SetFixFooterDist( sal_Bool bSet ) { bFixFooterDist = bSet; } + sal_Bool GetFixFooterDist() const { return bFixFooterDist; } }; -_HTMLAttrTable *_HTMLAttrContext_SaveDoc::GetAttrTab( BOOL bCreate ) +_HTMLAttrTable *_HTMLAttrContext_SaveDoc::GetAttrTab( sal_Bool bCreate ) { if( !pAttrTab && bCreate ) { @@ -129,7 +129,7 @@ _HTMLAttrTable *_HTMLAttrContext_SaveDoc::GetAttrTab( BOOL bCreate ) /* */ -_HTMLAttrContext_SaveDoc *_HTMLAttrContext::GetSaveDocContext( BOOL bCreate ) +_HTMLAttrContext_SaveDoc *_HTMLAttrContext::GetSaveDocContext( sal_Bool bCreate ) { if( !pSaveDocContext && bCreate ) pSaveDocContext = new _HTMLAttrContext_SaveDoc; @@ -160,12 +160,12 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) const SwNodeIndex& rNewSttPara = rNewPos.nNode; xub_StrLen nNewSttCnt = rNewPos.nContent.GetIndex(); - BOOL bMoveBack = FALSE; + sal_Bool bMoveBack = sal_False; // alle noch offenen Attribute beenden und hinter der Tabelle // neu aufspannen _HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab; - for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* ); + for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* ); nCnt--; ++pTbl ) { _HTMLAttr *pAttr = *pTbl; @@ -174,7 +174,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) _HTMLAttr *pNext = pAttr->GetNext(); _HTMLAttr *pPrev = pAttr->GetPrev(); - USHORT nWhich = pAttr->pItem->Which(); + sal_uInt16 nWhich = pAttr->pItem->Which(); if( !nOldEndCnt && RES_PARATR_BEGIN <= nWhich && pAttr->GetSttParaIdx() < pOldEndPara->GetIndex() ) { @@ -208,7 +208,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) pNext->InsertPrev( pSetAttr ); else { - USHORT nTmp = + sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0 : aSetAttrTab.Count(); aSetAttrTab.Insert( pSetAttr, nTmp ); } @@ -222,7 +222,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) pNext->InsertPrev( pPrev ); else { - USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count(); + sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count(); aSetAttrTab.Insert( pPrev, nTmp ); } } @@ -244,10 +244,10 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) } void SwHTMLParser::SaveDocContext( _HTMLAttrContext *pCntxt, - USHORT nFlags, + sal_uInt16 nFlags, const SwPosition *pNewPos ) { - _HTMLAttrContext_SaveDoc *pSave = pCntxt->GetSaveDocContext( TRUE ); + _HTMLAttrContext_SaveDoc *pSave = pCntxt->GetSaveDocContext( sal_True ); pSave->SetStripTrailingPara( (HTML_CNTXT_STRIP_PARA & nFlags) != 0 ); pSave->SetKeepNumRules( (HTML_CNTXT_KEEP_NUMRULE & nFlags) != 0 ); pSave->SetFixHeaderDist( (HTML_CNTXT_HEADER_DIST & nFlags) != 0 ); @@ -273,7 +273,7 @@ void SwHTMLParser::SaveDocContext( _HTMLAttrContext *pCntxt, } else { - _HTMLAttrTable *pSaveAttrTab = pSave->GetAttrTab( TRUE ); + _HTMLAttrTable *pSaveAttrTab = pSave->GetAttrTab( sal_True ); SaveAttrTab( *pSaveAttrTab ); } @@ -403,7 +403,7 @@ void SwHTMLParser::EndContext( _HTMLAttrContext *pContext ) void SwHTMLParser::ClearContext( _HTMLAttrContext *pContext ) { _HTMLAttrs &rAttrs = pContext->GetAttrs(); - for( USHORT i=0; i<rAttrs.Count(); i++ ) + for( sal_uInt16 i=0; i<rAttrs.Count(); i++ ) { // einfaches Loeschen reicht hier nicht, weil das // Attribut auch aus seiner Liste ausgetragen werden @@ -435,11 +435,11 @@ void SwHTMLParser::ClearContext( _HTMLAttrContext *pContext ) /* */ -BOOL SwHTMLParser::DoPositioning( SfxItemSet &rItemSet, +sal_Bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, _HTMLAttrContext *pContext ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; // Unter folgenden Umstaenden wird jetzt ein Rahmen aufgemacht: // - das Tag wird absolut positioniert und left/top sind beide @@ -470,20 +470,20 @@ BOOL SwHTMLParser::DoPositioning( SfxItemSet &rItemSet, InsertFlyFrame( aFrmItemSet, pContext, rPropInfo.aId, CONTEXT_FLAGS_ABSPOS ); - pContext->SetPopStack( TRUE ); + pContext->SetPopStack( sal_True ); rPropInfo.aId.Erase(); - bRet = TRUE; + bRet = sal_True; } return bRet; } -BOOL SwHTMLParser::CreateContainer( const String& rClass, +sal_Bool SwHTMLParser::CreateContainer( const String& rClass, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, _HTMLAttrContext *pContext ) { - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; if( rClass.EqualsIgnoreCaseAscii(sCSS1_class_abs_pos) && pCSS1Parser->MayBePositioned( rPropInfo ) ) { @@ -495,13 +495,13 @@ BOOL SwHTMLParser::CreateContainer( const String& rClass, SetAnchorAndAdjustment( text::VertOrientation::NONE, text::HoriOrientation::NONE, rItemSet, rPropInfo, *pFrmItemSet ); Size aDummy(0,0); - SetFixSize( aDummy, aDummy, FALSE, FALSE, rItemSet, rPropInfo, + SetFixSize( aDummy, aDummy, sal_False, sal_False, rItemSet, rPropInfo, *pFrmItemSet ); SetSpace( aDummy, rItemSet, rPropInfo, *pFrmItemSet ); SetFrmFmtAttrs( rItemSet, rPropInfo, HTML_FF_BOX|HTML_FF_BACKGROUND|HTML_FF_DIRECTION, *pFrmItemSet ); - bRet = TRUE; + bRet = sal_True; } return bRet; @@ -512,7 +512,7 @@ BOOL SwHTMLParser::CreateContainer( const String& rClass, void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, _HTMLAttrContext *pContext, - BOOL bCharLvl ) + sal_Bool bCharLvl ) { // Ein DropCap-Attribut basteln, wenn auf Zeichen-Ebene vor dem // ersten Zeichen ein float: left vorkommt @@ -566,16 +566,16 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet, // die bisherigen Absatz-Abstaende holen (ohne die vom // obersten Kontext, denn den veraendern wir ja gerade) ... - USHORT nOldLeft = 0, nOldRight = 0; + sal_uInt16 nOldLeft = 0, nOldRight = 0; short nOldIndent = 0; - BOOL bIgnoreTop = aContexts.Count() > nContextStMin && + sal_Bool bIgnoreTop = aContexts.Count() > nContextStMin && aContexts[aContexts.Count()-1] == pContext; GetMarginsFromContext( nOldLeft, nOldRight, nOldIndent, bIgnoreTop ); // und noch die aktuell gueltigen - USHORT nLeft = nOldLeft, nRight = nOldRight; + sal_uInt16 nLeft = nOldLeft, nRight = nOldRight; short nIndent = nOldIndent; pContext->GetMargins( nLeft, nRight, nIndent ); @@ -594,7 +594,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet, -rPropInfo.nLeftMargin > nOldLeft ) nLeft = 0; else - nLeft = nOldLeft + static_cast< USHORT >(rPropInfo.nLeftMargin); + nLeft = nOldLeft + static_cast< sal_uInt16 >(rPropInfo.nLeftMargin); } if( rPropInfo.bRightMargin ) { @@ -605,7 +605,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet, -rPropInfo.nRightMargin > nOldRight ) nRight = 0; else - nRight = nOldRight + static_cast< USHORT >(rPropInfo.nRightMargin); + nRight = nOldRight + static_cast< sal_uInt16 >(rPropInfo.nRightMargin); } if( rPropInfo.bTextIndent ) nIndent = pLRItem->GetTxtFirstLineOfst(); @@ -619,14 +619,14 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet, aLRItem.SetTxtLeft( nLeft ); aLRItem.SetRight( nRight ); NewAttr( &aAttrTab.pLRSpace, aLRItem ); - EndAttr( aAttrTab.pLRSpace, 0, FALSE ); + EndAttr( aAttrTab.pLRSpace, 0, sal_False ); } break; case RES_UL_SPACE: if( !rPropInfo.bTopMargin || !rPropInfo.bBottomMargin ) { - USHORT nUpper = 0, nLower = 0; + sal_uInt16 nUpper = 0, nLower = 0; GetULSpaceFromContext( nUpper, nLower ); SvxULSpaceItem aULSpace( *((const SvxULSpaceItem *)pItem) ); if( !rPropInfo.bTopMargin ) @@ -729,15 +729,15 @@ void SwHTMLParser::InsertAttr( _HTMLAttr **ppAttr, const SfxPoolItem & rItem, void SwHTMLParser::SplitPREListingXMP( _HTMLAttrContext *pCntxt ) { // PRE/Listing/XMP soll beim beenden des Kontexts beendet werden. - pCntxt->SetFinishPREListingXMP( TRUE ); + pCntxt->SetFinishPREListingXMP( sal_True ); // Und die jetzt gueltigen Flags sollen wieder gesetzt werden. if( IsReadPRE() ) - pCntxt->SetRestartPRE( TRUE ); + pCntxt->SetRestartPRE( sal_True ); if( IsReadXMP() ) - pCntxt->SetRestartXMP( TRUE ); + pCntxt->SetRestartXMP( sal_True ); if( IsReadListing() ) - pCntxt->SetRestartListing( TRUE ); + pCntxt->SetRestartListing( sal_True ); // PRE/Listing/XMP wird auuserdem sofort beendet FinishPREListingXMP(); |