loplugin:unuseddefaultparams in editeng

Change-Id: I1dc0ba262c06bd69cf92aae20b344fe23f460f55
This commit is contained in:
Noel Grandin 2016-03-03 08:56:35 +02:00
parent 4dedf654d8
commit b76842f63b
29 changed files with 96 additions and 148 deletions

View File

@ -96,8 +96,7 @@ namespace accessibility
void AccessibleParaManager::FireEvent( sal_Int32 nPara,
const sal_Int16 nEventId,
const uno::Any& rNewValue,
const uno::Any& rOldValue ) const
const uno::Any& rNewValue ) const
{
DBG_ASSERT( 0 <= nPara && maChildren.size() > static_cast<size_t>(nPara),
"AccessibleParaManager::FireEvent: invalid index" );
@ -106,7 +105,7 @@ namespace accessibility
{
auto maChild( GetChild( nPara ).first.get() );
if( maChild.is() )
maChild->FireEvent( nEventId, rNewValue, rOldValue );
maChild->FireEvent( nEventId, rNewValue, css::uno::Any() );
}
}

View File

@ -551,10 +551,10 @@ OUString EditEngine::GetText( LineEnd eEnd ) const
return pImpEditEngine->GetEditDoc().GetText( eEnd );
}
OUString EditEngine::GetText( const ESelection& rESelection, const LineEnd eEnd ) const
OUString EditEngine::GetText( const ESelection& rESelection ) const
{
EditSelection aSel( pImpEditEngine->CreateSel( rESelection ) );
return pImpEditEngine->GetSelected( aSel, eEnd );
return pImpEditEngine->GetSelected( aSel );
}
sal_uInt32 EditEngine::GetTextLen() const
@ -799,9 +799,9 @@ EditSelection EditEngine::InsertText(
return pImpEditEngine->InsertText(rxDataObj, rBaseURL, rPaM, bUseSpecial);
}
EditPaM EditEngine::EndOfWord(const EditPaM& rPaM, sal_Int16 nWordType)
EditPaM EditEngine::EndOfWord(const EditPaM& rPaM)
{
return pImpEditEngine->EndOfWord(rPaM, nWordType);
return pImpEditEngine->EndOfWord(rPaM);
}
EditPaM EditEngine::GetPaM(const Point& aDocPos, bool bSmart)
@ -873,9 +873,9 @@ const ParaPortionList& EditEngine::GetParaPortions() const
}
void EditEngine::SeekCursor(
ContentNode* pNode, sal_Int32 nPos, SvxFont& rFont, OutputDevice* pOut, sal_uInt16 nIgnoreWhich)
ContentNode* pNode, sal_Int32 nPos, SvxFont& rFont, OutputDevice* pOut)
{
pImpEditEngine->SeekCursor(pNode, nPos, rFont, pOut, nIgnoreWhich);
pImpEditEngine->SeekCursor(pNode, nPos, rFont, pOut);
}
EditPaM EditEngine::DeleteSelection(const EditSelection& rSel)
@ -908,9 +908,9 @@ void EditEngine::SetAttribs(const EditSelection& rSel, const SfxItemSet& rSet, s
pImpEditEngine->SetAttribs(rSel, rSet, nSpecial);
}
OUString EditEngine::GetSelected(const EditSelection& rSel, const LineEnd eParaSep) const
OUString EditEngine::GetSelected(const EditSelection& rSel) const
{
return pImpEditEngine->GetSelected(rSel, eParaSep);
return pImpEditEngine->GetSelected(rSel);
}
EditPaM EditEngine::DeleteSelected(const EditSelection& rSel)
@ -2732,10 +2732,9 @@ void EditEngine::CallImportHandler(ImportInfo& rInfo)
pImpEditEngine->aImportHdl.Call(rInfo);
}
EditPaM EditEngine::InsertParaBreak(
const EditSelection& rEditSelection, bool bKeepEndingAttribs)
EditPaM EditEngine::InsertParaBreak(const EditSelection& rEditSelection)
{
return pImpEditEngine->ImpInsertParaBreak(rEditSelection, bKeepEndingAttribs);
return pImpEditEngine->ImpInsertParaBreak(rEditSelection);
}
EditPaM EditEngine::InsertLineBreak(const EditSelection& rEditSelection)

View File

@ -369,7 +369,7 @@ void EditTextObject::Store( SvStream& rOStream ) const
rOStream.Seek( nEndPos );
}
EditTextObject* EditTextObject::Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool )
EditTextObject* EditTextObject::Create( SvStream& rIStream )
{
sal_Size nStartPos = rIStream.Tell();
@ -390,7 +390,7 @@ EditTextObject* EditTextObject::Create( SvStream& rIStream, SfxItemPool* pGlobal
if ( rIStream.GetError() )
return nullptr;
EditTextObject* pTxtObj = new EditTextObject(pGlobalTextObjectPool);
EditTextObject* pTxtObj = new EditTextObject(nullptr);
pTxtObj->CreateData(rIStream);
// Make sure that the stream is left at the correct place.

View File

@ -521,20 +521,17 @@ void EditHTMLParser::ImpInsertParaBreak()
aCurSel = mpEditEngine->InsertParaBreak(aCurSel);
}
void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSel )
void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems )
{
// pSel, when character attributes, otherwise paragraph attributes for
// the current paragraph.
DBG_ASSERT( pSel || ( aCurSel.Min().GetNode() == aCurSel.Max().GetNode() ), "ImpInsertAttribs: Selection?" );
DBG_ASSERT( aCurSel.Min().GetNode() == aCurSel.Max().GetNode(), "ImpInsertAttribs: Selection?" );
EditPaM aStartPaM( pSel ? pSel->Min() : aCurSel.Min() );
EditPaM aEndPaM( pSel ? pSel->Max() : aCurSel.Max() );
EditPaM aStartPaM( aCurSel.Min() );
EditPaM aEndPaM( aCurSel.Max() );
if ( !pSel )
{
aStartPaM.SetIndex( 0 );
aEndPaM.SetIndex( aEndPaM.GetNode()->Len() );
}
aStartPaM.SetIndex( 0 );
aEndPaM.SetIndex( aEndPaM.GetNode()->Len() );
if (mpEditEngine->IsImportHandlerSet())
{

View File

@ -62,7 +62,7 @@ private:
void ImpInsertParaBreak();
void ImpInsertText( const OUString& rText );
void ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSel = nullptr );
void ImpSetAttribs( const SfxItemSet& rItems );
void ImpSetStyleSheet( sal_uInt16 nHeadingLevel );
protected:

View File

@ -719,7 +719,7 @@ void ImpEditView::CalcAnchorPoint()
}
}
void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16 nShowCursorFlags )
void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
{
// No ShowCursor in an empty View ...
if ( ( aOutArea.Left() >= aOutArea.Right() ) && ( aOutArea.Top() >= aOutArea.Bottom() ) )
@ -750,9 +750,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16
const ParaPortion* pParaPortion = pEditEngine->GetParaPortions()[nPara];
nShowCursorFlags |= nExtraCursorFlags;
nShowCursorFlags |= GETCRSR_TXTONLY;
sal_uInt16 nShowCursorFlags = nExtraCursorFlags | GETCRSR_TXTONLY;
// Use CursorBidiLevel 0/1 in meaning of
// 0: prefer portion end, normal mode

View File

@ -347,7 +347,7 @@ public:
void CalcAnchorPoint();
void RecalcOutputArea();
void ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16 nShowCursorFlags = 0 );
void ShowCursor( bool bGotoCursor, bool bForceVisCursor );
Pair Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck = ScrollRangeCheck::NoNegative );
void SetInsertMode( bool bInsert );
@ -566,7 +566,7 @@ private:
EditPaM ImpInsertParaBreak( const EditSelection& rEditSelection, bool bKeepEndingAttribs = true );
EditPaM ImpInsertText(const EditSelection& aCurEditSelection, const OUString& rStr);
EditPaM ImpInsertFeature(const EditSelection& rCurSel, const SfxPoolItem& rItem);
void ImpRemoveChars( const EditPaM& rPaM, sal_Int32 nChars, EditUndoRemoveChars* pCurUndo = nullptr );
void ImpRemoveChars( const EditPaM& rPaM, sal_Int32 nChars );
void ImpRemoveParagraph( sal_Int32 nPara );
EditSelection ImpMoveParagraphs( Range aParagraphs, sal_Int32 nNewPos );
@ -597,9 +597,9 @@ private:
static EditPaM CursorEndOfParagraph( const EditPaM& rPaM );
EditPaM CursorStartOfDoc();
EditPaM CursorEndOfDoc();
EditPaM WordLeft( const EditPaM& rPaM, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
EditPaM WordLeft( const EditPaM& rPaM );
EditPaM WordRight( const EditPaM& rPaM, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
EditPaM StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
EditPaM StartOfWord( const EditPaM& rPaM );
EditPaM EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, bool bAcceptStartOfWord = true );
EditSelection SelectSentence( const EditSelection& rCurSel ) const;
@ -1006,7 +1006,7 @@ public:
void SetAddExtLeading( bool b );
bool IsAddExtLeading() const { return bAddExtLeading; }
rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable( bool bGetInternal = true ) const;
rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const;
static void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
/** sets a link that is called at the beginning of a drag operation at an edit view */

View File

@ -1396,7 +1396,7 @@ EditPaM ImpEditEngine::PageDown( const EditPaM& rPaM, EditView* pView )
return GetPaM( aBottomRight );
}
EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM, sal_Int16 nWordType )
EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM )
{
const sal_Int32 nCurrentPos = rPaM.GetIndex();
EditPaM aNewPaM( rPaM );
@ -1422,10 +1422,10 @@ EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM, sal_Int16 nWordType )
uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
i18n::Boundary aBoundary =
_xBI->getWordBoundary(aNewPaM.GetNode()->GetString(), nCurrentPos, aLocale, nWordType, true);
_xBI->getWordBoundary(aNewPaM.GetNode()->GetString(), nCurrentPos, aLocale, css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, true);
if ( aBoundary.startPos >= nCurrentPos )
aBoundary = _xBI->previousWord(
aNewPaM.GetNode()->GetString(), nCurrentPos, aLocale, nWordType);
aNewPaM.GetNode()->GetString(), nCurrentPos, aLocale, css::i18n::WordType::ANYWORD_IGNOREWHITESPACES);
aNewPaM.SetIndex( ( aBoundary.startPos != (-1) ) ? aBoundary.startPos : 0 );
}
@ -1464,7 +1464,7 @@ EditPaM ImpEditEngine::WordRight( const EditPaM& rPaM, sal_Int16 nWordType )
return aNewPaM;
}
EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType )
EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM )
{
EditPaM aNewPaM( rPaM );
@ -1477,7 +1477,7 @@ EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType )
uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
i18n::Boundary aBoundary = _xBI->getWordBoundary(
rPaM.GetNode()->GetString(), rPaM.GetIndex(), aLocale, nWordType, true);
rPaM.GetNode()->GetString(), rPaM.GetIndex(), aLocale, css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, true);
aNewPaM.SetIndex( aBoundary.startPos );
return aNewPaM;
@ -2035,7 +2035,7 @@ SvxCellVerJustify ImpEditEngine::GetVerJustification( sal_Int32 nPara ) const
}
// Text changes
void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, sal_Int32 nChars, EditUndoRemoveChars* pCurUndo )
void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, sal_Int32 nChars )
{
if ( IsUndoEnabled() && !IsInUndo() )
{
@ -2057,10 +2057,7 @@ void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, sal_Int32 nChars, EditU
break; // for
}
}
if ( pCurUndo && ( CreateEditPaM( pCurUndo->GetEPaM() ) == rPaM ) )
pCurUndo->GetStr() += aStr;
else
InsertUndo(new EditUndoRemoveChars(pEditEngine, CreateEPaM(rPaM), aStr));
InsertUndo(new EditUndoRemoveChars(pEditEngine, CreateEPaM(rPaM), aStr));
}
aEditDoc.RemoveChars( rPaM, nChars );
@ -4275,10 +4272,10 @@ void ImpEditEngine::IndentBlock( EditView* pEditView, bool bRight )
}
}
rtl::Reference<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( bool bGetInternal ) const
rtl::Reference<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable() const
{
rtl::Reference<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable;
if ( !xF.is() && bGetInternal )
if ( !xF.is() )
xF = EE_DLL().GetGlobalData()->GetForbiddenCharsTable();
return xF;
}

