summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-26 12:24:25 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-27 05:23:08 +0000
commitf384ae4c81c2459f9955697ecc36412f7409b936 (patch)
tree4d11e57f82569e7970136a89b9c8bce6a47f8b5a /sw/source
parent19c3aac98f756f6a9cda44a4cc70a2a924fa85df (diff)
loplugin:singlevalfields in sw(part3)
Change-Id: Ie971a1483f4fedda61c81a097399d3d562862891 Reviewed-on: https://gerrit.libreoffice.org/26677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/docbm.cxx48
-rw-r--r--sw/source/core/doc/tblrwcl.cxx8
-rw-r--r--sw/source/core/inc/SwXMLTextBlocks.hxx1
-rw-r--r--sw/source/core/inc/flyfrm.hxx7
-rw-r--r--sw/source/core/inc/flyfrms.hxx17
-rw-r--r--sw/source/core/inc/frmtool.hxx2
-rw-r--r--sw/source/core/inc/layact.hxx1
-rw-r--r--sw/source/core/inc/mvsave.hxx2
-rw-r--r--sw/source/core/inc/objectformatter.hxx9
-rw-r--r--sw/source/core/inc/swfont.hxx4
-rw-r--r--sw/source/core/inc/unoflatpara.hxx2
-rw-r--r--sw/source/core/layout/fly.cxx8
-rw-r--r--sw/source/core/layout/flyincnt.cxx2
-rw-r--r--sw/source/core/layout/frmtool.cxx27
-rw-r--r--sw/source/core/layout/layact.cxx4
-rw-r--r--sw/source/core/layout/objectformatter.cxx9
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx8
-rw-r--r--sw/source/core/layout/wsfrm.cxx2
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx13
-rw-r--r--sw/source/core/text/inftxt.cxx2
-rw-r--r--sw/source/core/text/inftxt.hxx1
-rw-r--r--sw/source/core/text/pordrop.hxx1
-rw-r--r--sw/source/core/text/portxt.cxx21
-rw-r--r--sw/source/core/text/portxt.hxx5
-rw-r--r--sw/source/core/text/txtdrop.cxx4
-rw-r--r--sw/source/core/txtnode/swfont.cxx4
-rw-r--r--sw/source/core/unocore/unoflatpara.cxx8
27 files changed, 27 insertions, 193 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 7fb4fdcfe94c..3e7919fa0e40 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1199,8 +1199,6 @@ SaveBookmark::SaveBookmark(
: m_aName(rBkmk.GetName())
, m_aShortName()
, m_aCode()
- , m_bSavePos(true)
- , m_bSaveOtherPos(true)
, m_eOrigBkmType(IDocumentMarkAccess::GetType(rBkmk))
{
const IBookmark* const pBookmark = dynamic_cast< const IBookmark* >(&rBkmk);
@@ -1219,24 +1217,18 @@ SaveBookmark::SaveBookmark(
m_nNode1 = rBkmk.GetMarkPos().nNode.GetIndex();
m_nContent1 = rBkmk.GetMarkPos().nContent.GetIndex();
- if(m_bSavePos)
- {
- m_nNode1 -= rMvPos.GetIndex();
- if(pIdx && !m_nNode1)
- m_nContent1 -= pIdx->GetIndex();
- }
+ m_nNode1 -= rMvPos.GetIndex();
+ if(pIdx && !m_nNode1)
+ m_nContent1 -= pIdx->GetIndex();
if(rBkmk.IsExpanded())
{
m_nNode2 = rBkmk.GetOtherMarkPos().nNode.GetIndex();
m_nContent2 = rBkmk.GetOtherMarkPos().nContent.GetIndex();
- if(m_bSaveOtherPos)
- {
- m_nNode2 -= rMvPos.GetIndex();
- if(pIdx && !m_nNode2)
- m_nContent2 -= pIdx->GetIndex();
- }
+ m_nNode2 -= rMvPos.GetIndex();
+ if(pIdx && !m_nNode2)
+ m_nContent2 -= pIdx->GetIndex();
}
else
{
@@ -1258,35 +1250,19 @@ void SaveBookmark::SetInDoc(
{
aPam.SetMark();
- if(m_bSaveOtherPos)
- {
- aPam.GetMark()->nNode += m_nNode2;
- if(pIdx && !m_nNode2)
- aPam.GetMark()->nContent += m_nContent2;
- else
- aPam.GetMark()->nContent.Assign(aPam.GetContentNode(false), m_nContent2);
- }
+ aPam.GetMark()->nNode += m_nNode2;
+ if(pIdx && !m_nNode2)
+ aPam.GetMark()->nContent += m_nContent2;
else
- {
- aPam.GetMark()->nNode = m_nNode2;
aPam.GetMark()->nContent.Assign(aPam.GetContentNode(false), m_nContent2);
- }
}
- if(m_bSavePos)
- {
- aPam.GetPoint()->nNode += m_nNode1;
+ aPam.GetPoint()->nNode += m_nNode1;
- if(pIdx && !m_nNode1)
- aPam.GetPoint()->nContent += m_nContent1;
- else
- aPam.GetPoint()->nContent.Assign(aPam.GetContentNode(), m_nContent1);
- }
+ if(pIdx && !m_nNode1)
+ aPam.GetPoint()->nContent += m_nContent1;
else
- {
- aPam.GetPoint()->nNode = m_nNode1;
aPam.GetPoint()->nContent.Assign(aPam.GetContentNode(), m_nContent1);
- }
if(!aPam.HasMark()
|| CheckNodesRange(aPam.GetPoint()->nNode, aPam.GetMark()->nNode, true))
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index c71938994e86..e1d8c3a59bf7 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -203,12 +203,11 @@ struct CR_SetLineHeight
SwTwips nMaxSpace, nMaxHeight;
TableChgMode nMode;
sal_uInt16 nLines;
- bool bBigger, bTop, bSplittBox, bAnyBoxFnd;
+ bool bBigger, bTop;
CR_SetLineHeight( sal_uInt16 eType, SwTableNode* pTNd )
: pTableNd( pTNd ), pUndo( nullptr ),
- nMaxSpace( 0 ), nMaxHeight( 0 ), nLines( 0 ),
- bSplittBox( false ), bAnyBoxFnd( false )
+ nMaxSpace( 0 ), nMaxHeight( 0 ), nLines( 0 )
{
bTop = nsTableChgWidthHeightType::WH_ROW_TOP == ( eType & 0xff ) || nsTableChgWidthHeightType::WH_CELL_TOP == ( eType & 0xff );
bBigger = 0 != (eType & nsTableChgWidthHeightType::WH_FLAG_BIGGER );
@@ -220,8 +219,7 @@ struct CR_SetLineHeight
: pTableNd( rCpy.pTableNd ), pUndo( rCpy.pUndo ),
nMaxSpace( rCpy.nMaxSpace ), nMaxHeight( rCpy.nMaxHeight ),
nMode( rCpy.nMode ), nLines( rCpy.nLines ),
- bBigger( rCpy.bBigger ), bTop( rCpy.bTop ),
- bSplittBox( rCpy.bSplittBox ), bAnyBoxFnd( rCpy.bAnyBoxFnd )
+ bBigger( rCpy.bBigger ), bTop( rCpy.bTop )
{}
SwUndoTableNdsChg* CreateUndo( SwUndoId nUndoType )
diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx
index 9e6a54d53b1a..157e8287f5fb 100644
--- a/sw/source/core/inc/SwXMLTextBlocks.hxx
+++ b/sw/source/core/inc/SwXMLTextBlocks.hxx
@@ -34,7 +34,6 @@ class SvxMacroTableDtor;
class SwXMLTextBlocks : public SwImpBlocks
{
protected:
- bool bAutocorrBlock;
SfxObjectShellRef xDocShellRef;
sal_uInt16 nFlags;
OUString aPackageName;
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index d43e220c63f2..2470fd585c59 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -111,11 +111,6 @@ protected:
bool m_bLayout :1; ///< FLY_AT_PAGE, FLY_AT_FLY, at page or at frame
bool m_bAutoPosition :1; ///< FLY_AT_CHAR, anchored at character
- bool m_bNoShrink :1; ///< temporary forbid shrinking to avoid loops
- // If true, the content of the fly frame will not be deleted when it
- // is moved to an invisible layer.
- bool m_bLockDeleteContent :1;
-
friend class SwNoTextFrame; // is allowed to call NotifyBackground
Point m_aContentPos; // content area's position relatively to Frame
@@ -203,8 +198,6 @@ public:
bool IsNotifyBack() const { return m_bNotifyBack; }
void SetNotifyBack() { m_bNotifyBack = true; }
void ResetNotifyBack() { m_bNotifyBack = false; }
- bool IsNoShrink() const { return m_bNoShrink; }
- bool IsLockDeleteContent() const { return m_bLockDeleteContent; }
bool IsClipped() const { return m_bHeightClipped || m_bWidthClipped; }
bool IsHeightClipped() const { return m_bHeightClipped; }
diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index ee9ef4950d78..fba851b632b4 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -172,9 +172,6 @@ class SwFlyInContentFrame : public SwFlyFrame
{
Point aRef; // relative to this point AbsPos is being calculated
- bool bInvalidLayout :1;
- bool bInvalidContent :1;
-
virtual void DestroyImpl() override;
virtual ~SwFlyInContentFrame();
@@ -196,10 +193,6 @@ public:
const Point &GetRefPoint() const { return aRef; }
const Point GetRelPos() const;
- inline void InvalidateLayout() const;
- inline void InvalidateContent() const;
- bool IsInvalid() const { return (bInvalidLayout || bInvalidContent); }
-
// (26.11.93, see tabfrm.hxx, but might also be valid for others)
// For creation of a Fly after a FlyCnt was created _and_ inserted.
// Must be called by creator because can be pasted only after creation.
@@ -218,16 +211,6 @@ public:
virtual void ActionOnInvalidation( const InvalidationType _nInvalid ) override;
};
-inline void SwFlyInContentFrame::InvalidateLayout() const
-{
- const_cast<SwFlyInContentFrame*>(this)->bInvalidLayout = true;
-}
-inline void SwFlyInContentFrame::InvalidateContent() const
-{
- const_cast<SwFlyInContentFrame*>(this)->bInvalidContent = true;
-}
-
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index aa278cf6494c..09265df6eab5 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -181,8 +181,6 @@ protected:
bool mbHadFollow;
bool mbInvaKeep;
bool mbValidSize;
- // #i49383#
- bool mbFrameDeleted;
public:
SwFrameNotify( SwFrame *pFrame );
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index d216486958e7..f549bc7b1e3c 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -186,7 +186,6 @@ class SwLayIdle
SwContentNode *pContentNode; // The current cursor position is saved here
sal_Int32 nTextPos;
bool bPageValid; // Were we able to evaluate everything on the whole page?
- bool bAllValid; // Were we able to evaluate everything?
#ifdef DBG_UTIL
bool m_bIndicator;
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index c7a06b0156ee..14f3662876c6 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -58,8 +58,6 @@ namespace sw { namespace mark
OUString m_aName;
OUString m_aShortName;
vcl::KeyCode m_aCode;
- bool m_bSavePos;
- bool m_bSaveOtherPos;
IDocumentMarkAccess::MarkType m_eOrigBkmType;
sal_uLong m_nNode1;
sal_uLong m_nNode2;
diff --git a/sw/source/core/inc/objectformatter.hxx b/sw/source/core/inc/objectformatter.hxx
index e6636215a447..1de7de04eb29 100644
--- a/sw/source/core/inc/objectformatter.hxx
+++ b/sw/source/core/inc/objectformatter.hxx
@@ -41,10 +41,6 @@ class SwObjectFormatter
// page frame, at which the floating screen objects are registered.
const SwPageFrame& mrPageFrame;
- // boolean, indicating that only as-character anchored objects have to
- // be formatted.
- bool mbFormatOnlyAsCharAnchored;
-
// value of document compatibility option 'Consider wrapping style on
// object positioning'
const bool mbConsiderWrapOnObjPos;
@@ -101,11 +97,6 @@ class SwObjectFormatter
return mpLayAction;
}
- inline bool FormatOnlyAsCharAnchored() const
- {
- return mbFormatOnlyAsCharAnchored;
- }
-
/** performs the intrinsic format of a given floating screen object and its content.
*/
void FormatObj_( SwAnchoredObject& _rAnchoredObj );
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 3c83bcdd40b7..eaea9f9bf95e 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -167,7 +167,6 @@ class SW_DLLPUBLIC SwFont
bool m_bFontChg :1;
bool m_bOrgChg :1; // nOrgHeight/Ascent are invalid
bool m_bURL :1;
- bool m_bPaintWrong :1; // flag for spelling mistakes
bool m_bGreyWave :1; // for the extended TextInput: gray waveline
bool m_bNoColorReplace :1; // Replacement without colormanipulation
@@ -990,12 +989,11 @@ public:
sal_uInt16 nGetStretchTextSize;
sal_uInt16 nDrawStretchText;
sal_uInt16 nChangeFont;
- sal_uInt16 nGetFontMetric;
inline void Reset()
{
nGetTextSize = nDrawText = nGetStretchTextSize =
- nDrawStretchText = nChangeFont = nGetFontMetric = 0;
+ nDrawStretchText = nChangeFont = 0;
}
inline SvStatistics() { Reset(); }
diff --git a/sw/source/core/inc/unoflatpara.hxx b/sw/source/core/inc/unoflatpara.hxx
index b7f6dddf467c..3c64fa1eb5eb 100644
--- a/sw/source/core/inc/unoflatpara.hxx
+++ b/sw/source/core/inc/unoflatpara.hxx
@@ -168,9 +168,7 @@ private:
const bool mbAutomatic;
sal_uLong mnCurrentNode; // used for non-automatic mode
- sal_uLong mnStartNode; // used for non-automatic mode
sal_uLong mnEndNode; // used for non-automatic mode
- bool mbWrapped; // used for non-automatic mode
};
#endif
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 65ba952f6245..ab0a2eacbc17 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -76,8 +76,6 @@ SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch
m_bAtCnt( false ),
m_bLayout( false ),
m_bAutoPosition( false ),
- m_bNoShrink( false ),
- m_bLockDeleteContent( false ),
m_bValidContentPos( false )
{
mnFrameType = SwFrameType::Fly;
@@ -292,10 +290,6 @@ void SwFlyFrame::Unchain()
// OD 2004-01-19 #110582#
void SwFlyFrame::DeleteCnt()
{
- // #110582#-2
- if ( IsLockDeleteContent() )
- return;
-
SwFrame* pFrame = m_pLower;
while ( pFrame )
{
@@ -1867,7 +1861,7 @@ SwTwips SwFlyFrame::Grow_( SwTwips nDist, bool bTst )
SwTwips SwFlyFrame::Shrink_( SwTwips nDist, bool bTst )
{
- if( Lower() && !IsColLocked() && !HasFixSize() && !IsNoShrink() )
+ if( Lower() && !IsColLocked() && !HasFixSize() )
{
SWRECTFN( this )
SwTwips nHeight = (Frame().*fnRect->fnGetHeight)();
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index 5fcd3a269c95..99a3956119c8 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -31,7 +31,7 @@
SwFlyInContentFrame::SwFlyInContentFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch ) :
SwFlyFrame( pFormat, pSib, pAnch )
{
- m_bInCnt = bInvalidLayout = bInvalidContent = true;
+ m_bInCnt = true;
SwTwips nRel = pFormat->GetVertOrient().GetPos();
// OD 2004-05-27 #i26791# - member <aRelPos> moved to <SwAnchoredObject>
Point aRelPos;
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 9ff86a0c6733..335582a4907b 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -84,8 +84,7 @@ SwFrameNotify::SwFrameNotify( SwFrame *pF ) :
maFrame( pF->Frame() ),
maPrt( pF->Prt() ),
mbInvaKeep( false ),
- mbValidSize( pF->GetValidSizeFlag() ),
- mbFrameDeleted( false ) // #i49383#
+ mbValidSize( pF->GetValidSizeFlag() )
{
if ( pF->IsTextFrame() )
{
@@ -103,12 +102,6 @@ SwFrameNotify::SwFrameNotify( SwFrame *pF ) :
SwFrameNotify::~SwFrameNotify()
{
- // #i49383#
- if ( mbFrameDeleted )
- {
- return;
- }
-
SWRECTFN( mpFrame )
const bool bAbsP = POS_DIFF( maFrame, mpFrame->Frame() );
const bool bChgWidth =
@@ -451,12 +444,6 @@ static void lcl_InvalidatePosOfLowers( SwLayoutFrame& _rLayoutFrame )
SwLayNotify::~SwLayNotify()
{
- // #i49383#
- if ( mbFrameDeleted )
- {
- return;
- }
-
SwLayoutFrame *pLay = GetLay();
SWRECTFN( pLay )
bool bNotify = false;
@@ -636,12 +623,6 @@ SwFlyNotify::SwFlyNotify( SwFlyFrame *pFlyFrame ) :
SwFlyNotify::~SwFlyNotify()
{
- // #i49383#
- if ( mbFrameDeleted )
- {
- return;
- }
-
SwFlyFrame *pFly = GetFly();
if ( pFly->IsNotifyBack() )
{
@@ -769,12 +750,6 @@ SwContentNotify::SwContentNotify( SwContentFrame *pContentFrame ) :
SwContentNotify::~SwContentNotify()
{
- // #i49383#
- if ( mbFrameDeleted )
- {
- return;
- }
-
SwContentFrame *pCnt = GetCnt();
if ( bSetCompletePaintOnInvalidate )
pCnt->SetCompletePaint();
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index d238d382da4d..abe5d5811137 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1919,8 +1919,6 @@ bool SwLayIdle::DoIdleJob_( const SwContentFrame *pCnt, IdleJobType eJob )
SwRect aRepaint( const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pCnt))->AutoSpell_( pContentNode, nTextPos ) );
// tdf#92036 PENDING should stop idle spell checking
bPageValid = bPageValid && (SwTextNode::WrongState::TODO != pTextNode->GetWrongDirty());
- if( !bPageValid )
- bAllValid = false;
if ( aRepaint.HasArea() )
pImp->GetShell()->InvalidateWindows( aRepaint );
if (Application::AnyInput(VCL_INPUT_ANY & VclInputFlags(~VclInputFlags::TIMER)))
@@ -1948,8 +1946,6 @@ bool SwLayIdle::DoIdleJob_( const SwContentFrame *pCnt, IdleJobType eJob )
try {
const SwRect aRepaint( const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pCnt))->SmartTagScan( pContentNode, nTextPos ) );
bPageValid = bPageValid && !pTextNode->IsSmartTagDirty();
- if( !bPageValid )
- bAllValid = false;
if ( aRepaint.HasArea() )
pImp->GetShell()->InvalidateWindows( aRepaint );
} catch( const css::uno::RuntimeException& e) {
diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx
index b434889070bc..a59c83495b1e 100644
--- a/sw/source/core/layout/objectformatter.cxx
+++ b/sw/source/core/layout/objectformatter.cxx
@@ -136,7 +136,6 @@ SwObjectFormatter::SwObjectFormatter( const SwPageFrame& _rPageFrame,
SwLayAction* _pLayAction,
const bool _bCollectPgNumOfAnchors )
: mrPageFrame( _rPageFrame ),
- mbFormatOnlyAsCharAnchored( false ),
mbConsiderWrapOnObjPos( _rPageFrame.GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) ),
mpLayAction( _pLayAction ),
// --> #i26945#
@@ -298,14 +297,6 @@ void SwObjectFormatter::FormatObjContent( SwAnchoredObject& _rAnchoredObj )
*/
void SwObjectFormatter::FormatObj_( SwAnchoredObject& _rAnchoredObj )
{
- // check, if only as-character anchored object have to be formatted, and
- // check the anchor type
- if ( FormatOnlyAsCharAnchored() &&
- !(_rAnchoredObj.GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
- {
- return;
- }
-
// collect anchor object and its 'anchor' page number, if requested
if ( mpPgNumAndTypeOfAnchors )
{
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index b59b9f57668a..16d3ed4fc764 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -110,14 +110,6 @@ SwFrame& SwObjectFormatterTextFrame::GetAnchorFrame()
bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
const bool _bCheckForMovedFwd )
{
- // check, if only as-character anchored object have to be formatted, and
- // check the anchor type
- if ( FormatOnlyAsCharAnchored() &&
- !(_rAnchoredObj.GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
- {
- return true;
- }
-
// consider, if the layout action has to be
// restarted due to a delete of a page frame.
if ( GetLayAction() && GetLayAction()->IsAgain() )
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 9451c0ae54e4..97c851dd7436 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -399,7 +399,6 @@ void SwFrame::InvalidatePage( const SwPageFrame *pPage ) const
{
if ( pFly->IsFlyInContentFrame() )
{ pPage->InvalidateFlyInCnt();
- static_cast<const SwFlyInContentFrame*>(pFly)->InvalidateContent();
pFly->GetAnchorFrame()->InvalidatePage();
}
else
@@ -420,7 +419,6 @@ void SwFrame::InvalidatePage( const SwPageFrame *pPage ) const
if ( pFly->IsFlyInContentFrame() )
{
pPage->InvalidateFlyInCnt();
- static_cast<const SwFlyInContentFrame*>(pFly)->InvalidateLayout();
pFly->GetAnchorFrame()->InvalidatePage();
}
else
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index c22157c50da8..1ecf8d381b09 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -57,7 +57,6 @@ void SwXMLTextBlocks::ResetBlockMode ( )
SwXMLTextBlocks::SwXMLTextBlocks( const OUString& rFile )
: SwImpBlocks(rFile)
- , bAutocorrBlock(false)
, nFlags(0)
{
SwDocShell* pDocSh = new SwDocShell ( SfxObjectCreateMode::INTERNAL );
@@ -101,7 +100,6 @@ SwXMLTextBlocks::SwXMLTextBlocks( const OUString& rFile )
SwXMLTextBlocks::SwXMLTextBlocks( const uno::Reference < embed::XStorage >& rStg, const OUString& rName )
: SwImpBlocks( rName )
- , bAutocorrBlock(false)
, nFlags(0)
{
SwDocShell* pDocSh = new SwDocShell ( SfxObjectCreateMode::INTERNAL );
@@ -460,8 +458,6 @@ bool SwXMLTextBlocks::PutMuchEntries( bool bOn )
sal_uLong SwXMLTextBlocks::OpenFile( bool bRdOnly )
{
- if( bAutocorrBlock )
- return 0;
sal_uLong nRet = 0;
try
{
@@ -480,12 +476,9 @@ sal_uLong SwXMLTextBlocks::OpenFile( bool bRdOnly )
void SwXMLTextBlocks::CloseFile()
{
- if ( !bAutocorrBlock )
- {
- if (bInfoChanged)
- WriteInfo();
- ResetBlockMode();
- }
+ if (bInfoChanged)
+ WriteInfo();
+ ResetBlockMode();
}
void SwXMLTextBlocks::SetIsTextOnly( const OUString& rShort, bool bNewValue )
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 527e23f6e74e..deff44ac2545 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1350,7 +1350,6 @@ void SwTextFormatInfo::CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwT
//! needs to be done in this order
m_nMinLeading = 2;
m_nMinTrailing = 2;
- m_nMinWordLength = 0;
m_bAutoHyph = InitHyph();
m_bIgnoreFly = false;
@@ -1495,7 +1494,6 @@ SwTextFormatInfo::SwTextFormatInfo( const SwTextFormatInfo& rInf,
m_nMinLeading = 0;
m_nMinTrailing = 0;
- m_nMinWordLength = 0;
m_bFull = false;
m_bFootnoteDone = true;
m_bErgoDone = true;
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 9ab99f1945bb..bd6383b9ccf2 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -510,7 +510,6 @@ class SwTextFormatInfo : public SwTextPaintInfo
sal_Int16 m_nMinLeading; // minimum number of chars before hyphenation point
sal_Int16 m_nMinTrailing; // minimum number of chars after hyphenation point
- sal_Int16 m_nMinWordLength; // minimum length of word to be hyphenated
bool m_bFull : 1; // Line is full
bool m_bFootnoteDone : 1; // Footnote already formatted
diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index 1c747d113102..9ca201273b64 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -67,7 +67,6 @@ class SwDropPortion : public SwTextPortion
sal_uInt16 nDropDescent; // Distance to the next line
sal_uInt16 nDistance; // Distance to the text
sal_uInt16 nFix; // Fixed position
- short nX; // X PaintOffset
short nY; // Y Offset
bool FormatText( SwTextFormatInfo &rInf );
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index de304c413fab..3b3d980a5dca 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -649,8 +649,6 @@ void SwTextPortion::HandlePortion( SwPortionHandler& rPH ) const
SwTextInputFieldPortion::SwTextInputFieldPortion()
: SwTextPortion()
- , mbContainsInputFieldStart( false )
- , mbContainsInputFieldEnd( false )
{
SetWhichPor( POR_INPUTFLD );
}
@@ -665,8 +663,7 @@ void SwTextInputFieldPortion::Paint( const SwTextPaintInfo &rInf ) const
if ( Width() )
{
rInf.DrawViewOpt( *this, POR_INPUTFLD );
- SwTextSlot aPaintText( &rInf, this, true, true,
- ContainsOnlyDummyChars() ? OUString(" ") : OUString() );
+ SwTextSlot aPaintText( &rInf, this, true, true, OUString() );
SwTextPortion::Paint( rInf );
}
}
@@ -702,25 +699,9 @@ SwPosSize SwTextInputFieldPortion::GetTextSize( const SwTextSizeInfo &rInf ) con
sal_uInt16 SwTextInputFieldPortion::GetViewWidth( const SwTextSizeInfo &rInf ) const
{
- if( !Width()
- && ContainsOnlyDummyChars()
- && !rInf.GetOpt().IsPagePreview()
- && !rInf.GetOpt().IsReadonly()
- && SwViewOption::IsFieldShadings() )
- {
- return rInf.GetTextSize( " " ).Width();
- }
-
return SwTextPortion::GetViewWidth( rInf );
}
-bool SwTextInputFieldPortion::ContainsOnlyDummyChars() const
-{
- return GetLen() <= 2
- && mbContainsInputFieldStart
- && mbContainsInputFieldEnd;
-}
-
SwHolePortion::SwHolePortion( const SwTextPortion &rPor )
: nBlankWidth( 0 )
{
diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx
index 488b2e4033ac..9462b56808d2 100644
--- a/sw/source/core/text/portxt.hxx
+++ b/sw/source/core/text/portxt.hxx
@@ -65,11 +65,6 @@ public:
virtual sal_uInt16 GetViewWidth( const SwTextSizeInfo &rInf ) const override;
virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override;
virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override;
-
-private:
- bool mbContainsInputFieldStart;
- bool mbContainsInputFieldEnd;
- bool ContainsOnlyDummyChars() const;
};
class SwHolePortion : public SwLinePortion
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 7dd7452c6217..b3ef2f1fa7fa 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -108,7 +108,6 @@ SwDropPortion::SwDropPortion( const sal_uInt16 nLineCnt,
nDropDescent(nDrpDescent),
nDistance(nDist),
nFix(0),
- nX(0),
nY(0)
{
SetWhichPor( POR_DROP );
@@ -303,7 +302,7 @@ void SwDropPortion::PaintDrop( const SwTextPaintInfo &rInf ) const
const SwTwips nOldPosY = rInf.Y();
const SwTwips nOldPosX = rInf.X();
const SwParaPortion *pPara = rInf.GetParaPortion();
- const Point aOutPos( nOldPosX + nX, nOldPosY - pPara->GetAscent()
+ const Point aOutPos( nOldPosX, nOldPosY - pPara->GetAscent()
- pPara->GetRealHeight() + pPara->Height() );
// make good for retouching
@@ -312,7 +311,6 @@ void SwDropPortion::PaintDrop( const SwTextPaintInfo &rInf ) const
// for background
const_cast<SwDropPortion*>(this)->Height( nDropHeight + nDropDescent );
- const_cast<SwDropPortion*>(this)->Width( Width() - nX );
const_cast<SwDropPortion*>(this)->SetAscent( nDropHeight );
// Always adapt Clipregion to us, never set it off using the existing ClipRect
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 067ff03a2c11..222fe8ccddbe 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -699,7 +699,6 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
m_bBlink = false;
}
m_bPaintBlank = false;
- m_bPaintWrong = false;
OSL_ENSURE( m_aSub[SwFontScript::Latin].IsTransparent(), "SwFont: Transparent revolution" );
}
@@ -729,7 +728,6 @@ SwFont::SwFont( const SwFont &rFont )
m_bFontChg = rFont.m_bFontChg;
m_bOrgChg = rFont.m_bOrgChg;
m_bPaintBlank = rFont.m_bPaintBlank;
- m_bPaintWrong = false;
m_bURL = rFont.m_bURL;
m_bGreyWave = rFont.m_bGreyWave;
m_bNoColorReplace = rFont.m_bNoColorReplace;
@@ -747,7 +745,6 @@ SwFont::SwFont( const SwAttrSet* pAttrSet,
m_nMetaCount = 0;
m_nInputFieldCount = 0;
m_bPaintBlank = false;
- m_bPaintWrong = false;
m_bURL = false;
m_bGreyWave = false;
m_bNoColorReplace = false;
@@ -948,7 +945,6 @@ SwFont& SwFont::operator=( const SwFont &rFont )
m_bFontChg = rFont.m_bFontChg;
m_bOrgChg = rFont.m_bOrgChg;
m_bPaintBlank = rFont.m_bPaintBlank;
- m_bPaintWrong = false;
m_bURL = rFont.m_bURL;
m_bGreyWave = rFont.m_bGreyWave;
m_bNoColorReplace = rFont.m_bNoColorReplace;
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx
index f937c91ba250..4f8e0daa61f7 100644
--- a/sw/source/core/unocore/unoflatpara.cxx
+++ b/sw/source/core/unocore/unoflatpara.cxx
@@ -344,9 +344,7 @@ SwXFlatParagraphIterator::SwXFlatParagraphIterator( SwDoc& rDoc, sal_Int32 nType
mnType( nType ),
mbAutomatic( bAutomatic ),
mnCurrentNode( 0 ),
- mnStartNode( 0 ),
- mnEndNode( rDoc.GetNodes().Count() ),
- mbWrapped( false )
+ mnEndNode( rDoc.GetNodes().Count() )
{
//mnStartNode = mnCurrentNode = get node from current cursor TODO!
@@ -458,10 +456,10 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara()
if ( pRet )
break;
- if ( mnCurrentNode == mnEndNode && !mbWrapped )
+ if ( mnCurrentNode == mnEndNode )
{
mnCurrentNode = 0;
- mnEndNode = mnStartNode;
+ mnEndNode = 0;
}
}
}