summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-30 15:34:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-31 12:42:50 +0200
commit714fe0fed88d01bac1a658fbb2de193a7704e24b (patch)
tree48d669b9555ff78dba0c87e9206db030e39cb499
parentcb9ce13d82839a7ce0db3bd113e70bbcc125076a (diff)
loplugin:returnconstant in svx
Change-Id: I0cc0c32afa0d735738c6744873f3518a2763821e Reviewed-on: https://gerrit.libreoffice.org/58334 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--cui/source/tabpages/numfmt.cxx20
-rw-r--r--include/svx/numfmtsh.hxx2
-rw-r--r--include/svx/svdcrtv.hxx4
-rw-r--r--include/svx/svdedtv.hxx6
-rw-r--r--include/svx/svdedxv.hxx6
-rw-r--r--include/svx/svdmrkv.hxx10
-rw-r--r--include/svx/svdpntv.hxx6
-rw-r--r--include/svx/svdview.hxx3
-rw-r--r--sd/source/ui/view/sdview.cxx3
-rw-r--r--svx/source/items/numfmtsh.cxx3
-rw-r--r--svx/source/svdraw/svdcrtv.cxx10
-rw-r--r--svx/source/svdraw/svdedtv1.cxx15
-rw-r--r--svx/source/svdraw/svdedxv.cxx26
-rw-r--r--svx/source/svdraw/svdmrkv.cxx4
-rw-r--r--svx/source/svdraw/svdmrkv1.cxx6
-rw-r--r--svx/source/svdraw/svdopath.cxx8
-rw-r--r--svx/source/svdraw/svdpntv.cxx9
-rw-r--r--svx/source/svdraw/svdview.cxx16
-rw-r--r--sw/source/core/frmedt/feshview.cxx5
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx4
20 files changed, 79 insertions, 87 deletions
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 2aa9505507e6..339451961612 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1387,11 +1387,12 @@ bool SvxNumberFormatTabPage::Click_Impl(PushButton* pIB)
if(bOneAreaFlag && (nFixedCategory!=nCatLbSelPos))
{
if(bAdded) aEntryList.clear();
- bDeleted = pNumFmtShell->RemoveFormat( aFormat,
- nCatLbSelPos,
- nFmtLbSelPos,
- a2EntryList);
- if(bDeleted) a2EntryList.clear();
+ pNumFmtShell->RemoveFormat( aFormat,
+ nCatLbSelPos,
+ nFmtLbSelPos,
+ a2EntryList);
+ bDeleted = true;
+ a2EntryList.clear();
m_pEdFormat->GrabFocus();
m_pEdFormat->SetSelection( Selection( 0, SELECTION_MAX ) );
nReturn |= nReturnOneArea;
@@ -1444,10 +1445,11 @@ bool SvxNumberFormatTabPage::Click_Impl(PushButton* pIB)
sal_uInt16 nCatLbSelPos = 0;
short nFmtLbSelPos = SELPOS_NONE;
- bDeleted = pNumFmtShell->RemoveFormat( aFormat,
- nCatLbSelPos,
- nFmtLbSelPos,
- aEntryList );
+ pNumFmtShell->RemoveFormat( aFormat,
+ nCatLbSelPos,
+ nFmtLbSelPos,
+ aEntryList );
+ bDeleted = true;
m_pEdComment->SetText(m_pLbCategory->GetEntry(1));
if ( bDeleted )
diff --git a/include/svx/numfmtsh.hxx b/include/svx/numfmtsh.hxx
index da26e9cbf707..8c1731cb1f73 100644
--- a/include/svx/numfmtsh.hxx
+++ b/include/svx/numfmtsh.hxx
@@ -109,7 +109,7 @@ public:
short& rFmtSelPos,
std::vector<OUString>& rFmtEntries );
- bool RemoveFormat( const OUString& rFormat,
+ void RemoveFormat( const OUString& rFormat,
sal_uInt16& rCatLbSelPos,
short& rFmtSelPos,
std::vector<OUString>& rFmtEntries );
diff --git a/include/svx/svdcrtv.hxx b/include/svx/svdcrtv.hxx
index add5d962ed59..9b6a08e8f93b 100644
--- a/include/svx/svdcrtv.hxx
+++ b/include/svx/svdcrtv.hxx
@@ -152,11 +152,11 @@ public:
// Attributes of the object that is in the process of being created
/* new interface src537 */
- bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
+ void GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(bool& rOk) const;
- bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
+ void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
};
#endif // INCLUDED_SVX_SVDCRTV_HXX
diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index a44e4935021f..27eb85e8c607 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -308,11 +308,11 @@ public:
void SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
/* new interface src537 */
- bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
+ void GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
- bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
+ void SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(bool& rOk) const;
- bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
+ void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
// Group all marked objects to a single group.
// Subsequently mark the new group . If the group spawns multiple
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index b7f5eb31caae..bacb8db8f8ab 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -244,11 +244,11 @@ public:
virtual SvtScriptType GetScriptType() const;
/* new interface src537 */
- bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
+ void GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(bool& rOk) const;
- bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
+ void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
// Intern: at mounting new OutlinerView...
virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow) override;
@@ -259,7 +259,7 @@ public:
// Object MacroMode (e.g. rect as button or sth. like that):
- bool BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin);
+ void BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin);
void BegMacroObj(const Point& rPnt, SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin) { BegMacroObj(rPnt,-2,pObj,pPV,pWin); }
void MovMacroObj(const Point& rPnt);
void BrkMacroObj();
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index 36e80416087b..ff3c5bff5d1d 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -189,7 +189,7 @@ public:
bool IsMarking() const { return IsMarkObj() || IsMarkPoints() || IsMarkGluePoints(); }
// Marking objects by drawing of a selection frame
- bool BegMarkObj(const Point& rPnt, bool bUnmark = false);
+ void BegMarkObj(const Point& rPnt, bool bUnmark = false);
void MovMarkObj(const Point& rPnt);
bool EndMarkObj();
void BrkMarkObj();
@@ -328,8 +328,8 @@ public:
// Selects the first marked point (P1) which is hit by rPnt
// and from there it searches the first non-marked point(P2).
// In case of success the marking of
- // P1 is deleted, a mark is set at P2 and true is returned.
- bool MarkNextPoint();
+ // P1 is deleted, a mark is set at P2.
+ void MarkNextPoint();
// Search for the number of the suitable handle. In case of empty search result,
// SAL_MAX_SIZE is returned.
@@ -378,8 +378,8 @@ public:
// Selects the first marked point (P1) which is hit by rPnt
// and from there it searches the first non-marked point(P2).
// In case of success the marking of
- // P1 is deleted, a mark is set at P2 and true is returned.
- bool MarkNextGluePoint();
+ // P1 is deleted, a mark is set at P2.
+ void MarkNextGluePoint();
// Draw a selection frame for glue point marking.
// This routine will just be started in case that HasMarkablePoints() returns sal_True.
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index d6822dd54819..f52276f27809 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -468,11 +468,11 @@ public:
virtual bool MouseMove(const MouseEvent& /*rMEvt*/, vcl::Window* /*pWin*/) { return false; }
virtual bool Command(const CommandEvent& /*rCEvt*/, vcl::Window* /*pWin*/) { return false; }
- bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
+ void GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const;
- bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
+ void SetAttributes(const SfxItemSet& rSet, bool bReplaceAll);
SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(bool& rOk) const;
- bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
+ void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
virtual void MakeVisible(const tools::Rectangle& rRect, vcl::Window& rWin);
diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx
index 2bab7eaed548..bab4ecd10d90 100644
--- a/include/svx/svdview.hxx
+++ b/include/svx/svdview.hxx
@@ -190,10 +190,9 @@ public:
virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll=false) { return SdrCreateView::SetAttributes(rSet,bReplaceAll); }
- bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr) { return SdrCreateView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr); }
/* new interface src537 */
- bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr=false) const;
+ void GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr=false) const;
SfxStyleSheet* GetStyleSheet() const;
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index ca98672ef38c..4ca098bde258 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -599,7 +599,8 @@ void View::SelectAll()
bool View::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
{
// forward to SdrView
- return FmFormView::SetStyleSheet(pStyleSheet, bDontRemoveHardAttr);
+ FmFormView::SetStyleSheet(pStyleSheet, bDontRemoveHardAttr);
+ return true;
}
/**
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index 211347a60e53..e2b7faf2ece7 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -318,7 +318,7 @@ bool SvxNumberFormatShell::AddFormat( OUString& rFormat, sal_Int32& rErrPos,
}
-bool SvxNumberFormatShell::RemoveFormat( const OUString& rFormat,
+void SvxNumberFormatShell::RemoveFormat( const OUString& rFormat,
sal_uInt16& rCatLbSelPos,
short& rFmtSelPos,
std::vector<OUString>& rFmtEntries )
@@ -349,7 +349,6 @@ bool SvxNumberFormatShell::RemoveFormat( const OUString& rFormat,
CategoryToPos_Impl( nCurCategory, rCatLbSelPos );
rFmtSelPos = FillEntryList_Impl( rFmtEntries );
}
- return true;
}
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 070d20dec458..fac7c2a28245 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -842,16 +842,15 @@ void SdrCreateView::HideCreateObj()
}
-bool SdrCreateView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
+void SdrCreateView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
{
if(pCurrentCreate)
{
rTargetSet.Put(pCurrentCreate->GetMergedItemSet());
- return true;
}
else
{
- return SdrDragView::GetAttributes(rTargetSet, bOnlyHardAttr);
+ SdrDragView::GetAttributes(rTargetSet, bOnlyHardAttr);
}
}
@@ -881,16 +880,15 @@ SfxStyleSheet* SdrCreateView::GetStyleSheet() const
}
}
-bool SdrCreateView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
+void SdrCreateView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
{
if (pCurrentCreate!=nullptr)
{
pCurrentCreate->SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
- return true;
}
else
{
- return SdrDragView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
+ SdrDragView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
}
}
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index e8bb92aba1c0..9b1a5e269225 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1211,26 +1211,24 @@ void SdrEditView::SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, bool bDontRe
}
-bool SdrEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
+void SdrEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
{
if(GetMarkedObjectCount())
{
rTargetSet.Put(GetAttrFromMarked(bOnlyHardAttr), false);
- return true;
}
else
{
- return SdrMarkView::GetAttributes(rTargetSet, bOnlyHardAttr);
+ SdrMarkView::GetAttributes(rTargetSet, bOnlyHardAttr);
}
}
-bool SdrEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
+void SdrEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
{
if (GetMarkedObjectCount()!=0) {
SetAttrToMarked(rSet,bReplaceAll);
- return true;
} else {
- return SdrMarkView::SetAttributes(rSet,bReplaceAll);
+ SdrMarkView::SetAttributes(rSet,bReplaceAll);
}
}
@@ -1243,13 +1241,12 @@ SfxStyleSheet* SdrEditView::GetStyleSheet() const
}
}
-bool SdrEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
+void SdrEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
{
if (GetMarkedObjectCount()!=0) {
SetStyleSheetToMarked(pStyleSheet,bDontRemoveHardAttr);
- return true;
} else {
- return SdrMarkView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
+ SdrMarkView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
}
}
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 98752ab56d54..5dc1a3473135 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1123,9 +1123,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
// remember old cursor
if (pTextEditOutliner->GetViewCount()!=0)
{
- OutlinerView* pTmpOLV=pTextEditOutliner->RemoveView(static_cast<size_t>(0));
- if(pTmpOLV!=nullptr && pTmpOLV!=pGivenOutlinerView)
- delete pTmpOLV;
+ pTextEditOutliner->RemoveView(static_cast<size_t>(0));
}
// Determine EditArea via TakeTextEditArea.
@@ -1995,11 +1993,11 @@ SvtScriptType SdrObjEditView::GetScriptType() const
return nScriptType;
}
-bool SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
+void SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
{
if( mxSelectionController.is() )
if( mxSelectionController->GetAttributes( rTargetSet, bOnlyHardAttr ) )
- return true;
+ return;
if(IsTextEdit())
{
@@ -2023,12 +2021,10 @@ bool SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) c
{
MergeNotPersistAttrFromMarked(rTargetSet);
}
-
- return true;
}
else
{
- return SdrGlueEditView::GetAttributes(rTargetSet, bOnlyHardAttr);
+ SdrGlueEditView::GetAttributes(rTargetSet, bOnlyHardAttr);
}
}
@@ -2047,7 +2043,8 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
if( !bRet )
{
- bRet=SdrGlueEditView::SetAttributes(*pSet,bReplaceAll);
+ SdrGlueEditView::SetAttributes(*pSet,bReplaceAll);
+ bRet=true;
}
}
else
@@ -2196,12 +2193,12 @@ SfxStyleSheet* SdrObjEditView::GetStyleSheet() const
return pSheet;
}
-bool SdrObjEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
+void SdrObjEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
{
if( mxSelectionController.is() )
{
if( mxSelectionController->SetStyleSheet( pStyleSheet, bDontRemoveHardAttr ) )
- return true;
+ return;
}
// if we are currently in edit mode we must also set the stylesheet
@@ -2217,7 +2214,7 @@ bool SdrObjEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveH
}
}
- return SdrGlueEditView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
+ SdrGlueEditView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr);
}
@@ -2242,7 +2239,7 @@ void SdrObjEditView::DeleteWindowFromPaintView(OutputDevice* pOldWin)
i--;
OutlinerView* pOLV=pTextEditOutliner->GetView(i);
if (pOLV && pOLV->GetWindow()==static_cast<vcl::Window*>(pOldWin)) {
- delete pTextEditOutliner->RemoveView(i);
+ pTextEditOutliner->RemoveView(i);
}
}
}
@@ -2259,7 +2256,7 @@ bool SdrObjEditView::IsTextEditInSelectionMode() const
// MacroMode
-bool SdrObjEditView::BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin)
+void SdrObjEditView::BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin)
{
BrkMacroObj();
if (pObj!=nullptr && pPV!=nullptr && pWin!=nullptr && pObj->HasMacro()) {
@@ -2272,7 +2269,6 @@ bool SdrObjEditView::BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj,
aMacroDownPos=rPnt;
MovMacroObj(rPnt);
}
- return false;
}
void SdrObjEditView::ImpMacroUp(const Point& rUpPos)
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 2198ee4df002..c4eca039c19d 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -344,7 +344,7 @@ void SdrMarkView::HideSdrPage()
}
-bool SdrMarkView::BegMarkObj(const Point& rPnt, bool bUnmark)
+void SdrMarkView::BegMarkObj(const Point& rPnt, bool bUnmark)
{
BrkAction();
@@ -355,8 +355,6 @@ bool SdrMarkView::BegMarkObj(const Point& rPnt, bool bUnmark)
maDragStat.Reset(rPnt);
maDragStat.NextPoint();
maDragStat.SetMinMove(mnMinMovLog);
-
- return true;
}
void SdrMarkView::MovMarkObj(const Point& rPnt)
diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx
index 52dcb79eb181..335368c4ed65 100644
--- a/svx/source/svdraw/svdmrkv1.cxx
+++ b/svx/source/svdraw/svdmrkv1.cxx
@@ -249,11 +249,10 @@ bool SdrMarkView::MarkPoints(const tools::Rectangle* pRect, bool bUnmark)
return bChgd;
}
-bool SdrMarkView::MarkNextPoint()
+void SdrMarkView::MarkNextPoint()
{
ForceUndirtyMrkPnt();
SortMarkedObjects();
- return false;
}
const tools::Rectangle& SdrMarkView::GetMarkedPointsRect() const
@@ -553,11 +552,10 @@ SdrHdl* SdrMarkView::GetGluePointHdl(const SdrObject* pObj, sal_uInt16 nId) cons
return nullptr;
}
-bool SdrMarkView::MarkNextGluePoint()
+void SdrMarkView::MarkNextGluePoint()
{
ForceUndirtyMrkPnt();
SortMarkedObjects();
- return false;
}
const tools::Rectangle& SdrMarkView::GetMarkedGluePointsRect() const
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index d98c9d6a21fd..ec60bc5a857a 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -511,7 +511,7 @@ public:
basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const;
// create stuff
- bool BegCreate(SdrDragStat& rStat);
+ void BegCreate(SdrDragStat& rStat);
bool MovCreate(SdrDragStat& rStat);
bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd);
bool BckCreate(SdrDragStat const & rStat);
@@ -1223,7 +1223,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra
return aRetval.getB2DPolyPolygon();
}
-bool ImpPathForDragAndCreate::BegCreate(SdrDragStat& rStat)
+void ImpPathForDragAndCreate::BegCreate(SdrDragStat& rStat)
{
bool bFreeHand(IsFreeHand(meObjectKind));
rStat.SetNoSnap(bFreeHand);
@@ -1245,7 +1245,6 @@ bool ImpPathForDragAndCreate::BegCreate(SdrDragStat& rStat)
pU->eStartKind=meObjectKind;
pU->eCurrentKind=meObjectKind;
rStat.SetUser(std::move(pU));
- return true;
}
bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat)
@@ -2192,7 +2191,8 @@ basegfx::B2DPolyPolygon SdrPathObj::getSpecialDragPoly(const SdrDragStat& rDrag)
bool SdrPathObj::BegCreate(SdrDragStat& rStat)
{
mpDAC.reset();
- return impGetDAC().BegCreate(rStat);
+ impGetDAC().BegCreate(rStat);
+ return true;
}
bool SdrPathObj::MovCreate(SdrDragStat& rStat)
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index b5e767c8d6f7..e40fe93eed7f 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -1059,7 +1059,7 @@ void SdrPaintView::SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRe
#endif
}
-bool SdrPaintView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
+void SdrPaintView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
{
if(bOnlyHardAttr || !mpDefaultStyleSheet)
{
@@ -1072,13 +1072,11 @@ bool SdrPaintView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) con
rTargetSet.Put(maDefaultAttr, false);
}
MergeNotPersistDefaultAttr(rTargetSet);
- return true;
}
-bool SdrPaintView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
+void SdrPaintView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
{
SetDefaultAttr(rSet,bReplaceAll);
- return true;
}
SfxStyleSheet* SdrPaintView::GetStyleSheet() const
@@ -1086,10 +1084,9 @@ SfxStyleSheet* SdrPaintView::GetStyleSheet() const
return mpDefaultStyleSheet;
}
-bool SdrPaintView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
+void SdrPaintView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
{
SetDefaultStyleSheet(pStyleSheet,bDontRemoveHardAttr);
- return true;
}
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 47e6af06b353..5022243ff455 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -248,9 +248,9 @@ bool SdrView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
return bRet;
}
-bool SdrView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
+void SdrView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
{
- return SdrCreateView::GetAttributes(rTargetSet, bOnlyHardAttr);
+ SdrCreateView::GetAttributes(rTargetSet, bOnlyHardAttr);
}
SfxStyleSheet* SdrView::GetStyleSheet() const
@@ -864,7 +864,8 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
case SdrEventKind::MarkPoint: { // + (if applicable) BegDrag
if (!rVEvt.bAddMark) UnmarkAllPoints();
if (rVEvt.bPrevNextMark) {
- bRet=MarkNextPoint();
+ MarkNextPoint();
+ bRet=false;
} else {
bRet=MarkPoint(*rVEvt.pHdl,rVEvt.bUnmark);
}
@@ -876,7 +877,8 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
case SdrEventKind::MarkGluePoint: { // + (if applicable) BegDrag
if (!rVEvt.bAddMark) UnmarkAllGluePoints();
if (rVEvt.bPrevNextMark) {
- bRet=MarkNextGluePoint();
+ MarkNextGluePoint();
+ bRet=false;
} else {
bRet=MarkGluePoint(rVEvt.pObj,rVEvt.nGlueId,rVEvt.bUnmark);
}
@@ -905,7 +907,8 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
} else bRet=BegCreateObj(aLogicPos);
} break;
case SdrEventKind::BeginMacroObj: {
- bRet=BegMacroObj(aLogicPos,mnHitTolLog,rVEvt.pObj,rVEvt.pPV,static_cast<vcl::Window*>(mpActualOutDev.get()));
+ BegMacroObj(aLogicPos,mnHitTolLog,rVEvt.pObj,rVEvt.pPV,static_cast<vcl::Window*>(mpActualOutDev.get()));
+ bRet=false;
} break;
case SdrEventKind::BeginTextEdit: {
if (!IsObjMarked(rVEvt.pObj)) {
@@ -1428,7 +1431,8 @@ bool SdrView::BegMark(const Point& rPnt, bool bAddMark, bool bUnmark)
return BegMarkPoints(rPnt,bUnmark);
} else {
if (!bAddMark) UnmarkAllObj();
- return BegMarkObj(rPnt,bUnmark);
+ BegMarkObj(rPnt,bUnmark);
+ return true;
}
}
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index d6c53ed68834..3094133cf81b 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2133,7 +2133,10 @@ bool SwFEShell::BeginMark( const Point &rPos )
if (pDView->HasMarkablePoints())
return pDView->BegMarkPoints( rPos );
else
- return pDView->BegMarkObj( rPos );
+ {
+ pDView->BegMarkObj( rPos );
+ return true;
+ }
}
else
return false;
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 4e665239616c..d1939e6df0b6 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -730,8 +730,8 @@ bool SwView::IsDrawTextHyphenate()
SfxItemSet aNewAttr( pSdrView->GetModel()->GetItemPool(),
svl::Items<EE_PARA_HYPHENATE, EE_PARA_HYPHENATE>{} );
- if( pSdrView->GetAttributes( aNewAttr ) &&
- aNewAttr.GetItemState( EE_PARA_HYPHENATE ) >= SfxItemState::DEFAULT )
+ pSdrView->GetAttributes( aNewAttr );
+ if( aNewAttr.GetItemState( EE_PARA_HYPHENATE ) >= SfxItemState::DEFAULT )
bHyphenate = aNewAttr.Get( EE_PARA_HYPHENATE ).GetValue();
return bHyphenate;