View File

@ -828,7 +828,7 @@ void SvxNumRule::SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt)
}
}
OUString SvxNumRule::MakeNumString( const SvxNodeNum& rNum, bool bInclStrings ) const
OUString SvxNumRule::MakeNumString( const SvxNodeNum& rNum ) const
{
OUString aStr;
if( SVX_NO_NUM > rNum.GetLevel() && !( SVX_NO_NUMLEVEL & rNum.GetLevel() ) )
@ -874,10 +874,7 @@ OUString SvxNumRule::MakeNumString( const SvxNodeNum& rNum, bool bInclStrings )
}
}
if( bInclStrings )
{
aStr = rMyNFmt.GetPrefix() + aStr + rMyNFmt.GetSuffix();
}
aStr = rMyNFmt.GetPrefix() + aStr + rMyNFmt.GetSuffix();
}
return aStr;
}

View File

@ -93,11 +93,11 @@ Paper SvxPaperInfo::GetSvxPaper( const Size &rSize, MapUnit eUnit, bool bSloppy
}
long SvxPaperInfo::GetSloppyPaperDimension( long nSize, MapUnit eUnit )
long SvxPaperInfo::GetSloppyPaperDimension( long nSize )
{
nSize = eUnit == MAP_100TH_MM ? nSize : OutputDevice::LogicToLogic(nSize, eUnit, MAP_100TH_MM);
nSize = OutputDevice::LogicToLogic(nSize, MAP_TWIP, MAP_100TH_MM);
nSize = PaperInfo::sloppyFitPageDimension(nSize);
return eUnit == MAP_100TH_MM ? nSize : OutputDevice::LogicToLogic(nSize, MAP_100TH_MM, eUnit);
return OutputDevice::LogicToLogic(nSize, MAP_100TH_MM, MAP_TWIP);
}

