Kaydet (Commit) a7246759 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

refactor SvxRectCtl & SvxPreviewBase + sub to use RenderContext

Change-Id: I2ca96a94273c7985cef284eebd4199ad7a4b98f7
üst 49cbb78f
...@@ -72,26 +72,30 @@ class SvxPixelCtlAccessible; ...@@ -72,26 +72,30 @@ class SvxPixelCtlAccessible;
class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxRectCtl : public Control class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxRectCtl : public Control
{ {
private: private:
SVX_DLLPRIVATE void InitSettings( bool bForeground, bool bBackground ); SVX_DLLPRIVATE void InitSettings(vcl::RenderContext& rRenderContext);
SVX_DLLPRIVATE void InitRectBitmap(); SVX_DLLPRIVATE void InitRectBitmap();
SVX_DLLPRIVATE Bitmap& GetRectBitmap(); SVX_DLLPRIVATE Bitmap& GetRectBitmap();
SVX_DLLPRIVATE void Resize_Impl(); SVX_DLLPRIVATE void Resize_Impl();
protected: protected:
SvxRectCtlAccessibleContext* pAccContext; SvxRectCtlAccessibleContext* pAccContext;
sal_uInt16 nBorderWidth; sal_uInt16 nBorderWidth;
sal_uInt16 nRadius; sal_uInt16 nRadius;
Size aSize; Size aSize;
Point aPtLT, aPtMT, aPtRT; Point aPtLT, aPtMT, aPtRT;
Point aPtLM, aPtMM, aPtRM; Point aPtLM, aPtMM, aPtRM;
Point aPtLB, aPtMB, aPtRB; Point aPtLB, aPtMB, aPtRB;
Point aPtNew; Point aPtNew;
RECT_POINT eRP, eDefRP; RECT_POINT eRP, eDefRP;
CTL_STYLE eCS; CTL_STYLE eCS;
Bitmap* pBitmap; Bitmap* pBitmap;
CTL_STATE m_nState; CTL_STATE m_nState;
bool mbCompleteDisable; bool mbCompleteDisable : 1;
bool mbUpdateForeground : 1;
bool mbUpdateBackground : 1;
void MarkToResetSettings(bool bUpdateForeground, bool bUpdateBackground);
RECT_POINT GetRPFromPoint( Point, bool bRTL = false ) const; RECT_POINT GetRPFromPoint( Point, bool bRTL = false ) const;
Point GetPointFromRP( RECT_POINT ) const; Point GetPointFromRP( RECT_POINT ) const;
...@@ -371,10 +375,10 @@ protected: ...@@ -371,10 +375,10 @@ protected:
void InitSettings(bool bForeground, bool bBackground); void InitSettings(bool bForeground, bool bBackground);
// prepare buffered paint // prepare buffered paint
void LocalPrePaint(); void LocalPrePaint(vcl::RenderContext& rRenderContext);
// end and output buffered paint // end and output buffered paint
void LocalPostPaint(); void LocalPostPaint(vcl::RenderContext& rRenderContext);
public: public:
SvxPreviewBase(vcl::Window* pParent); SvxPreviewBase(vcl::Window* pParent);
...@@ -386,8 +390,14 @@ public: ...@@ -386,8 +390,14 @@ public:
virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE; virtual void DataChanged(const DataChangedEvent& rDCEvt) SAL_OVERRIDE;
// dada read access // dada read access
SdrModel& getModel() const { return *mpModel; } SdrModel& getModel() const
OutputDevice& getBufferDevice() const { return *mpBufferDevice; } {
return *mpModel;
}
OutputDevice& getBufferDevice() const
{
return *mpBufferDevice;
}
}; };
/************************************************************************* /*************************************************************************
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment