cui/source/inc/cuitabarea.hxx | 16 ++++---- include/svx/dlgctrl.hxx | 28 +-------------- svx/source/dialog/dlgctrl.cxx | 75 +++--------------------------------------- 3 files changed, 17 insertions(+), 102 deletions(-)
New commits: commit b878bd3fe9cdc2ad0180b05892b7feeaa06b9c8d Author: Caolán McNamara <[email protected]> AuthorDate: Sat Sep 29 11:58:10 2018 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sun Sep 30 16:14:36 2018 +0200 rename XRectPreview back to SvxXRectPreview Change-Id: I5d684a651c075104cfb2f2bd73303a2e7f5a7fdd Reviewed-on: https://gerrit.libreoffice.org/61138 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 88232baaf86e..31932eba7c55 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -148,8 +148,8 @@ class SvxTransparenceTabPage : public SfxTabPage XFillAttrSetItem aXFillAttr; SfxItemSet& rXFSet; - XRectPreview m_aCtlBitmapPreview; - XRectPreview m_aCtlXRectPreview; + SvxXRectPreview m_aCtlBitmapPreview; + SvxXRectPreview m_aCtlXRectPreview; // main selection std::unique_ptr<weld::RadioButton> m_xRbtTransOff; @@ -367,7 +367,7 @@ private: XFillAttrSetItem m_aXFillAttr; SfxItemSet& m_rXFSet; - XRectPreview m_aCtlPreview; + SvxXRectPreview m_aCtlPreview; std::unique_ptr<weld::ComboBox> m_xLbGradientType; std::unique_ptr<weld::Label> m_xFtCenter; std::unique_ptr<weld::MetricSpinButton> m_xMtrCenterX; @@ -448,7 +448,7 @@ private: MapUnit m_ePoolUnit; - XRectPreview m_aCtlPreview; + SvxXRectPreview m_aCtlPreview; std::unique_ptr<weld::MetricSpinButton> m_xMtrDistance; std::unique_ptr<weld::MetricSpinButton> m_xMtrAngle; std::unique_ptr<weld::Scale> m_xSliderAngle; @@ -529,7 +529,7 @@ private: Size rFilledSize; Size rZoomedSize; - XRectPreview m_aCtlBitmapPreview; + SvxXRectPreview m_aCtlBitmapPreview; std::unique_ptr<PresetListBox> m_xBitmapLB; std::unique_ptr<weld::ComboBox> m_xBitmapStyleLB; std::unique_ptr<weld::Container> m_xSizeBox; @@ -599,7 +599,7 @@ private: XFillAttrSetItem m_aXFillAttr; SfxItemSet& m_rXFSet; - XRectPreview m_aCtlPreview; + SvxXRectPreview m_aCtlPreview; std::unique_ptr<SvxPixelCtl> m_xCtlPixel; std::unique_ptr<ColorListBox> m_xLbColor; std::unique_ptr<ColorListBox> m_xLbBackgroundColor; @@ -676,8 +676,8 @@ private: css::uno::Reference< css::uno::XComponentContext > m_context; PaletteManager maPaletteManager; - XRectPreview m_aCtlPreviewOld; - XRectPreview m_aCtlPreviewNew; + SvxXRectPreview m_aCtlPreviewOld; + SvxXRectPreview m_aCtlPreviewNew; std::unique_ptr<ColorValueSet> m_xValSetColorList; std::unique_ptr<ColorValueSet> m_xValSetRecentList; std::unique_ptr<weld::ComboBox> m_xSelectPalette; diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx index a6a1910956ab..90c4fc6e8f6d 100644 --- a/include/svx/dlgctrl.hxx +++ b/include/svx/dlgctrl.hxx @@ -398,15 +398,15 @@ public: virtual Size GetOptimalSize() const override; }; -class SAL_WARN_UNUSED SVX_DLLPUBLIC XRectPreview : public PreviewBase +class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxXRectPreview : public PreviewBase { private: SdrObject* mpRectangleObject; public: - XRectPreview(); + SvxXRectPreview(); virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; - virtual ~XRectPreview() override; + virtual ~SvxXRectPreview() override; void SetAttributes(const SfxItemSet& rItemSet); diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 4850967c52fd..0750a5355853 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1626,7 +1626,7 @@ void PreviewBase::StyleUpdated() CustomWidgetController::StyleUpdated(); } -XRectPreview::XRectPreview() +SvxXRectPreview::SvxXRectPreview() : mpRectangleObject(nullptr) { } @@ -1637,7 +1637,7 @@ tools::Rectangle PreviewBase::GetPreviewSize() const return aObjectSize; } -void XRectPreview::SetDrawingArea(weld::DrawingArea* pDrawingArea) +void SvxXRectPreview::SetDrawingArea(weld::DrawingArea* pDrawingArea) { PreviewBase::SetDrawingArea(pDrawingArea); InitSettings(); @@ -1646,7 +1646,7 @@ void XRectPreview::SetDrawingArea(weld::DrawingArea* pDrawingArea) mpRectangleObject = new SdrRectObj(getModel(), GetPreviewSize()); } -void XRectPreview::Resize() +void SvxXRectPreview::Resize() { SdrObject *pOrigObject = mpRectangleObject; if (pOrigObject) @@ -1658,18 +1658,18 @@ void XRectPreview::Resize() PreviewBase::Resize(); } -XRectPreview::~XRectPreview() +SvxXRectPreview::~SvxXRectPreview() { SdrObject::Free(mpRectangleObject); } -void XRectPreview::SetAttributes(const SfxItemSet& rItemSet) +void SvxXRectPreview::SetAttributes(const SfxItemSet& rItemSet) { mpRectangleObject->SetMergedItemSet(rItemSet, true); mpRectangleObject->SetMergedItem(XLineStyleItem(drawing::LineStyle_NONE)); } -void XRectPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) +void SvxXRectPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) { rRenderContext.Push(PushFlags::MAPMODE); rRenderContext.SetMapMode(MapMode(MapUnit::Map100thMM)); commit 0749b68fe14ef8687c9fa28133a960f66add1fc7 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Sep 29 11:55:52 2018 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sun Sep 30 16:14:25 2018 +0200 drop unused SvxXRectPreview Change-Id: I7e43c0e1e12be40cfecbe6614430e9291efe8c2e Reviewed-on: https://gerrit.libreoffice.org/61137 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx index a74c96180b1d..a6a1910956ab 100644 --- a/include/svx/dlgctrl.hxx +++ b/include/svx/dlgctrl.hxx @@ -398,28 +398,6 @@ public: virtual Size GetOptimalSize() const override; }; -/************************************************************************* -|* -|* SvxXRectPreview -|* -\************************************************************************/ - -class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxXRectPreview : public SvxPreviewBase -{ -private: - SdrObject* mpRectangleObject; - -public: - SvxXRectPreview(vcl::Window* pParent); - virtual ~SvxXRectPreview() override; - virtual void dispose() override; - - void SetAttributes(const SfxItemSet& rItemSet); - - virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; - virtual void Resize() override; -}; - class SAL_WARN_UNUSED SVX_DLLPUBLIC XRectPreview : public PreviewBase { private: diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 637ef4858949..4850967c52fd 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1456,69 +1456,6 @@ void SvxXLinePreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rec LocalPostPaint(rRenderContext); } -SvxXRectPreview::SvxXRectPreview(vcl::Window* pParent) -: SvxPreviewBase(pParent) - ,mpRectangleObject(nullptr) -{ - InitSettings(true, true); - - // create RectangleObject - const tools::Rectangle aObjectSize(Point(), GetOutputSize()); - mpRectangleObject = new SdrRectObj( - getModel(), - aObjectSize); -} - -void SvxXRectPreview::Resize() -{ - const tools::Rectangle aObjectSize(Point(), GetOutputSize()); - SdrObject *pOrigObject = mpRectangleObject; - if (pOrigObject) - { - mpRectangleObject = new SdrRectObj( - getModel(), - aObjectSize); - SetAttributes(pOrigObject->GetMergedItemSet()); - SdrObject::Free(pOrigObject); - } - SvxPreviewBase::Resize(); -} - -VCL_BUILDER_FACTORY(SvxXRectPreview) - -SvxXRectPreview::~SvxXRectPreview() -{ - disposeOnce(); -} - -void SvxXRectPreview::dispose() -{ - SdrObject::Free(mpRectangleObject); - SvxPreviewBase::dispose(); -} - -void SvxXRectPreview::SetAttributes(const SfxItemSet& rItemSet) -{ - mpRectangleObject->SetMergedItemSet(rItemSet, true); - mpRectangleObject->SetMergedItem(XLineStyleItem(drawing::LineStyle_NONE)); -} - -void SvxXRectPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) -{ - LocalPrePaint(rRenderContext); - - sdr::contact::SdrObjectVector aObjectVector; - - aObjectVector.push_back(mpRectangleObject); - - sdr::contact::ObjectContactOfObjListPainter aPainter(getBufferDevice(), aObjectVector, nullptr); - sdr::contact::DisplayInfo aDisplayInfo; - - aPainter.ProcessDisplay(aDisplayInfo); - - LocalPostPaint(rRenderContext); -} - SvxXShadowPreview::SvxXShadowPreview() : mpRectangleObject(nullptr) , mpRectangleShadow(nullptr) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