View File

@ -1130,17 +1130,16 @@ bool SvxTabStopItem::Insert( const SvxTabStop& rTab )
return maTabStops.insert( rTab ).second;
}
void SvxTabStopItem::Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart,
sal_uInt16 nEnd )
void SvxTabStopItem::Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart )
{
for( sal_uInt16 i = nStart; i < nEnd && i < pTabs->Count(); i++ )
for( sal_uInt16 i = nStart; i < pTabs->Count(); i++ )
{
const SvxTabStop& rTab = (*pTabs)[i];
sal_uInt16 nTabPos = GetPos(rTab);
if(SVX_TAB_NOTFOUND != nTabPos)
Remove(nTabPos);
}
for( sal_uInt16 i = nStart; i < nEnd && i < pTabs->Count(); i++ )
for( sal_uInt16 i = nStart; i < pTabs->Count(); i++ )
{
maTabStops.insert( (*pTabs)[i] );
}

View File

@ -716,8 +716,7 @@ bool SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
sal_Int32 , sal_Int32 nEndPos,
LanguageType eLang )
sal_Int32 , sal_Int32 nEndPos )
{
// Condition:
// at the beginning: _ or * after Space with the following !Space
@ -733,7 +732,7 @@ bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const OUString& rT
bool bAlphaNum = false;
sal_Int32 nPos = nEndPos;
sal_Int32 nFndPos = -1;
CharClass& rCC = GetCharClass( eLang );
CharClass& rCC = GetCharClass( LANGUAGE_SYSTEM );
while( nPos )
{

View File

@ -178,9 +178,9 @@ void Outliner::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect )
pEditEngine->Draw( pOutDev, rOutRect );
}
void Outliner::Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation )
void Outliner::Draw( OutputDevice* pOutDev, const Point& rStartPos )
{
pEditEngine->Draw( pOutDev, rStartPos, nOrientation );
pEditEngine->Draw( pOutDev, rStartPos );
}
void Outliner::SetPaperSize( const Size& rSize )
@ -328,9 +328,9 @@ sal_Int32 Outliner::GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const
return pEditEngine->GetLineLen( nParagraph, nLine );
}
sal_uLong Outliner::GetLineHeight( sal_Int32 nParagraph, sal_Int32 nLine )
sal_uLong Outliner::GetLineHeight( sal_Int32 nParagraph )
{
return pEditEngine->GetLineHeight( nParagraph, nLine );
return pEditEngine->GetLineHeight( nParagraph );
}
void Outliner::RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich )
@ -486,9 +486,9 @@ void Outliner::QuickInsertLineBreak( const ESelection& rSel )
pEditEngine->QuickInsertLineBreak( rSel );
}
void Outliner::QuickFormatDoc( bool bFull )
void Outliner::QuickFormatDoc()
{
pEditEngine->QuickFormatDoc( bFull );
pEditEngine->QuickFormatDoc();
}
void Outliner::SetGlobalCharStretching( sal_uInt16 nX, sal_uInt16 nY )

View File

