tdf#90834: Turn in-line version control comments into good comments

Change-Id: I366badf234f00536cd208a516eff9667f99d2f86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87719
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
This commit is contained in:
Pelin Kuran
2020-01-30 12:08:52 +03:00
committed by Michael Stahl
parent f363ca0c0b
commit c3bdf60484
5 changed files with 87 additions and 140 deletions

View File

@@ -119,7 +119,6 @@ void SvxUnoDrawPool::getAny( SfxItemPool const * pPool, const comphelper::Proper
if( eMapUnit == MapUnit::Map100thMM ) if( eMapUnit == MapUnit::Map100thMM )
nMemberId &= (~CONVERT_TWIPS); nMemberId &= (~CONVERT_TWIPS);
// DVO, OD 10.10.2003 #i18732#
// Assure, that ID is a Which-ID (it could be a Slot-ID.) // Assure, that ID is a Which-ID (it could be a Slot-ID.)
// Thus, convert handle to Which-ID. // Thus, convert handle to Which-ID.
pPool->GetDefaultItem( pPool->GetWhich( static_cast<sal_uInt16>(pEntry->mnHandle) ) ).QueryValue( rValue, nMemberId ); pPool->GetDefaultItem( pPool->GetWhich( static_cast<sal_uInt16>(pEntry->mnHandle) ) ).QueryValue( rValue, nMemberId );
@@ -153,7 +152,6 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn
SvxUnoConvertFromMM( eMapUnit, aValue ); SvxUnoConvertFromMM( eMapUnit, aValue );
} }
// DVO, OD 10.10.2003 #i18732#
// Assure, that ID is a Which-ID (it could be a Slot-ID.) // Assure, that ID is a Which-ID (it could be a Slot-ID.)
// Thus, convert handle to Which-ID. // Thus, convert handle to Which-ID.
const sal_uInt16 nWhich = pPool->GetWhich( static_cast<sal_uInt16>(pEntry->mnHandle) ); const sal_uInt16 nWhich = pPool->GetWhich( static_cast<sal_uInt16>(pEntry->mnHandle) );
@@ -231,8 +229,7 @@ void SvxUnoDrawPool::_getPropertyStates( const comphelper::PropertyMapEntry** pp
{ {
while( *ppEntries ) while( *ppEntries )
{ {
// OD 13.10.2003 #i18732# //Assure, that ID is a Which-ID (it could be a Slot-ID.)
// Assure, that ID is a Which-ID (it could be a Slot-ID.)
// Thus, convert handle to Which-ID. // Thus, convert handle to Which-ID.
const sal_uInt16 nWhich = pPool->GetWhich( static_cast<sal_uInt16>((*ppEntries)->mnHandle) ); const sal_uInt16 nWhich = pPool->GetWhich( static_cast<sal_uInt16>((*ppEntries)->mnHandle) );
@@ -254,7 +251,7 @@ void SvxUnoDrawPool::_getPropertyStates( const comphelper::PropertyMapEntry** pp
} }
break; break;
default: default:
// OD 13.10.2003 #i18732# - correction: //#i18732# - correction:
// use method <IsStaticDefaultItem(..)> instead of using probably // use method <IsStaticDefaultItem(..)> instead of using probably
// incompatible item pool <mpDefaultPool>. // incompatible item pool <mpDefaultPool>.
const SfxPoolItem& r1 = pPool->GetDefaultItem( nWhich ); const SfxPoolItem& r1 = pPool->GetDefaultItem( nWhich );
@@ -289,14 +286,12 @@ void SvxUnoDrawPool::_setPropertyToDefault( const comphelper::PropertyMapEntry*
SfxItemPool* pPool = getModelPool( true ); SfxItemPool* pPool = getModelPool( true );
// OD 10.10.2003 #i18732#
// Assure, that ID is a Which-ID (it could be a Slot-ID.) // Assure, that ID is a Which-ID (it could be a Slot-ID.)
// Thus, convert handle to Which-ID. // Thus, convert handle to Which-ID.
const sal_uInt16 nWhich = pPool->GetWhich( static_cast<sal_uInt16>(pEntry->mnHandle) ); const sal_uInt16 nWhich = pPool->GetWhich( static_cast<sal_uInt16>(pEntry->mnHandle) );
if ( pPool && pPool != mpDefaultsPool ) if ( pPool && pPool != mpDefaultsPool )
{ {
// OD 13.10.2003 #i18732# - use method <ResetPoolDefaultItem(..)> // use method <ResetPoolDefaultItem(..)> instead of using probably incompatible item pool <mpDefaultsPool>.
// instead of using probably incompatible item pool <mpDefaultsPool>.
pPool->ResetPoolDefaultItem( nWhich ); pPool->ResetPoolDefaultItem( nWhich );
} }
} }
@@ -304,8 +299,7 @@ void SvxUnoDrawPool::_setPropertyToDefault( const comphelper::PropertyMapEntry*
uno::Any SvxUnoDrawPool::_getPropertyDefault( const comphelper::PropertyMapEntry* pEntry ) uno::Any SvxUnoDrawPool::_getPropertyDefault( const comphelper::PropertyMapEntry* pEntry )
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
//#i18732# - use method <GetPoolDefaultItem(..)> instead of
// OD 13.10.2003 #i18732# - use method <GetPoolDefaultItem(..)> instead of
// using probably incompatible item pool <mpDefaultsPool> // using probably incompatible item pool <mpDefaultsPool>
uno::Any aAny; uno::Any aAny;
SfxItemPool* pPool = getModelPool( true ); SfxItemPool* pPool = getModelPool( true );

View File

@@ -278,10 +278,8 @@ void SwFlyFrame::DestroyImpl()
{ {
ClearTmpConsiderWrapInfluence(); // remove this from SwLayouter ClearTmpConsiderWrapInfluence(); // remove this from SwLayouter
// OD 2004-01-19 #110582#
Unchain(); Unchain();
// OD 2004-01-19 #110582#
DeleteCnt(); DeleteCnt();
if ( GetAnchorFrame() ) if ( GetAnchorFrame() )
@@ -305,7 +303,6 @@ const IDocumentDrawModelAccess& SwFlyFrame::getIDocumentDrawModelAccess()
return GetFormat()->getIDocumentDrawModelAccess(); return GetFormat()->getIDocumentDrawModelAccess();
} }
// OD 2004-01-19 #110582#
void SwFlyFrame::Unchain() void SwFlyFrame::Unchain()
{ {
if ( GetPrevLink() ) if ( GetPrevLink() )
@@ -314,7 +311,6 @@ void SwFlyFrame::Unchain()
UnchainFrames( this, GetNextLink() ); UnchainFrames( this, GetNextLink() );
} }
// OD 2004-01-19 #110582#
void SwFlyFrame::DeleteCnt() void SwFlyFrame::DeleteCnt()
{ {
SwFrame* pFrame = m_pLower; SwFrame* pFrame = m_pLower;
@@ -329,7 +325,7 @@ void SwFlyFrame::DeleteCnt()
} }
else if ( dynamic_cast<const SwAnchoredDrawObject*>( pAnchoredObj) != nullptr ) else if ( dynamic_cast<const SwAnchoredDrawObject*>( pAnchoredObj) != nullptr )
{ {
// OD 23.06.2003 #108784# - consider 'virtual' drawing objects // consider 'virtual' drawing objects
SdrObject* pObj = pAnchoredObj->DrawObj(); SdrObject* pObj = pAnchoredObj->DrawObj();
if ( dynamic_cast<const SwDrawVirtObj*>( pObj) != nullptr ) if ( dynamic_cast<const SwDrawVirtObj*>( pObj) != nullptr )
{ {
@@ -359,15 +355,12 @@ void SwFlyFrame::DeleteCnt()
void SwFlyFrame::InitDrawObj() void SwFlyFrame::InitDrawObj()
{ {
// OD 2004-03-22 #i26791#
SetDrawObj(*SwFlyDrawContact::CreateNewRef(this, GetFormat())); SetDrawObj(*SwFlyDrawContact::CreateNewRef(this, GetFormat()));
// Set the right Layer // Set the right Layer
// OD 2004-01-19 #110582#
IDocumentDrawModelAccess& rIDDMA = GetFormat()->getIDocumentDrawModelAccess(); IDocumentDrawModelAccess& rIDDMA = GetFormat()->getIDocumentDrawModelAccess();
SdrLayerID nHeavenId = rIDDMA.GetHeavenId(); SdrLayerID nHeavenId = rIDDMA.GetHeavenId();
SdrLayerID nHellId = rIDDMA.GetHellId(); SdrLayerID nHellId = rIDDMA.GetHellId();
// OD 2004-03-22 #i26791#
GetVirtDrawObj()->SetLayer( GetFormat()->GetOpaque().GetValue() GetVirtDrawObj()->SetLayer( GetFormat()->GetOpaque().GetValue()
? nHeavenId ? nHeavenId
: nHellId ); : nHellId );
@@ -705,14 +698,14 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
{ {
case RES_VERT_ORIENT: case RES_VERT_ORIENT:
case RES_HORI_ORIENT: case RES_HORI_ORIENT:
// OD 22.09.2003 #i18732# - consider new option 'follow text flow' // #i18732# - consider new option 'follow text flow'
case RES_FOLLOW_TEXT_FLOW: case RES_FOLLOW_TEXT_FLOW:
{ {
// ATTENTION: Always also change Action in ChgRePos()! // ATTENTION: Always also change Action in ChgRePos()!
rInvFlags |= 0x09; rInvFlags |= 0x09;
} }
break; break;
// OD 2004-07-01 #i28701# - consider new option 'wrap influence on position' // #i28701# - consider new option 'wrap influence on position'
case RES_WRAP_INFLUENCE_ON_OBJPOS: case RES_WRAP_INFLUENCE_ON_OBJPOS:
{ {
rInvFlags |= 0x89; rInvFlags |= 0x89;
@@ -720,7 +713,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
break; break;
case RES_SURROUND: case RES_SURROUND:
{ {
// OD 2004-05-13 #i28701# - invalidate position on change of //#i28701# - invalidate position on change of
// wrapping style. // wrapping style.
//rInvFlags |= 0x40; //rInvFlags |= 0x40;
rInvFlags |= 0x41; rInvFlags |= 0x41;
@@ -1349,11 +1342,9 @@ void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderA
ColUnlock(); ColUnlock();
} }
// OD 14.03.2003 #i11760# - change parameter <bNoColl>: type <bool>; // #i11760# - change parameter <bNoColl>: type <bool>;
// default value = false. // add new parameter <bNoCalcFollow> with
// OD 14.03.2003 #i11760# - add new parameter <bNoCalcFollow> with // new parameter <bNoCalcFollow> was used by method
// default value = false.
// OD 11.04.2003 #108824# - new parameter <bNoCalcFollow> was used by method
// <FormatWidthCols(..)> to avoid follow formatting // <FormatWidthCols(..)> to avoid follow formatting
// for text frames. But, unformatted follows causes // for text frames. But, unformatted follows causes
// problems in method <SwContentFrame::WouldFit_(..)>, // problems in method <SwContentFrame::WouldFit_(..)>,
@@ -1431,7 +1422,7 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
if ( pFrame->IsTabFrame() ) if ( pFrame->IsTabFrame() )
{ {
static_cast<SwTabFrame*>(pFrame)->m_bCalcLowers = true; static_cast<SwTabFrame*>(pFrame)->m_bCalcLowers = true;
// OD 26.08.2003 #i18103# - lock move backward of follow table, // #i18103# - lock move backward of follow table,
// if no section content is formatted or follow table belongs // if no section content is formatted or follow table belongs
// to the section, which content is formatted. // to the section, which content is formatted.
if ( static_cast<SwTabFrame*>(pFrame)->IsFollow() && if ( static_cast<SwTabFrame*>(pFrame)->IsFollow() &&
@@ -1447,15 +1438,15 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
pFrame->Calc(pRenderContext); pFrame->Calc(pRenderContext);
} }
// OD 14.03.2003 #i11760# - reset control flag for follow format. // #i11760# - reset control flag for follow format.
if ( pFrame->IsTextFrame() ) if ( pFrame->IsTextFrame() )
{ {
static_cast<SwTextFrame*>(pFrame)->AllowFollowFormat(); static_cast<SwTextFrame*>(pFrame)->AllowFollowFormat();
} }
// #111937# The keep-attribute can cause the position // The keep-attribute can cause the position
// of the prev to be invalid: // of the prev to be invalid:
// OD 2004-03-15 #116560# - Do not consider invalid previous frame // Do not consider invalid previous frame
// due to its keep-attribute, if current frame is a follow or is locked. // due to its keep-attribute, if current frame is a follow or is locked.
// #i44049# - do not consider invalid previous // #i44049# - do not consider invalid previous
// frame due to its keep-attribute, if it can't move forward. // frame due to its keep-attribute, if it can't move forward.
@@ -1569,7 +1560,7 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
continue; continue;
} }
// OD 2004-05-17 #i28701# - format anchor frame after its objects // #i28701# - format anchor frame after its objects
// are formatted, if the wrapping style influence has to be considered. // are formatted, if the wrapping style influence has to be considered.
if ( pLay->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) ) if ( pLay->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) )
{ {
@@ -1667,7 +1658,6 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
while( true ); while( true );
} }
// OD 2004-03-23 #i26791#
void SwFlyFrame::MakeObjPos() void SwFlyFrame::MakeObjPos()
{ {
if ( !isFrameAreaPositionValid() ) if ( !isFrameAreaPositionValid() )
@@ -1675,7 +1665,7 @@ void SwFlyFrame::MakeObjPos()
vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut();
setFrameAreaPositionValid(true); setFrameAreaPositionValid(true);
// OD 29.10.2003 #113049# - use new class to position object // use new class to position object
GetAnchorFrame()->Calc(pRenderContext); GetAnchorFrame()->Calc(pRenderContext);
objectpositioning::SwToLayoutAnchoredObjectPosition objectpositioning::SwToLayoutAnchoredObjectPosition
aObjPositioning( *GetVirtDrawObj() ); aObjPositioning( *GetVirtDrawObj() );
@@ -1703,7 +1693,7 @@ void SwFlyFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
{ {
setFramePrintAreaValid(true); setFramePrintAreaValid(true);
// OD 31.07.2003 #110978# - consider vertical layout // consider vertical layout
SwRectFnSet aRectFnSet(this); SwRectFnSet aRectFnSet(this);
aRectFnSet.SetXMargins( *this, rAttrs.CalcLeftLine(), aRectFnSet.SetXMargins( *this, rAttrs.CalcLeftLine(),
rAttrs.CalcRightLine() ); rAttrs.CalcRightLine() );
@@ -2568,7 +2558,7 @@ static SwTwips lcl_CalcAutoWidth( const SwLayoutFrame& rFrame )
return nRet; return nRet;
} }
/// OD 16.04.2003 #i13147# - If called for paint and the <SwNoTextFrame> contains /// #i13147# - If called for paint and the <SwNoTextFrame> contains
/// a graphic, load of intrinsic graphic has to be avoided. /// a graphic, load of intrinsic graphic has to be avoided.
bool SwFlyFrame::GetContour( tools::PolyPolygon& rContour, bool SwFlyFrame::GetContour( tools::PolyPolygon& rContour,
const bool _bForPaint ) const const bool _bForPaint ) const
@@ -2582,7 +2572,7 @@ bool SwFlyFrame::GetContour( tools::PolyPolygon& rContour,
if(GetFormat()->GetSurround().IsContour()) if(GetFormat()->GetSurround().IsContour())
{ {
SwNoTextNode *pNd = const_cast<SwNoTextNode*>(static_cast<const SwNoTextNode*>(static_cast<const SwNoTextFrame*>(Lower())->GetNode())); SwNoTextNode *pNd = const_cast<SwNoTextNode*>(static_cast<const SwNoTextNode*>(static_cast<const SwNoTextFrame*>(Lower())->GetNode()));
// OD 16.04.2003 #i13147# - determine <GraphicObject> instead of <Graphic> // #i13147# - determine <GraphicObject> instead of <Graphic>
// in order to avoid load of graphic, if <SwNoTextNode> contains a graphic // in order to avoid load of graphic, if <SwNoTextNode> contains a graphic
// node and method is called for paint. // node and method is called for paint.
std::unique_ptr<GraphicObject> xTmpGrfObj; std::unique_ptr<GraphicObject> xTmpGrfObj;
@@ -2602,7 +2592,7 @@ bool SwFlyFrame::GetContour( tools::PolyPolygon& rContour,
{ {
if( !pNd->HasContour() ) if( !pNd->HasContour() )
{ {
// OD 16.04.2003 #i13147# - no <CreateContour> for a graphic //#i13147# - no <CreateContour> for a graphic
// during paint. Thus, return (value of <bRet> should be <false>). // during paint. Thus, return (value of <bRet> should be <false>).
if ( pGrfNd && _bForPaint ) if ( pGrfNd && _bForPaint )
{ {
@@ -2618,7 +2608,7 @@ bool SwFlyFrame::GetContour( tools::PolyPolygon& rContour,
SwRect aOrig; SwRect aOrig;
Lower()->Calc(pRenderContext); Lower()->Calc(pRenderContext);
static_cast<const SwNoTextFrame*>(Lower())->GetGrfArea( aClip, &aOrig ); static_cast<const SwNoTextFrame*>(Lower())->GetGrfArea( aClip, &aOrig );
// OD 16.04.2003 #i13147# - copy method code <SvxContourDlg::ScaleContour(..)> // #i13147# - copy method code <SvxContourDlg::ScaleContour(..)>
// in order to avoid that graphic has to be loaded for contour scale. // in order to avoid that graphic has to be loaded for contour scale.
//SvxContourDlg::ScaleContour( rContour, aGrf, MapUnit::MapTwip, aOrig.SSize() ); //SvxContourDlg::ScaleContour( rContour, aGrf, MapUnit::MapTwip, aOrig.SSize() );
{ {
@@ -2656,7 +2646,7 @@ bool SwFlyFrame::GetContour( tools::PolyPolygon& rContour,
} }
} }
} }
// OD 17.04.2003 #i13147# - destroy created <GraphicObject>. // destroy created <GraphicObject>.
xTmpGrfObj.reset(); xTmpGrfObj.reset();
rContour.Move( aOrig.Left(), aOrig.Top() ); rContour.Move( aOrig.Left(), aOrig.Top() );
if( !aClip.Width() ) if( !aClip.Width() )
@@ -2717,7 +2707,7 @@ bool SwFlyFrame::GetContour( tools::PolyPolygon& rContour,
return bRet; return bRet;
} }
// OD 2004-03-25 #i26791#
const SwVirtFlyDrawObj* SwFlyFrame::GetVirtDrawObj() const const SwVirtFlyDrawObj* SwFlyFrame::GetVirtDrawObj() const
{ {
return static_cast<const SwVirtFlyDrawObj*>(GetDrawObj()); return static_cast<const SwVirtFlyDrawObj*>(GetDrawObj());
@@ -2727,7 +2717,7 @@ SwVirtFlyDrawObj* SwFlyFrame::GetVirtDrawObj()
return static_cast<SwVirtFlyDrawObj*>(DrawObj()); return static_cast<SwVirtFlyDrawObj*>(DrawObj());
} }
// OD 2004-03-24 #i26791# - implementation of pure virtual method declared in // implementation of pure virtual method declared in
// base class <SwAnchoredObject> // base class <SwAnchoredObject>
void SwFlyFrame::InvalidateObjPos() void SwFlyFrame::InvalidateObjPos()
@@ -2863,8 +2853,7 @@ SwTwips SwFlyFrame::CalcContentHeight(const SwBorderAttrs *pAttrs, const SwTwips
if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) != nullptr ) if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) != nullptr )
{ {
SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pAnchoredObj); SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
// OD 06.11.2003 #i22305# - consider // consider only Writer fly frames, which follow the text flow.
// only Writer fly frames, which follow the text flow.
if ( pFly->IsFlyLayFrame() && if ( pFly->IsFlyLayFrame() &&
pFly->getFrameArea().Top() != FAR_AWAY && pFly->getFrameArea().Top() != FAR_AWAY &&
pFly->GetFormat()->GetFollowTextFlow().GetValue() ) pFly->GetFormat()->GetFollowTextFlow().GetValue() )

View File

@@ -170,7 +170,6 @@ void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
nUL = pAttrs->CalcBottom() + nSpace; nUL = pAttrs->CalcBottom() + nSpace;
/* set print area */ /* set print area */
// OD 23.01.2003 #106895# - add first parameter to <SwBorderAttrs::CalcRight(..)>
SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this ); SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this );
SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this); SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
@@ -209,7 +208,6 @@ void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
// Set sizes - the sizes are given by the surrounding Frame, just // Set sizes - the sizes are given by the surrounding Frame, just
// subtract the borders. // subtract the borders.
// OD 23.01.2003 #106895# - add first parameter to <SwBorderAttrs::CalcRight(..)>
SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this ); SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this );
aPrt.Width ( getFrameArea().Width() - nLR ); aPrt.Width ( getFrameArea().Width() - nLR );
aPrt.Height( getFrameArea().Height()- nUL ); aPrt.Height( getFrameArea().Height()- nUL );
@@ -487,7 +485,7 @@ SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
else if (nEat > nMaxEat) else if (nEat > nMaxEat)
nEat = nMaxEat; nEat = nMaxEat;
// OD 10.04.2003 #108719# - Notify fly frame, if header frame // Notify fly frame, if header frame
// grows. Consider, that 'normal' grow of layout frame already notifies // grows. Consider, that 'normal' grow of layout frame already notifies
// the fly frames. // the fly frames.
bool bNotifyFlys = false; bool bNotifyFlys = false;
@@ -506,7 +504,7 @@ SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
} }
nResult += nEat; nResult += nEat;
// OD 14.04.2003 #108719# - trigger fly frame notify. // trigger fly frame notify.
if ( IsHeaderFrame() ) if ( IsHeaderFrame() )
{ {
bNotifyFlys = true; bNotifyFlys = true;
@@ -525,7 +523,7 @@ SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
} }
} }
// OD 10.04.2003 #108719# - notify fly frames, if necessary and triggered. // notify fly frames, if necessary and triggered.
if ( ( nResult > 0 ) && bNotifyFlys ) if ( ( nResult > 0 ) && bNotifyFlys )
{ {
NotifyLowerObjs(); NotifyLowerObjs();
@@ -578,9 +576,8 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
spacing. */ spacing. */
nRest = nDist; nRest = nDist;
// OD 10.04.2003 #108719# - Notify fly frame, if header/footer frame // Notify fly frame, if header/footer frame shrinks.
// shrinks. Consider, that 'normal' shrink of layout frame already notifies // Consider, that 'normal' shrink of layout frame already notifies the fly frames.
// the fly frames.
bool bNotifyFlys = false; bool bNotifyFlys = false;
if (nRest > 0) if (nRest > 0)
{ {
@@ -622,7 +619,7 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
InvalidateAll(); InvalidateAll();
} }
nResult += nShrink; nResult += nShrink;
// OD 14.04.2003 #108719# - trigger fly frame notify. // Trigger fly frame notify.
if ( IsHeaderFrame() ) if ( IsHeaderFrame() )
{ {
bNotifyFlys = true; bNotifyFlys = true;
@@ -641,7 +638,7 @@ SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
} }
} }
// OD 10.04.2003 #108719# - notify fly frames, if necessary. // Notify fly frames, if necessary.
if ( ( nResult > 0 ) && bNotifyFlys ) if ( ( nResult > 0 ) && bNotifyFlys )
{ {
NotifyLowerObjs(); NotifyLowerObjs();

View File

@@ -2052,8 +2052,7 @@ void DrawGraphic(
pOutDev->SetDrawMode( DrawModeFlags::Default ); pOutDev->SetDrawMode( DrawModeFlags::Default );
} }
// OD 06.08.2002 #99657# - if background region has to be drawn // If background region has to be drawn transparent, set only the RGB values of the background color as
// transparent, set only the RGB values of the background color as
// the fill color for the output device. // the fill color for the output device.
switch (eDrawStyle) switch (eDrawStyle)
{ {
@@ -2075,7 +2074,6 @@ void DrawGraphic(
// restore draw mode // restore draw mode
pOutDev->SetDrawMode( nOldDrawMode ); pOutDev->SetDrawMode( nOldDrawMode );
// OD 02.09.2002 #99657#
switch (eDrawStyle) switch (eDrawStyle)
{ {
case Transparent: case Transparent:
@@ -2089,8 +2087,7 @@ void DrawGraphic(
if ( !bGrfIsTransparent ) if ( !bGrfIsTransparent )
{ {
// subtract area of background graphic from draw area // subtract area of background graphic from draw area
// OD 08.10.2002 #103898# - consider only that part of the // Consider only that part of the graphic area that is overlapping with draw area.
// graphic area that is overlapping with draw area.
SwRect aTmpGrf = aGrf; SwRect aTmpGrf = aGrf;
aTmpGrf.Intersection( rOut ); aTmpGrf.Intersection( rOut );
if ( aTmpGrf.HasArea() ) if ( aTmpGrf.HasArea() )
@@ -2134,8 +2131,6 @@ void DrawGraphic(
} }
if( bDraw && aGrf.IsOver( rOut ) ) if( bDraw && aGrf.IsOver( rOut ) )
// OD 02.09.2002 #99657#
// add parameter <bGrfBackgrdAlreadyDrawn>
lcl_DrawGraphic( *pBrush, pOutDev, rSh, aGrf, rOut, bGrfNum, gProp, lcl_DrawGraphic( *pBrush, pOutDev, rSh, aGrf, rOut, bGrfNum, gProp,
bGrfBackgrdAlreadyDrawn ); bGrfBackgrdAlreadyDrawn );
@@ -3113,13 +3108,13 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const&
if(OUTDEV_WINDOW == gProp.pSGlobalShell->GetOut()->GetOutDevType()) if(OUTDEV_WINDOW == gProp.pSGlobalShell->GetOut()->GetOutDevType())
{ {
// OD 27.09.2002 #103636# - changed method SwLayVout::Enter(..) // changed method SwLayVout::Enter(..)
// 2nd parameter is no longer <const> and will be set to the // 2nd parameter is no longer <const> and will be set to the
// rectangle the virtual output device is calculated from <aPaintRect>, // rectangle the virtual output device is calculated from <aPaintRect>,
// if the virtual output is used. // if the virtual output is used.
s_pVout->Enter(pSh, aPaintRect, !s_isNoVirDev); s_pVout->Enter(pSh, aPaintRect, !s_isNoVirDev);
// OD 27.09.2002 #103636# - adjust paint rectangle to pixel size // Adjust paint rectangle to pixel size
// Thus, all objects overlapping on pixel level with the unadjusted // Thus, all objects overlapping on pixel level with the unadjusted
// paint rectangle will be considered in the paint. // paint rectangle will be considered in the paint.
lcl_AdjustRectToPixelSize( aPaintRect, *(pSh->GetOut()) ); lcl_AdjustRectToPixelSize( aPaintRect, *(pSh->GetOut()) );
@@ -3128,7 +3123,6 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const&
// maybe this can be put in the above scope. Since we are not sure, just leave it ATM // maybe this can be put in the above scope. Since we are not sure, just leave it ATM
s_pVout->SetOrgRect( aPaintRect ); s_pVout->SetOrgRect( aPaintRect );
// OD 29.08.2002 #102450#
// determine background color of page for <PaintLayer> method // determine background color of page for <PaintLayer> method
// calls, paint <hell> or <heaven> // calls, paint <hell> or <heaven>
const Color aPageBackgrdColor(pPage->GetDrawBackgrdColor()); const Color aPageBackgrdColor(pPage->GetDrawBackgrdColor());
@@ -3184,8 +3178,6 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const&
if ( pSh->Imp()->HasDrawView() ) if ( pSh->Imp()->HasDrawView() )
{ {
// OD 29.08.2002 #102450# - add 3rd parameter
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
pSh->Imp()->PaintLayer( pSh->GetDoc()->getIDocumentDrawModelAccess().GetHeavenId(), pSh->Imp()->PaintLayer( pSh->GetDoc()->getIDocumentDrawModelAccess().GetHeavenId(),
pPrintData, pPrintData,
*pPage, pPage->getFrameArea(), *pPage, pPage->getFrameArea(),
@@ -3245,9 +3237,9 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const&
if( pSh->GetOut()->GetFillColor() != aGlobalRetoucheColor ) if( pSh->GetOut()->GetFillColor() != aGlobalRetoucheColor )
pSh->GetOut()->SetFillColor( aGlobalRetoucheColor ); pSh->GetOut()->SetFillColor( aGlobalRetoucheColor );
// No line color
pSh->GetOut()->SetLineColor(); // OD 20.02.2003 #107369# - no line color pSh->GetOut()->SetLineColor();
// OD 20.02.2003 #107369# - use aligned page rectangle // Use aligned page rectangle
{ {
SwRect aTmpPageRect( aEmptyPageRect ); SwRect aTmpPageRect( aEmptyPageRect );
::SwAlignRect( aTmpPageRect, pSh, &rRenderContext ); ::SwAlignRect( aTmpPageRect, pSh, &rRenderContext );
@@ -3268,8 +3260,6 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const&
pSh->GetOut()->SetFont( aOldFont ); pSh->GetOut()->SetFont( aOldFont );
// paint shadow and border for empty page // paint shadow and border for empty page
// OD 19.02.2003 #107369# - use new method to paint page border and
// shadow
SwPageFrame::PaintBorderAndShadow( aEmptyPageRect, pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar ); SwPageFrame::PaintBorderAndShadow( aEmptyPageRect, pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
SwPageFrame::PaintNotesSidebar( aEmptyPageRect, pSh, pPage->GetPhyPageNum(), bRightSidebar); SwPageFrame::PaintNotesSidebar( aEmptyPageRect, pSh, pPage->GetPhyPageNum(), bRightSidebar);
@@ -3837,8 +3827,7 @@ bool SwFlyFrame::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
} }
else else
{ {
// OD 13.10.2003 #i19919# - consider 'virtual' drawing objects // Consider 'virtual' drawing objects
// OD 2004-03-29 #i26791#
SwDrawContact* pDrawContact = dynamic_cast<SwDrawContact*>(pUserCall); SwDrawContact* pDrawContact = dynamic_cast<SwDrawContact*>(pUserCall);
pAnch = pDrawContact ? pDrawContact->GetAnchorFrame(pObj) : nullptr; pAnch = pDrawContact ? pDrawContact->GetAnchorFrame(pObj) : nullptr;
if ( pAnch ) if ( pAnch )
@@ -3859,7 +3848,6 @@ bool SwFlyFrame::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
} }
else else
{ {
// OD 02.07.2003 #108784# - debug assert
if ( dynamic_cast< const SdrObjGroup *>( pObj ) == nullptr ) if ( dynamic_cast< const SdrObjGroup *>( pObj ) == nullptr )
{ {
OSL_FAIL( "<SwFlyFrame::IsPaint(..)> - paint of drawing object without anchor frame!?" ); OSL_FAIL( "<SwFlyFrame::IsPaint(..)> - paint of drawing object without anchor frame!?" );
@@ -3953,7 +3941,7 @@ void SwFlyFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const&
tools::PolyPolygon aPoly; tools::PolyPolygon aPoly;
if ( bContour ) if ( bContour )
{ {
// OD 16.04.2003 #i13147# - add 2nd parameter with value <true> // add 2nd parameter with value <true>
// to indicate that method is called for paint in order to avoid // to indicate that method is called for paint in order to avoid
// load of the intrinsic graphic. // load of the intrinsic graphic.
bContour = GetContour( aPoly, true ); bContour = GetContour( aPoly, true );
@@ -3985,7 +3973,6 @@ void SwFlyFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const&
else else
{ {
std::shared_ptr<SvxBrushItem> aBack = GetFormat()->makeBackgroundBrushItem(); std::shared_ptr<SvxBrushItem> aBack = GetFormat()->makeBackgroundBrushItem();
// OD 07.08.2002 #99657# #GetTransChg#
// to determine, if background has to be painted, by checking, if // to determine, if background has to be painted, by checking, if
// background color is not COL_TRANSPARENT ("no fill"/"auto fill") // background color is not COL_TRANSPARENT ("no fill"/"auto fill")
// or a background graphic exists. // or a background graphic exists.
@@ -4032,7 +4019,6 @@ void SwFlyFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const&
//receives the original Rect but PaintSwFrameBackground only the limited //receives the original Rect but PaintSwFrameBackground only the limited
//one. //one.
// OD 2004-04-23 #116347#
rRenderContext.Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR ); rRenderContext.Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
rRenderContext.SetLineColor(); rRenderContext.SetLineColor();
@@ -4086,15 +4072,14 @@ void SwFlyFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const&
} }
} }
// OD 06.08.2002 #99657# - paint border before painting background // paint border before painting background
// paint border
PaintSwFrameShadowAndBorder(rRect, pPage, rAttrs); PaintSwFrameShadowAndBorder(rRect, pPage, rAttrs);
rRenderContext.Pop(); rRenderContext.Pop();
} }
} }
// OD 19.12.2002 #106318# - fly frame will paint it's subsidiary lines and // fly frame will paint it's subsidiary lines and
// the subsidiary lines of its lowers on its own, due to overlapping with // the subsidiary lines of its lowers on its own, due to overlapping with
// other fly frames or other objects. // other fly frames or other objects.
if( gProp.pSGlobalShell->GetWin() if( gProp.pSGlobalShell->GetWin()
@@ -4155,7 +4140,7 @@ void SwFlyFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const&
Validate(); Validate();
// OD 19.12.2002 #106318# - first paint lines added by fly frame paint // first paint lines added by fly frame paint
// and then unlock other lines. // and then unlock other lines.
gProp.pSLines->PaintLines( &rRenderContext, gProp ); gProp.pSLines->PaintLines( &rRenderContext, gProp );
gProp.pSLines->LockLines( false ); gProp.pSLines->LockLines( false );
@@ -4205,10 +4190,10 @@ void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const&
SwLayoutFrame::PaintSwFrame( rRenderContext, rRect ); SwLayoutFrame::PaintSwFrame( rRenderContext, rRect );
} }
// OD 10.01.2003 #i6467# - no light grey rectangle for page preview // #i6467# - no light grey rectangle for page preview
else if ( gProp.pSGlobalShell->GetWin() && !gProp.pSGlobalShell->IsPreview() ) else if ( gProp.pSGlobalShell->GetWin() && !gProp.pSGlobalShell->IsPreview() )
{ {
// OD 10.01.2003 #i6467# - intersect output rectangle with table frame // #i6467# - intersect output rectangle with table frame
SwRect aTabRect( getFramePrintArea() ); SwRect aTabRect( getFramePrintArea() );
aTabRect.Pos() += getFrameArea().Pos(); aTabRect.Pos() += getFrameArea().Pos();
SwRect aTabOutRect( rRect ); SwRect aTabOutRect( rRect );
@@ -4249,7 +4234,7 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect,
{ {
if ( bDrawFullShadowRectangle ) if ( bDrawFullShadowRectangle )
{ {
// OD 06.08.2002 #99657# - draw full shadow rectangle // draw full shadow rectangle
aOut.Top( rOutRect.Top() + nHeight ); aOut.Top( rOutRect.Top() + nHeight );
aOut.Left( rOutRect.Left() + nWidth ); aOut.Left( rOutRect.Left() + nWidth );
aRegion.push_back( aOut ); aRegion.push_back( aOut );
@@ -4286,7 +4271,7 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect,
{ {
if ( bDrawFullShadowRectangle ) if ( bDrawFullShadowRectangle )
{ {
// OD 06.08.2002 #99657# - draw full shadow rectangle // draw full shadow rectangle
aOut.Bottom( rOutRect.Bottom() - nHeight ); aOut.Bottom( rOutRect.Bottom() - nHeight );
aOut.Right( rOutRect.Right() - nWidth ); aOut.Right( rOutRect.Right() - nWidth );
aRegion.push_back( aOut ); aRegion.push_back( aOut );
@@ -4323,7 +4308,7 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect,
{ {
if ( bDrawFullShadowRectangle ) if ( bDrawFullShadowRectangle )
{ {
// OD 06.08.2002 #99657# - draw full shadow rectangle // draw full shadow rectangle
aOut.Bottom( rOutRect.Bottom() - nHeight); aOut.Bottom( rOutRect.Bottom() - nHeight);
aOut.Left( rOutRect.Left() + nWidth ); aOut.Left( rOutRect.Left() + nWidth );
aRegion.push_back( aOut ); aRegion.push_back( aOut );
@@ -4360,7 +4345,7 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect,
{ {
if ( bDrawFullShadowRectangle ) if ( bDrawFullShadowRectangle )
{ {
// OD 06.08.2002 #99657# - draw full shadow rectangle // draw full shadow rectangle
aOut.Top( rOutRect.Top() + nHeight ); aOut.Top( rOutRect.Top() + nHeight );
aOut.Right( rOutRect.Right() - nWidth ); aOut.Right( rOutRect.Right() - nWidth );
aRegion.push_back( aOut ); aRegion.push_back( aOut );
@@ -4461,8 +4446,7 @@ void SwFrame::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
} }
} }
// OD 23.08.2002 #99657# - determine, if full shadow rectangle have to // determine, if full shadow rectangle have to be drawn or only two shadow rectangles beside the frame.
// be drawn or only two shadow rectangles beside the frame.
// draw full shadow rectangle, if frame background is drawn transparent. // draw full shadow rectangle, if frame background is drawn transparent.
// Status Quo: // Status Quo:
// SwLayoutFrame can have transparent drawn backgrounds. Thus, // SwLayoutFrame can have transparent drawn backgrounds. Thus,
@@ -5111,13 +5095,13 @@ void SwFrame::PaintSwFrameShadowAndBorder(
SwRect aRect( getFramePrintArea() ); SwRect aRect( getFramePrintArea() );
aRect += getFrameArea().Pos(); aRect += getFrameArea().Pos();
::SwAlignRect( aRect, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() ); ::SwAlignRect( aRect, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() );
// OD 27.09.2002 #103636# - new local boolean variable in order to // new local boolean variable in order to
// suspend border paint under special cases - see below. // suspend border paint under special cases - see below.
// NOTE: This is a fix for the implementation of feature #99657#. // NOTE: This is a fix for the implementation of feature #99657#.
bool bDrawOnlyShadowForTransparentFrame = false; bool bDrawOnlyShadowForTransparentFrame = false;
if ( aRect.IsInside( rRect ) ) if ( aRect.IsInside( rRect ) )
{ {
// OD 27.09.2002 #103636# - paint shadow, if background is transparent. // paint shadow, if background is transparent.
// Because of introduced transparent background for fly frame #99657#, // Because of introduced transparent background for fly frame #99657#,
// the shadow have to be drawn if the background is transparent, // the shadow have to be drawn if the background is transparent,
// in spite the fact that the paint rectangle <rRect> lies fully // in spite the fact that the paint rectangle <rRect> lies fully
@@ -5145,7 +5129,7 @@ void SwFrame::PaintSwFrameShadowAndBorder(
PaintShadow(rRect, aRect, rAttrs); PaintShadow(rRect, aRect, rAttrs);
} }
// OD 27.09.2002 #103636# - suspend drawing of border // suspend drawing of border
// add condition < NOT bDrawOnlyShadowForTransparentFrame > - see above // add condition < NOT bDrawOnlyShadowForTransparentFrame > - see above
// - add condition <bFoundCellForTopOrBorderAttrs> // - add condition <bFoundCellForTopOrBorderAttrs>
//-hack. //-hack.
@@ -6144,14 +6128,13 @@ void SwFrame::PaintBaBo( const SwRect& rRect, const SwPageFrame *pPage,
// #i16816# tagged pdf support // #i16816# tagged pdf support
SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pOut ); SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pOut );
// OD 2004-04-23 #116347#
pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR ); pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
pOut->SetLineColor(); pOut->SetLineColor();
SwBorderAttrAccess aAccess( SwFrame::GetCache(), this ); SwBorderAttrAccess aAccess( SwFrame::GetCache(), this );
const SwBorderAttrs &rAttrs = *aAccess.Get(); const SwBorderAttrs &rAttrs = *aAccess.Get();
// OD 20.11.2002 #104598# - take care of page margin area // take care of page margin area
// Note: code move from <SwFrame::PaintSwFrameBackground(..)> to new method // Note: code move from <SwFrame::PaintSwFrameBackground(..)> to new method
// <SwPageFrame::Paintmargin(..)>. // <SwPageFrame::Paintmargin(..)>.
if ( IsPageFrame() && !bOnlyTextBackground) if ( IsPageFrame() && !bOnlyTextBackground)
@@ -6164,7 +6147,7 @@ void SwFrame::PaintBaBo( const SwRect& rRect, const SwPageFrame *pPage,
PaintSwFrameBackground( rRect, pPage, rAttrs, false, true/*bLowerBorder*/, bOnlyTextBackground ); PaintSwFrameBackground( rRect, pPage, rAttrs, false, true/*bLowerBorder*/, bOnlyTextBackground );
} }
// OD 06.08.2002 #99657# - paint border before painting background // paint border before painting background
// paint grid for page frame and paint border // paint grid for page frame and paint border
if (!bOnlyTextBackground) if (!bOnlyTextBackground)
{ {
@@ -6190,7 +6173,6 @@ static bool lcl_compareFillAttributes(const drawinglayer::attribute::SdrAllFillA
return pA->getFillAttribute() == pB->getFillAttribute(); return pA->getFillAttribute() == pB->getFillAttribute();
} }
/// OD 05.09.2002 #102912#
/// Do not paint background for fly frames without a background brush by /// Do not paint background for fly frames without a background brush by
/// calling <PaintBaBo> at the page or at the fly frame its anchored /// calling <PaintBaBo> at the page or at the fly frame its anchored
void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pPage, void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pPage,
@@ -6199,8 +6181,7 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP
const bool bLowerBorder, const bool bLowerBorder,
const bool bOnlyTextBackground ) const const bool bOnlyTextBackground ) const
{ {
// OD 20.01.2003 #i1837# - no paint of table background, if corresponding // #i1837# - no paint of table background, if corresponding option is *not* set.
// option is *not* set.
if( IsTabFrame() && if( IsTabFrame() &&
!gProp.pSGlobalShell->GetViewOptions()->IsTable() ) !gProp.pSGlobalShell->GetViewOptions()->IsTable() )
{ {
@@ -6217,7 +6198,6 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP
SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pSh->GetOut() ); SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pSh->GetOut() );
const SvxBrushItem* pItem; const SvxBrushItem* pItem;
// OD 05.09.2002 #102912#
// temporary background brush for a fly frame without a background brush // temporary background brush for a fly frame without a background brush
std::unique_ptr<SvxBrushItem> pTmpBackBrush; std::unique_ptr<SvxBrushItem> pTmpBackBrush;
const Color* pCol; const Color* pCol;
@@ -6231,7 +6211,7 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP
bool bNoFlyBackground = !gProp.bSFlyMetafile && !bBack && IsFlyFrame(); bool bNoFlyBackground = !gProp.bSFlyMetafile && !bBack && IsFlyFrame();
if ( bNoFlyBackground ) if ( bNoFlyBackground )
{ {
// OD 05.09.2002 #102912# - Fly frame has no background. // Fly frame has no background.
// Try to find background brush at parents, if previous call of // Try to find background brush at parents, if previous call of
// <GetBackgroundBrush> disabled this option with the parameter <bLowerMode> // <GetBackgroundBrush> disabled this option with the parameter <bLowerMode>
if ( bLowerMode ) if ( bLowerMode )
@@ -6243,9 +6223,8 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP
// to true, that fly frame will paint its background using this color. // to true, that fly frame will paint its background using this color.
if ( !bBack ) if ( !bBack )
{ {
// OD 10.01.2003 #i6467# - on print output, pdf output and // #i6467# - on print output, pdf output and in embedded mode not editing color COL_WHITE is used
// in embedded mode not editing color COL_WHITE is used instead of // instead of the global retouche color.
// the global retouche color.
if ( pSh->GetOut()->GetOutDevType() == OUTDEV_PRINTER || if ( pSh->GetOut()->GetOutDevType() == OUTDEV_PRINTER ||
pSh->GetViewOptions()->IsPDFExport() || pSh->GetViewOptions()->IsPDFExport() ||
( pSh->GetDoc()->GetDocShell()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED && ( pSh->GetDoc()->GetDocShell()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
@@ -6333,10 +6312,10 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP
::lcl_SubtractFlys( this, pPage, aRect, aRegion, aClipState, gProp ); ::lcl_SubtractFlys( this, pPage, aRect, aRegion, aClipState, gProp );
} }
// OD 06.08.2002 #99657# - determine, if background transparency // Determine, if background transparency
// have to be considered for drawing. // have to be considered for drawing.
// --> Status Quo: background transparency have to be // Status Quo: background transparency have to be
// considered for fly frames // considered for fly frames
const bool bConsiderBackgroundTransparency = IsFlyFrame(); const bool bConsiderBackgroundTransparency = IsFlyFrame();
bool bDone(false); bool bDone(false);
@@ -6375,8 +6354,7 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP
if( !aRegion[i].HasArea() ) if( !aRegion[i].HasArea() )
continue; continue;
} }
// OD 06.08.2002 #99657# - add 6th parameter to indicate, if // add 6th parameter to indicate, if background transparency have to be considered
// background transparency have to be considered
// Set missing 5th parameter to the default value GRFNUM_NO // Set missing 5th parameter to the default value GRFNUM_NO
// - see declaration in /core/inc/frmtool.hxx. // - see declaration in /core/inc/frmtool.hxx.
::DrawGraphic( ::DrawGraphic(
@@ -6394,7 +6372,6 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP
bLowMode = bLowerMode; bLowMode = bLowerMode;
} }
// OD 05.09.2002 #102912#
// delete temporary background brush. // delete temporary background brush.
pTmpBackBrush.reset(); pTmpBackBrush.reset();
@@ -6449,7 +6426,7 @@ void SwPageFrame::RefreshSubsidiary( const SwRect &rRect ) const
if ( !gProp.pSSubsLines ) if ( !gProp.pSSubsLines )
{ {
gProp.pSSubsLines.reset(new SwSubsRects); gProp.pSSubsLines.reset(new SwSubsRects);
// OD 20.12.2002 #106318# - create container for special subsidiary lines // create container for special subsidiary lines
gProp.pSSpecSubsLines.reset(new SwSubsRects); gProp.pSSpecSubsLines.reset(new SwSubsRects);
bDelSubs = true; bDelSubs = true;
} }
@@ -6458,8 +6435,7 @@ void SwPageFrame::RefreshSubsidiary( const SwRect &rRect ) const
if ( bDelSubs ) if ( bDelSubs )
{ {
// OD 20.12.2002 #106318# - paint special subsidiary lines // paint special subsidiary lines and delete its container
// and delete its container
gProp.pSSpecSubsLines->PaintSubsidiary( gProp.pSGlobalShell->GetOut(), nullptr, gProp ); gProp.pSSpecSubsLines->PaintSubsidiary( gProp.pSGlobalShell->GetOut(), nullptr, gProp );
gProp.pSSpecSubsLines.reset(); gProp.pSSpecSubsLines.reset();
@@ -6582,10 +6558,8 @@ static void lcl_RefreshLine( const SwLayoutFrame *pLay,
continue; continue;
} }
// OD 19.12.2002 #106318# - do *not* consider fly frames with // do *not* consider fly frames with a transparent background.
// a transparent background. // do *not* consider fly frame, which belongs to an invisible layer
// OD 2004-02-12 #110582#-2 - do *not* consider fly frame, which
// belongs to an invisible layer
if ( pFly->IsBackgroundTransparent() || if ( pFly->IsBackgroundTransparent() ||
!pFly->GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( pObj->GetLayer() ) ) !pFly->GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( pObj->GetLayer() ) )
{ {
@@ -6618,8 +6592,7 @@ static void lcl_RefreshLine( const SwLayoutFrame *pLay,
if ( (aP1.*pDirPt)() < (aP2.*pDirPt)() ) if ( (aP1.*pDirPt)() < (aP2.*pDirPt)() )
{ {
SwRect aRect( aP1, aP2 ); SwRect aRect( aP1, aP2 );
// OD 18.11.2002 #99672# - use parameter <pSubsLines> instead of // use parameter <pSubsLines> instead of global variable <gProp.pSSubsLines>.
// global variable <gProp.pSSubsLines>.
pSubsLines->AddLineRect( aRect, nullptr, SvxBorderLineStyle::SOLID, pSubsLines->AddLineRect( aRect, nullptr, SvxBorderLineStyle::SOLID,
nullptr, nSubColor, gProp ); nullptr, nSubColor, gProp );
} }
@@ -6860,8 +6833,7 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
const bool bFlys = pPage->GetSortedObjs() != nullptr; const bool bFlys = pPage->GetSortedObjs() != nullptr;
const bool bCell = IsCellFrame(); const bool bCell = IsCellFrame();
// use frame area for cells // #i3662# - use frame area for cells for section use also frame area
// OD 13.02.2003 #i3662# - for section use also frame area
const bool bUseFrameArea = bCell || IsSctFrame(); const bool bUseFrameArea = bCell || IsSctFrame();
SwRect aOriginal( bUseFrameArea ? getFrameArea() : getFramePrintArea() ); SwRect aOriginal( bUseFrameArea ? getFrameArea() : getFramePrintArea() );
if ( !bUseFrameArea ) if ( !bUseFrameArea )
@@ -6888,7 +6860,7 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
? SubColFlags::Sect ? SubColFlags::Sect
: ( IsInFly() ? SubColFlags::Fly : SubColFlags::Page ) ); : ( IsInFly() ? SubColFlags::Fly : SubColFlags::Page ) );
// OD 18.11.2002 #99672# - collect body, header, footer, footnote and section // collect body, header, footer, footnote and section
// sub-lines in <pSpecSubsLine> array. // sub-lines in <pSpecSubsLine> array.
const bool bSpecialSublines = IsBodyFrame() || IsHeaderFrame() || IsFooterFrame() || const bool bSpecialSublines = IsBodyFrame() || IsHeaderFrame() || IsFooterFrame() ||
IsFootnoteFrame() || IsSctFrame(); IsFootnoteFrame() || IsSctFrame();
@@ -6902,20 +6874,20 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
const bool bVert = IsVertical(); const bool bVert = IsVertical();
if ( bFlys ) if ( bFlys )
{ {
// OD 14.11.2002 #104822# - add control for drawing left and right lines // add control for drawing left and right lines
if ( !bCell || bNewTableModel || !bVert ) if ( !bCell || bNewTableModel || !bVert )
{ {
if ( aOriginal.Left() == aOut.Left() ) if ( aOriginal.Left() == aOut.Left() )
::lcl_RefreshLine( this, pPage, aOut.Pos(), aLB, nSubColor, pUsedSubsLines ); ::lcl_RefreshLine( this, pPage, aOut.Pos(), aLB, nSubColor, pUsedSubsLines );
// OD 14.11.2002 #104821# - in vertical layout set page/column break at right // in vertical layout set page/column break at right
if ( aOriginal.Right() == nRight ) if ( aOriginal.Right() == nRight )
::lcl_RefreshLine( this, pPage, aRT, aRB, nSubColor, pUsedSubsLines ); ::lcl_RefreshLine( this, pPage, aRT, aRB, nSubColor, pUsedSubsLines );
} }
// OD 14.11.2002 #104822# - adjust control for drawing top and bottom lines // adjust control for drawing top and bottom lines
if ( !bCell || bNewTableModel || bVert ) if ( !bCell || bNewTableModel || bVert )
{ {
if ( aOriginal.Top() == aOut.Top() ) if ( aOriginal.Top() == aOut.Top() )
// OD 14.11.2002 #104821# - in horizontal layout set page/column break at top // in horizontal layout set page/column break at top
::lcl_RefreshLine( this, pPage, aOut.Pos(), aRT, nSubColor, pUsedSubsLines ); ::lcl_RefreshLine( this, pPage, aOut.Pos(), aRT, nSubColor, pUsedSubsLines );
if ( aOriginal.Bottom() == nBottom ) if ( aOriginal.Bottom() == nBottom )
::lcl_RefreshLine( this, pPage, aLB, aRB, nSubColor, ::lcl_RefreshLine( this, pPage, aLB, aRB, nSubColor,
@@ -6924,7 +6896,7 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
} }
else else
{ {
// OD 14.11.2002 #104822# - add control for drawing left and right lines // add control for drawing left and right lines
if ( !bCell || bNewTableModel || !bVert ) if ( !bCell || bNewTableModel || !bVert )
{ {
if ( aOriginal.Left() == aOut.Left() ) if ( aOriginal.Left() == aOut.Left() )
@@ -6933,7 +6905,7 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
pUsedSubsLines->AddLineRect( aRect, nullptr, pUsedSubsLines->AddLineRect( aRect, nullptr,
SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp ); SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp );
} }
// OD 14.11.2002 #104821# - in vertical layout set page/column break at right // in vertical layout set page/column break at right
if ( aOriginal.Right() == nRight ) if ( aOriginal.Right() == nRight )
{ {
const SwRect aRect( aRT, aRB ); const SwRect aRect( aRT, aRB );
@@ -6941,12 +6913,12 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp ); SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp );
} }
} }
// OD 14.11.2002 #104822# - adjust control for drawing top and bottom lines // adjust control for drawing top and bottom lines
if ( !bCell || bNewTableModel || bVert ) if ( !bCell || bNewTableModel || bVert )
{ {
if ( aOriginal.Top() == aOut.Top() ) if ( aOriginal.Top() == aOut.Top() )
{ {
// OD 14.11.2002 #104821# - in horizontal layout set page/column break at top // in horizontal layout set page/column break at top
const SwRect aRect( aOut.Pos(), aRT ); const SwRect aRect( aOut.Pos(), aRT );
pUsedSubsLines->AddLineRect( aRect, nullptr, pUsedSubsLines->AddLineRect( aRect, nullptr,
SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp ); SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp );
@@ -7260,7 +7232,6 @@ bool SwFrame::GetBackgroundBrush(
if( pFrame->IsSctFrame() ) if( pFrame->IsSctFrame() )
{ {
const SwSection* pSection = static_cast<const SwSectionFrame*>(pFrame)->GetSection(); const SwSection* pSection = static_cast<const SwSectionFrame*>(pFrame)->GetSection();
// OD 20.08.2002 #99657# #GetTransChg#
// Note: If frame <pFrame> is a section of the index and // Note: If frame <pFrame> is a section of the index and
// it its background color is "no fill"/"auto fill" and // it its background color is "no fill"/"auto fill" and
// it has no background graphic and // it has no background graphic and
@@ -7285,9 +7256,8 @@ bool SwFrame::GetBackgroundBrush(
} }
} }
// OD 20.08.2002 #99657#
// determine, if background draw of frame <pFrame> considers transparency // determine, if background draw of frame <pFrame> considers transparency
// --> Status Quo: background transparency have to be // Status Quo: background transparency have to be
// considered for fly frames // considered for fly frames
const bool bConsiderBackgroundTransparency = pFrame->IsFlyFrame(); const bool bConsiderBackgroundTransparency = pFrame->IsFlyFrame();
@@ -7318,7 +7288,6 @@ bool SwFrame::GetBackgroundBrush(
} }
} }
// OD 20.08.2002 #99657#
// add condition: // add condition:
// If <bConsiderBackgroundTransparency> is set - see above -, // If <bConsiderBackgroundTransparency> is set - see above -,
// return brush of frame <pFrame>, if its color is *not* "no fill"/"auto fill" // return brush of frame <pFrame>, if its color is *not* "no fill"/"auto fill"
@@ -7369,7 +7338,6 @@ bool SwFrame::GetBackgroundBrush(
// get parent frame - anchor or upper - for next loop // get parent frame - anchor or upper - for next loop
if ( pFrame->IsFlyFrame() ) if ( pFrame->IsFlyFrame() )
{ {
// OD 20.08.2002 - use "static_cast" instead of "old C-cast"
pFrame = static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(); pFrame = static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame();
} }
else else
@@ -7456,7 +7424,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
gProp.pSFlyOnlyDraw = pFly; gProp.pSFlyOnlyDraw = pFly;
gProp.pSLines.reset(new SwLineRects); gProp.pSLines.reset(new SwLineRects);
// OD 09.12.2002 #103045# - determine page, fly frame is on // determine page, fly frame is on
const SwPageFrame* pFlyPage = pFly->FindPageFrame(); const SwPageFrame* pFlyPage = pFly->FindPageFrame();
const Color aPageBackgrdColor(pFlyPage->GetDrawBackgrdColor()); const Color aPageBackgrdColor(pFlyPage->GetDrawBackgrdColor());
const IDocumentDrawModelAccess& rIDDMA = pSh->getIDocumentDrawModelAccess(); const IDocumentDrawModelAccess& rIDDMA = pSh->getIDocumentDrawModelAccess();
@@ -7471,7 +7439,6 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
if ( pFly->IsFlyInContentFrame() ) if ( pFly->IsFlyInContentFrame() )
pFly->PaintSwFrame( *pDev, aOut ); pFly->PaintSwFrame( *pDev, aOut );
gProp.pSLines->PaintLines( pDev, gProp ); gProp.pSLines->PaintLines( pDev, gProp );
// OD 30.08.2002 #102450# - add 3rd parameter
pImp->PaintLayer( rIDDMA.GetHeavenId(), nullptr, pImp->PaintLayer( rIDDMA.GetHeavenId(), nullptr,
*pFlyPage, aOut, &aPageBackgrdColor, *pFlyPage, aOut, &aPageBackgrdColor,
pFlyPage->IsRightToLeft(), pFlyPage->IsRightToLeft(),

View File

@@ -110,10 +110,10 @@ bool SwLayVout::DoesFit( const Size &rNew )
return true; return true;
} }
/// OD 27.09.2002 #103636# - change 2nd parameter <rRect> - no longer <const> /// change 2nd parameter <rRect> - no longer <const>
/// in order to return value of class member variable <aRect>, if virtual /// in order to return value of class member variable <aRect>, if virtual
/// output is used. /// output is used.
/// <aRect> contains the rectangle that represents the area the virtual /// <aRect> contains the rectangle that represents the area the virtual
/// output device is used for and that is flushed at the end. /// output device is used for and that is flushed at the end.
void SwLayVout::Enter( SwViewShell *pShell, SwRect &rRect, bool bOn ) void SwLayVout::Enter( SwViewShell *pShell, SwRect &rRect, bool bOn )
{ {
@@ -164,14 +164,14 @@ void SwLayVout::Enter( SwViewShell *pShell, SwRect &rRect, bool bOn )
pVirDev->SetFillColor( pOut->GetFillColor() ); pVirDev->SetFillColor( pOut->GetFillColor() );
MapMode aMapMode( pOut->GetMapMode() ); MapMode aMapMode( pOut->GetMapMode() );
// OD 12.11.2002 #96272# - use method to set mapping // use method to set mapping
//aMapMode.SetOrigin( Point(0,0) - aRect.Pos() ); //aMapMode.SetOrigin( Point(0,0) - aRect.Pos() );
::SetMappingForVirtDev( aRect.Pos(), pOut, pVirDev ); ::SetMappingForVirtDev( aRect.Pos(), pOut, pVirDev );
if( aMapMode != pVirDev->GetMapMode() ) if( aMapMode != pVirDev->GetMapMode() )
pVirDev->SetMapMode( aMapMode ); pVirDev->SetMapMode( aMapMode );
/// OD 27.09.2002 #103636# - set value of parameter <rRect> // set value of parameter <rRect>
rRect = aRect; rRect = aRect;
} }