summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-30 11:59:33 +0200
committerNoel Grandin <noel@peralex.com>2016-03-31 09:59:23 +0200
commit2bd1e7aafeebdfe0e1656ed1ff01762039be5af1 (patch)
tree279c9bbaffbf8b253d7b41665b1a3e403e1480a4 /sw
parent7a7be32e5265f897174f3880adc061dac0203f1f (diff)
loplugin:constantparam in sw
Change-Id: I2d99ff8149f6348a3781e01e9b3079f6c2505d6a
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/postithelper.hxx13
-rw-r--r--sw/inc/redline.hxx6
-rw-r--r--sw/inc/swtable.hxx2
-rw-r--r--sw/inc/txatritr.hxx5
-rw-r--r--sw/source/core/doc/tblrwcl.cxx4
-rw-r--r--sw/source/core/docnode/ndtbl.cxx6
-rw-r--r--sw/source/core/docnode/node2lay.cxx12
-rw-r--r--sw/source/core/fields/postithelper.cxx5
-rw-r--r--sw/source/core/inc/frame.hxx2
-rw-r--r--sw/source/core/inc/txtfly.hxx3
-rw-r--r--sw/source/core/layout/paintfrm.cxx10
-rw-r--r--sw/source/core/text/inftxt.cxx7
-rw-r--r--sw/source/core/text/inftxt.hxx6
-rw-r--r--sw/source/core/text/itradj.cxx4
-rw-r--r--sw/source/core/text/itrform2.cxx10
-rw-r--r--sw/source/core/text/porfly.cxx4
-rw-r--r--sw/source/core/text/porglue.cxx4
-rw-r--r--sw/source/core/text/porglue.hxx6
-rw-r--r--sw/source/core/text/txtfly.cxx19
-rw-r--r--sw/source/core/text/txtftn.cxx2
-rw-r--r--sw/source/core/text/txttab.cxx6
-rw-r--r--sw/source/core/txtnode/txatritr.cxx18
-rw-r--r--sw/source/filter/html/htmltab.cxx61
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx4
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx4
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx6
-rw-r--r--sw/source/ui/index/cnttab.cxx6
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx2
-rw-r--r--sw/source/uibase/docvw/AnchorOverlayObject.cxx13
-rw-r--r--sw/source/uibase/docvw/AnchorOverlayObject.hxx7
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx3
-rw-r--r--sw/source/uibase/inc/wrtsh.hxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx4
33 files changed, 87 insertions, 179 deletions
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 64cc025ec73e..e4bf2bf5a3c5 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -96,10 +96,9 @@ public:
SwPostItHelper::SwLayoutStatus mLayoutStatus;
SwLayoutInfo maLayoutInfo;
- SwSidebarItem( const bool aShow,
- const bool aFocus)
+ SwSidebarItem( const bool aFocus)
: pPostIt(nullptr)
- , bShow(aShow)
+ , bShow(true)
, bFocus(aFocus)
, mLayoutStatus( SwPostItHelper::INVISIBLE )
, maLayoutInfo()
@@ -116,8 +115,7 @@ public:
virtual const SfxBroadcaster* GetBroadCaster() const = 0;
virtual VclPtr<sw::sidebarwindows::SwSidebarWin> GetSidebarWindow( SwEditWin& rEditWin,
WinBits nBits,
- SwPostItMgr& aMgr,
- SwPostItBits aBits) = 0;
+ SwPostItMgr& aMgr) = 0;
};
class SwAnnotationItem: public SwSidebarItem
@@ -126,7 +124,7 @@ public:
SwAnnotationItem(
SwFormatField& rFormatField,
const bool aFocus)
- : SwSidebarItem( true/*aShow*/, aFocus )
+ : SwSidebarItem( aFocus )
, mrFormatField( rFormatField )
{
}
@@ -148,8 +146,7 @@ public:
virtual VclPtr<sw::sidebarwindows::SwSidebarWin> GetSidebarWindow(
SwEditWin& rEditWin,
WinBits nBits,
- SwPostItMgr& aMgr,
- SwPostItBits aBits ) override;
+ SwPostItMgr& aMgr ) override;
private:
SwFormatField& mrFormatField;
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 2649010afa3d..1033a5668207 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -197,10 +197,10 @@ public:
SwRangeRedline( const SwRedlineData& rData, const SwPaM& rPam );
SwRangeRedline( const SwRedlineData& rData, const SwPosition& rPos );
// For sw3io: pData is taken over!
- SwRangeRedline(SwRedlineData* pData, const SwPosition& rPos, bool bVsbl,
- bool bDelLP, bool bIsPD) :
+ SwRangeRedline(SwRedlineData* pData, const SwPosition& rPos,
+ bool bDelLP) :
SwPaM( rPos ), pRedlineData( pData ), pContentSect( nullptr ),
- bDelLastPara( bDelLP ), bIsLastParaDelete( bIsPD ), bIsVisible( bVsbl )
+ bDelLastPara( bDelLP ), bIsLastParaDelete( false ), bIsVisible( true )
{}
SwRangeRedline( const SwRangeRedline& );
virtual ~SwRangeRedline();
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 34a31aa99e49..09ad765a8e6c 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -275,7 +275,7 @@ public:
const bool bPerformValidCheck = false ) const;
// Copy selected boxes to another document.
bool MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&,
- bool bCpyNds = true, bool bCpyName = false ) const;
+ bool bCpyName = false ) const;
// Copy table in this
bool InsTable( const SwTable& rCpyTable, const SwNodeIndex&,
SwUndoTableCpyTable* pUndo = nullptr );
diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx
index ee4a3ba06297..471c668fe348 100644
--- a/sw/inc/txatritr.hxx
+++ b/sw/inc/txatritr.hxx
@@ -57,14 +57,13 @@ class SwTextAttrIterator
size_t nAttrPos;
sal_Int32 nChgPos;
sal_uInt16 nWhichId;
- bool bIsUseGetWhichOfScript;
void AddToStack( const SwTextAttr& rAttr );
void SearchNextChg();
public:
SwTextAttrIterator( const SwTextNode& rTextNd, sal_uInt16 nWhichId,
- sal_Int32 nStart = 0, bool bUseGetWhichOfScript = true );
+ sal_Int32 nStart = 0 );
bool Next();
@@ -77,7 +76,7 @@ class SwLanguageIterator : public SwTextAttrIterator
public:
SwLanguageIterator( const SwTextNode& rTextNode, sal_Int32 nStart = 0,
sal_uInt16 nWhich = RES_CHRATR_LANGUAGE )
- : SwTextAttrIterator( rTextNode, nWhich, nStart, true/*bUseGetWhichOfScript*/ )
+ : SwTextAttrIterator( rTextNode, nWhich, nStart )
{}
sal_uInt16 GetLanguage() const
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 3049790d4a83..fd92763ad523 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -2058,7 +2058,7 @@ bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTableNd )
}
bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
- const SwSelBoxes& rSelBoxes, bool bCpyNds,
+ const SwSelBoxes& rSelBoxes,
bool bCpyName ) const
{
// Find all Boxes/Lines
@@ -2129,7 +2129,7 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
pNewTable->GetFrameFormat()->SetName( GetFrameFormat()->GetName() );
_CpyTabFrames aCpyFormat;
- _CpyPara aPara( pTableNd, 1, aCpyFormat, bCpyNds );
+ _CpyPara aPara( pTableNd, 1, aCpyFormat, true/*bCpyNds*/ );
aPara.nNewSize = aPara.nOldSize = GetFrameFormat()->GetFrameSize().GetWidth();
if( IsNewModel() )
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 45f9bfb526b8..2d9c24d906cb 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -4306,7 +4306,7 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
{
::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
bRet = pSrcTableNd->GetTable().MakeCopy( this, rInsPos, rBoxes,
- true, bCpyName );
+ bCpyName );
}
if( pUndo )
@@ -4329,7 +4329,7 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
{
RedlineMode_t eOld = getIDocumentRedlineAccess().GetRedlineMode();
if( getIDocumentRedlineAccess().IsRedlineOn() )
- getIDocumentRedlineAccess().SetRedlineMode( (RedlineMode_t)(nsRedlineMode_t::REDLINE_ON |
+ getIDocumentRedlineAccess().SetRedlineMode( (RedlineMode_t)(nsRedlineMode_t::REDLINE_ON |
nsRedlineMode_t::REDLINE_SHOW_INSERT |
nsRedlineMode_t::REDLINE_SHOW_DELETE));
@@ -4351,7 +4351,7 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
pCpyDoc->acquire();
SwPosition aPos( SwNodeIndex( pCpyDoc->GetNodes().GetEndOfContent() ));
- if( !pSrcTableNd->GetTable().MakeCopy( pCpyDoc, aPos, rBoxes, true, true ))
+ if( !pSrcTableNd->GetTable().MakeCopy( pCpyDoc, aPos, rBoxes, true ))
{
if( pCpyDoc->release() == 0 )
delete pCpyDoc;
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index 2665aa39c305..f326ccb102d8 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -51,9 +51,8 @@ public:
// Inserts a Frame under every pUpper of the array
void RestoreUpperFrames( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd );
- SwFrame* GetFrame( const Point* pDocPos = nullptr,
- const SwPosition *pPos = nullptr,
- const bool bCalcFrame = true ) const;
+ SwFrame* GetFrame( const Point* pDocPos,
+ const SwPosition *pPos ) const;
};
SwNode* GoNextWithFrame(const SwNodes& rNodes, SwNodeIndex *pIdx)
@@ -413,11 +412,10 @@ void SwNode2LayImpl::RestoreUpperFrames( SwNodes& rNds, sal_uLong nStt, sal_uLon
}
SwFrame* SwNode2LayImpl::GetFrame( const Point* pDocPos,
- const SwPosition *pPos,
- const bool bCalcFrame ) const
+ const SwPosition *pPos ) const
{
// test if change of member pIter -> pMod broke anything
- return pMod ? ::GetFrameOfModify( nullptr, *pMod, USHRT_MAX, pDocPos, pPos, bCalcFrame ) : nullptr;
+ return pMod ? ::GetFrameOfModify( nullptr, *pMod, USHRT_MAX, pDocPos, pPos ) : nullptr;
}
SwNode2Layout::SwNode2Layout( const SwNode& rNd, sal_uLong nIdx )
@@ -454,7 +452,7 @@ SwNode2Layout::~SwNode2Layout()
SwFrame* SwNode2Layout::GetFrame( const Point* pDocPos,
const SwPosition *pPos ) const
{
- return pImpl->GetFrame( pDocPos, pPos, false/*bCalcFrame*/ );
+ return pImpl->GetFrame( pDocPos, pPos );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index ed4aa4c50893..3389be1b2fe9 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -146,11 +146,10 @@ bool SwAnnotationItem::UseElement()
VclPtr<sw::sidebarwindows::SwSidebarWin> SwAnnotationItem::GetSidebarWindow(
SwEditWin& rEditWin,
WinBits nBits,
- SwPostItMgr& aMgr,
- SwPostItBits aBits)
+ SwPostItMgr& aMgr)
{
return VclPtr<sw::annotation::SwAnnotationWin>::Create( rEditWin, nBits,
- aMgr, aBits,
+ aMgr, 0,
*this,
&mrFormatField );
}
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index f9c0e432bba9..05abbf688ac5 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -379,7 +379,7 @@ public:
virtual void PaintBorder( const SwRect&, const SwPageFrame *pPage,
const SwBorderAttrs & ) const;
void PaintBaBo( const SwRect&, const SwPageFrame *pPage = nullptr,
- const bool bLowerBorder = false, const bool bOnlyTextBackground = false ) const;
+ const bool bOnlyTextBackground = false) const;
void PaintBackground( const SwRect&, const SwPageFrame *pPage,
const SwBorderAttrs &,
const bool bLowerMode = false,
diff --git a/sw/source/core/inc/txtfly.hxx b/sw/source/core/inc/txtfly.hxx
index f5de71cd684c..f269e04a7a45 100644
--- a/sw/source/core/inc/txtfly.hxx
+++ b/sw/source/core/inc/txtfly.hxx
@@ -265,8 +265,7 @@ public:
Ensure that the overlapping frames (except the transparent frames)
won't be scribbled
*/
- void DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
- const SwTextPaintInfo &rInf, bool bNoGraphic = false );
+ void DrawFlyRect( OutputDevice* pOut, const SwRect &rRect );
/**
Used to switch off the SwTextFly when there is no overlapping object (Relax).
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 5c3b1fd7de22..03c0c6a904a1 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3370,7 +3370,7 @@ void SwRootFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
// calls, paint <hell> or <heaven>
const Color aPageBackgrdColor(pPage->GetDrawBackgrdColor());
- pPage->PaintBaBo( aPaintRect, pPage, true );
+ pPage->PaintBaBo( aPaintRect, pPage );
if ( pSh->Imp()->HasDrawView() )
{
@@ -3387,7 +3387,7 @@ void SwRootFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
}
if ( pSh->GetDoc()->GetDocumentSettingManager().get( DocumentSettingId::BACKGROUND_PARA_OVER_DRAWINGS ) )
- pPage->PaintBaBo( aPaintRect, pPage, true, /*bOnlyTextBackground=*/true );
+ pPage->PaintBaBo( aPaintRect, pPage, /*bOnlyTextBackground=*/true );
if( pSh->GetWin() )
{
@@ -6427,7 +6427,7 @@ SwRect SwPageFrame::GetBoundRect(OutputDevice* pOutputDevice) const
}
void SwFrame::PaintBaBo( const SwRect& rRect, const SwPageFrame *pPage,
- const bool bLowerBorder, const bool bOnlyTextBackground ) const
+ const bool bOnlyTextBackground ) const
{
if ( !pPage )
pPage = FindPageFrame();
@@ -6454,7 +6454,7 @@ void SwFrame::PaintBaBo( const SwRect& rRect, const SwPageFrame *pPage,
// paint background
{
- PaintBackground( rRect, pPage, rAttrs, false, bLowerBorder, bOnlyTextBackground );
+ PaintBackground( rRect, pPage, rAttrs, false, true/*bLowerBorder*/, bOnlyTextBackground );
}
// OD 06.08.2002 #99657# - paint border before painting background
@@ -7413,7 +7413,7 @@ void SwFrame::Retouch( const SwPageFrame * pPage, const SwRect &rRect ) const
{
SwRect &rRetouche = aRegion[i];
- GetUpper()->PaintBaBo( rRetouche, pPage, true );
+ GetUpper()->PaintBaBo( rRetouche, pPage );
//Hell and Heaven need to be refreshed too.
//To avoid recursion my retouch flag needs to be reset first!
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index de21e6cea9c0..eafd1ec92f0a 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -389,14 +389,13 @@ SwPosSize SwTextSizeInfo::GetTextSize( OutputDevice* pOutDev,
const SwScriptInfo* pSI,
const OUString& rText,
const sal_Int32 nIndex,
- const sal_Int32 nLength,
- const sal_uInt16 nComp) const
+ const sal_Int32 nLength) const
{
SwDrawTextInfo aDrawInf( m_pVsh, *pOutDev, pSI, rText, nIndex, nLength );
aDrawInf.SetFrame( m_pFrame );
aDrawInf.SetFont( m_pFnt );
aDrawInf.SetSnapToGrid( SnapToGrid() );
- aDrawInf.SetKanaComp( nComp );
+ aDrawInf.SetKanaComp( 0 );
return SwPosSize(m_pFnt->_GetTextSize( aDrawInf ));
}
@@ -940,7 +939,7 @@ void SwTextPaintInfo::DrawRect( const SwRect &rRect, bool bRetouche ) const
{
if( aTextFly.IsOn() )
const_cast<SwTextPaintInfo*>(this)->GetTextFly().
- DrawFlyRect( m_pOut, rRect, *this, true/*bNoGraphic*/ );
+ DrawFlyRect( m_pOut, rRect );
else
m_pOut->DrawRect( rRect.SVRect() );
}
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index b1ae3b508275..941589c9baaf 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -263,7 +263,7 @@ public:
SwPosSize GetTextSize( OutputDevice* pOut, const SwScriptInfo* pSI,
const OUString& rText, const sal_Int32 nIdx,
- const sal_Int32 nLen, const sal_uInt16 nComp ) const;
+ const sal_Int32 nLen ) const;
SwPosSize GetTextSize() const;
void GetTextSize( const SwScriptInfo* pSI, const sal_Int32 nIdx,
const sal_Int32 nLen, const sal_uInt16 nComp,
@@ -740,14 +740,14 @@ inline sal_uInt16 SwTextSizeInfo::GetTextHeight() const
inline SwPosSize SwTextSizeInfo::GetTextSize( const OUString &rText ) const
{
- return GetTextSize( m_pOut, nullptr, rText, 0, rText.getLength(), 0 );
+ return GetTextSize( m_pOut, nullptr, rText, 0, rText.getLength() );
}
inline SwPosSize SwTextSizeInfo::GetTextSize( const SwScriptInfo* pSI,
const sal_Int32 nNewIdx,
const sal_Int32 nNewLen ) const
{
- return GetTextSize( m_pOut, pSI, *m_pText, nNewIdx, nNewLen, 0/*nCompress*/ );
+ return GetTextSize( m_pOut, pSI, *m_pText, nNewIdx, nNewLen );
}
inline SwTwips SwTextPaintInfo::GetPaintOfst() const
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 0f677ac9664e..721950e75c7a 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -549,8 +549,8 @@ SwMarginPortion *SwTextAdjuster::CalcRightMargin( SwLineLayout *pCurrent,
{
pLast->Append( pFly );
pLast = pFly;
- if( pFly->Fix() > nPrtWidth )
- pFly->Width( ( pFly->Fix() - nPrtWidth) + pFly->Width() + 1);
+ if( pFly->GetFix() > nPrtWidth )
+ pFly->Width( ( pFly->GetFix() - nPrtWidth) + pFly->Width() + 1);
nPrtWidth += pFly->Width() + 1;
aCurrRect.Left( nLeftMar + nPrtWidth );
pFly = CalcFlyPortion( nRealWidth, aCurrRect );
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 082a8359a68a..dc853e119617 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -371,7 +371,7 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf )
SwFlyPortion *pFly = rInf.GetFly();
if( pFly )
{
- if ( 0 < pFly->Fix() )
+ if ( 0 < pFly->GetFix() )
ClearFly( rInf );
else
rInf.SetFull(true);
@@ -1349,8 +1349,8 @@ SwLinePortion *SwTextFormatter::NewPortion( SwTextFormatInfo &rInf )
if ( GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT) /*rInf.GetVsh()->IsTabCompat();*/ &&
POR_TABDECIMAL == pLastTabPortion->GetWhichPor() )
{
- OSL_ENSURE( rInf.X() >= pLastTabPortion->Fix(), "Decimal tab stop position cannot be calculated" );
- const sal_uInt16 nWidthOfPortionsUpToDecimalPosition = (sal_uInt16)(rInf.X() - pLastTabPortion->Fix() );
+ OSL_ENSURE( rInf.X() >= pLastTabPortion->GetFix(), "Decimal tab stop position cannot be calculated" );
+ const sal_uInt16 nWidthOfPortionsUpToDecimalPosition = (sal_uInt16)(rInf.X() - pLastTabPortion->GetFix() );
static_cast<SwTabDecimalPortion*>(pLastTabPortion)->SetWidthOfPortionsUpToDecimalPosition( nWidthOfPortionsUpToDecimalPosition );
rInf.SetTabDecimal( 0 );
}
@@ -2432,8 +2432,8 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
rInf.SetFly( pFly );
- if( pFly->Fix() < rInf.Width() )
- rInf.Width( pFly->Fix() );
+ if( pFly->GetFix() < rInf.Width() )
+ rInf.Width( pFly->GetFix() );
SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame()));
if ( pGrid )
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index f824098991bd..d48d10a9b70d 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -52,14 +52,14 @@ void SwFlyPortion::Paint( const SwTextPaintInfo& ) const
bool SwFlyPortion::Format( SwTextFormatInfo &rInf )
{
- OSL_ENSURE( Fix() >= rInf.X(), "SwFlyPortion::Format" );
+ OSL_ENSURE( GetFix() >= rInf.X(), "SwFlyPortion::Format" );
// tabs must be expanded
if( rInf.GetLastTab() )
rInf.GetLastTab()->FormatEOL( rInf );
rInf.GetLast()->FormatEOL( rInf );
- PrtWidth( static_cast<sal_uInt16>(Fix() - rInf.X() + PrtWidth()) );
+ PrtWidth( static_cast<sal_uInt16>(GetFix() - rInf.X() + PrtWidth()) );
if( !Width() )
{
OSL_ENSURE( Width(), "+SwFlyPortion::Format: a fly is a fly is a fly" );
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index 47004e5bbd43..8dec1512c0b5 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -139,8 +139,8 @@ SwFixPortion::SwFixPortion( const SwRect &rRect )
SetWhichPor( POR_FIX );
}
-SwFixPortion::SwFixPortion(const sal_uInt16 nFixedWidth, const sal_uInt16 nFixedPos)
- : SwGluePortion(nFixedWidth), nFix(nFixedPos)
+SwFixPortion::SwFixPortion()
+ : SwGluePortion(0), nFix(0)
{
SetWhichPor( POR_FIX );
}
diff --git a/sw/source/core/text/porglue.hxx b/sw/source/core/text/porglue.hxx
index 98ff30b6b48a..f2ceabf336df 100644
--- a/sw/source/core/text/porglue.hxx
+++ b/sw/source/core/text/porglue.hxx
@@ -53,9 +53,9 @@ class SwFixPortion : public SwGluePortion
sal_uInt16 nFix; // The width offset in the line
public:
explicit SwFixPortion( const SwRect &rFlyRect );
- SwFixPortion( const sal_uInt16 nFixWidth, const sal_uInt16 nFixPos );
- inline void Fix( const sal_uInt16 nNewFix ) { nFix = nNewFix; }
- inline sal_uInt16 Fix() const { return nFix; }
+ SwFixPortion();
+ void SetFix( const sal_uInt16 nNewFix ) { nFix = nNewFix; }
+ sal_uInt16 GetFix() const { return nFix; }
OUTPUT_OPERATOR_OVERRIDE
};
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 341a2eb6cfaf..58d931aad567 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -578,8 +578,7 @@ bool SwTextFly::DrawTextOpaque( SwDrawTextInfo &rInf )
return true;
}
-void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
- const SwTextPaintInfo &rInf, bool bNoGraphic )
+void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect )
{
SwRegionRects aRegion( rRect );
OSL_ENSURE( !bTopRule, "DrawFlyRect: Wrong TopRule" );
@@ -631,21 +630,7 @@ void SwTextFly::DrawFlyRect( OutputDevice* pOut, const SwRect &rRect,
for( size_t i = 0; i < aRegion.size(); ++i )
{
- if ( bNoGraphic )
- {
- pOut->DrawRect( aRegion[i].SVRect() );
- }
- else
- {
- if(reinterpret_cast<SvxBrushItem*>(-1) != rInf.GetBrushItem())
- {
- ::DrawGraphic(rInf.GetBrushItem(), pOut, rInf.GetBrushRect(), aRegion[i] );
- }
- else
- {
- OSL_ENSURE(false, "DrawRect: Uninitialized BrushItem!" );
- }
- }
+ pOut->DrawRect( aRegion[i].SVRect() );
}
}
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 3ef8db04ef78..1d8d5f36541d 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1065,7 +1065,7 @@ sal_Int32 SwTextFormatter::FormatQuoVadis( const sal_Int32 nOffset )
while( pPor )
{
if ( pPor->IsFlyPortion() )
- nLastLeft = static_cast<SwFlyPortion*>(pPor)->Fix() +
+ nLastLeft = static_cast<SwFlyPortion*>(pPor)->GetFix() +
static_cast<SwFlyPortion*>(pPor)->Width();
pPor = pPor->GetPortion();
}
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 21d5b3215694..fe7dbcfdba5c 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -293,7 +293,7 @@ SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto
* The base class is initialized without setting anything
*/
SwTabPortion::SwTabPortion( const sal_uInt16 nTabPosition, const sal_Unicode cFillChar, const bool bAutoTab )
- : SwFixPortion( 0, 0 ), nTabPos(nTabPosition), cFill(cFillChar), bAutoTabStop( bAutoTab )
+ : SwFixPortion(), nTabPos(nTabPosition), cFill(cFillChar), bAutoTabStop( bAutoTab )
{
nLineLength = 1;
OSL_ENSURE(!IsFilled() || ' ' != cFill, "SwTabPortion::CTOR: blanks ?!");
@@ -321,7 +321,7 @@ bool SwTabPortion::PreFormat( SwTextFormatInfo &rInf )
OSL_ENSURE( rInf.X() <= GetTabPos(), "SwTabPortion::PreFormat: rush hour" );
// Here we settle down ...
- Fix( static_cast<sal_uInt16>(rInf.X()) );
+ SetFix( static_cast<sal_uInt16>(rInf.X()) );
const bool bTabCompat = rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_COMPAT);
const bool bTabOverflow = rInf.GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVERFLOW);
@@ -474,7 +474,7 @@ bool SwTabPortion::PostFormat( SwTextFormatInfo &rInf )
nPorWidth = nNewWidth;
}
- const sal_uInt16 nDiffWidth = nRight - Fix();
+ const sal_uInt16 nDiffWidth = nRight - GetFix();
if( nDiffWidth > nPorWidth )
{
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index e524a7f572c4..1ae345863953 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -94,11 +94,9 @@ bool SwScriptIterator::Next()
}
SwTextAttrIterator::SwTextAttrIterator( const SwTextNode& rTNd, sal_uInt16 nWhchId,
- sal_Int32 nStt,
- bool bUseGetWhichOfScript )
+ sal_Int32 nStt )
: aSIter( rTNd.GetText(), nStt ), rTextNd( rTNd ),
- pParaItem( nullptr ), nAttrPos( 0 ), nChgPos( nStt ), nWhichId( nWhchId ),
- bIsUseGetWhichOfScript( bUseGetWhichOfScript )
+ pParaItem( nullptr ), nAttrPos( 0 ), nChgPos( nStt ), nWhichId( nWhchId )
{
SearchNextChg();
}
@@ -136,9 +134,7 @@ bool SwTextAttrIterator::Next()
if( RES_TXTATR_CHARFMT == pHt->Which() )
{
- const sal_uInt16 nWId = bIsUseGetWhichOfScript
- ? GetWhichOfScript( nWhichId, aSIter.GetCurrScript() )
- : nWhichId;
+ const sal_uInt16 nWId = GetWhichOfScript( nWhichId, aSIter.GetCurrScript() );
pCurItem = &pHt->GetCharFormat().GetCharFormat()->GetFormatAttr(nWId);
}
else
@@ -179,9 +175,7 @@ void SwTextAttrIterator::SearchNextChg()
}
if( !pParaItem )
{
- nWh = bIsUseGetWhichOfScript ?
- GetWhichOfScript( nWhichId,
- aSIter.GetCurrScript() ) : nWhichId;
+ nWh = GetWhichOfScript( nWhichId, aSIter.GetCurrScript() );
pParaItem = &rTextNd.GetSwAttrSet().Get( nWh );
}
@@ -194,9 +188,7 @@ void SwTextAttrIterator::SearchNextChg()
{
if( !nWh )
{
- nWh = bIsUseGetWhichOfScript ?
- GetWhichOfScript( nWhichId,
- aSIter.GetCurrScript() ) : nWhichId;
+ nWh = GetWhichOfScript( nWhichId, aSIter.GetCurrScript() );
}
const SfxPoolItem* pItem = nullptr;
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 0eb7512ae0e9..9c798ab5fcb0 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -460,10 +460,8 @@ class HTMLTable
// If nRow==nCell==USHRT_MAX, return the last Start-Node of the table.
const SwStartNode* GetPrevBoxStartNode( sal_uInt16 nRow, sal_uInt16 nCell ) const;
- sal_uInt16 GetTopCellSpace( sal_uInt16 nRow, sal_uInt16 nRowSpan,
- bool bSwBorders=true ) const;
- sal_uInt16 GetBottomCellSpace( sal_uInt16 nRow, sal_uInt16 nRowSpan,
- bool bSwBorders=true ) const;
+ sal_uInt16 GetTopCellSpace( sal_uInt16 nRow ) const;
+ sal_uInt16 GetBottomCellSpace( sal_uInt16 nRow, sal_uInt16 nRowSpan ) const;
// Conforming of the frame::Frame-Format of the box
void FixFrameFormat( SwTableBox *pBox, sal_uInt16 nRow, sal_uInt16 nCol,
@@ -1255,72 +1253,25 @@ static bool IsBoxEmpty( const SwTableBox *pBox )
return false;
}
-sal_uInt16 HTMLTable::GetTopCellSpace( sal_uInt16 nRow, sal_uInt16 nRowSpan,
- bool bSwBorders ) const
+sal_uInt16 HTMLTable::GetTopCellSpace( sal_uInt16 nRow ) const
{
sal_uInt16 nSpace = nCellPadding;
if( nRow == 0 )
{
nSpace += nBorder + nCellSpacing;
- if( bSwBorders )
- {
- sal_uInt16 nTopBorderWidth =
- GetBorderWidth( aTopBorderLine, true );
- if( nSpace < nTopBorderWidth )
- nSpace = nTopBorderWidth;
- }
- }
- else if (bSwBorders && (*m_pRows)[nRow+nRowSpan-1]->bBottomBorder &&
- nSpace < MIN_BORDER_DIST )
- {
- OSL_ENSURE( !nCellPadding, "GetTopCellSpace: CELLPADDING!=0" );
- // Wenn die Gegenueberliegende Seite umrandet ist muessen
- // wir zumindest den minimalen Abstand zum Inhalt
- // beruecksichtigen. (Koennte man zusaetzlich auch an
- // nCellPadding festmachen.)
- nSpace = MIN_BORDER_DIST;
}
return nSpace;
}
-sal_uInt16 HTMLTable::GetBottomCellSpace( sal_uInt16 nRow, sal_uInt16 nRowSpan,
- bool bSwBorders ) const
+sal_uInt16 HTMLTable::GetBottomCellSpace( sal_uInt16 nRow, sal_uInt16 nRowSpan ) const
{
sal_uInt16 nSpace = nCellSpacing + nCellPadding;
if( nRow+nRowSpan == nRows )
{
nSpace = nSpace + nBorder;
-
- if( bSwBorders )
- {
- sal_uInt16 nBottomBorderWidth =
- GetBorderWidth( aBottomBorderLine, true );
- if( nSpace < nBottomBorderWidth )
- nSpace = nBottomBorderWidth;
- }
- }
- else if( bSwBorders )
- {
- if ((*m_pRows)[nRow+nRowSpan+1]->bBottomBorder)
- {
- sal_uInt16 nBorderWidth = GetBorderWidth( aBorderLine, true );
- if( nSpace < nBorderWidth )
- nSpace = nBorderWidth;
- }
- else if( nRow==0 && bTopBorder && nSpace < MIN_BORDER_DIST )
- {
- OSL_ENSURE( GetBorderWidth( aTopBorderLine, true ) > 0,
- "GetBottomCellSpace: |aTopLine| == 0" );
- OSL_ENSURE( !nCellPadding, "GetBottomCellSpace: CELLPADDING!=0" );
- // Wenn die Gegenueberliegende Seite umrandet ist muessen
- // wir zumindest den minimalen Abstand zum Inhalt
- // beruecksichtigen. (Koennte man zusaetzlich auch an
- // nCellPadding festmachen.)
- nSpace = MIN_BORDER_DIST;
- }
}
return nSpace;
@@ -1667,8 +1618,8 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper,
// Mindesthoehe handelt, kann sie genauso wie in
// Netscape berechnet werden, also ohne Beruecksichtigung
// der tatsaechlichen Umrandungsbreite.
- nRowHeight += GetTopCellSpace( nTopRow, 1, false ) +
- GetBottomCellSpace( nTopRow, 1, false );
+ nRowHeight += GetTopCellSpace( nTopRow ) +
+ GetBottomCellSpace( nTopRow, 1 );
pFrameFormat->SetFormatAttr( SwFormatFrameSize( ATT_MIN_SIZE, 0, nRowHeight ) );
}
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 7333d3f36a5d..39c80822095d 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -653,8 +653,8 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
// create redline (using pRedlineData which gets copied in SwRangeRedline())
SwRedlineData* pRedlineData = ConvertRedline(pRedlineInfo, pDoc);
SwRangeRedline* pRedline =
- new SwRangeRedline( pRedlineData, *aPaM.GetPoint(), true,
- !pRedlineInfo->bMergeLastParagraph, false );
+ new SwRangeRedline( pRedlineData, *aPaM.GetPoint(),
+ !pRedlineInfo->bMergeLastParagraph );
// set mark
if( aPaM.HasMark() )
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index b4d4cb537b1e..db528db9ec0c 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -135,8 +135,8 @@ static OUString lcl_getFlatURL( uno::Reference<beans::XPropertySet>& xSourceProp
class SwAddrSourceLB : public SvSimpleTable
{
public:
- SwAddrSourceLB(SvSimpleTableContainer& rParent, WinBits nBits = 0)
- : SvSimpleTable(rParent, nBits)
+ SwAddrSourceLB(SvSimpleTableContainer& rParent)
+ : SvSimpleTable(rParent, 0)
{
}
virtual void Resize() override;
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 1c7e2bb87ef7..549af3928a47 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -45,14 +45,14 @@ using namespace ::com::sun::star::beans;
class SwAddressTable : public SvSimpleTable
{
public:
- SwAddressTable(SvSimpleTableContainer& rParent, WinBits nBits = 0);
+ SwAddressTable(SvSimpleTableContainer& rParent);
void InsertHeaderItem(sal_uInt16 nColumn, const OUString& rText, HeaderBarItemBits nBits);
virtual void Resize() override;
void setColSizes();
};
-SwAddressTable::SwAddressTable(SvSimpleTableContainer& rParent, WinBits nBits)
- : SvSimpleTable(rParent, nBits)
+SwAddressTable::SwAddressTable(SvSimpleTableContainer& rParent)
+ : SvSimpleTable(rParent, 0)
{
SetSpaceBetweenEntries(3);
SetSelectionMode(SINGLE_SELECTION);
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 1f63cfaff1a6..7781b330bec8 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -539,15 +539,15 @@ bool SwMultiTOXTabDialog::IsNoNum(SwWrtShell& rSh, const OUString& rName)
class SwIndexTreeLB : public SvSimpleTable
{
public:
- SwIndexTreeLB(SvSimpleTableContainer& rParent, WinBits nBits = 0);
+ SwIndexTreeLB(SvSimpleTableContainer& rParent);
virtual void KeyInput( const KeyEvent& rKEvt ) override;
virtual void Resize() override;
virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* ) override;
void setColSizes();
};
-SwIndexTreeLB::SwIndexTreeLB(SvSimpleTableContainer& rParent, WinBits nBits)
- : SvSimpleTable(rParent, nBits)
+SwIndexTreeLB::SwIndexTreeLB(SvSimpleTableContainer& rParent)
+ : SvSimpleTable(rParent, 0)
{
HeaderBar& rStylesHB = GetTheHeaderBar();
rStylesHB.SetStyle(rStylesHB.GetStyle()|WB_BUTTONSTYLE);
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index f601f15a10b3..0728ad75f079 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -2355,7 +2355,7 @@ bool SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
case SwPasteSdr::Insert:
{
SwTransferable::SetSelInShell( rSh, false, pPt );
- rSh.Insert( sURL, aEmptyOUStr, aGraphic, nullptr, false, nAnchorType );
+ rSh.Insert( sURL, aEmptyOUStr, aGraphic, nullptr, nAnchorType );
break;
}
diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.cxx b/sw/source/uibase/docvw/AnchorOverlayObject.cxx
index 9adf4699f6f3..d43c4eee9fbd 100644
--- a/sw/source/uibase/docvw/AnchorOverlayObject.cxx
+++ b/sw/source/uibase/docvw/AnchorOverlayObject.cxx
@@ -253,9 +253,7 @@ ImplPrimitive2DIDBlock(AnchorPrimitive, PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE)
basegfx::B2DPoint( aPageBorder ,aAnchorRect.Bottom()+2*15),
basegfx::B2DPoint( aLineStart.X(),aLineStart.Y()),
basegfx::B2DPoint( aLineEnd.X(),aLineEnd.Y()) ,
- aColorAnchor,
- false,
- false);
+ aColorAnchor);
xOverlayManager->add(*pAnchorOverlayObject);
}
}
@@ -284,9 +282,7 @@ AnchorOverlayObject::AnchorOverlayObject( const basegfx::B2DPoint& rBasePos,
const basegfx::B2DPoint& rFifthPos,
const basegfx::B2DPoint& rSixthPos,
const basegfx::B2DPoint& rSeventhPos,
- const Color& rBaseColor,
- const bool bShadowedEffect,
- const bool bLineSolid)
+ const Color& rBaseColor)
: OverlayObjectWithBasePosition(rBasePos, rBaseColor)
, maSecondPosition(rSecondPos)
, maThirdPosition(rThirdPos)
@@ -299,8 +295,7 @@ AnchorOverlayObject::AnchorOverlayObject( const basegfx::B2DPoint& rBasePos,
, maLineTop()
, mHeight(0)
, mAnchorState(AS_ALL)
- , mbShadowedEffect(bShadowedEffect)
- , mbLineSolid(bLineSolid)
+ , mbLineSolid(false)
{
}
@@ -351,7 +346,7 @@ drawinglayer::primitive2d::Primitive2DContainer AnchorOverlayObject::createOverl
GetAnchorState(),
getBaseColor().getBColor(),
ANCHORLINE_WIDTH * aDiscreteLineWidth,
- getShadowedEffect(),
+ false,
getLineSolid()) );
return drawinglayer::primitive2d::Primitive2DContainer { aReference };
diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.hxx b/sw/source/uibase/docvw/AnchorOverlayObject.hxx
index 9492aef5c0f5..ebe49230737f 100644
--- a/sw/source/uibase/docvw/AnchorOverlayObject.hxx
+++ b/sw/source/uibase/docvw/AnchorOverlayObject.hxx
@@ -76,8 +76,6 @@ class AnchorOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition
inline void SetHeight( const unsigned long aHeight ) { mHeight = aHeight; };
- bool getShadowedEffect() const { return mbShadowedEffect; }
-
void SetAnchorState( const AnchorState aState );
inline AnchorState GetAnchorState() const { return mAnchorState; }
@@ -110,7 +108,6 @@ class AnchorOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition
unsigned long mHeight;
AnchorState mAnchorState;
- bool mbShadowedEffect : 1;
bool mbLineSolid : 1;
AnchorOverlayObject( const basegfx::B2DPoint& rBasePos,
@@ -120,9 +117,7 @@ class AnchorOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition
const basegfx::B2DPoint& rFifthPos,
const basegfx::B2DPoint& rSixthPos,
const basegfx::B2DPoint& rSeventhPos,
- const Color& rBaseColor,
- const bool bShadowedEffect,
- const bool bLineSolid );
+ const Color& rBaseColor );
virtual ~AnchorOverlayObject();
};
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 7380e27239e3..70c07fd63655 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -650,8 +650,7 @@ void SwPostItMgr::LayoutPostIts()
{
pPostIt = (*i)->GetSidebarWindow( mpView->GetEditWin(),
WB_DIALOGCONTROL,
- *this,
- 0 );
+ *this );
pPostIt->InitControls();
pPostIt->SetReadonly(mbReadOnly);
pItem->pPostIt = pPostIt;
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index 51adb0336c9a..63de844cf9f5 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -291,7 +291,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
// graphic
void Insert( const OUString &rPath, const OUString &rFilter,
const Graphic &, SwFlyFrameAttrMgr * = nullptr,
- bool bRule = false, sal_uInt16 nAnchorType = 0 );
+ sal_uInt16 nAnchorType = 0);
void InsertByWord( const OUString & );
void InsertPageBreak(const OUString *pPageDesc = nullptr, const ::boost::optional<sal_uInt16>& rPgNum = boost::none);
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 2c87f3f52144..d60045bb67c6 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -240,7 +240,7 @@ void SwWrtShell::Insert( const OUString &rStr )
void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter,
const Graphic &rGrf, SwFlyFrameAttrMgr *pFrameMgr,
- bool bRule, sal_uInt16 nAnchorType )
+ sal_uInt16 nAnchorType )
{
ResetCursorStack();
if ( !CanInsert() )
@@ -299,7 +299,7 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter,
if ( bOwnMgr )
pFrameMgr->UpdateAttrMgr();
- if( bSetGrfSize && !bRule )
+ if( bSetGrfSize )
{
Size aGrfSize, aBound = GetGraphicDefaultSize();
GetGrfSize( aGrfSize );