@ -229,24 +229,11 @@ void Outliner::Init( sal_uInt16 nMode )
EnableUndo(bWasUndoEnabled);
}
void Outliner::SetMaxDepth( sal_Int16 nDepth, bool bCheckParagraphs )
void Outliner::SetMaxDepth( sal_Int16 nDepth )
{
if( nMaxDepth != nDepth )
{
nMaxDepth = std::min( nDepth, (sal_Int16)(SVX_MAX_NUM-1) );
if( bCheckParagraphs )
{
sal_Int32 nParagraphs = pParaList->GetParagraphCount();
for ( sal_Int32 nPara = 0; nPara < nParagraphs; nPara++ )
{
Paragraph* pPara = pParaList->GetParagraph( nPara );
if( pPara && pPara->GetDepth() > nMaxDepth )
{
SetDepth( pPara, nMaxDepth );
}
}
}
}
}
@ -506,7 +493,7 @@ void Outliner::SetText( const OUString& rText, Paragraph* pPara )
// pView == 0 -> Ignore tabs
bool Outliner::ImpConvertEdtToOut( sal_Int32 nPara,EditView* pView)
bool Outliner::ImpConvertEdtToOut( sal_Int32 nPara )
{
bool bConverted = false;
@ -565,13 +552,7 @@ bool Outliner::ImpConvertEdtToOut( sal_Int32 nPara,EditView* pView)
if ( aDelSel.HasRange() )
{
if ( pView )
{
pView->SetSelection( aDelSel );
pView->DeleteSelected();
}
else
pEditEngine->QuickDelete( aDelSel );
pEditEngine->QuickDelete( aDelSel );
}
const SfxInt16Item& rLevel = static_cast<const SfxInt16Item&>( pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL ) );
@ -709,14 +690,12 @@ void Outliner::ImplCheckNumBulletItem( sal_Int32 nPara )
pPara->aBulSize.Width() = -1;
}
void Outliner::ImplSetLevelDependendStyleSheet( sal_Int32 nPara, SfxStyleSheet* pLevelStyle )
void Outliner::ImplSetLevelDependendStyleSheet( sal_Int32 nPara )
{
DBG_ASSERT( ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) || ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ), "SetLevelDependendStyleSheet: Wrong Mode!" );
SfxStyleSheet* pStyle = pLevelStyle;
if ( !pStyle )
pStyle = GetStyleSheet( nPara );
SfxStyleSheet* pStyle = GetStyleSheet( nPara );
if ( pStyle )
{
@ -743,7 +722,7 @@ void Outliner::ImplSetLevelDependendStyleSheet( sal_Int32 nPara, SfxStyleSheet*
}
}
void Outliner::ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUndo, bool bUndoAction )
void Outliner::ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUndo )
{
DBG_ASSERT( ( nDepth >= nMinDepth ) && ( nDepth <= nMaxDepth ), "ImplInitDepth - Depth is invalid!" );
@ -762,8 +741,6 @@ void Outliner::ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUnd
pEditEngine->SetUpdateMode( false );
bool bUndo = bCreateUndo && IsUndoEnabled();
if ( bUndo && bUndoAction )
UndoActionStart( OLUNDO_DEPTH );
SfxItemSet aAttrs( pEditEngine->GetParaAttribs( nPara ) );
aAttrs.Put( SfxInt16Item( EE_PARA_OUTLLEVEL, nDepth ) );
@ -774,8 +751,6 @@ void Outliner::ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUnd
if ( bUndo )
{
InsertUndo( new OutlinerUndoChangeDepth( this, nPara, nOldDepth, nDepth ) );
if ( bUndoAction )
UndoActionEnd( OLUNDO_DEPTH );
}
pEditEngine->SetUpdateMode( bUpdate );

View File

@ -1269,9 +1269,9 @@ OUString OutlinerView::GetSelected() const
return pEditView->GetSelected();
}
void OutlinerView::StartSpeller( bool bMultiDoc )
void OutlinerView::StartSpeller()
{
pEditView->StartSpeller( bMultiDoc );
pEditView->StartSpeller();
}
EESpellState OutlinerView::StartThesaurus()
@ -1371,9 +1371,9 @@ sal_uInt16 OutlinerView::GetInvalidateMore() const
}
bool OutlinerView::IsCursorAtWrongSpelledWord( bool bMarkIfWrong )
bool OutlinerView::IsCursorAtWrongSpelledWord()
{
return pEditView->IsCursorAtWrongSpelledWord( bMarkIfWrong );
return pEditView->IsCursorAtWrongSpelledWord();
}

View File

@ -94,10 +94,10 @@ inline const SvxEscapementItem& GetEscapement(const SfxItemSet& rSet,sal_uInt16
inline const SvxLineSpacingItem& GetLineSpacing(const SfxItemSet& rSet,sal_uInt16 nId,bool bInP=true)
{ return static_cast<const SvxLineSpacingItem&>(rSet.Get( nId,bInP)); }
// frm
inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,sal_uInt16 nId,bool bInP=true)
{ return static_cast<const SvxLRSpaceItem&>(rSet.Get( nId,bInP)); }
inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,sal_uInt16 nId,bool bInP=true)
{ return static_cast<const SvxULSpaceItem&>(rSet.Get( nId,bInP)); }
inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,sal_uInt16 nId)
{ return static_cast<const SvxLRSpaceItem&>(rSet.Get( nId)); }
inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,sal_uInt16 nId)
{ return static_cast<const SvxULSpaceItem&>(rSet.Get( nId)); }
void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet,
SfxPoolItem& rItem )

