[Libreoffice-commits] core.git: include/svx svx/source
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 25 19:05:48 UTC 2020
include/svx/svdcrtv.hxx | 3 -
include/svx/svddrgv.hxx | 3 -
include/svx/svdedtv.hxx | 1
include/svx/svdedxv.hxx | 2
include/svx/svdmrkv.hxx | 1
include/svx/svdpntv.hxx | 1
svx/source/svdraw/svdcrtv.cxx | 34 +++++----------
svx/source/svdraw/svddrgv.cxx | 52 ++++++++----------------
svx/source/svdraw/svdedtv.cxx | 48 +++++++++++++++++-----
svx/source/svdraw/svdedxv.cxx | 32 ++++++--------
svx/source/svdraw/svdmrkv.cxx | 43 +++++++------------
svx/source/svdraw/svdpntv.cxx | 91 ++++++++++++++++++------------------------
12 files changed, 136 insertions(+), 175 deletions(-)
New commits:
commit b18037ab115bf4f97f28f654621d160abd2bf8fb
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Thu Aug 27 14:43:56 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Fri Sep 25 21:04:59 2020 +0200
remove ImpClearVars, set values in the constructor
Change-Id: I8ff465d5755dae7098293702115ab08055814754
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103403
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/svx/svdcrtv.hxx b/include/svx/svdcrtv.hxx
index 1bf7276a02cc..6868e7ba1cb2 100644
--- a/include/svx/svdcrtv.hxx
+++ b/include/svx/svdcrtv.hxx
@@ -57,9 +57,6 @@ protected:
void ImpClearConnectMarker();
-private:
- SVX_DLLPRIVATE void ImpClearVars();
-
protected:
bool ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, const Point& rPnt, OutputDevice* pOut,
sal_Int16 nMinMov, const tools::Rectangle& rLogRect, SdrObject* pPreparedFactoryObject);
diff --git a/include/svx/svddrgv.hxx b/include/svx/svddrgv.hxx
index 654f010c7b3f..c88cf0b30192 100644
--- a/include/svx/svddrgv.hxx
+++ b/include/svx/svddrgv.hxx
@@ -59,9 +59,6 @@ protected:
bool mbInsGluePointMode : 1;
bool mbNoDragXorPolys : 1;
-private:
- SVX_DLLPRIVATE void ImpClearVars();
-
protected:
virtual void SetMarkHandles(SfxViewShell* pOtherShell) override;
void ShowDragObj();
diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 5ddf6856bb7f..03ca5fc3a022 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -114,7 +114,6 @@ protected:
bool m_bResizeProtect : 1;
private:
- SVX_DLLPRIVATE void ImpClearVars();
SVX_DLLPRIVATE void ImpResetPossibilityFlags();
protected:
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index a78dd5cdc637..192c61e3c07c 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -105,8 +105,6 @@ protected:
private:
SfxUndoManager* mpOldTextEditUndoManager;
- SVX_DLLPRIVATE void ImpClearVars();
-
protected:
// central method to get an SdrUndoManager for enhanced TextEdit. Default will
// try to return a dynamic_casted GetModel()->GetSdrUndoManager(). Applications
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index f75ffa896d7e..aaf16fba2670 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -144,7 +144,6 @@ protected:
const SdrPageView* pPV) const;
private:
- SVX_DLLPRIVATE void ImpClearVars();
SVX_DLLPRIVATE void ImpSetPointsRects() const;
void UndirtyMrkPnt() const;
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index 829e6241780b..ad68da20dec2 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -226,7 +226,6 @@ public:
OutputDevice* GetFirstOutputDevice() const;
private:
- SVX_DLLPRIVATE void ImpClearVars();
DECL_LINK(ImpComeBackHdl, Timer*, void);
protected:
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 061bc034d92e..d5e9f8d08473 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -177,29 +177,19 @@ void SdrCreateView::ImpClearConnectMarker()
mpCoMaOverlay.reset();
}
-void SdrCreateView::ImpClearVars()
-{
- nCurrentInvent=SdrInventor::Default;
- nCurrentIdent=OBJ_NONE;
- pCurrentCreate=nullptr;
- pCreatePV=nullptr;
- b1stPointAsCenter=false;
- aCurrentCreatePointer=PointerStyle::Cross;
- bUseIncompatiblePathCreateInterface=false;
- nAutoCloseDistPix=5;
- nFreeHandMinDistPix=10;
-
- ImpClearConnectMarker();
-}
-
-SdrCreateView::SdrCreateView(
- SdrModel& rSdrModel,
- OutputDevice* pOut)
-: SdrDragView(rSdrModel, pOut),
- mpCreateViewExtraData(new ImpSdrCreateViewExtraData()),
- aCurrentCreatePointer(PointerStyle::Arrow)
+SdrCreateView::SdrCreateView(SdrModel& rSdrModel, OutputDevice* pOut)
+ : SdrDragView(rSdrModel, pOut)
+ , pCurrentCreate(nullptr)
+ , pCreatePV(nullptr)
+ , mpCreateViewExtraData(new ImpSdrCreateViewExtraData())
+ , aCurrentCreatePointer(PointerStyle::Cross)
+ , nAutoCloseDistPix(5)
+ , nFreeHandMinDistPix(10)
+ , nCurrentInvent(SdrInventor::Default)
+ , nCurrentIdent(OBJ_NONE)
+ , b1stPointAsCenter(false)
+ , bUseIncompatiblePathCreateInterface(false)
{
- ImpClearVars();
}
SdrCreateView::~SdrCreateView()
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 1dcb24c9ca10..62aea371e758 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -38,40 +38,26 @@
using namespace sdr;
-
-// DragView
-
-
-void SdrDragView::ImpClearVars()
-{
- mbFramDrag=false;
- meDragMode=SdrDragMode::Move;
- mbDragLimit=false;
- mbMarkedHitMovesAlways=false;
- meDragHdl=SdrHdlKind::Move;
- mpDragHdl=nullptr;
- mbDragHdl=false;
- mpCurrentSdrDragMethod=nullptr;
- mbDragStripes=false;
- mbDragWithCopy=false;
- mpInsPointUndo=nullptr;
- mbInsGluePoint=false;
- mbInsObjPointMode=false;
- mbInsGluePointMode=false;
- mbNoDragXorPolys=false;
- mbResizeAtCenter=false;
- mbCrookAtCenter=false;
-
- // init using default
- mbSolidDragging = getOptionsDrawinglayer().IsSolidDragCreate();
-}
-
-SdrDragView::SdrDragView(
- SdrModel& rSdrModel,
- OutputDevice* pOut)
-: SdrExchangeView(rSdrModel, pOut)
+SdrDragView::SdrDragView(SdrModel& rSdrModel, OutputDevice* pOut)
+ : SdrExchangeView(rSdrModel, pOut)
+ , mpDragHdl(nullptr)
+ , mpInsPointUndo(nullptr)
+ , meDragHdl(SdrHdlKind::Move)
+ , mbFramDrag(false)
+ , mbMarkedHitMovesAlways(false)
+ , mbDragLimit(false)
+ , mbDragHdl(false)
+ , mbDragStripes(false)
+ , mbSolidDragging(getOptionsDrawinglayer().IsSolidDragCreate())
+ , mbResizeAtCenter(false)
+ , mbCrookAtCenter(false)
+ , mbDragWithCopy(false)
+ , mbInsGluePoint(false)
+ , mbInsObjPointMode(false)
+ , mbInsGluePointMode(false)
+ , mbNoDragXorPolys(false)
{
- ImpClearVars();
+ meDragMode = SdrDragMode::Move;
}
SdrDragView::~SdrDragView()
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 34b7c58c25b3..2fd71bee4092 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -80,18 +80,44 @@ void SdrEditView::ImpResetPossibilityFlags()
m_bResizeProtect =false;
}
-void SdrEditView::ImpClearVars()
+SdrEditView::SdrEditView(SdrModel& rSdrModel, OutputDevice* pOut)
+ : SdrMarkView(rSdrModel, pOut)
+ , m_bPossibilitiesDirty(true)
+ , m_bReadOnly(false)
+ , m_bGroupPossible(false)
+ , m_bUnGroupPossible(false)
+ , m_bGrpEnterPossible(false)
+ , m_bToTopPossible(false)
+ , m_bToBtmPossible(false)
+ , m_bReverseOrderPossible(false)
+ , m_bImportMtfPossible(false)
+ , m_bCombinePossible(false)
+ , m_bDismantlePossible(false)
+ , m_bCombineNoPolyPolyPossible(false)
+ , m_bDismantleMakeLinesPossible(false)
+ , m_bOrthoDesiredOnMarked(false)
+ , m_bOneOrMoreMovable(false)
+ , m_bMoreThanOneNoMovRot(false)
+ , m_bContortionPossible(false)
+ , m_bMoveAllowed(false)
+ , m_bResizeFreeAllowed(false)
+ , m_bResizePropAllowed(false)
+ , m_bRotateFreeAllowed(false)
+ , m_bRotate90Allowed(false)
+ , m_bMirrorFreeAllowed(false)
+ , m_bMirror45Allowed(false)
+ , m_bMirror90Allowed(false)
+ , m_bShearAllowed(false)
+ , m_bEdgeRadiusAllowed(false)
+ , m_bTransparenceAllowed(false)
+ , m_bCropAllowed(false)
+ , m_bGradientAllowed(false)
+ , m_bCanConvToPath(false)
+ , m_bCanConvToPoly(false)
+ , m_bCanConvToContour(false)
+ , m_bMoveProtect(false)
+ , m_bResizeProtect(false)
{
- ImpResetPossibilityFlags();
- m_bPossibilitiesDirty=true; // << Purify didn't like this
-}
-
-SdrEditView::SdrEditView(
- SdrModel& rSdrModel,
- OutputDevice* pOut)
-: SdrMarkView(rSdrModel, pOut)
-{
- ImpClearVars();
}
SdrEditView::~SdrEditView()
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 02974eaa36a0..4abcff73ca4e 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -65,29 +65,23 @@
#include <memory>
-void SdrObjEditView::ImpClearVars()
-{
- bQuickTextEditMode = true;
- pTextEditOutliner.reset();
- pTextEditOutlinerView = nullptr;
- pTextEditPV = nullptr;
- pTextEditWin = nullptr;
- pTextEditCursorBuffer = nullptr;
- bTextEditNewObj = false;
- bMacroDown = false;
- pMacroObj = nullptr;
- pMacroPV = nullptr;
- pMacroWin = nullptr;
- nMacroTol = 0;
- bTextEditDontDelete = false;
- bTextEditOnlyOneView = false;
-}
-
SdrObjEditView::SdrObjEditView(SdrModel& rSdrModel, OutputDevice* pOut)
: SdrGlueEditView(rSdrModel, pOut)
+ , pTextEditPV(nullptr)
+ , pTextEditOutlinerView(nullptr)
+ , pTextEditWin(nullptr)
+ , pTextEditCursorBuffer(nullptr)
+ , pMacroObj(nullptr)
+ , pMacroPV(nullptr)
+ , pMacroWin(nullptr)
+ , nMacroTol(0)
+ , bTextEditDontDelete(false)
+ , bTextEditOnlyOneView(false)
+ , bTextEditNewObj(false)
+ , bQuickTextEditMode(true)
+ , bMacroDown(false)
, mpOldTextEditUndoManager(nullptr)
{
- ImpClearVars();
}
SdrObjEditView::~SdrObjEditView()
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 2c85e8be56c0..2ef9c7a3fe30 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -159,39 +159,28 @@ public:
}
};
-
-// MarkView
-
-
-void SdrMarkView::ImpClearVars()
+SdrMarkView::SdrMarkView(SdrModel& rSdrModel, OutputDevice* pOut)
+ : SdrSnapView(rSdrModel, pOut)
+ , mpMarkedObj(nullptr)
+ , mpMarkedPV(nullptr)
+ , maHdlList(this)
+ , meDragMode(SdrDragMode::Move)
+ , meEditMode(SdrViewEditMode::Edit)
+ , meEditMode0(SdrViewEditMode::Edit)
+ , mbDesignMode(false)
+ , mbForceFrameHandles(false)
+ , mbPlusHdlAlways(false)
+ , mbInsPolyPoint(false)
+ , mbMarkedObjRectDirty(false)
+ , mbMrkPntDirty(false)
+ , mbMarkedPointsRectsDirty(false)
+ , mbMarkHandlesHidden(false)
{
- meDragMode=SdrDragMode::Move;
- meEditMode=SdrViewEditMode::Edit;
- meEditMode0=SdrViewEditMode::Edit;
- mbDesignMode=false;
- mpMarkedObj=nullptr;
- mpMarkedPV=nullptr;
- mbForceFrameHandles=false;
- mbPlusHdlAlways=false;
- mbInsPolyPoint=false;
- mbMarkedObjRectDirty=false;
- mbMarkedPointsRectsDirty=false;
- mbMarkHandlesHidden = false;
- mbMrkPntDirty=false;
- // Migrate selections
BrkMarkObj();
BrkMarkPoints();
BrkMarkGluePoints();
-}
-SdrMarkView::SdrMarkView(
- SdrModel& rSdrModel,
- OutputDevice* pOut)
-: SdrSnapView(rSdrModel, pOut),
- maHdlList(this)
-{
- ImpClearVars();
StartListening(rSdrModel);
}
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index f34e7c10f942..2e4f10f26696 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -124,36 +124,44 @@ BitmapEx convertMetafileToBitmapEx(
return aBitmapEx;
}
-
-void SdrPaintView::ImpClearVars()
-{
- mbPageVisible=true;
- mbPageShadowVisible=true;
- mbPageBorderVisible=true;
- mbBordVisible=true;
- mbGridVisible=true;
- mbGridFront =false;
- mbHlplVisible=true;
- mbHlplFront =true;
- mbGlueVisible=false;
- mbGlueVisible2=false;
- mbGlueVisible3=false;
- mbGlueVisible4=false;
- mbSwapAsynchron=false;
- mbPrintPreview=false;
- mbPreviewRenderer=false;
-
- meAnimationMode = SdrAnimationMode::Animate;
- mbAnimationPause = false;
-
- mnHitTolPix=2;
- mnMinMovPix=3;
- mnHitTolLog=0;
- mnMinMovLog=0;
- mpActualOutDev=nullptr;
- mpDragWin=nullptr;
- mpDefaultStyleSheet=nullptr;
- mbSomeObjChgdFlag=false;
+SdrPaintView::SdrPaintView(SdrModel& rSdrModel, OutputDevice* pOut)
+ : mrSdrModelFromSdrView(rSdrModel)
+ , mpModel(&rSdrModel)
+ , mpActualOutDev(nullptr)
+ , mpDragWin(nullptr)
+ , mpDefaultStyleSheet(nullptr)
+ , maDefaultAttr(rSdrModel.GetItemPool())
+ , meAnimationMode(SdrAnimationMode::Animate)
+ , mnHitTolPix(2)
+ , mnMinMovPix(3)
+ , mnHitTolLog(0)
+ , mnMinMovLog(0)
+ , mbPageVisible(true)
+ , mbPageShadowVisible(true)
+ , mbPageBorderVisible(true)
+ , mbBordVisible(true)
+ , mbGridVisible(true)
+ , mbGridFront(false)
+ , mbHlplVisible(true)
+ , mbHlplFront(true)
+ , mbGlueVisible(false)
+ , mbGlueVisible2(false)
+ , mbGlueVisible3(false)
+ , mbGlueVisible4(false)
+ , mbSomeObjChgdFlag(false)
+ , mbSwapAsynchron(false)
+ , mbPrintPreview(false)
+ , mbAnimationPause(false)
+ , mbBufferedOutputAllowed(false)
+ , mbBufferedOverlayAllowed(false)
+ , mbPagePaintingAllowed(true)
+ , mbPreviewRenderer(false)
+ , mbHideOle(false)
+ , mbHideChart(false)
+ , mbHideDraw(false)
+ , mbHideFormControl(false)
+ , maGridColor(COL_BLACK)
+{
maComeBackIdle.SetPriority(TaskPriority::REPAINT);
maComeBackIdle.SetInvokeHandler(LINK(this,SdrPaintView,ImpComeBackHdl));
maComeBackIdle.SetDebugName( "svx::SdrPaintView aComeBackIdle" );
@@ -161,29 +169,8 @@ void SdrPaintView::ImpClearVars()
if (mpModel)
SetDefaultStyleSheet(mpModel->GetDefaultStyleSheet(), true);
- maGridColor = COL_BLACK;
-}
-
-SdrPaintView::SdrPaintView(
- SdrModel& rSdrModel,
- OutputDevice* pOut)
-: mrSdrModelFromSdrView(rSdrModel),
- maDefaultAttr(rSdrModel.GetItemPool()),
- mbBufferedOutputAllowed(false),
- mbBufferedOverlayAllowed(false),
- mbPagePaintingAllowed(true),
- mbHideOle(false),
- mbHideChart(false),
- mbHideDraw(false),
- mbHideFormControl(false)
-{
- mpModel=&rSdrModel;
- ImpClearVars();
-
- if(pOut)
- {
+ if (pOut)
AddWindowToPaintView(pOut, nullptr);
- }
maColorConfig.AddListener(this);
onChangeColorConfig();
More information about the Libreoffice-commits
mailing list