diff options
63 files changed, 220 insertions, 347 deletions
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 291856442520..fcc108dcf9f7 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -689,12 +689,12 @@ static void RemoveScriptItems( SfxItemSet& rItemSet, sal_uInt16 nScript, } } -bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, +void SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, SfxItemSet& rItemSet, SvxCSS1PropertyInfo& rPropInfo ) { if( !bIsNewDoc ) - return true; + return; CSS1SelectorType eSelType = pSelector->GetType(); const CSS1Selector *pNext = pSelector->GetNext(); @@ -737,7 +737,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, if( CSS1_SELTYPE_ELEMENT != eSelType && CSS1_SELTYPE_ELEM_CLASS != eSelType) - return true; + return; // Token und Class zu dem Selektor holen OUString aToken2; @@ -759,7 +759,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, if( !pNext ) { InsertTag( aToken2, rItemSet, rPropInfo ); - return false; + return; } else if( pNext && CSS1_SELTYPE_PSEUDO == eNextType ) { @@ -796,7 +796,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, { InsertTag( sTmp, rItemSet, rPropInfo ); } - return false; + return; } } break; @@ -835,7 +835,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, GetTextCollFromPool( RES_POOLCOLL_STANDARD ), rItemSet, rPropInfo, this ); - return false; + return; } break; } @@ -862,7 +862,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, SetCharFormatAttrs( GetCharFormatFromPool(nPoolFormatId), aScriptItemSet); } - return false; + return; } } @@ -928,7 +928,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, if( CSS1_SELTYPE_ELEMENT==eSelType && !pNext ) { InsertTag( aToken2, rItemSet, rPropInfo ); - return false; + return; } else if( CSS1_SELTYPE_ELEMENT==eSelType && pNext && (CSS1_SELTYPE_ELEMENT==eNextType || @@ -964,7 +964,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, InsertTag( sTmp, aScriptItemSet, rPropInfo ); } - return false; + return; } } } @@ -1069,17 +1069,15 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, pColl->SetFormatAttr( aDrop ); } } - - return false; } - return true; + return; } // Jetzt werden die Selektoten verarbeitet, die zu einer Zechenvorlage // gehoehren. Zusammengesetzte gibt es hier allerdings nich nicht. if( pNext ) - return true; + return; SwCharFormat *pCFormat = GetChrFormat( static_cast< sal_uInt16 >(nToken2), aEmptyOUStr ); if( pCFormat ) @@ -1110,10 +1108,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, pParentCFormat ? &pParentCFormat->GetAttrSet() : nullptr ); SetCharFormatAttrs( pCFormat, aScriptItemSet ); } - return false; } - - return true; } sal_uInt32 SwCSS1Parser::GetFontHeight( sal_uInt16 nSize ) const @@ -2194,11 +2189,11 @@ bool SwHTMLParser::GetMarginsFromContext( sal_uInt16& nLeft, return false; } -bool SwHTMLParser::GetMarginsFromContextWithNumBul( sal_uInt16& nLeft, +void SwHTMLParser::GetMarginsFromContextWithNumBul( sal_uInt16& nLeft, sal_uInt16& nRight, short& nIndent ) const { - bool bRet = GetMarginsFromContext( nLeft, nRight, nIndent ); + GetMarginsFromContext( nLeft, nRight, nIndent ); const SwHTMLNumRuleInfo& rInfo = const_cast<SwHTMLParser*>(this)->GetNumInfo(); if( rInfo.GetDepth() ) { @@ -2208,8 +2203,6 @@ bool SwHTMLParser::GetMarginsFromContextWithNumBul( sal_uInt16& nLeft, nLeft = nLeft + rNumFormat.GetAbsLSpace(); nIndent = rNumFormat.GetFirstLineOffset(); } - - return bRet; } void SwHTMLParser::GetULSpaceFromContext( sal_uInt16& nUpper, diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx index 034c429f6334..cdb1c78c2b29 100644 --- a/sw/source/filter/html/parcss1.cxx +++ b/sw/source/filter/html/parcss1.cxx @@ -1224,7 +1224,7 @@ CSS1Expression::~CSS1Expression() delete pNext; } -bool CSS1Expression::GetURL( OUString& rURL ) const +void CSS1Expression::GetURL( OUString& rURL ) const { OSL_ENSURE( CSS1_URL==eType, "CSS1-Ausruck ist keine Farbe URL" ); @@ -1234,8 +1234,6 @@ bool CSS1Expression::GetURL( OUString& rURL ) const ')' == aValue[aValue.getLength()-1], "keine gueltiges URL(...)" ); - bool bRet = false; - if( aValue.getLength() > 5 ) { rURL = aValue.copy( 4, aValue.getLength() - 5 ); @@ -1249,11 +1247,7 @@ bool CSS1Expression::GetURL( OUString& rURL ) const rURL = comphelper::string::strip(rURL, aSpace); rURL = comphelper::string::strip(rURL, aSingleQuote); rURL = comphelper::string::strip(rURL, aSpace); - - bRet = true; } - - return bRet; } bool CSS1Expression::GetColor( Color &rColor ) const diff --git a/sw/source/filter/html/parcss1.hxx b/sw/source/filter/html/parcss1.hxx index a1fdba12f0e4..eaea4365e11d 100644 --- a/sw/source/filter/html/parcss1.hxx +++ b/sw/source/filter/html/parcss1.hxx @@ -138,7 +138,7 @@ public: inline sal_Int32 GetSLength() const; sal_Unicode GetOp() const { return cOp; } - bool GetURL( OUString& rURL ) const; + void GetURL( OUString& rURL ) const; bool GetColor( Color &rRGB ) const; void SetNext( CSS1Expression *pNxt ) { pNext = pNxt; } @@ -208,9 +208,9 @@ class CSS1Parser bool IsEOF() const { return bEOF; } - sal_uInt32 IncLineNr() { return ++nlLineNr; } + void IncLineNr() { ++nlLineNr; } sal_uInt32 IncLinePos() { return ++nlLinePos; } - inline sal_uInt32 SetLinePos( sal_uInt32 nlPos ); // inline declaration below + inline void SetLinePos( sal_uInt32 nlPos ); // inline declaration below // parse parts of the grammar void ParseRule(); @@ -262,11 +262,9 @@ public: virtual ~CSS1Parser(); }; -inline sal_uInt32 CSS1Parser::SetLinePos( sal_uInt32 nlPos ) +inline void CSS1Parser::SetLinePos( sal_uInt32 nlPos ) { - sal_uInt32 nlOld = nlLinePos; nlLinePos = nlPos; - return nlOld; } #endif diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index c14956fa11db..641d75aa7cca 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -650,12 +650,11 @@ SvxCSS1MapEntry::SvxCSS1MapEntry( const SfxItemSet& rItemSet, aPropInfo( rProp ) {} -bool SvxCSS1Parser::StyleParsed( const CSS1Selector * /*pSelector*/, +void SvxCSS1Parser::StyleParsed( const CSS1Selector * /*pSelector*/, SfxItemSet& /*rItemSet*/, SvxCSS1PropertyInfo& /*rPropInfo*/ ) { // wie man sieht passiert hier gar nichts - return true; } bool SvxCSS1Parser::SelectorParsed( CSS1Selector *pSelector, bool bFirst ) @@ -844,20 +843,18 @@ bool SvxCSS1Parser::ParseStyleSheet( const OUString& rIn ) return bSuccess; } -bool SvxCSS1Parser::ParseStyleOption( const OUString& rIn, +void SvxCSS1Parser::ParseStyleOption( const OUString& rIn, SfxItemSet& rItemSet, SvxCSS1PropertyInfo& rPropInfo ) { pItemSet = &rItemSet; pPropInfo = &rPropInfo; - bool bSuccess = CSS1Parser::ParseStyleOption( rIn ); + CSS1Parser::ParseStyleOption( rIn ); rItemSet.ClearItem( aItemIds.nDirection ); pItemSet = nullptr; pPropInfo = nullptr; - - return bSuccess; } bool SvxCSS1Parser::GetEnum( const CSS1PropertyEnum *pPropTable, diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx index 56cc280b802f..d1f9f2b8dbd6 100644 --- a/sw/source/filter/html/svxcss1.hxx +++ b/sw/source/filter/html/svxcss1.hxx @@ -220,7 +220,7 @@ protected: // Selektor nicht mehr gespeichert! // Der ItemSet darf entsprechend modifiziert werden! // Die Implementierung dieser Methode gibt false zurueck. - virtual bool StyleParsed( const CSS1Selector *pSelector, + virtual void StyleParsed( const CSS1Selector *pSelector, SfxItemSet& rItemSet, SvxCSS1PropertyInfo& rPropInfo ); @@ -253,7 +253,7 @@ public: // Parsen einer Style-Option. Hier wird einfach nur der Item-Set // gefuellt. - bool ParseStyleOption( const OUString& rIn, SfxItemSet& rItemSet, + void ParseStyleOption( const OUString& rIn, SfxItemSet& rItemSet, SvxCSS1PropertyInfo& rPropInfo ); // Umwandeln eines Strings in den Wert eines Enums diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx index fedcbb395794..428a76b8e8c9 100644 --- a/sw/source/filter/html/swcss1.hxx +++ b/sw/source/filter/html/swcss1.hxx @@ -65,7 +65,7 @@ class SwCSS1Parser : public SvxCSS1Parser void SetLinkCharFormats(); protected: - virtual bool StyleParsed( const CSS1Selector *pSelector, + virtual void StyleParsed( const CSS1Selector *pSelector, SfxItemSet& rItemSet, SvxCSS1PropertyInfo& rPropInfo ) override; diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 376e68b61ed7..6b5f78bd14f4 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -567,7 +567,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient bool GetMarginsFromContext( sal_uInt16 &nLeft, sal_uInt16 &nRight, short& nIndent, bool bIgnoreCurrent=false ) const; - bool GetMarginsFromContextWithNumBul( sal_uInt16 &nLeft, sal_uInt16 &nRight, + void GetMarginsFromContextWithNumBul( sal_uInt16 &nLeft, sal_uInt16 &nRight, short& nIndent ) const; void GetULSpaceFromContext( sal_uInt16 &rUpper, sal_uInt16 &rLower ) const; diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 03d891f57866..bdadc0fea033 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -192,10 +192,6 @@ struct HTMLControl ~HTMLControl(); // operatoren fuer das Sort-Array - bool operator==( const HTMLControl& rCtrl ) const - { - return nNdIdx == rCtrl.nNdIdx; - } bool operator<( const HTMLControl& rCtrl ) const { return nNdIdx < rCtrl.nNdIdx; diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx index d0ea96eac96c..5b128fe42819 100644 --- a/sw/source/filter/ww8/escher.hxx +++ b/sw/source/filter/ww8/escher.hxx @@ -117,7 +117,7 @@ public: SwBasicEscherEx(SvStream* pStrm, WW8Export& rWrt); sal_Int32 WriteGrfFlyFrame(const SwFrameFormat& rFormat, sal_uInt32 nShapeId); //For i120928,to export graphic of bullet - sal_Int32 WriteGrfBullet(const Graphic&); + void WriteGrfBullet(const Graphic&); sal_Int32 WriteOLEFlyFrame(const SwFrameFormat& rFormat, sal_uInt32 nShapeId); void WriteEmptyFlyFrame(const SwFrameFormat& rFormat, sal_uInt32 nShapeId); virtual void WriteFrameExtraData(const SwFrameFormat&); diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index c9d386a34a03..daadc8295d98 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -630,10 +630,10 @@ void RtfSdrExport::EndShape(sal_Int32 nShapeElement) } } -sal_uInt32 RtfSdrExport::AddSdrObject(const SdrObject& rObj) +void RtfSdrExport::AddSdrObject(const SdrObject& rObj) { m_pSdrObject = &rObj; - return EscherEx::AddSdrObject(rObj); + EscherEx::AddSdrObject(rObj); } bool RtfSdrExport::isTextBox(const SwFrameFormat& rFrameFormat) diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx index 926ff7464ae6..15a7fbf7e705 100644 --- a/sw/source/filter/ww8/rtfsdrexport.hxx +++ b/sw/source/filter/ww8/rtfsdrexport.hxx @@ -66,7 +66,7 @@ public: /// Export the sdr object as Sdr. /// /// Call this when you need to export the object as Sdr in RTF. - sal_uInt32 AddSdrObject(const SdrObject& rObj); + void AddSdrObject(const SdrObject& rObj); /// Is this a standalone TextFrame, or used as a TextBox of a shape? bool isTextBox(const SwFrameFormat& rFrameFormat); diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 648e6454fa7f..967b3fc24d44 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -663,12 +663,12 @@ bool RTLDrawingsHack(long &rLeft, long /*nWidth*/, return bRet; } -bool WW8Export::MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight, +void WW8Export::MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight, const ww8::Frame &rFrameFormat) { //Require nasty bidi swap if (FRMDIR_HORI_RIGHT_TOP != m_pDoc->GetTextDirection(rFrameFormat.GetPosition())) - return false; + return; SwTwips nWidth = rRight - rLeft; SwTwips nPageLeft, nPageRight; @@ -696,7 +696,6 @@ bool WW8Export::MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight, } if (bRet) rRight = rLeft + nWidth; - return bRet; } void PlcDrawObj::WritePlc( WW8Export& rWrt ) const @@ -1613,7 +1612,7 @@ sal_uInt32 AddMirrorFlags(sal_uInt32 nFlags, const SwMirrorGrf &rMirror) return nFlags; } //For i120928,this function is added to export graphic of bullet -sal_Int32 SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf) +void SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf) { OpenContainer( ESCHER_SpContainer ); AddShape(ESCHER_ShpInst_PictureFrame, 0xa00,0x401); @@ -1660,8 +1659,6 @@ sal_Int32 SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf) AddAtom(4, ESCHER_ClientAnchor); GetStream().WriteUInt32( 0x80000000 ); CloseContainer(); - - return 0; } sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrameFormat& rFormat, sal_uInt32 nShapeId) @@ -3175,7 +3172,7 @@ bool SwMSConvertControls::ReadOCXStream( tools::SvRef<SotStorage>& rSrc1, return bRes; } -bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrUnoObj& rFormObj) +void SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrUnoObj& rFormObj) { uno::Reference< awt::XControlModel > xControlModel = rFormObj.GetUnoControlModel(); @@ -3201,11 +3198,11 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrUnoObj& rFo tools::SvRef<SotStorage> xOleStg = xObjPool->OpenSotStorage(sStorageName.makeStringAndClear()); if (!xOleStg.Is()) - return false; + return; OUString sUName; if (!WriteOCXStream( mxModel, xOleStg,xControlModel,aSize,sUName)) - return false; + return; sal_uInt8 aSpecOLE[] = { @@ -3227,7 +3224,6 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrUnoObj& rFo aSpecOLE); rWW8Wrt.WriteChar( 0x1 ); rWW8Wrt.OutputField(nullptr, ww::eCONTROL, OUString(), WRITEFIELD_END | WRITEFIELD_CLOSE); - return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index c3d46f15e441..841f1922cdae 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1932,7 +1932,7 @@ bool MSWordExportBase::NearestBookmark( sal_Int32& rNearest, const sal_Int32 nAk return bHasBookmark; } -bool MSWordExportBase::NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nAktPos, bool bNextPositionOnly ) +void MSWordExportBase::NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nAktPos, bool bNextPositionOnly ) { bool bHasAnnotationMark = false; @@ -1960,8 +1960,6 @@ bool MSWordExportBase::NearestAnnotationMark( sal_Int32& rNearest, const sal_Int bHasAnnotationMark = true; } } - - return bHasAnnotationMark; } void MSWordExportBase::GetSortedAnnotationMarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 12d92ea2a2b4..325d051501e8 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -761,7 +761,7 @@ wwFont::wwFont(const OUString &rFamilyName, FontPitch ePitch, FontFamily eFamily maWW8_FFN[5] = static_cast< sal_uInt8 >(msFamilyNm.getLength() + 1); } -bool wwFont::Write(SvStream *pTableStrm) const +void wwFont::Write(SvStream *pTableStrm) const { pTableStrm->Write(maWW8_FFN, sizeof(maWW8_FFN)); // fixed part // ab Ver8 sind folgende beiden Felder eingeschoben, @@ -772,7 +772,6 @@ bool wwFont::Write(SvStream *pTableStrm) const SwWW8Writer::WriteString16(*pTableStrm, msFamilyNm, true); if (mbAlt) SwWW8Writer::WriteString16(*pTableStrm, msAltNm, true); - return true; } void wwFont::WriteDocx( DocxAttributeOutput* rAttrOutput ) const diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 92a2b41f9f8f..dff76a786831 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -142,7 +142,7 @@ public: WW8_WrFkp(ePLCFT ePl, WW8_FC nStartFc); ~WW8_WrFkp(); bool Append( WW8_FC nEndFc, sal_uInt16 nVarLen = 0, const sal_uInt8* pSprms = nullptr ); - bool Combine(); + void Combine(); void Write( SvStream& rStrm, SwWW8WrGrf& rGrf ); bool IsEqualPos(WW8_FC nEndFc) const @@ -864,10 +864,10 @@ void WW8_WrPlc1::Write( SvStream& rStrm ) // Class WW8_WrPlcField for fields -bool WW8_WrPlcField::Write( WW8Export& rWrt ) +void WW8_WrPlcField::Write( WW8Export& rWrt ) { if( WW8_WrPlc1::Count() <= 1 ) - return false; + return; WW8_FC *pfc; sal_Int32 *plc; @@ -919,18 +919,16 @@ bool WW8_WrPlcField::Write( WW8Export& rWrt ) *pfc = nFcStart; *plc = rWrt.pTableStrm->Tell() - nFcStart; } - return true; } -bool WW8_WrMagicTable::Write( WW8Export& rWrt ) +void WW8_WrMagicTable::Write( WW8Export& rWrt ) { if( WW8_WrPlc1::Count() <= 1 ) - return false; + return; sal_uLong nFcStart = rWrt.pTableStrm->Tell(); WW8_WrPlc1::Write( *rWrt.pTableStrm ); rWrt.pFib->fcPlcfTch = nFcStart; rWrt.pFib->lcbPlcfTch = rWrt.pTableStrm->Tell() - nFcStart; - return true; } void WW8_WrMagicTable::Append( WW8_CP nCp, sal_uLong nData) @@ -1244,10 +1242,10 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, sal_uInt16 nVarLen, const sal_uInt8* pSpr return true; } -bool WW8_WrFkp::Combine() +void WW8_WrFkp::Combine() { if( bCombined ) - return false; + return; if( nIMax ) memcpy( pFkp + ( nIMax + 1 ) * 4, pOfs, nIMax * nItemSize ); delete[] pOfs; @@ -1262,8 +1260,6 @@ bool WW8_WrFkp::Combine() for( i = 0, p = (sal_uInt32*)pFkp; i <= nIMax; i++, p++ ) *p = OSL_SWAPDWORD( *p ); #endif // ifdef OSL_BIGENDIAN - - return true; } void WW8_WrFkp::Write( SvStream& rStrm, SwWW8WrGrf& rGrf ) diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index e10075b3c345..5a3f7ab12626 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -304,7 +304,7 @@ sal_uInt8 maWW8_FFN[6]; public: wwFont( const OUString &rFamilyName, FontPitch ePitch, FontFamily eFamily, rtl_TextEncoding eChrSet); - bool Write( SvStream *pTableStram ) const; + void Write( SvStream *pTableStram ) const; void WriteDocx( DocxAttributeOutput* rAttrOutput ) const; void WriteRtf( const RtfAttributeOutput* rAttrOutput ) const; OUString GetFamilyName() const { return OUString( msFamilyNm ); } @@ -608,9 +608,9 @@ public: return m_aFontHelper.GetId(rFont); } /// @overload - sal_uInt16 GetId( const wwFont& rFont) + void GetId( const wwFont& rFont) { - return m_aFontHelper.GetId(rFont); + m_aFontHelper.GetId(rFont); } const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const; @@ -853,8 +853,7 @@ protected: /// Find the nearest annotation mark from the current position. /// - /// Returns false when there is no annotation mark. - bool NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nAktPos, bool bNextPositionOnly ); + void NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nAktPos, bool bNextPositionOnly ); void GetSortedAnnotationMarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ); @@ -1103,7 +1102,7 @@ public: SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const; /// Nasty swap for bidi if necessary - bool MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight, + void MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight, const ww8::Frame &rFrameFormat); void InsUInt16( sal_uInt16 n ) { SwWW8Writer::InsUInt16( *pO, n ); } @@ -1313,7 +1312,7 @@ public: WW8_WrPlcField( sal_uInt16 nStructSz, sal_uInt8 nTTyp ) : WW8_WrPlc1( nStructSz ), nTextTyp( nTTyp ), nResults(0) {} - bool Write( WW8Export& rWrt ); + void Write( WW8Export& rWrt ); void ResultAdded() { ++nResults; } sal_uInt16 ResultCount() const { return nResults; } }; @@ -1326,7 +1325,7 @@ private: public: WW8_WrMagicTable() : WW8_WrPlc1( 4 ) {Append(0,0);} void Append( WW8_CP nCp, sal_uLong nData ); - bool Write( WW8Export& rWrt ); + void Write( WW8Export& rWrt ); }; class GraphicDetails diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 7458609689f6..22f7510738a7 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -985,7 +985,7 @@ OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(OUString &rString, WW8_CP // InsertTxbxText() fuegt fuer TextBoxen und CaptionBoxen den Text // und die Attribute ein -SwFrameFormat* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, +void SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, Size* pObjSiz, sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp, SwFrameFormat* pOldFlyFormat, bool bMakeSdrGrafObj, bool& rbEraseTextObj, bool* pbTestTxbxContainsText, long* pnStartCp, long* pnEndCp, @@ -1191,7 +1191,6 @@ SwFrameFormat* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, m_pStrm->Seek( nOld ); if (pbContainsGraphics) *pbContainsGraphics = bContainsGraphics; - return pFlyFormat; } bool SwWW8ImplReader::TxbxChainContainsRealText(sal_uInt16 nTxBxS, long& rStartCp, diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx index 8af88cd88a03..0c15878f2b8a 100644 --- a/sw/source/filter/ww8/ww8graf.hxx +++ b/sw/source/filter/ww8/ww8graf.hxx @@ -69,7 +69,7 @@ private: sal_uLong GetEscherObjectPos( sal_uLong nSpId, const bool _bInHeaderFooter ); sal_uLong GetDrawingObjectPos(short nWwHeight); - bool InsertObject(SdrObject *pObject, sal_uLong nPos); + void InsertObject(SdrObject *pObject, sal_uLong nPos); public: wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg, const SvxMSDffShapeOrders *pShapeOrders); diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index 23599896699e..fc015f486159 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -228,14 +228,12 @@ sal_uLong wwZOrderer::GetDrawingObjectPos(short nWwHeight) return std::distance(maDrawHeight.begin(), aIter); } -bool wwZOrderer::InsertObject(SdrObject* pObject, sal_uLong nPos) +void wwZOrderer::InsertObject(SdrObject* pObject, sal_uLong nPos) { if (!pObject->IsInserted()) { mpDrawPg->InsertObject(pObject, nPos); - return true; } - return false; } extern void WW8PicShadowToReal( WW8_PIC_SHADOW* pPicS, WW8_PIC* pPic ); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index b605c02a74db..7ec09795fc46 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4814,17 +4814,17 @@ class WW8Customizations WW8Fib mWw8Fib; public: WW8Customizations( SvStream*, WW8Fib& ); - bool Import( SwDocShell* pShell ); + void Import( SwDocShell* pShell ); }; WW8Customizations::WW8Customizations( SvStream* pTableStream, WW8Fib& rFib ) : mpTableStream(pTableStream), mWw8Fib( rFib ) { } -bool WW8Customizations::Import( SwDocShell* pShell ) +void WW8Customizations::Import( SwDocShell* pShell ) { if ( mWw8Fib.lcbCmds == 0 || !IsEightPlus(mWw8Fib.GetFIBVersion()) ) - return false; + return; try { Tcg aTCG; @@ -4835,24 +4835,23 @@ bool WW8Customizations::Import( SwDocShell* pShell ) if ( !bReadResult ) { SAL_WARN("sw.ww8", "** Read of Customization data failed!!!! "); - return false; + return; } #if OSL_DEBUG_LEVEL > 1 aTCG.Print( stderr ); #endif - return aTCG.ImportCustomToolBar( *pShell ); + aTCG.ImportCustomToolBar( *pShell ); } catch(...) { SAL_WARN("sw.ww8", "** Read of Customization data failed!!!! epically"); - return false; } } -bool SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom, const uno::Reference< container::XNameContainer >& xPrjNameCache ) +void SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom, const uno::Reference< container::XNameContainer >& xPrjNameCache ) { if (utl::ConfigManager::IsAvoidConfig()) - return true; + return; SvtPathOptions aPathOpt; OUString aAddinPath = aPathOpt.GetAddinPath(); @@ -4865,7 +4864,6 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom, sGlobalTemplates = xSFA->getFolderContents( aAddinPath, sal_False ); sal_Int32 nEntries = sGlobalTemplates.getLength(); - bool bRes = true; for ( sal_Int32 i=0; i<nEntries; ++i ) { INetURLObject aObj; @@ -4898,7 +4896,6 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom, aGblCustomisations.Import( m_pDocShell ); } } - return bRes; } sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss) diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 425b32388d82..1cda9e6f01c9 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -738,11 +738,11 @@ class SwMSConvertControls: public oox::ole::MSConvertOCXControls { public: SwMSConvertControls( SfxObjectShell *pDSh,SwPaM *pP ); - bool InsertFormula( WW8FormulaControl &rFormula); + void InsertFormula( WW8FormulaControl &rFormula); virtual bool InsertControl(const css::uno::Reference< css::form::XFormComponent >& rFComp, const css::awt::Size& rSize, css::uno::Reference< css::drawing::XShape > *pShape, bool bFloatingCtrl) override; - bool ExportControl(WW8Export &rWrt, const SdrUnoObj& rFormObj); + void ExportControl(WW8Export &rWrt, const SdrUnoObj& rFormObj); bool ReadOCXStream( tools::SvRef<SotStorage>& rSrc1, css::uno::Reference< css::drawing::XShape > *pShapeRef=nullptr, bool bFloatingCtrl=false ); @@ -1583,7 +1583,7 @@ private: sal_uInt16 nSequence); sal_Int32 GetRangeAsDrawingString(OUString& rString, long StartCp, long nEndCp, ManTypes eType); OutlinerParaObject* ImportAsOutliner(OUString &rString, WW8_CP nStartCp, WW8_CP nEndCp, ManTypes eType); - SwFrameFormat* InsertTxbxText(SdrTextObj* pTextObj, Size* pObjSiz, + void InsertTxbxText(SdrTextObj* pTextObj, Size* pObjSiz, sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp, SwFrameFormat* pFlyFormat, bool bMakeSdrGrafObj, bool& rbEraseTextObj, bool* pbTestTxbxContainsText = nullptr, long* pnStartCp = nullptr, @@ -1682,7 +1682,7 @@ private: // #i84783# // determine object attribute "Layout in Table Cell" bool IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const; - bool ReadGlobalTemplateSettings( const OUString& sCreatedFrom, const css::uno::Reference< css::container::XNameContainer >& xPrjNameMap ); + void ReadGlobalTemplateSettings( const OUString& sCreatedFrom, const css::uno::Reference< css::container::XNameContainer >& xPrjNameMap ); SwWW8ImplReader(const SwWW8ImplReader &) = delete; SwWW8ImplReader& operator=(const SwWW8ImplReader&) = delete; public: // really private, but can only be done public diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 27b82a46c63d..cc255220dcc8 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -154,7 +154,7 @@ class WW8TabDesc: private boost::noncopyable void SetTabVertAlign( SwTableBox* pBox, short nWwIdx ); void SetTabDirection( SwTableBox* pBox, short nWwIdx ); void CalcDefaults(); - bool SetPamInCell(short nWwCol, bool bPam); + void SetPamInCell(short nWwCol, bool bPam); void InsertCells( short nIns ); void AdjustNewBand(); @@ -162,7 +162,7 @@ class WW8TabDesc: private boost::noncopyable // single box - maybe used in a merge group // (the merge groups are processed later at once) - SwTableBox* UpdateTableMergeGroup(WW8_TCell& rCell, + void UpdateTableMergeGroup(WW8_TCell& rCell, WW8SelBoxInfo* pActGroup, SwTableBox* pActBox, sal_uInt16 nCol ); void StartMiserableHackForUnsupportedDirection(short nWwCol); void EndMiserableHackForUnsupportedDirection(short nWwCol); @@ -2821,11 +2821,11 @@ void WW8TabDesc::EndMiserableHackForUnsupportedDirection(short nWwCol) pIo->m_pCtrlStck->SetAttr(*pIo->m_pPaM->GetPoint(), RES_CHRATR_ROTATE); } -bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) +void WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) { OSL_ENSURE( pActBand, "pActBand ist 0" ); if (!pActBand) - return false; + return; sal_uInt16 nCol = pActBand->transCell(nWwCol); @@ -2834,7 +2834,7 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) OSL_ENSURE(false, "Actual row bigger than expected." ); if (bPam) MoveOutsideTable(); - return false; + return; } pTabLine = (*pTabLines)[nAktRow]; @@ -2861,7 +2861,7 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) ParkPaM(); } - return false; + return; } pTabBox = (*pTabBoxes)[nCol]; if( !pTabBox->GetSttNd() ) @@ -2869,7 +2869,7 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) OSL_ENSURE(pTabBox->GetSttNd(), "Probleme beim Aufbau der Tabelle"); if (bPam) MoveOutsideTable(); - return false; + return; } if (bPam) { @@ -2927,7 +2927,6 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) StartMiserableHackForUnsupportedDirection(nWwCol); } - return true; } void WW8TabDesc::InsertCells( short nIns ) @@ -3253,7 +3252,7 @@ void WW8TabDesc::TableCellEnd() } // if necessary register the box for the merge group for this column -SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell, +void WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell, WW8SelBoxInfo* pActGroup, SwTableBox* pActBox, sal_uInt16 nCol ) @@ -3291,7 +3290,6 @@ SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell, pResult = (*pTheMergeGroup)[ 0 ]; } } - return pResult; } sal_uInt16 WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED within WW6 UI status line -1 diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index ba0d4f03894a..0f457f9821f7 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2139,26 +2139,23 @@ bool SwWW8ImplReader::ImportFormulaControl(WW8FormulaControl &aFormula, return bRet; } -bool SwMSConvertControls::InsertFormula(WW8FormulaControl &rFormula) +void SwMSConvertControls::InsertFormula(WW8FormulaControl &rFormula) { - bool bRet = false; - const uno::Reference< lang::XMultiServiceFactory > & rServiceFactory = GetServiceFactory(); if(!rServiceFactory.is()) - return false; + return; awt::Size aSz; uno::Reference< form::XFormComponent> xFComp; - if ((bRet = rFormula.Import(rServiceFactory, xFComp, aSz))) + if (rFormula.Import(rServiceFactory, xFComp, aSz)) { uno::Reference <drawing::XShape> xShapeRef; - if ((bRet = InsertControl(xFComp, aSz, &xShapeRef, false))) + if (InsertControl(xFComp, aSz, &xShapeRef, false)) GetShapes()->add(xShapeRef); } - return bRet; } void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 66c18b14fecc..bff8b64d2947 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -2707,14 +2707,12 @@ sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& return pSprms; } -bool WW8PLCFx_Fc_FKP::WW8Fkp::SetIdx(sal_uInt8 nI) +void WW8PLCFx_Fc_FKP::WW8Fkp::SetIdx(sal_uInt8 nI) { if (nI < mnIMax) { mnIdx = nI; - return true; } - return false; } sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(sal_Int32& rLen) const @@ -2735,11 +2733,11 @@ const sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( sal_uInt16 nId ) return aIter.FindSprm(nId); } -bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(sal_uInt16 nId, +void WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult) { if (mnIdx >= mnIMax) - return false; + return; sal_Int32 nLen; sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen ); @@ -2752,7 +2750,6 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(sal_uInt16 nId, rResult.push_back(aIter.GetAktParams()); aIter.advance(); }; - return !rResult.empty(); } void WW8PLCFx::GetSprms( WW8PLCFxDesc* p ) @@ -4180,12 +4177,10 @@ OUString WW8PLCFx_Book::GetUniqueBookmarkName(const OUString &rSuggestedName) return aRet; } -bool WW8PLCFx_Book::MapName(OUString& rName) +void WW8PLCFx_Book::MapName(OUString& rName) { if( !pBook[0] || !pBook[1] ) - return false; - - bool bFound = false; + return; size_t i = 0; while (i < aBookNames.size()) @@ -4193,12 +4188,10 @@ bool WW8PLCFx_Book::MapName(OUString& rName) if (rName.equalsIgnoreAsciiCase(aBookNames[i])) { rName = aBookNames[i]; - bFound = true; break; } ++i; } - return bFound; } const OUString* WW8PLCFx_Book::GetName() const @@ -4970,7 +4963,7 @@ void WW8PLCFMan::GetNoSprmEnd( short nIdx, WW8PLCFManResult* pRes ) const pRes->nSprmId = 0; } -bool WW8PLCFMan::TransferOpenSprms(std::stack<sal_uInt16> &rStack) +void WW8PLCFMan::TransferOpenSprms(std::stack<sal_uInt16> &rStack) { for (sal_uInt16 i = 0; i < nPLCF; ++i) { @@ -4983,7 +4976,6 @@ bool WW8PLCFMan::TransferOpenSprms(std::stack<sal_uInt16> &rStack) p->pIdStack->pop(); } } - return rStack.empty(); } void WW8PLCFMan::AdvSprm(short nIdx, bool bStart) @@ -5239,10 +5231,10 @@ const sal_uInt8* WW8PLCFMan::HasCharSprm( sal_uInt16 nId ) const return static_cast<WW8PLCFx_Cp_FKP*>(pChp->pPLCFx)->HasSprm( nId ); } -bool WW8PLCFMan::HasCharSprm(sal_uInt16 nId, +void WW8PLCFMan::HasCharSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult) const { - return static_cast<WW8PLCFx_Cp_FKP*>(pChp->pPLCFx)->HasSprm(nId, rResult); + static_cast<WW8PLCFx_Cp_FKP*>(pChp->pPLCFx)->HasSprm(nId, rResult); } void WW8PLCFx::Save( WW8PLCFxSave1& rSave ) const @@ -5931,7 +5923,7 @@ WW8Fib::WW8Fib(sal_uInt8 nVer, bool bDot) } -bool WW8Fib::WriteHeader(SvStream& rStrm) +void WW8Fib::WriteHeader(SvStream& rStrm) { bool bVer8 = 8 == nVersion; @@ -6014,10 +6006,9 @@ bool WW8Fib::WriteHeader(SvStream& rStrm) rStrm.Write( pDataPtr, nUnencryptedHdr ); delete[] pDataPtr; - return 0 == rStrm.GetError(); } -bool WW8Fib::Write(SvStream& rStrm) +void WW8Fib::Write(SvStream& rStrm) { bool bVer8 = 8 == nVersion; @@ -6259,7 +6250,6 @@ bool WW8Fib::Write(SvStream& rStrm) rStrm.Write( pDataPtr, fcMin - nUnencryptedHdr ); delete[] pDataPtr; - return 0 == rStrm.GetError(); } rtl_TextEncoding WW8Fib::GetFIBCharset(sal_uInt16 chs, sal_uInt16 nLidLocale) @@ -7145,7 +7135,7 @@ bool WW8PLCF_HdFt::GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rSta return true; } -bool WW8PLCF_HdFt::GetTextPosExact(short nIdx, WW8_CP& rStart, WW8_CP& rLen) +void WW8PLCF_HdFt::GetTextPosExact(short nIdx, WW8_CP& rStart, WW8_CP& rLen) { WW8_CP nEnd; void* pData; @@ -7155,11 +7145,9 @@ bool WW8PLCF_HdFt::GetTextPosExact(short nIdx, WW8_CP& rStart, WW8_CP& rLen) if (nEnd < rStart) { SAL_WARN("sw.ww8", "End " << nEnd << " before Start " << rStart); - return false; + return; } rLen = nEnd - rStart; - - return true; } void WW8PLCF_HdFt::UpdateIndex( sal_uInt8 grpfIhdt ) @@ -7593,7 +7581,7 @@ sal_uInt32 WW8Dop::GetCompatibilityOptions2() const return a32Bit; } -bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const +void WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const { const int nMaxDopLen = 610; sal_uInt32 nLen = 8 == rFib.nVersion ? nMaxDopLen : 84; @@ -7793,7 +7781,6 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const Set_UInt16(pData, a16Bit); } rStrm.Write( aData, nLen ); - return 0 == rStrm.GetError(); } void WW8DopTypography::ReadFromMem(sal_uInt8 *&pData) diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index 0b4c263e4e8e..effdf1a255c5 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -522,7 +522,7 @@ public: void Reset(WW8_FC nPos); long GetFilePos() const { return nFilePos; } sal_uInt8 GetIdx() const { return mnIdx; } - bool SetIdx(sal_uInt8 nI); + void SetIdx(sal_uInt8 nI); bool SeekPos(WW8_FC nFc); WW8_FC Where() const { @@ -546,7 +546,7 @@ public: calls GetLenAndIStdAndSprms()... */ const sal_uInt8* HasSprm( sal_uInt16 nId ); - bool HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult); + void HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult); const wwSprmParser &GetSprmParser() const { return maSprmParser; } }; @@ -751,7 +751,7 @@ public: bool GetIsEnd() const { return nIsEnd != 0; } long GetHandle() const; void SetStatus( sal_uInt16 nIndex, eBookStatus eStat ); - bool MapName(OUString& rName); + void MapName(OUString& rName); OUString GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex); eBookStatus GetStatus() const; OUString GetUniqueBookmarkName(const OUString &rSuggestedName); @@ -965,7 +965,7 @@ public: /* asks, if *current textrun* has an Sprm of this type */ const sal_uInt8* HasCharSprm( sal_uInt16 nId ) const; - bool HasCharSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult) const; + void HasCharSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult) const; WW8PLCFx_Cp_FKP* GetChpPLCF() const { return static_cast<WW8PLCFx_Cp_FKP*>(pChp->pPLCFx); } @@ -974,7 +974,7 @@ public: WW8PLCFx_SEPX* GetSepPLCF() const { return static_cast<WW8PLCFx_SEPX*>(pSep->pPLCFx); } WW8PLCFxDesc* GetPap() const { return pPap; } - bool TransferOpenSprms(std::stack<sal_uInt16> &rStack); + void TransferOpenSprms(std::stack<sal_uInt16> &rStack); void SeekPos( long nNewCp ); void SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const; void RestoreAllPLCFx( const WW8PLCFxSaveAll& rSave ); @@ -1506,8 +1506,8 @@ public: /* unfortunately incorrect, you still need one for the export */ WW8Fib( sal_uInt8 nVersion = 6, bool bDot = false ); - bool WriteHeader(SvStream& rStrm); - bool Write(SvStream& rStrm); + void WriteHeader(SvStream& rStrm); + void Write(SvStream& rStrm); static rtl_TextEncoding GetFIBCharset(sal_uInt16 chs, sal_uInt16 nLidLocale); ww::WordVersion GetFIBVersion() const; bool GetBaseCp(ManTypes nType, WW8_CP * cp) const; @@ -1808,7 +1808,7 @@ public: /* Constructs default DOP suitable for exporting */ WW8Dop(); - bool Write(SvStream& rStrm, WW8Fib& rFib) const; + void Write(SvStream& rStrm, WW8Fib& rFib) const; sal_uInt32 GetCompatibilityOptions() const; void SetCompatibilityOptions(sal_uInt32 a32Bit); @@ -1827,7 +1827,7 @@ private: public: WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop ); bool GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart, WW8_CP& rLen); - bool GetTextPosExact(short nIdx, WW8_CP& rStart, WW8_CP& rLen); + void GetTextPosExact(short nIdx, WW8_CP& rStart, WW8_CP& rLen); void UpdateIndex( sal_uInt8 grpfIhdt ); }; diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index afd645ac8bcc..fddd1572db2c 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -115,11 +115,10 @@ void SwFieldPage::EditNewField( bool bOnlyActivate ) } // insert field -bool SwFieldPage::InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUString& rPar1, +void SwFieldPage::InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUString& rPar1, const OUString& rPar2, sal_uLong nFormatId, sal_Unicode cSeparator, bool bIsAutomaticLanguage) { - bool bRet = false; SwView* pView = GetActiveView(); SwWrtShell *pSh = m_pWrtShell ? m_pWrtShell : pView->GetWrtShellPtr(); @@ -128,7 +127,7 @@ bool SwFieldPage::InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUS SwInsertField_Data aData(nTypeId, nSubType, rPar1, rPar2, nFormatId, nullptr, cSeparator, bIsAutomaticLanguage ); //#i26566# provide parent for SwWrtShell::StartInputFieldDlg aData.m_pParent = &GetTabDialog()->GetOKButton(); - bRet = m_aMgr.InsertField( aData ); + m_aMgr.InsertField( aData ); uno::Reference< frame::XDispatchRecorder > xRecorder = pView->GetViewFrame()->GetBindings().GetRecorder(); @@ -277,8 +276,6 @@ bool SwFieldPage::InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUS pSh->SetUndoNoResetModified(); pSh->EndAllAction(); } - - return bRet; } void SwFieldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2, diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx index 68580af6d0fc..273d9d1b3873 100644 --- a/sw/source/ui/fldui/fldpage.hxx +++ b/sw/source/ui/fldui/fldpage.hxx @@ -69,7 +69,7 @@ protected: inline bool IsFieldEdit() const { return m_bFieldEdit; } // insert field - bool InsertField( sal_uInt16 nTypeId, + void InsertField( sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUString& rPar1, const OUString& rPar2, diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 7696748ff8e1..77b3c3819e73 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -700,7 +700,7 @@ void SwFieldVarPage::UpdateSubType() m_pSelectionLB->SetUpdateMode(true); } -sal_Int32 SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) +void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) { OUString sOldSel; const sal_Int32 nFormatSel = m_pFormatLB->GetSelectEntryPos(); @@ -826,8 +826,6 @@ sal_Int32 SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId) } } } - - return nSize; } // Modify diff --git a/sw/source/ui/fldui/fldvar.hxx b/sw/source/ui/fldui/fldvar.hxx index 853edf348e74..7b7a6ff6b493 100644 --- a/sw/source/ui/fldui/fldvar.hxx +++ b/sw/source/ui/fldui/fldvar.hxx @@ -85,7 +85,7 @@ class SwFieldVarPage : public SwFieldPage void SubTypeHdl(ListBox*); void UpdateSubType(); - sal_Int32 FillFormatLB(sal_uInt16 nTypeId); + void FillFormatLB(sal_uInt16 nTypeId); protected: virtual sal_uInt16 GetGroup() override; diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index fd92482373c6..a0934b060500 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -1446,7 +1446,7 @@ sal_Int32 SwFramePage::FillPosLB(const FrameMap* _pMap, return GetMapPos(_pMap, _rLB); } -sal_uLong SwFramePage::FillRelLB( const FrameMap* _pMap, +void SwFramePage::FillRelLB( const FrameMap* _pMap, const sal_uInt16 _nLBSelPos, const sal_Int16 _nAlign, const sal_Int16 _nRel, @@ -1622,8 +1622,6 @@ sal_uLong SwFramePage::FillRelLB( const FrameMap* _pMap, _rFT.Enable( bEnable ); RelHdl(_rLB); - - return nLBRelations; } sal_Int16 SwFramePage::GetRelation(FrameMap * /*pMap*/, ListBox &rRelationLB) diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index 85f3793715f6..ab8eee3b7f1f 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -46,7 +46,7 @@ class SwVbaBorder : public SwVbaBorder_Base private: uno::Reference< beans::XPropertySet > m_xProps; sal_Int32 m_LineType; - bool setBorderLine( table::BorderLine& rBorderLine ) + void setBorderLine( table::BorderLine& rBorderLine ) { table::TableBorder aTableBorder; m_xProps->getPropertyValue( "TableBorder" ) >>= aTableBorder; @@ -84,10 +84,9 @@ private: // nice to investigate what we can do here break; default: - return false; + return; } m_xProps->setPropertyValue( "TableBorder", uno::makeAny(aTableBorder) ); - return true; } bool getBorderLine( table::BorderLine& rBorderLine ) diff --git a/sw/source/uibase/config/caption.cxx b/sw/source/uibase/config/caption.cxx index bdc771779f88..ab56dbccf3f2 100644 --- a/sw/source/uibase/config/caption.cxx +++ b/sw/source/uibase/config/caption.cxx @@ -65,12 +65,4 @@ InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt ) return *this; } -bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const -{ - return (eObjType == rOpt.eObjType && - aOleId == rOpt.aOleId); // So that identical Ole-IDs can't be added multiple - // times, don't compare against anything else. - -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 075a3c047576..5de1b1272e98 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -178,14 +178,14 @@ OUString SwGlossaryHdl::GetGroupName( size_t nId, OUString* pTitle ) return sRet; } -bool SwGlossaryHdl::NewGroup(OUString &rGrpName, const OUString& rTitle) +void SwGlossaryHdl::NewGroup(OUString &rGrpName, const OUString& rTitle) { if (rGrpName.indexOf(GLOS_DELIM)<0) FindGroupName(rGrpName); - return rStatGlossaries.NewGroupDoc(rGrpName, rTitle); + rStatGlossaries.NewGroupDoc(rGrpName, rTitle); } -bool SwGlossaryHdl::RenameGroup(const OUString& rOld, OUString& rNew, const OUString& rNewTitle) +void SwGlossaryHdl::RenameGroup(const OUString& rOld, OUString& rNew, const OUString& rNewTitle) { bool bRet = false; OUString sOldGroup(rOld); @@ -211,7 +211,6 @@ bool SwGlossaryHdl::RenameGroup(const OUString& rOld, OUString& rNew, const OUSt bRet = rStatGlossaries.RenameGroupDoc(sOldGroup, sNewGroup, rNewTitle); rNew = sNewGroup; } - return bRet; } bool SwGlossaryHdl::CopyOrMove( const OUString& rSourceGroupName, OUString& rSourceShortName, diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 12d04664d4d4..0c4e60e0326a 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1021,10 +1021,10 @@ int SwTransferable::Copy( bool bIsCut ) return nRet; } -int SwTransferable::CalculateAndCopy() +void SwTransferable::CalculateAndCopy() { if(!m_pWrtShell) - return 0; + return; SwWait aWait( *m_pWrtShell->GetView().GetDocShell(), true ); OUString aStr( m_pWrtShell->Calculate() ); @@ -1036,8 +1036,6 @@ int SwTransferable::CalculateAndCopy() AddFormat( SotClipboardFormatId::STRING ); CopyToClipboard( &m_pWrtShell->GetView().GetEditWin() ); - - return 1; } int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, const OUString& rStr ) diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index d376191340fc..08170a20003a 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5589,9 +5589,8 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) /* i#18686 select the object/cursor at the mouse position of the context menu request */ -bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) +void SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) { - bool bRet = false; const Point aDocPos( PixelToLogic( rMousePos ) ); const bool bIsInsideSelectedObj( rSh.IsInsideSelectedObj( aDocPos ) ); //create a synthetic mouse event out of the coordinates @@ -5643,7 +5642,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) aSelection.Adjust(); if(!aCompare.IsLess(aSelection) && !aCompare.IsGreater(aSelection)) { - return false; + return; } } @@ -5653,14 +5652,14 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) { pSdrView->MouseButtonUp( aMEvt, this ); rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(false); - return true; + return; } } rSh.ResetCursorStack(); if ( EnterDrawMode( aMEvt, aDocPos ) ) { - return true; + return; } if ( m_rView.GetDrawFuncPtr() && m_bInsFrame ) { @@ -5689,7 +5688,6 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) if( bSelObj ) { - bRet = true; // in case the frame was deselected in the macro // just the cursor has to be displayed again. if( FrameTypeFlags::NONE == rSh.GetSelFrameType() ) @@ -5707,7 +5705,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rSh.EnterSelFrameMode( &aDocPos ); g_bFrameDrag = true; UpdatePointer( aDocPos ); - return bRet; + return; } } @@ -5729,7 +5727,6 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rSh.UnSelectFrame(); rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); - bRet = true; } bool bSelObj = rSh.SelectObj( aDocPos, nFlag ); @@ -5744,7 +5741,6 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rSh.LeaveSelFrameMode(); m_rView.LeaveDrawCreate(); m_rView.AttrChangedNotify( &rSh ); - bRet = true; } else { @@ -5762,13 +5758,12 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) m_rView.AttrChangedNotify( &rSh ); } UpdatePointer( aDocPos ); - bRet = true; } } else if ( rSh.IsSelFrameMode() && bIsInsideSelectedObj ) { // Object at the mouse cursor is already selected - do nothing - return false; + return; } if ( rSh.IsGCAttr() ) @@ -5787,7 +5782,6 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) // the query against the content form doesn't work!!! SwMvContext aMvContext( &rSh ); rSh.CallSetCursor(&aDocPos, false); - bRet = true; } } if( !bOverURLGrf ) @@ -5800,10 +5794,8 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) if( !rSh.IsFrameSelected() ) rSh.GotoNextFly(); rSh.EnterSelFrameMode(); - bRet = true; } } - return bRet; } static SfxShell* lcl_GetTextShellFromDispatcher( SwView& rView ) diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index a4891b49626d..beab06be0f12 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -420,9 +420,8 @@ sal_uInt16 SwFieldMgr::GetPos(sal_uInt16 nTypeId) } // localise subtypes of a field -bool SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) +void SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) { - bool bRet = false; SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); if(pSh) @@ -519,9 +518,7 @@ bool SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) } } } - bRet = true; } - return bRet; } // determine format diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx index b6d8ed4f12cb..6f7ca97a60b2 100644 --- a/sw/source/uibase/frmdlg/frmmgr.cxx +++ b/sw/source/uibase/frmdlg/frmmgr.cxx @@ -159,7 +159,7 @@ void SwFlyFrameAttrMgr::UpdateFlyFrame() } // insert frame -bool SwFlyFrameAttrMgr::InsertFlyFrame() +void SwFlyFrameAttrMgr::InsertFlyFrame() { m_pOwnSh->StartAllAction(); @@ -173,7 +173,6 @@ bool SwFlyFrameAttrMgr::InsertFlyFrame() FrameNotify(m_pOwnSh, FLY_DRAG_START); } m_pOwnSh->EndAllAction(); - return bRet; } // Insert frames of type eAnchorType. Position and size are being set explicitly. diff --git a/sw/source/uibase/inc/caption.hxx b/sw/source/uibase/inc/caption.hxx index 446114af66eb..b1fa6fdfc789 100644 --- a/sw/source/uibase/inc/caption.hxx +++ b/sw/source/uibase/inc/caption.hxx @@ -85,10 +85,7 @@ public: inline bool& CopyAttributes() { return bCopyAttributes; } inline bool CopyAttributes() const { return bCopyAttributes; } - bool operator==( const InsCaptionOpt& rOpt ) const; InsCaptionOpt& operator= ( const InsCaptionOpt& rOpt ); - inline bool operator< ( const InsCaptionOpt & rObj ) const - { return aOleId < rObj.aOleId; } }; #endif diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index ca22dc77a4e4..33cf7dda958d 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -156,7 +156,7 @@ public: OUString GetEntryLongDescription( SvTreeListEntry* pEntry ) const override; SdrObject* GetDrawingObjectsByContent(const SwContent *pCnt); - bool ToggleToRoot(); + void ToggleToRoot(); void SetRootType(ContentTypeId nType); void Display( bool bActiveView ); void Clear(); diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx index 1313e4e9425a..29f37429b694 100644 --- a/sw/source/uibase/inc/dbinsdlg.hxx +++ b/sw/source/uibase/inc/dbinsdlg.hxx @@ -75,8 +75,6 @@ struct SwInsDBColumn bIsDBFormat(true) {} - bool operator==( const SwInsDBColumn& rCmp ) const - { return sColumn == rCmp.sColumn; } bool operator<( const SwInsDBColumn& rCmp ) const; }; diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index 41db7bff8f97..58f2a489a7e4 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -158,7 +158,7 @@ friend void PageNumNotify( SwViewShell* pVwSh, SotExchangeDest GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj = nullptr ); //select the object/cursor at the mouse position of the context menu request - bool SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ); + void SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ); /* * handler for scrolling on when the mousepointer diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx index 9d9972da4300..d73c78d5be94 100644 --- a/sw/source/uibase/inc/fldmgr.hxx +++ b/sw/source/uibase/inc/fldmgr.hxx @@ -181,7 +181,7 @@ public: static sal_uInt16 GetPos(sal_uInt16 nTypeId); // subtypes to a type - bool GetSubTypes(sal_uInt16 nId, std::vector<OUString>& rToFill); + void GetSubTypes(sal_uInt16 nId, std::vector<OUString>& rToFill); // format to a type sal_uInt16 GetFormatCount(sal_uInt16 nTypeId, bool bIsText, bool bHtmlMode = false) const; diff --git a/sw/source/uibase/inc/frmmgr.hxx b/sw/source/uibase/inc/frmmgr.hxx index 4093edc8bdd1..ad228735759a 100644 --- a/sw/source/uibase/inc/frmmgr.hxx +++ b/sw/source/uibase/inc/frmmgr.hxx @@ -103,7 +103,7 @@ public: void UpdateFlyFrame(); // create new frame - bool InsertFlyFrame(); + void InsertFlyFrame(); void InsertFlyFrame(RndStdIds eAnchorType, const Point &rPos, const Size &rSize, diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx index 03908be3d687..74ab40d760f1 100644 --- a/sw/source/uibase/inc/frmpage.hxx +++ b/sw/source/uibase/inc/frmpage.hxx @@ -160,7 +160,7 @@ class SwFramePage: public SfxTabPage ListBox& _rLB ); // OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous // in their string entries. - sal_uLong FillRelLB( const FrameMap* _pMap, + void FillRelLB( const FrameMap* _pMap, const sal_uInt16 _nLBSelPos, const sal_Int16 _nAlign, const sal_Int16 _nRel, diff --git a/sw/source/uibase/inc/gloshdl.hxx b/sw/source/uibase/inc/gloshdl.hxx index 6d23af7f20e1..333c7886f545 100644 --- a/sw/source/uibase/inc/gloshdl.hxx +++ b/sw/source/uibase/inc/gloshdl.hxx @@ -46,9 +46,9 @@ public: size_t GetGroupCnt() const; OUString GetGroupName( size_t, OUString* pTitle = nullptr ); - bool NewGroup(OUString & rGroupName, const OUString& rTitle); + void NewGroup(OUString & rGroupName, const OUString& rTitle); bool DelGroup(const OUString &); - bool RenameGroup(const OUString& rOld, OUString& rNew, const OUString& rNewTitle); + void RenameGroup(const OUString& rOld, OUString& rNew, const OUString& rNewTitle); void SetCurGroup(const OUString &aGrp, bool bApi = false, bool bAlwaysCreateNew = false); sal_uInt16 GetGlossaryCnt(); diff --git a/sw/source/uibase/inc/gloslst.hxx b/sw/source/uibase/inc/gloslst.hxx index ff440f13050e..0011330c5d30 100644 --- a/sw/source/uibase/inc/gloslst.hxx +++ b/sw/source/uibase/inc/gloslst.hxx @@ -56,7 +56,7 @@ public: SwGlossaryList(); virtual ~SwGlossaryList(); - bool HasLongName(const OUString& rBegin, std::vector<OUString> *pLongNames); + void HasLongName(const OUString& rBegin, std::vector<OUString> *pLongNames); bool GetShortName(const OUString& rLongName, OUString& rShortName, OUString& rGroupName ); diff --git a/sw/source/uibase/inc/olmenu.hxx b/sw/source/uibase/inc/olmenu.hxx index 1aab51e8b3f0..0ebdfed4e3c5 100644 --- a/sw/source/uibase/inc/olmenu.hxx +++ b/sw/source/uibase/inc/olmenu.hxx @@ -78,7 +78,7 @@ public: const css::uno::Sequence< OUString > &rSuggestions, const OUString & rParaText ); - sal_uInt16 Execute( const Rectangle& rPopupPos, vcl::Window* pWin ); + void Execute( const Rectangle& rPopupPos, vcl::Window* pWin ); void Execute( sal_uInt16 nId ); }; diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index cf198c0a4b15..4537551e87b4 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -193,7 +193,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell SAL_DLLPRIVATE void Init(const SwViewOption* = nullptr); SAL_DLLPRIVATE Point AlignToPixel(const Point& rPt) const; - SAL_DLLPRIVATE int _CreateScrollbar( bool bHori); + SAL_DLLPRIVATE void _CreateScrollbar( bool bHori); DECL_DLLPRIVATE_LINK_TYPED(ScrollHdl, ScrollBar*, void); DECL_DLLPRIVATE_LINK_TYPED(EndScrollHdl, ScrollBar*, void); SAL_DLLPRIVATE bool ChgPage( int eMvMode, bool bUpdateScrollbar = true ); diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx index 3055d5b2188d..ccf15226632a 100644 --- a/sw/source/uibase/inc/redlndlg.hxx +++ b/sw/source/uibase/inc/redlndlg.hxx @@ -51,8 +51,6 @@ struct SwRedlineDataParent SvTreeListEntry* pTLBParent; // corresponding TreeListBox entry OUString sComment; // redline comment - inline bool operator==( const SwRedlineDataParent& rObj ) const - { return (pData && pData->GetSeqNo() == rObj.pData->GetSeqNo()); } inline bool operator< ( const SwRedlineDataParent& rObj ) const { return (pData && pData->GetSeqNo() < rObj.pData->GetSeqNo()); } }; diff --git a/sw/source/uibase/inc/srcview.hxx b/sw/source/uibase/inc/srcview.hxx index 96be7e5ea884..1c3e88410142 100644 --- a/sw/source/uibase/inc/srcview.hxx +++ b/sw/source/uibase/inc/srcview.hxx @@ -44,7 +44,7 @@ class SwSrcView: public SfxViewShell virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; protected: - sal_uInt16 StartSearchAndReplace(const SvxSearchItem& rItem, + void StartSearchAndReplace(const SvxSearchItem& rItem, bool bFromStart, bool bApi, bool bRecursive = false); diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx index b5f5c46743d2..8f9bd43b407b 100644 --- a/sw/source/uibase/inc/swdtflvr.hxx +++ b/sw/source/uibase/inc/swdtflvr.hxx @@ -159,7 +159,7 @@ public: int Cut(); int Copy( bool bIsCut = false ); int PrepareForCopy( bool bIsCut = false ); - int CalculateAndCopy(); // special for Calculator + void CalculateAndCopy(); // special for Calculator int CopyGlossary( SwTextBlocks& rGlossary, const OUString& rStr ); // remove the DDE-Link format promise diff --git a/sw/source/uibase/inc/toxmgr.hxx b/sw/source/uibase/inc/toxmgr.hxx index 12cfb78b460e..4a367172659c 100644 --- a/sw/source/uibase/inc/toxmgr.hxx +++ b/sw/source/uibase/inc/toxmgr.hxx @@ -274,7 +274,6 @@ public: void PrevTOXMark(bool bSame=false); // get current TOXmarks - sal_uInt16 GetTOXMarks(); sal_uInt16 GetTOXMarkCount(); SwTOXMark* GetTOXMark(sal_uInt16 nId); SwTOXMark* GetCurTOXMark(); diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index 40f0730d6413..dae1c2cdcf3e 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -104,8 +104,8 @@ public: using SwEditShell::Insert; long CallSetCursor(const Point* pPt, bool bProp) { return (this->*m_fnSetCursor)(pPt, bProp); } - long Drag (const Point* pPt, bool bProp) { return (this->*m_fnDrag)(pPt, bProp); } - long EndDrag (const Point* pPt, bool bProp) { return (this->*m_fnEndDrag)(pPt, bProp); } + void Drag (const Point* pPt, bool bProp) { (this->*m_fnDrag)(pPt, bProp); } + void EndDrag (const Point* pPt, bool bProp) { (this->*m_fnEndDrag)(pPt, bProp); } long KillSelection(const Point* pPt, bool bProp) { return (this->*m_fnKillSel)(pPt, bProp); } // reset all selections @@ -138,7 +138,7 @@ public: void EnterAddMode(); void LeaveAddMode(); - bool ToggleAddMode(); + void ToggleAddMode(); bool IsAddMode() const { return m_bAddMode; } void EnterBlockMode(); @@ -193,7 +193,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); sal_uInt16 nCount, bool bBasicCall, bool bVisual = false ); bool Up ( bool bSelect, sal_uInt16 nCount = 1, bool bBasicCall = false ); bool Down ( bool bSelect, sal_uInt16 nCount = 1, bool bBasicCall = false ); - bool NxtWrd ( bool bSelect = false ) { return SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); } + void NxtWrd ( bool bSelect = false ) { SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); } bool PrvWrd ( bool bSelect = false ) { return SimpleMove( &SwWrtShell::_PrvWrd, bSelect ); } bool LeftMargin ( bool bSelect, bool bBasicCall ); @@ -203,37 +203,37 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); bool EndDoc ( bool bSelect = false ); bool SttNxtPg ( bool bSelect = false ); - bool SttPrvPg ( bool bSelect = false ); - bool EndNxtPg ( bool bSelect = false ); + void SttPrvPg ( bool bSelect = false ); + void EndNxtPg ( bool bSelect = false ); bool EndPrvPg ( bool bSelect = false ); bool SttPg ( bool bSelect = false ); bool EndPg ( bool bSelect = false ); bool SttPara ( bool bSelect = false ); - bool EndPara ( bool bSelect = false ); + void EndPara ( bool bSelect = false ); bool FwdPara ( bool bSelect = false ) { return SimpleMove( &SwWrtShell::_FwdPara, bSelect ); } - bool BwdPara ( bool bSelect = false ) - { return SimpleMove( &SwWrtShell::_BwdPara, bSelect ); } - bool FwdSentence( bool bSelect = false ) - { return SimpleMove( &SwWrtShell::_FwdSentence, bSelect ); } - bool BwdSentence( bool bSelect = false ) - { return SimpleMove( &SwWrtShell::_BwdSentence, bSelect ); } + void BwdPara ( bool bSelect = false ) + { SimpleMove( &SwWrtShell::_BwdPara, bSelect ); } + void FwdSentence( bool bSelect = false ) + { SimpleMove( &SwWrtShell::_FwdSentence, bSelect ); } + void BwdSentence( bool bSelect = false ) + { SimpleMove( &SwWrtShell::_BwdSentence, bSelect ); } // #i20126# Enhanced table selection bool SelectTableRowCol( const Point& rPt, const Point* pEnd = nullptr, bool bRowDrag = false ); - bool SelectTableRow(); - bool SelectTableCol(); - bool SelectTableCell(); + void SelectTableRow(); + void SelectTableCol(); + void SelectTableCell(); bool SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr = nullptr ); // per column jumps - bool StartOfColumn ( bool bSelect = false ); - bool EndOfColumn ( bool bSelect = false ); - bool StartOfNextColumn ( bool bSelect = false ); - bool EndOfNextColumn ( bool bSelect = false ); - bool StartOfPrevColumn ( bool bSelect = false ); - bool EndOfPrevColumn ( bool bSelect = false ); + void StartOfColumn ( bool bSelect = false ); + void EndOfColumn ( bool bSelect = false ); + void StartOfNextColumn ( bool bSelect = false ); + void EndOfNextColumn ( bool bSelect = false ); + void StartOfPrevColumn ( bool bSelect = false ); + void EndOfPrevColumn ( bool bSelect = false ); // set the cursor to page "nPage" at the beginning // additionally to a identically named implementation in crsrsh.hxx @@ -259,19 +259,19 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); void ChgDBData(const SwDBData& SwDBData); // delete - long DelToEndOfLine(); - long DelToStartOfLine(); - long DelLine(); + void DelToEndOfLine(); + void DelToStartOfLine(); + void DelLine(); long DelLeft(); // also deletes the frame or sets the cursor in the frame when bDelFrame == false long DelRight(); - long DelToEndOfPara(); - long DelToStartOfPara(); + void DelToEndOfPara(); + void DelToStartOfPara(); long DelToEndOfSentence(); - long DelToStartOfSentence(); - long DelNxtWord(); - long DelPrvWord(); + void DelToStartOfSentence(); + void DelNxtWord(); + void DelPrvWord(); // checks whether a word selection exists. // According to the rules for intelligent Cut / Paste @@ -395,9 +395,9 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); virtual void DrawSelChanged( ) override; // jump to bookmark and set the "selections-flags" correctly again - bool GotoMark( const ::sw::mark::IMark* const pMark ); + void GotoMark( const ::sw::mark::IMark* const pMark ); bool GotoMark( const ::sw::mark::IMark* const pMark, bool bSelect, bool bStart ); - bool GotoMark( const OUString& rName ); + void GotoMark( const OUString& rName ); bool GoNextBookmark(); // true when there still was one bool GoPrevBookmark(); @@ -407,7 +407,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); // jump to the next / previous hyperlink - inside text and also // on graphics - bool SelectNextPrevHyperlink( bool bNext = true ); + void SelectNextPrevHyperlink( bool bNext = true ); // determine corresponding SwView const SwView& GetView() const { return m_rView; } @@ -461,7 +461,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); void GotoOutline( sal_uInt16 nIdx ); bool GotoOutline( const OUString& rName ); bool GotoRegion( const OUString& rName ); - bool GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType = 0, + void GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType = 0, sal_uInt16 nSeqNo = 0 ); bool GotoNextTOXBase( const OUString* pName = nullptr); bool GotoTable( const OUString& rName ); @@ -580,8 +580,8 @@ private: // after SSize/Move of a frame update; Point is destination. SAL_DLLPRIVATE long UpdateLayoutFrame(const Point *, bool bProp=false ); - SAL_DLLPRIVATE long SttLeaveSelect(const Point *, bool bProp=false ); - SAL_DLLPRIVATE long AddLeaveSelect(const Point *, bool bProp=false ); + SAL_DLLPRIVATE void SttLeaveSelect(const Point *, bool bProp=false ); + SAL_DLLPRIVATE void AddLeaveSelect(const Point *, bool bProp=false ); SAL_DLLPRIVATE long Ignore(const Point *, bool bProp=false ); SAL_DLLPRIVATE void LeaveExtSel() { m_bSelWrd = m_bSelLn = false;} diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx index 6ea8f857f16a..676944636673 100644 --- a/sw/source/uibase/index/toxmgr.cxx +++ b/sw/source/uibase/index/toxmgr.cxx @@ -32,16 +32,10 @@ SwTOXMgr::SwTOXMgr(SwWrtShell* pShell): pSh(pShell) { - GetTOXMarks(); + pSh->GetCurTOXMarks(aCurMarks); SetCurTOXMark(0); } -// handle current TOXMarks -sal_uInt16 SwTOXMgr::GetTOXMarks() -{ - return pSh->GetCurTOXMarks(aCurMarks); -} - SwTOXMark* SwTOXMgr::GetTOXMark(sal_uInt16 nId) { if(!aCurMarks.empty()) diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 66cf66f94b18..6270ab0eb4d3 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -631,11 +631,10 @@ void SwSpellPopup::checkRedline() } } -sal_uInt16 SwSpellPopup::Execute( const Rectangle& rWordPos, vcl::Window* pWin ) +void SwSpellPopup::Execute( const Rectangle& rWordPos, vcl::Window* pWin ) { sal_uInt16 nRet = PopupMenu::Execute(pWin, pWin->LogicToPixel(rWordPos)); Execute( nRet ); - return nRet; } void SwSpellPopup::Execute( sal_uInt16 nId ) diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 48ee1ef7cf09..4c6580017954 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1271,7 +1271,7 @@ SwDocShell* SwPagePreview::GetDocShell() return dynamic_cast<SwDocShell*>( GetViewFrame()->GetObjectShell() ); } -int SwPagePreview::_CreateScrollbar( bool bHori ) +void SwPagePreview::_CreateScrollbar( bool bHori ) { vcl::Window *pMDI = &GetViewFrame()->GetWindow(); VclPtr<SwScrollbar>& ppScrollbar = bHori ? pHScrollbar : pVScrollbar; @@ -1288,7 +1288,6 @@ int SwPagePreview::_CreateScrollbar( bool bHori ) InvalidateBorder(); ppScrollbar->ExtendedShow(); - return 1; } bool SwPagePreview::ChgPage( int eMvMode, bool bUpdateScrollbar ) diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 0c55eedca0a4..2cd03e410fe9 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -566,7 +566,7 @@ void SwSrcView::SetSearchItem( const SvxSearchItem& rItem ) pSearchItem = static_cast<SvxSearchItem*>(rItem.Clone()); } -sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, +void SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, bool bFromStart, bool bApi, bool bRecursive) @@ -658,7 +658,6 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, } } } - return nFound; } sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, SfxPrinterChangeFlags nDiffFlags, bool ) diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 3feb1f98098d..a037afed86db 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1896,7 +1896,7 @@ bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer, // Switch the display to Root -bool SwContentTree::ToggleToRoot() +void SwContentTree::ToggleToRoot() { if(!m_bIsRoot) { @@ -1928,7 +1928,6 @@ bool SwContentTree::ToggleToRoot() } m_pConfig->SetRootType( m_nRootType ); GetParentWindow()->m_aContentToolBox->CheckItem(FN_SHOW_ROOT, m_bIsRoot); - return m_bIsRoot; } // Check if the displayed content is valid. diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx index 1bfd535c8965..3af10c9fd928 100644 --- a/sw/source/uibase/utlui/gloslst.cxx +++ b/sw/source/uibase/utlui/gloslst.cxx @@ -391,7 +391,7 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries) // Give back all (not exceeding FIND_MAX_GLOS) found modules // with matching beginning. -bool SwGlossaryList::HasLongName(const OUString& rBegin, std::vector<OUString> *pLongNames) +void SwGlossaryList::HasLongName(const OUString& rBegin, std::vector<OUString> *pLongNames) { if(!bFilled) Update(); @@ -416,7 +416,6 @@ bool SwGlossaryList::HasLongName(const OUString& rBegin, std::vector<OUString> * } } } - return nFound > 0; } void SwGlossaryList::ClearGroups() diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx index 725d64271180..340b39a696a8 100644 --- a/sw/source/uibase/wrtsh/delete.cxx +++ b/sw/source/uibase/wrtsh/delete.cxx @@ -83,7 +83,7 @@ bool SwWrtShell::TryRemoveIndent() /** Description: Erase the line. */ -long SwWrtShell::DelLine() +void SwWrtShell::DelLine() { SwActContext aActContext(this); ResetCursorStack(); @@ -98,25 +98,22 @@ long SwWrtShell::DelLine() Pop(false); if( nRet ) UpdateAttr(); - return nRet; } -long SwWrtShell::DelToStartOfLine() +void SwWrtShell::DelToStartOfLine() { OpenMark(); SwCursorShell::LeftMargin(); long nRet = Delete(); CloseMark( 0 != nRet ); - return nRet; } -long SwWrtShell::DelToEndOfLine() +void SwWrtShell::DelToEndOfLine() { OpenMark(); SwCursorShell::RightMargin(); long nRet = Delete(); CloseMark( 0 != nRet ); - return 1; } long SwWrtShell::DelLeft() @@ -392,7 +389,7 @@ long SwWrtShell::DelRight() return nRet; } -long SwWrtShell::DelToEndOfPara() +void SwWrtShell::DelToEndOfPara() { SwActContext aActContext(this); ResetCursorStack(); @@ -401,16 +398,15 @@ long SwWrtShell::DelToEndOfPara() if( !MovePara(fnParaCurr,fnParaEnd)) { Pop(false); - return 0; + return; } long nRet = Delete(); Pop(false); if( nRet ) UpdateAttr(); - return nRet; } -long SwWrtShell::DelToStartOfPara() +void SwWrtShell::DelToStartOfPara() { SwActContext aActContext(this); ResetCursorStack(); @@ -419,27 +415,25 @@ long SwWrtShell::DelToStartOfPara() if( !MovePara(fnParaCurr,fnParaStart)) { Pop(false); - return 0; + return; } long nRet = Delete(); Pop(false); if( nRet ) UpdateAttr(); - return nRet; } // All erase operations should work with Find instead with // Nxt-/PrvDelim, because the latter works with Wrap Around // -- that's probably not wished. -long SwWrtShell::DelToStartOfSentence() +void SwWrtShell::DelToStartOfSentence() { if(IsStartOfDoc()) - return 0; + return; OpenMark(); long nRet = _BwdSentence() ? Delete() : 0; CloseMark( 0 != nRet ); - return nRet; } long SwWrtShell::DelToEndOfSentence() @@ -476,10 +470,10 @@ long SwWrtShell::DelToEndOfSentence() return nRet; } -long SwWrtShell::DelNxtWord() +void SwWrtShell::DelNxtWord() { if(IsEndOfDoc()) - return 0; + return; SwActContext aActContext(this); ResetCursorStack(); EnterStdMode(); @@ -497,13 +491,12 @@ long SwWrtShell::DelNxtWord() else SwapPam(); ClearMark(); - return nRet; } -long SwWrtShell::DelPrvWord() +void SwWrtShell::DelPrvWord() { if(IsStartOfDoc()) - return 0; + return; SwActContext aActContext(this); ResetCursorStack(); EnterStdMode(); @@ -522,7 +515,6 @@ long SwWrtShell::DelPrvWord() else SwapPam(); ClearMark(); - return nRet; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index e1070bb27adf..5a663a0ecb03 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -309,16 +309,16 @@ bool SwWrtShell::SttNxtPg( bool bSelect ) return MovePage( fnPageNext, fnPageStart ); } -bool SwWrtShell::SttPrvPg( bool bSelect ) +void SwWrtShell::SttPrvPg( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect ); - return MovePage( fnPagePrev, fnPageStart ); + MovePage( fnPagePrev, fnPageStart ); } -bool SwWrtShell::EndNxtPg( bool bSelect ) +void SwWrtShell::EndNxtPg( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect ); - return MovePage( fnPageNext, fnPageEnd ); + MovePage( fnPageNext, fnPageEnd ); } bool SwWrtShell::EndPrvPg( bool bSelect ) @@ -345,50 +345,50 @@ bool SwWrtShell::SttPara( bool bSelect ) return MovePara( fnParaCurr, fnParaStart ); } -bool SwWrtShell::EndPara( bool bSelect ) +void SwWrtShell::EndPara( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect ); - return MovePara(fnParaCurr,fnParaEnd); + MovePara(fnParaCurr,fnParaEnd); } // Column-by-jumping. // SSelection with or without // returns success or failure -bool SwWrtShell::StartOfColumn( bool bSelect ) +void SwWrtShell::StartOfColumn( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect); - return MoveColumn(fnColumnCurr, fnColumnStart); + MoveColumn(fnColumnCurr, fnColumnStart); } -bool SwWrtShell::EndOfColumn( bool bSelect ) +void SwWrtShell::EndOfColumn( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect); - return MoveColumn(fnColumnCurr, fnColumnEnd); + MoveColumn(fnColumnCurr, fnColumnEnd); } -bool SwWrtShell::StartOfNextColumn( bool bSelect ) +void SwWrtShell::StartOfNextColumn( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect); - return MoveColumn( fnColumnNext, fnColumnStart); + MoveColumn( fnColumnNext, fnColumnStart); } -bool SwWrtShell::EndOfNextColumn( bool bSelect ) +void SwWrtShell::EndOfNextColumn( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect); - return MoveColumn(fnColumnNext, fnColumnEnd); + MoveColumn(fnColumnNext, fnColumnEnd); } -bool SwWrtShell::StartOfPrevColumn( bool bSelect ) +void SwWrtShell::StartOfPrevColumn( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect); - return MoveColumn(fnColumnPrev, fnColumnStart); + MoveColumn(fnColumnPrev, fnColumnStart); } -bool SwWrtShell::EndOfPrevColumn( bool bSelect ) +void SwWrtShell::EndOfPrevColumn( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect); - return MoveColumn(fnColumnPrev, fnColumnEnd); + MoveColumn(fnColumnPrev, fnColumnEnd); } bool SwWrtShell::PushCursor(SwTwips lOffset, bool bSelect) @@ -629,14 +629,13 @@ bool SwWrtShell::GotoRegion( const OUString& rName ) return bRet; } -bool SwWrtShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType, +void SwWrtShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo ) { SwPosition aPos = *GetCursor()->GetPoint(); bool bRet = SwCursorShell::GotoRefMark(rRefMark, nSubType, nSeqNo); if (bRet) m_aNavigationMgr.addEntry(aPos); - return bRet; } bool SwWrtShell::GotoNextTOXBase( const OUString* pName ) diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index 805b075a05d4..3226dd6ff316 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -576,23 +576,21 @@ void SwWrtShell::LeaveExtMode() // End of a selection; if the selection is empty, // ClearMark(). -long SwWrtShell::SttLeaveSelect(const Point *, bool ) +void SwWrtShell::SttLeaveSelect(const Point *, bool ) { if(SwCursorShell::HasSelection() && !IsSelTableCells() && m_bClearMark) { - return 0; + return; } ClearMark(); - return 1; } // Leaving of the selection mode in additional mode -long SwWrtShell::AddLeaveSelect(const Point *, bool ) +void SwWrtShell::AddLeaveSelect(const Point *, bool ) { if(IsTableMode()) LeaveAddMode(); else if(SwCursorShell::HasSelection()) CreateCursor(); - return 1; } // Additional Mode @@ -731,11 +729,10 @@ long SwWrtShell::UpdateLayoutFrame(const Point *pPt, bool ) // Handler for toggling the modes. Returns back the old mode. -bool SwWrtShell::ToggleAddMode() +void SwWrtShell::ToggleAddMode() { m_bAddMode ? LeaveAddMode(): EnterAddMode(); Invalidate(); - return !m_bAddMode; } bool SwWrtShell::ToggleBlockMode() @@ -816,37 +813,31 @@ bool SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR // Description: Selection of a table line or column -bool SwWrtShell::SelectTableRow() +void SwWrtShell::SelectTableRow() { if ( SelTableRow() ) { m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; - return true; } - return false; } -bool SwWrtShell::SelectTableCol() +void SwWrtShell::SelectTableCol() { if ( SelTableCol() ) { m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; - return true; } - return false; } -bool SwWrtShell::SelectTableCell() +void SwWrtShell::SelectTableCell() { if ( SelTableBox() ) { m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; - return true; } - return false; } // Description: Check if a word selection is present. @@ -921,7 +912,7 @@ int SwWrtShell::IntelligentCut(int nSelection, bool bCut) // jump to the next / previous hyperlink - inside text and also // on graphics -bool SwWrtShell::SelectNextPrevHyperlink( bool bNext ) +void SwWrtShell::SelectNextPrevHyperlink( bool bNext ) { StartAction(); bool bRet = SwCursorShell::SelectNxtPrvHyperlink( bNext ); @@ -964,8 +955,6 @@ bool SwWrtShell::SelectNextPrevHyperlink( bool bNext ) if( bCreateXSelection ) SwTransferable::CreateSelection( *this ); - - return bRet; } // For the preservation of the selection the cursor will be moved left diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx index 49eb3c51c377..2192a32bbd4d 100644 --- a/sw/source/uibase/wrtsh/wrtsh3.cxx +++ b/sw/source/uibase/wrtsh/wrtsh3.cxx @@ -127,16 +127,17 @@ void SwWrtShell::DrawSelChanged( ) g_bNoInterrupt = bOldVal; } -bool SwWrtShell::GotoMark( const OUString& rName ) +void SwWrtShell::GotoMark( const OUString& rName ) { IDocumentMarkAccess::const_iterator_t ppMark = getIDocumentMarkAccess()->findMark( rName ); - if(ppMark == getIDocumentMarkAccess()->getAllMarksEnd()) return false; - return MoveBookMark( BOOKMARK_INDEX, ppMark->get() ); + if (ppMark == getIDocumentMarkAccess()->getAllMarksEnd()) + return; + MoveBookMark( BOOKMARK_INDEX, ppMark->get() ); } -bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark ) +void SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark ) { - return MoveBookMark( BOOKMARK_INDEX, pMark ); + MoveBookMark( BOOKMARK_INDEX, pMark ); } bool SwWrtShell::GoNextBookmark() |