View File

@ -653,7 +653,7 @@ util::DateTime SvxRTFParser::GetDateTimeStamp( )
return aDT;
}
void SvxRTFParser::ReadInfo( const sal_Char* pChkForVerNo )
void SvxRTFParser::ReadInfo()
{
int _nOpenBrakets = 1; // the first was already detected earlier!!
DBG_ASSERT(m_xDocProps.is(),
@ -745,15 +745,9 @@ void SvxRTFParser::ReadInfo( const sal_Char* pChkForVerNo )
case RTF_NOFCHARS:
NextToken( nToken );
break;
// default:
}
}
if( pChkForVerNo &&
sComment == OUString::createFromAscii( pChkForVerNo ) )
nVersionNo = nVersNo;
SkipToken(); // the closing brace is evaluated "above"
}
@ -813,12 +807,12 @@ const vcl::Font& SvxRTFParser::GetFont( sal_uInt16 nId )
return *pDfltFont;
}
SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( bool const bCopyAttr )
SvxRTFItemStackType* SvxRTFParser::_GetAttrSet()
{
SvxRTFItemStackType* pAkt = aAttrStack.empty() ? nullptr : aAttrStack.back();
SvxRTFItemStackType* pNew;
if( pAkt )
pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, bCopyAttr );
pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, false/*bCopyAttr*/ );
else
pNew = new SvxRTFItemStackType( *pAttrPool, &aWhichMap[0],
*pInsPos );

View File

@ -99,13 +99,13 @@ public:
void SetFieldOffset( sal_Int32 nOffset, sal_Int32 nLen ) { mnFieldOffset = nOffset; mnFieldLen = nLen; }
sal_Int32 GetFieldOffset() const { return mnFieldOffset; }
sal_Int32 GetFieldLen() const { return mnFieldLen; }
void AreInField( bool bInField = true ) { mbInField = bInField; }
void AreInField() { mbInField = true; }
bool InField() const { return mbInField; }
void SetBulletOffset( sal_Int32 nOffset, sal_Int32 nLen ) { mnBulletOffset = nOffset; mnBulletLen = nLen; }
sal_Int32 GetBulletOffset() const { return mnBulletOffset; }
sal_Int32 GetBulletLen() const { return mnBulletLen; }
void AreInBullet( bool bInBullet = true ) { mbInBullet = bInBullet; }
void AreInBullet() { mbInBullet = true; }
bool InBullet() const { return mbInBullet; }
/// returns false if the given range is non-editable (e.g. contains bullets or _parts_ of fields)

View File

@ -131,8 +131,7 @@ namespace accessibility
void FireEvent( sal_Int32 nPara,
const sal_Int16 nEventId,
const css::uno::Any& rNewValue = css::uno::Any(),
const css::uno::Any& rOldValue = css::uno::Any() ) const;
const css::uno::Any& rNewValue = css::uno::Any() ) const;
static bool IsReferencable(rtl::Reference<AccessibleEditableTextPara> const & aChild);
bool IsReferencable( sal_Int32 nChild ) const;

View File

@ -114,7 +114,7 @@ namespace editeng {
void GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn = 0, sal_uInt16 nDist = 0 );
// TODO Hacky method to mirror lines in only a few cases
void SetMirrorWidths( bool bMirror = true ) { m_bMirrorWidths = bMirror; }
void SetMirrorWidths() { m_bMirrorWidths = true; }
long GetWidth( ) const { return m_nWidth; }
sal_uInt16 GetOutWidth() const;
sal_uInt16 GetInWidth() const;

View File

@ -175,8 +175,7 @@ private:
css::uno::Reference<css::datatransfer::XTransferable >& rxDataObj,
const OUString& rBaseURL, const EditPaM& rPaM, bool bUseSpecial);
EDITENG_DLLPRIVATE EditPaM EndOfWord(
const EditPaM& rPaM, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES);
EDITENG_DLLPRIVATE EditPaM EndOfWord(const EditPaM& rPaM);
EDITENG_DLLPRIVATE EditPaM GetPaM(const Point& aDocPos, bool bSmart = true);
@ -271,7 +270,7 @@ public:
void SetMaxAutoPaperSize( const Size& rSz );
OUString GetText( LineEnd eEnd = LINEEND_LF ) const;
OUString GetText( const ESelection& rSelection, const LineEnd eEnd = LINEEND_LF ) const;
OUString GetText( const ESelection& rSelection ) const;
sal_uInt32 GetTextLen() const;
sal_uInt32 GetTextHeight() const;
sal_uInt32 GetTextHeightNTP() const;
@ -551,8 +550,7 @@ public:
EditPaM InsertField(const EditSelection& rEditSelection, const SvxFieldItem& rFld);
EditPaM InsertText(const EditSelection& aCurEditSelection, const OUString& rStr);
EditSelection InsertText(const EditTextObject& rTextObject, const EditSelection& rSel);
EditPaM InsertParaBreak(
const EditSelection& rEditSelection, bool bKeepEndingAttribs = true);
EditPaM InsertParaBreak(const EditSelection& rEditSelection);
EditPaM InsertLineBreak(const EditSelection& rEditSelection);
EditPaM CursorLeft(
@ -561,7 +559,7 @@ public:
const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = css::i18n::CharacterIteratorMode::SKIPCELL);
void SeekCursor(
ContentNode* pNode, sal_Int32 nPos, SvxFont& rFont, OutputDevice* pOut = nullptr, sal_uInt16 nIgnoreWhich = 0);
ContentNode* pNode, sal_Int32 nPos, SvxFont& rFont, OutputDevice* pOut = nullptr);
EditPaM DeleteSelection(const EditSelection& rSel);
@ -572,7 +570,7 @@ public:
void SetParaAttribsOnly(sal_Int32 nPara, const SfxItemSet& rSet);
void SetAttribs(const EditSelection& rSel, const SfxItemSet& rSet, sal_uInt8 nSpecial = 0);
OUString GetSelected(const EditSelection& rSel, const LineEnd eParaSep = LINEEND_LF) const;
OUString GetSelected(const EditSelection& rSel) const;
EditPaM DeleteSelected(const EditSelection& rSel);
SvtScriptType GetScriptType(const EditSelection& rSel) const;

View File

@ -100,8 +100,7 @@ public:
void Store( SvStream& rOStream ) const;
static EditTextObject* Create(
SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool = nullptr );
static EditTextObject* Create( SvStream& rIStream );
sal_Int32 GetParagraphCount() const;

View File

@ -284,7 +284,7 @@ public:
SvxNumRuleFlags GetFeatureFlags() const {return nFeatureFlags;}
void SetFeatureFlag( SvxNumRuleFlags nFlag, bool bSet = true ) { if(bSet) nFeatureFlags |= nFlag; else nFeatureFlags &= ~nFlag; }
OUString MakeNumString( const SvxNodeNum&, bool bInclStrings = true ) const;
OUString MakeNumString( const SvxNodeNum& ) const;
SvxNumRuleType GetNumRuleType() const { return eNumberingType; }

View File

@ -293,7 +293,7 @@ public:
Pointer GetPointer( const Point& rPosPixel );
void Command( const CommandEvent& rCEvt );
void StartSpeller( bool bMultipleDoc = false );
void StartSpeller();
EESpellState StartThesaurus();
sal_Int32 StartSearchAndReplace( const SvxSearchItem& rSearchItem );
@ -361,7 +361,7 @@ public:
*/
void EnableBullets();
bool IsCursorAtWrongSpelledWord( bool bMarkIfWrong = false );
bool IsCursorAtWrongSpelledWord();
bool IsWrongSpelledWordAtPos( const Point& rPosPixel, bool bMarkIfWrong = false );
void ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void>* pCallBack = nullptr );
@ -634,13 +634,13 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
void ImplCalcBulletText( sal_Int32 nPara, bool bRecalcLevel, bool bRecalcChildren );
OUString ImplGetBulletText( sal_Int32 nPara );
void ImplCheckNumBulletItem( sal_Int32 nPara );
void ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUndo, bool bUndoAction = false );
void ImplSetLevelDependendStyleSheet( sal_Int32 nPara, SfxStyleSheet* pLevelStyle = nullptr );
void ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUndo );
void ImplSetLevelDependendStyleSheet( sal_Int32 nPara );
void ImplBlockInsertionCallbacks( bool b );
void ImpFilterIndents( sal_Int32 nFirstPara, sal_Int32 nLastPara );
bool ImpConvertEdtToOut( sal_Int32 nPara, EditView* pView = nullptr );
bool ImpConvertEdtToOut( sal_Int32 nPara );
void ImpTextPasted( sal_Int32 nStartPara, sal_Int32 nCount );
vcl::Font ImpCalcBulletFont( sal_Int32 nPara ) const;
@ -717,7 +717,7 @@ public:
void SetBackgroundColor( const Color& rColor );
Color GetBackgroundColor() const;
void SetMaxDepth( sal_Int16 nDepth, bool bCheckParas = false );
void SetMaxDepth( sal_Int16 nDepth );
sal_Int16 GetMaxDepth() const { return nMaxDepth; }
void SetUpdateMode( bool bUpdate );
@ -798,7 +798,7 @@ public:
Link<EditStatus&, void> GetStatusEventHdl() const;
void Draw( OutputDevice* pOutDev, const Rectangle& rOutRect );
void Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation = 0 );
void Draw( OutputDevice* pOutDev, const Point& rStartPos );
const Size& GetPaperSize() const;
void SetPaperSize( const Size& rSize );
@ -885,7 +885,7 @@ public:
sal_uLong GetLineCount( sal_Int32 nParagraph ) const;
sal_Int32 GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const;
sal_uLong GetLineHeight( sal_Int32 nParagraph, sal_Int32 nLine = 0 );
sal_uLong GetLineHeight( sal_Int32 nParagraph );
sal_uLong Read( SvStream& rInput, const OUString& rBaseURL, sal_uInt16, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
@ -900,7 +900,7 @@ public:
void QuickInsertText( const OUString& rText, const ESelection& rSel );
void QuickDelete( const ESelection& rSel );
void RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0 );
void QuickFormatDoc( bool bFull = false );
void QuickFormatDoc();
bool UpdateFields();
void RemoveFields( bool bKeepFieldText, std::function<bool ( const SvxFieldData* )> isFieldData = [] (const SvxFieldData* ){return true;} );

View File

@ -40,7 +40,7 @@ public:
static Size GetPaperSize( Paper ePaper, MapUnit eUnit = MAP_TWIP );
static Size GetPaperSize( const Printer* pPrinter );
static Paper GetSvxPaper( const Size &rSize, MapUnit eUnit = MAP_TWIP, bool bSloppy = false );
static long GetSloppyPaperDimension( long nSize, MapUnit eUnit = MAP_TWIP );
static long GetSloppyPaperDimension( long nSize );
static OUString GetName( Paper ePaper );
};

View File

@ -95,7 +95,7 @@ public:
inline bool IsStartDone(){ return bStartDone; }
inline bool IsEndDone(){ return bEndDone; }
inline bool IsHyphen(){ return bHyphen; } // Split instead of Spell check
inline void SetHyphen( const bool bNew = true ){ bHyphen = bNew; }
inline void SetHyphen() { bHyphen = true; }
inline bool IsAllRight() { return bAllRight; }
protected:

View File

@ -395,8 +395,7 @@ public:
sal_Int32 nSttPos, sal_Int32 nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
bool FnChgWeightUnderl( SvxAutoCorrDoc&, const OUString&,
sal_Int32 nSttPos, sal_Int32 nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
sal_Int32 nSttPos, sal_Int32 nEndPos );
bool FnCapitalStartSentence( SvxAutoCorrDoc&, const OUString&, bool bNormalPos,
sal_Int32 nSttPos, sal_Int32 nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM);

View File

@ -224,7 +224,7 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser
void ClearStyleTbl();
void ClearAttrStack();
SvxRTFItemStackType* _GetAttrSet(bool bCopyAttr = false); // Create new ItemStackType:s
SvxRTFItemStackType* _GetAttrSet(); // Create new ItemStackType:s
void _ClearStyleAttr( SvxRTFItemStackType& rStkType );
// Sets all the attributes that are different from the current
@ -268,7 +268,7 @@ protected:
// Read Document-Info
css::util::DateTime GetDateTimeStamp( );
OUString& GetTextToEndGroup( OUString& rStr );
void ReadInfo( const sal_Char* pChkForVerNo = nullptr );
void ReadInfo();
inline SfxItemSet& GetAttrSet();
// no text yet inserted? (SttPos from the top stack entry!)

View File

@ -117,8 +117,7 @@ public:
// unprivatized:
sal_uInt16 Count() const { return maTabStops.size(); }
bool Insert( const SvxTabStop& rTab );
void Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart = 0,
sal_uInt16 nEnd = USHRT_MAX );
void Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart = 0 );
void Remove( const sal_uInt16 nPos, const sal_uInt16 nLen = 1 )
{ maTabStops.erase( maTabStops.begin() + nPos, maTabStops.begin() + nPos + nLen ); }