vcl: VclPtr conversion in svx.
Change-Id: I3a1000baa049b11728c46efbc2f0af0d8f34cf2b
Conflicts:
include/svx/charmap.hxx
include/svx/float3d.hxx
include/svx/fontwork.hxx
include/svx/galctrl.hxx
svx/inc/svdibrow.hxx
svx/source/dialog/dlgctl3d.cxx
svx/source/dialog/fontwork.cxx
svx/source/engine3d/float3d.cxx
svx/source/fmcomp/gridctrl.cxx
svx/source/gallery2/galbrws1.cxx
svx/source/inc/docrecovery.hxx
diff --git a/include/avmedia/mediaplayer.hxx b/include/avmedia/mediaplayer.hxx
index 101c6c6..bb24bd0 100644
--- a/include/avmedia/mediaplayer.hxx
+++ b/include/avmedia/mediaplayer.hxx
@@ -45,6 +45,7 @@ public:
MediaFloater( SfxBindings* pBindings, SfxChildWindow* pCW, vcl::Window* pParent );
virtual ~MediaFloater();
virtual void dispose() SAL_OVERRIDE;
void setURL( const OUString& rURL, const OUString& rReferer, bool bPlayImmediately );
diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx
index 8ee7e7c..52e4f15 100644
--- a/include/svx/bmpmask.hxx
+++ b/include/svx/bmpmask.hxx
@@ -139,6 +139,7 @@ public:
SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* pParent);
virtual ~SvxBmpMask();
virtual void dispose() SAL_OVERRIDE;
void SetColor( const Color& rColor );
void PipetteClicked();
diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx
index d27afb6..c877be2 100644
--- a/include/svx/charmap.hxx
+++ b/include/svx/charmap.hxx
@@ -22,6 +22,8 @@
#include <vcl/ctrl.hxx>
#include <vcl/metric.hxx>
#include <vcl/scrbar.hxx>
#include <vcl/vclptr.hxx>
#include <boost/shared_ptr.hpp>
#include <map>
#include <memory>
#include <svx/svxdllapi.h>
@@ -44,6 +46,7 @@ class SVX_DLLPUBLIC SvxShowCharSet : public Control
public:
SvxShowCharSet( vcl::Window* pParent );
virtual ~SvxShowCharSet();
virtual void dispose() SAL_OVERRIDE;
void SetFont( const vcl::Font& rFont );
@@ -71,7 +74,7 @@ public:
sal_uInt16 GetRowPos(sal_uInt16 _nPos) const;
sal_uInt16 GetColumnPos(sal_uInt16 _nPos) const;
ScrollBar& getScrollBar() { return aVscrollSB;}
ScrollBar& getScrollBar() { return *aVscrollSB.get();}
void ReleaseAccessible();
sal_Int32 getMaxCharCount() const;
@@ -112,7 +115,7 @@ private:
sal_Int32 nSelectedIndex;
FontCharMapPtr mpFontCharMap;
ScrollBar aVscrollSB;
VclPtr<ScrollBar> aVscrollSB;
private:
void DrawChars_Impl( int n1, int n2);
diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx
index eb587db..ff3319d 100644
--- a/include/svx/checklbx.hxx
+++ b/include/svx/checklbx.hxx
@@ -46,6 +46,7 @@ public:
SvxCheckListBox( vcl::Window* pParent, WinBits nWinStyle = 0 );
void SetNormalStaticImage(const Image& rNormalStaticImage);
virtual ~SvxCheckListBox();
virtual void dispose() SAL_OVERRIDE;
void InsertEntry ( const OUString& rStr,
sal_uLong nPos = TREELIST_APPEND,
diff --git a/include/svx/colrctrl.hxx b/include/svx/colrctrl.hxx
index 7de406d..8b0de98 100644
--- a/include/svx/colrctrl.hxx
+++ b/include/svx/colrctrl.hxx
@@ -26,6 +26,7 @@
#include <svl/lstner.hxx>
#include <svx/svxdllapi.h>
#include <svx/xtable.hxx>
#include <vcl/vclptr.hxx>
class SvData;
@@ -75,7 +76,7 @@ class SvxColorDockingWindow : public SfxDockingWindow, public SfxListener
private:
XColorListRef pColorList;
SvxColorValueSet_docking aColorSet;
VclPtr<SvxColorValueSet_docking> aColorSet;
sal_uInt16 nLeftSlot;
sal_uInt16 nRightSlot;
sal_uInt16 nCols;
@@ -103,6 +104,7 @@ public:
SfxChildWindow *pCW,
vcl::Window* pParent);
virtual ~SvxColorDockingWindow();
virtual void dispose() SAL_OVERRIDE;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
diff --git a/include/svx/compressgraphicdialog.hxx b/include/svx/compressgraphicdialog.hxx
index b8dcf80..83e1f66 100644
--- a/include/svx/compressgraphicdialog.hxx
+++ b/include/svx/compressgraphicdialog.hxx
@@ -84,8 +84,6 @@ public:
CompressGraphicsDialog( vcl::Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings );
CompressGraphicsDialog( vcl::Window* pParent, Graphic& rGraphic, Size rViewSize100mm, Rectangle& rCropRectangle, SfxBindings& rBindings );
virtual ~CompressGraphicsDialog();
SdrGrafObj* GetCompressedSdrGrafObj();
Graphic GetCompressedGraphic();
diff --git a/include/svx/connctrl.hxx b/include/svx/connctrl.hxx
index 6caac03..f052915 100644
--- a/include/svx/connctrl.hxx
+++ b/include/svx/connctrl.hxx
@@ -46,6 +46,7 @@ private:
public:
SvxXConnectionPreview( vcl::Window* pParent, WinBits nStyle);
virtual ~SvxXConnectionPreview();
virtual void dispose() SAL_OVERRIDE;
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
diff --git a/include/svx/contdlg.hxx b/include/svx/contdlg.hxx
index f1192de..064d003 100644
--- a/include/svx/contdlg.hxx
+++ b/include/svx/contdlg.hxx
@@ -75,7 +75,6 @@ public:
SvxContourDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
vcl::Window* pParent);
virtual ~SvxContourDlg();
const Graphic& GetGraphic() const;
bool IsGraphicChanged() const;
diff --git a/include/svx/ctredlin.hxx b/include/svx/ctredlin.hxx
index 9d8d3c7..f5519bd 100644
--- a/include/svx/ctredlin.hxx
+++ b/include/svx/ctredlin.hxx
@@ -116,6 +116,7 @@ public:
SvxRedlinTable(SvSimpleTableContainer& rParent, WinBits nBits = WB_BORDER);
virtual ~SvxRedlinTable();
virtual void dispose() SAL_OVERRIDE;
// For FilterPage only {
void SetFilterDate(bool bFlag=true);
@@ -322,6 +323,7 @@ private:
public:
SvxTPView(vcl::Window * pParent, VclBuilderContainer *pTopLevel);
virtual ~SvxTPView();
virtual void dispose() SAL_OVERRIDE;
void InsertWriterHeader();
void InsertCalcHeader();
@@ -382,6 +384,7 @@ public:
SvxAcceptChgCtr(vcl::Window* pParent, VclBuilderContainer* pTopLevel);
virtual ~SvxAcceptChgCtr();
virtual void dispose() SAL_OVERRIDE;
void ShowFilterPage();
void ShowViewPage();
diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx
index 38b60e3..a2bc074 100644
--- a/include/svx/dialcontrol.hxx
+++ b/include/svx/dialcontrol.hxx
@@ -80,8 +80,6 @@ class SVX_DLLPUBLIC DialControl : public Control
public:
explicit DialControl( vcl::Window* pParent, WinBits nBits );
virtual ~DialControl();
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
diff --git a/include/svx/dlgctl3d.hxx b/include/svx/dlgctl3d.hxx
index a17e9a8..41c1b9c 100644
--- a/include/svx/dlgctl3d.hxx
+++ b/include/svx/dlgctl3d.hxx
@@ -51,6 +51,7 @@ protected:
public:
Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle = 0);
virtual ~Svx3DPreviewControl();
virtual void dispose() SAL_OVERRIDE;
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
@@ -104,7 +105,6 @@ class SVX_DLLPUBLIC Svx3DLightControl : public Svx3DPreviewControl
public:
Svx3DLightControl(vcl::Window* pParent, WinBits nStyle = 0);
virtual ~Svx3DLightControl();
virtual void Paint(const Rectangle& rRect) SAL_OVERRIDE;
virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE;
@@ -145,18 +145,19 @@ class SVX_DLLPUBLIC SvxLightCtl3D : public Control
{
private:
// local controls
Svx3DLightControl maLightControl;
ScrollBar maHorScroller;
ScrollBar maVerScroller;
PushButton maSwitcher;
VclPtr<Svx3DLightControl> maLightControl;
VclPtr<ScrollBar> maHorScroller;
VclPtr<ScrollBar> maVerScroller;
VclPtr<PushButton> maSwitcher;
// callback for interactive changes
Link maUserInteractiveChangeCallback;
Link maUserSelectionChangeCallback;
Link maUserInteractiveChangeCallback;
Link maUserSelectionChangeCallback;
public:
SvxLightCtl3D(vcl::Window* pParent);
virtual ~SvxLightCtl3D();
virtual void dispose() SAL_OVERRIDE;
// react to size changes
virtual void Resize() SAL_OVERRIDE;
@@ -166,7 +167,7 @@ public:
void CheckSelection();
// bring further settings to the outside world
Svx3DLightControl& GetSvx3DLightControl() { return maLightControl; }
Svx3DLightControl& GetSvx3DLightControl() { return *maLightControl.get(); }
// register user callback
void SetUserInteractiveChangeCallback(Link aNew) { maUserInteractiveChangeCallback = aNew; }
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 456c4f8..15794fa 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -100,6 +100,7 @@ public:
void SetControlSettings(RECT_POINT eRpt = RP_MM, sal_uInt16 nBorder = 200,
sal_uInt16 nCircle = 80, CTL_STYLE eStyle = CS_RECT);
virtual ~SvxRectCtl();
virtual void dispose() SAL_OVERRIDE;
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
@@ -179,6 +180,7 @@ public:
SvxPixelCtl( vcl::Window* pParent, sal_uInt16 nNumber = 8 );
virtual ~SvxPixelCtl();
virtual void dispose() SAL_OVERRIDE;
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
@@ -322,7 +324,6 @@ private:
public:
LineLB(vcl::Window* pParent, WinBits aWB);
virtual ~LineLB();
void Fill(const XDashListRef &pList);
bool getAddStandardFields() const { return mbAddStandardFields; }
@@ -341,7 +342,6 @@ class SVX_DLLPUBLIC LineEndLB : public ListBox
public:
LineEndLB( vcl::Window* pParent, WinBits aWB );
virtual ~LineEndLB (void);
void Fill( const XLineEndListRef &pList, bool bStart = true );
@@ -373,6 +373,7 @@ protected:
public:
SvxPreviewBase(vcl::Window* pParent);
virtual ~SvxPreviewBase();
virtual void dispose() SAL_OVERRIDE;
// change support
virtual void StateChanged(StateChangedType nStateChange) SAL_OVERRIDE;
@@ -403,6 +404,7 @@ private:
public:
SvxXLinePreview( vcl::Window* pParent );
virtual ~SvxXLinePreview();
virtual void dispose() SAL_OVERRIDE;
void SetLineAttributes(const SfxItemSet& rItemSet);
@@ -429,6 +431,7 @@ private:
public:
SvxXRectPreview(vcl::Window* pParent);
virtual ~SvxXRectPreview();
virtual void dispose() SAL_OVERRIDE;
void SetAttributes(const SfxItemSet& rItemSet);
@@ -454,6 +457,7 @@ public:
SvxXShadowPreview(vcl::Window *pParent);
virtual ~SvxXShadowPreview();
virtual void dispose() SAL_OVERRIDE;
void SetRectangleAttributes(const SfxItemSet& rItemSet);
void SetShadowAttributes(const SfxItemSet& rItemSet);
diff --git a/include/svx/fillctrl.hxx b/include/svx/fillctrl.hxx
index c8878d9..1c164cd 100644
--- a/include/svx/fillctrl.hxx
+++ b/include/svx/fillctrl.hxx
@@ -101,6 +101,7 @@ private:
public:
FillControl(vcl::Window* pParent, WinBits nStyle = 0);
virtual ~FillControl();
virtual void dispose() SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
};
diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx
index fcc6dce..44d6280 100644
--- a/include/svx/float3d.hxx
+++ b/include/svx/float3d.hxx
@@ -60,108 +60,108 @@ class SVX_DLLPUBLIC Svx3DWin : public SfxDockingWindow
using Window::Update;
private:
PushButton* m_pBtnGeo;
PushButton* m_pBtnRepresentation;
PushButton* m_pBtnLight;
PushButton* m_pBtnTexture;
PushButton* m_pBtnMaterial;
PushButton* m_pBtnUpdate;
PushButton* m_pBtnAssign;
VclPtr<PushButton> m_pBtnGeo;
VclPtr<PushButton> m_pBtnRepresentation;
VclPtr<PushButton> m_pBtnLight;
VclPtr<PushButton> m_pBtnTexture;
VclPtr<PushButton> m_pBtnMaterial;
VclPtr<PushButton> m_pBtnUpdate;
VclPtr<PushButton> m_pBtnAssign;
// geometry
VclContainer* m_pFLGeometrie;
FixedText* m_pFtPercentDiagonal;
MetricField* m_pMtrPercentDiagonal;
FixedText* m_pFtBackscale;
MetricField* m_pMtrBackscale;
FixedText* m_pFtEndAngle;
MetricField* m_pMtrEndAngle;
FixedText* m_pFtDepth;
MetricField* m_pMtrDepth;
VclPtr<VclContainer> m_pFLGeometrie;
VclPtr<FixedText> m_pFtPercentDiagonal;
VclPtr<MetricField> m_pMtrPercentDiagonal;
VclPtr<FixedText> m_pFtBackscale;
VclPtr<MetricField> m_pMtrBackscale;
VclPtr<FixedText> m_pFtEndAngle;
VclPtr<MetricField> m_pMtrEndAngle;
VclPtr<FixedText> m_pFtDepth;
VclPtr<MetricField> m_pMtrDepth;
VclContainer* m_pFLSegments;
NumericField* m_pNumHorizontal;
NumericField* m_pNumVertical;
VclPtr<VclContainer> m_pFLSegments;
VclPtr<NumericField> m_pNumHorizontal;
VclPtr<NumericField> m_pNumVertical;
VclContainer* m_pFLNormals;
PushButton* m_pBtnNormalsObj;
PushButton* m_pBtnNormalsFlat;
PushButton* m_pBtnNormalsSphere;
PushButton* m_pBtnNormalsInvert;
PushButton* m_pBtnTwoSidedLighting;
PushButton* m_pBtnDoubleSided;
VclPtr<VclContainer> m_pFLNormals;
VclPtr<PushButton> m_pBtnNormalsObj;
VclPtr<PushButton> m_pBtnNormalsFlat;
VclPtr<PushButton> m_pBtnNormalsSphere;
VclPtr<PushButton> m_pBtnNormalsInvert;
VclPtr<PushButton> m_pBtnTwoSidedLighting;
VclPtr<PushButton> m_pBtnDoubleSided;
// presentation
VclContainer* m_pFLRepresentation;
ListBox* m_pLbShademode;
VclPtr<VclContainer> m_pFLRepresentation;
VclPtr<ListBox> m_pLbShademode;
VclContainer* m_pFLShadow;
PushButton* m_pBtnShadow3d;
FixedText* m_pFtSlant;
MetricField* m_pMtrSlant;
VclPtr<VclContainer> m_pFLShadow;
VclPtr<PushButton> m_pBtnShadow3d;
VclPtr<FixedText> m_pFtSlant;
VclPtr<MetricField> m_pMtrSlant;
VclContainer* m_pFLCamera;
MetricField* m_pMtrDistance;
MetricField* m_pMtrFocalLength;
VclPtr<VclContainer> m_pFLCamera;
VclPtr<MetricField> m_pMtrDistance;
VclPtr<MetricField> m_pMtrFocalLength;
// lighting
VclContainer* m_pFLLight;
PushButton* m_pBtnLight1;
PushButton* m_pBtnLight2;
PushButton* m_pBtnLight3;
PushButton* m_pBtnLight4;
PushButton* m_pBtnLight5;
PushButton* m_pBtnLight6;
PushButton* m_pBtnLight7;
PushButton* m_pBtnLight8;
ColorLB* m_pLbLight1;
ColorLB* m_pLbLight2;
ColorLB* m_pLbLight3;
ColorLB* m_pLbLight4;
ColorLB* m_pLbLight5;
ColorLB* m_pLbLight6;
ColorLB* m_pLbLight7;
ColorLB* m_pLbLight8;
PushButton* m_pBtnLightColor;
ColorLB* m_pLbAmbientlight; // ListBox
PushButton* m_pBtnAmbientColor; // color button
VclPtr<VclContainer> m_pFLLight;
VclPtr<PushButton> m_pBtnLight1;
VclPtr<PushButton> m_pBtnLight2;
VclPtr<PushButton> m_pBtnLight3;
VclPtr<PushButton> m_pBtnLight4;
VclPtr<PushButton> m_pBtnLight5;
VclPtr<PushButton> m_pBtnLight6;
VclPtr<PushButton> m_pBtnLight7;
VclPtr<PushButton> m_pBtnLight8;
VclPtr<ColorLB> m_pLbLight1;
VclPtr<ColorLB> m_pLbLight2;
VclPtr<ColorLB> m_pLbLight3;
VclPtr<ColorLB> m_pLbLight4;
VclPtr<ColorLB> m_pLbLight5;
VclPtr<ColorLB> m_pLbLight6;
VclPtr<ColorLB> m_pLbLight7;
VclPtr<ColorLB> m_pLbLight8;
VclPtr<PushButton> m_pBtnLightColor;
VclPtr<ColorLB> m_pLbAmbientlight; // ListBox
VclPtr<PushButton> m_pBtnAmbientColor; // color button
// Textures
VclContainer* m_pFLTexture;
PushButton* m_pBtnTexLuminance;
PushButton* m_pBtnTexColor;
PushButton* m_pBtnTexReplace;
PushButton* m_pBtnTexModulate;
PushButton* m_pBtnTexBlend;
PushButton* m_pBtnTexObjectX;
PushButton* m_pBtnTexParallelX;
PushButton* m_pBtnTexCircleX;
PushButton* m_pBtnTexObjectY;
PushButton* m_pBtnTexParallelY;
PushButton* m_pBtnTexCircleY;
PushButton* m_pBtnTexFilter;
VclPtr<PushButton> m_pBtnTexLuminance;
VclPtr<PushButton> m_pBtnTexColor;
VclPtr<PushButton> m_pBtnTexReplace;
VclPtr<PushButton> m_pBtnTexModulate;
VclPtr<PushButton> m_pBtnTexBlend;
VclPtr<PushButton> m_pBtnTexObjectX;
VclPtr<PushButton> m_pBtnTexParallelX;
VclPtr<PushButton> m_pBtnTexCircleX;
VclPtr<PushButton> m_pBtnTexObjectY;
VclPtr<PushButton> m_pBtnTexParallelY;
VclPtr<PushButton> m_pBtnTexCircleY;
VclPtr<PushButton> m_pBtnTexFilter;
// material
// material editor
VclContainer* m_pFLMaterial;
ListBox* m_pLbMatFavorites;
ColorLB* m_pLbMatColor;
PushButton* m_pBtnMatColor;
ColorLB* m_pLbMatEmission;
PushButton* m_pBtnEmissionColor;
VclPtr<VclContainer> m_pFLMaterial;
VclPtr<ListBox> m_pLbMatFavorites;
VclPtr<ColorLB> m_pLbMatColor;
VclPtr<PushButton> m_pBtnMatColor;
VclPtr<ColorLB> m_pLbMatEmission;
VclPtr<PushButton> m_pBtnEmissionColor;
VclContainer* m_pFLMatSpecular;
ColorLB* m_pLbMatSpecular;
PushButton* m_pBtnSpecularColor;
MetricField* m_pMtrMatSpecularIntensity;
VclPtr<VclContainer> m_pFLMatSpecular;
VclPtr<ColorLB> m_pLbMatSpecular;
VclPtr<PushButton> m_pBtnSpecularColor;
VclPtr<MetricField> m_pMtrMatSpecularIntensity;
Svx3DPreviewControl* m_pCtlPreview;
SvxLightCtl3D* m_pCtlLightPreview;
VclPtr<Svx3DPreviewControl> m_pCtlPreview;
VclPtr<SvxLightCtl3D> m_pCtlLightPreview;
// bottom part
PushButton* m_pBtnConvertTo3D;
PushButton* m_pBtnLatheObject;
PushButton* m_pBtnPerspective;
VclPtr<PushButton> m_pBtnConvertTo3D;
VclPtr<PushButton> m_pBtnLatheObject;
VclPtr<PushButton> m_pBtnPerspective;
// the rest ...
Image aImgLightOn;
@@ -189,8 +189,6 @@ private:
bool bOnly3DChanged;
DECL_LINK( ClickViewTypeHdl, void * );
DECL_LINK( ClickUpdateHdl, void * );
DECL_LINK( ClickAssignHdl, void * );
@@ -220,6 +218,7 @@ public:
Svx3DWin( SfxBindings* pBindings, SfxChildWindow *pCW,
vcl::Window* pParent );
virtual ~Svx3DWin();
virtual void dispose() SAL_OVERRIDE;
void InitColorLB( const SdrModel* pDoc );
bool IsUpdateMode() const { return bUpdate; }
diff --git a/include/svx/fmgridcl.hxx b/include/svx/fmgridcl.hxx
index f373f5e..5517a27 100644
--- a/include/svx/fmgridcl.hxx
+++ b/include/svx/fmgridcl.hxx
@@ -43,6 +43,7 @@ protected:
public:
FmGridHeader( BrowseBox* pParent, WinBits nWinBits = WB_STDHEADERBAR | WB_DRAG );
virtual ~FmGridHeader();
virtual void dispose() SAL_OVERRIDE;
public:
struct AccessControl { friend class FmGridControl; private: AccessControl() { } };
diff --git a/include/svx/fntctrl.hxx b/include/svx/fntctrl.hxx
index 0c9461f..1a2c1db 100644
--- a/include/svx/fntctrl.hxx
+++ b/include/svx/fntctrl.hxx
@@ -49,6 +49,7 @@ public:
SvxFontPrevWindow( vcl::Window* pParent, const ResId& rId );
SvxFontPrevWindow(vcl::Window* pParent, WinBits nStyle);
virtual ~SvxFontPrevWindow();
virtual void dispose() SAL_OVERRIDE;
virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
diff --git a/include/svx/fontwork.hxx b/include/svx/fontwork.hxx
index 283b631..76521bf 100644
--- a/include/svx/fontwork.hxx
+++ b/include/svx/fontwork.hxx
@@ -92,20 +92,22 @@ class SVX_DLLPUBLIC SvxFontWorkDialog : public SfxDockingWindow
SvxFontWorkControllerItem* pCtrlItems[CONTROLLER_COUNT];
ToolBox* m_pTbxStyle;
ToolBox* m_pTbxAdjust;
VclPtr<ToolBox> m_pTbxStyle;
VclPtr<ToolBox> m_pTbxAdjust;
MetricField* m_pMtrFldDistance;
MetricField* m_pMtrFldTextStart;
VclPtr<FixedImage> m_pFbDistance;
VclPtr<MetricField> m_pMtrFldDistance;
VclPtr<FixedImage> m_pFbTextStart;
VclPtr<MetricField> m_pMtrFldTextStart;
ToolBox* m_pTbxShadow;
VclPtr<ToolBox> m_pTbxShadow;
FixedImage* m_pFbShadowX;
MetricField* m_pMtrFldShadowX;
FixedImage* m_pFbShadowY;
MetricField* m_pMtrFldShadowY;
VclPtr<FixedImage> m_pFbShadowX;
VclPtr<MetricField> m_pMtrFldShadowX;
VclPtr<FixedImage> m_pFbShadowY;
VclPtr<MetricField> m_pMtrFldShadowY;
ColorLB* m_pShadowColorLB;
VclPtr<ColorLB> m_pShadowColorLB;
SfxBindings& rBindings;
Idle aInputIdle;
@@ -172,6 +174,7 @@ class SVX_DLLPUBLIC SvxFontWorkDialog : public SfxDockingWindow
SvxFontWorkDialog(SfxBindings *pBinding, SfxChildWindow *pCW,
vcl::Window* pParent);
virtual ~SvxFontWorkDialog();
virtual void dispose() SAL_OVERRIDE;
void SetColorList(const XColorListRef &pTable);
};
diff --git a/include/svx/fontworkgallery.hxx b/include/svx/fontworkgallery.hxx
index 7bd4534..c2521a7 100644
--- a/include/svx/fontworkgallery.hxx
+++ b/include/svx/fontworkgallery.hxx
@@ -98,7 +98,6 @@ class SVX_DLLPUBLIC FontWorkGalleryDialog : public ModalDialog
public:
FontWorkGalleryDialog( SdrView* pView, vcl::Window* pParent, sal_uInt16 nSID );
virtual ~FontWorkGalleryDialog();
// SJ: if the SdrObject** is set, the SdrObject is not inserted into the page when executing the dialog
void SetSdrObjectRef( SdrObject**, SdrModel* pModel );
diff --git a/include/svx/frmdirlbox.hxx b/include/svx/frmdirlbox.hxx
index 80bd1b1..c7145e8 100644
--- a/include/svx/frmdirlbox.hxx
+++ b/include/svx/frmdirlbox.hxx
@@ -40,7 +40,6 @@ class SVX_DLLPUBLIC FrameDirectionListBox : public ListBox
{
public:
explicit FrameDirectionListBox( vcl::Window* pParent, WinBits nBits );
virtual ~FrameDirectionListBox();
/** Inserts a string with corresponding direction enum into the listbox. */
void InsertEntryValue(
diff --git a/include/svx/frmsel.hxx b/include/svx/frmsel.hxx
index e92271b..61b3615 100644
--- a/include/svx/frmsel.hxx
+++ b/include/svx/frmsel.hxx
@@ -84,7 +84,6 @@ class SVX_DLLPUBLIC FrameSelector : public Control
{
public:
FrameSelector(vcl::Window* pParent);
virtual ~FrameSelector();
/** Initializes the control, enables/disables frame borders according to flags. */
void Initialize( FrameSelFlags nFlags );
diff --git a/include/svx/galctrl.hxx b/include/svx/galctrl.hxx
index d1b6a39..2765e9c 100644
--- a/include/svx/galctrl.hxx
+++ b/include/svx/galctrl.hxx
@@ -109,7 +109,6 @@ private:
public:
GalleryIconView( GalleryBrowser2* pParent, GalleryTheme* pTheme );
virtual ~GalleryIconView();
};
class GalleryListView : public BrowseBox
@@ -144,7 +143,6 @@ private:
public:
GalleryListView( GalleryBrowser2* pParent, GalleryTheme* pTheme );
virtual ~GalleryListView();
void SetSelectHdl( const Link& rSelectHdl ) { maSelectHdl = rSelectHdl; }
diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx
index 8cd389c..b3278de 100644
--- a/include/svx/graphctl.hxx
+++ b/include/svx/graphctl.hxx
@@ -80,8 +80,9 @@ protected:
public:
GraphCtrl( vcl::Window* pParent, WinBits nStyle );
virtual ~GraphCtrl();
GraphCtrl( vcl::Window* pParent, WinBits nStyle );
virtual ~GraphCtrl();
virtual void dispose() SAL_OVERRIDE;
void SetWinStyle( WinBits nWinBits );
WinBits GetWinStyle() const { return nWinStyle; }
diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index e50c6e5..11f384e 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -151,20 +151,20 @@ public:
friend class NavigationBar::AbsolutePos;
// zusaetzliche Controls
FixedText m_aRecordText;
AbsolutePos m_aAbsolute; // absolute positioning
FixedText m_aRecordOf;
FixedText m_aRecordCount;
VclPtr<FixedText> m_aRecordText;
VclPtr<AbsolutePos> m_aAbsolute; // absolute positioning
VclPtr<FixedText> m_aRecordOf;
VclPtr<FixedText> m_aRecordCount;
ImageButton m_aFirstBtn; // ImageButton for 'go to the first record'
ImageButton m_aPrevBtn; // ImageButton for 'go to the previous record'
ImageButton m_aNextBtn; // ImageButton for 'go to the next record'
ImageButton m_aLastBtn; // ImageButton for 'go to the last record'
ImageButton m_aNewBtn; // ImageButton for 'go to a new record'
sal_uInt16 m_nDefaultWidth;
sal_Int32 m_nCurrentPos;
VclPtr<ImageButton> m_aFirstBtn; // ImageButton for 'go to the first record'
VclPtr<ImageButton> m_aPrevBtn; // ImageButton for 'go to the previous record'
VclPtr<ImageButton> m_aNextBtn; // ImageButton for 'go to the next record'
VclPtr<ImageButton> m_aLastBtn; // ImageButton for 'go to the last record'
VclPtr<ImageButton> m_aNewBtn; // ImageButton for 'go to a new record'
sal_uInt16 m_nDefaultWidth;
sal_Int32 m_nCurrentPos;
bool m_bPositioning; // protect PositionDataSource against recursion
bool m_bPositioning; // protect PositionDataSource against recursion
public:
// StatusIds for Controls of the Bar
@@ -183,6 +183,8 @@ public:
};
NavigationBar(vcl::Window* pParent, WinBits nStyle = 0);
virtual ~NavigationBar();
virtual void dispose() SAL_OVERRIDE;
// Status methods for Controls
void InvalidateAll(sal_Int32 nCurrentPos = -1, bool bAll = false);
@@ -225,7 +227,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
DbGridColumns m_aColumns; // Column description
NavigationBar m_aBar;
VclPtr<NavigationBar> m_aBar;
DbGridRowRef m_xDataRow; // Row which can be modified
// comes from the data cursor
DbGridRowRef m_xSeekRow, // Row to which the iterator can set
@@ -370,6 +372,7 @@ public:
WinBits nBits = WB_BORDER);
virtual ~DbGridControl();
virtual void dispose() SAL_OVERRIDE;
virtual void Init() SAL_OVERRIDE;
virtual void InitColumnsByFields(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& xFields) = 0;
@@ -431,7 +434,7 @@ public:
bool HasNavigationBar() const {return m_bNavigationBar;}
sal_uInt16 GetOptions() const {return m_nOptions;}
NavigationBar& GetNavigationBar() {return m_aBar;}
NavigationBar& GetNavigationBar() {return *m_aBar.get();}
sal_uInt16 SetOptions(sal_uInt16 nOpt);
// The new options are interpreted with respect to the current data source. If it is unable
// to update, to insert or to restore, the according options are ignored. If the grid isn't
diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
index ad0a5cc..719c5aa 100644
--- a/include/svx/hdft.hxx
+++ b/include/svx/hdft.hxx
@@ -52,6 +52,7 @@ public:
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
virtual ~SvxHFPage();
virtual void dispose() SAL_OVERRIDE;
void DisableDeleteQueryBox() { mbDisableQueryBox = true; }
void EnableBackgroundSelector(bool bNew) { mbEnableBackgroundSelector = bNew; }
diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx
index 7c288fe..d21dc42 100644
--- a/include/svx/imapdlg.hxx
+++ b/include/svx/imapdlg.hxx
@@ -136,6 +136,7 @@ public:
SvxIMapDlg( SfxBindings *pBindings, SfxChildWindow *pCW,
vcl::Window* pParent );
virtual ~SvxIMapDlg();
virtual void dispose() SAL_OVERRIDE;
void SetExecState( bool bEnable );
diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx
index 0df5118..7852285 100644
--- a/include/svx/itemwin.hxx
+++ b/include/svx/itemwin.hxx
@@ -49,7 +49,6 @@ public:
SvxLineBox( vcl::Window* pParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL );
virtual ~SvxLineBox();
void FillControl();
@@ -87,7 +86,6 @@ public:
SvxMetricField( vcl::Window* pParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
WinBits nBits = WB_BORDER | WB_SPIN | WB_REPEAT );
virtual ~SvxMetricField();
void Update( const XLineWidthItem* pItem );
void SetCoreUnit( SfxMapUnit eUnit );
@@ -100,7 +98,6 @@ class SvxFillTypeBox : public FillTypeLB
{
public:
SvxFillTypeBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL );
virtual ~SvxFillTypeBox();
void Selected() { bSelect = true; }
bool IsRelease() { return bRelease;}
@@ -123,7 +120,6 @@ class SvxFillAttrBox : public FillAttrLB
{
public:
SvxFillAttrBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL );
virtual ~SvxFillAttrBox();
bool IsRelease() { return bRelease;}
diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx
index f804f32..7cc8a3e 100644
--- a/include/svx/langbox.hxx
+++ b/include/svx/langbox.hxx
@@ -116,7 +116,6 @@ class SVX_DLLPUBLIC SvxLanguageBox : public ListBox, public SvxLanguageBoxBase
{
public:
SvxLanguageBox( vcl::Window* pParent, WinBits nBits, bool bCheck = false );
virtual ~SvxLanguageBox();
private:
SVX_DLLPRIVATE virtual sal_Int32 ImplInsertImgEntry( const OUString& rEntry, sal_Int32 nPos, bool bChecked ) SAL_OVERRIDE;
@@ -143,7 +142,6 @@ class SVX_DLLPUBLIC SvxLanguageComboBox : public ComboBox, public SvxLanguageBox
{
public:
SvxLanguageComboBox( vcl::Window* pParent, WinBits nBits, bool bCheck = false );
virtual ~SvxLanguageComboBox();
enum EditedAndValid
{
diff --git a/include/svx/linectrl.hxx b/include/svx/linectrl.hxx
index c7c80a4..a853dd8 100644
--- a/include/svx/linectrl.hxx
+++ b/include/svx/linectrl.hxx
@@ -82,7 +82,7 @@ class SvxLineEndWindow : public SfxPopupWindow
private:
XLineEndListRef pLineEndList;
ValueSet aLineEndSet;
VclPtr<ValueSet> aLineEndSet;
sal_uInt16 nCols;
sal_uInt16 nLines;
sal_uIntPtr nLineEndWidth;
@@ -118,6 +118,7 @@ public:
vcl::Window* pParentWindow,
const OUString& rWndTitle );
virtual ~SvxLineEndWindow();
virtual void dispose() SAL_OVERRIDE;
void StartSelection();
diff --git a/include/svx/linkwarn.hxx b/include/svx/linkwarn.hxx
index 8fc66af..395b1b6 100644
--- a/include/svx/linkwarn.hxx
+++ b/include/svx/linkwarn.hxx
@@ -32,6 +32,7 @@ private:
public:
SvxLinkWarningDialog(vcl::Window* pParent, const OUString& _rFileName);
virtual ~SvxLinkWarningDialog();
virtual void dispose() SAL_OVERRIDE;
};
#endif // INCLUDED_SVX_LINKWARN_HXX
diff --git a/include/svx/measctrl.hxx b/include/svx/measctrl.hxx
index 83161ca..4753ab1 100644
--- a/include/svx/measctrl.hxx
+++ b/include/svx/measctrl.hxx
@@ -43,6 +43,7 @@ private:
public:
SvxXMeasurePreview(vcl::Window* pParent, WinBits nStyle);
virtual ~SvxXMeasurePreview();
virtual void dispose() SAL_OVERRIDE;
virtual void Paint(const Rectangle& rRect) SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
diff --git a/include/svx/numvset.hxx b/include/svx/numvset.hxx
index f5e3781..3742199 100644
--- a/include/svx/numvset.hxx
+++ b/include/svx/numvset.hxx
@@ -66,27 +66,26 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
com::sun::star::uno::Reference<
com::sun::star::container::XIndexAccess> > aOutlineSettings;
public:
public:
SvxNumValueSet(vcl::Window* pParent, WinBits nWinBits = WB_TABSTOP);
void init(sal_uInt16 nType);
virtual ~SvxNumValueSet();
virtual void dispose() SAL_OVERRIDE;
virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE;
void SetHTMLMode(bool bSet) {bHTMLMode = bSet;}
void SetNumberingSettings(
const com::sun::star::uno::Sequence<
com::sun::star::uno::Sequence<
com::sun::star::beans::PropertyValue> >& aNum,
com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter,
const com::sun::star::lang::Locale& rLocale );
const css::uno::Sequence<
css::uno::Sequence<css::beans::PropertyValue> >& aNum,
css::uno::Reference<css::text::XNumberingFormatter>& xFormatter,
const css::lang::Locale& rLocale );
void SetOutlineNumberingSettings(
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::container::XIndexAccess> >& rOutline,
com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter,
const com::sun::star::lang::Locale& rLocale);
css::uno::Sequence<
css::uno::Reference<css::container::XIndexAccess> >& rOutline,
css::uno::Reference<css::text::XNumberingFormatter>& xFormatter,
const css::lang::Locale& rLocale);
};
class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
@@ -96,7 +95,7 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
void init();
protected:
protected:
DECL_LINK(FormatHdl_Impl, void *);
void SetGrfNotFound(bool bSet) {bGrfNotFound = bSet;}
@@ -104,9 +103,10 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
Idle& GetFormatIdle() {return aFormatIdle;}
public:
public:
SvxBmpNumValueSet(vcl::Window* pParent, WinBits nWinBits = WB_TABSTOP);
virtual ~SvxBmpNumValueSet();
virtual void dispose() SAL_OVERRIDE;
virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE;
diff --git a/include/svx/pagectrl.hxx b/include/svx/pagectrl.hxx
index 8b6da4d..007d4ca 100644
--- a/include/svx/pagectrl.hxx
+++ b/include/svx/pagectrl.hxx
@@ -89,6 +89,7 @@ protected:
public:
SvxPageWindow( vcl::Window* pParent );
virtual ~SvxPageWindow();
virtual void dispose() SAL_OVERRIDE;
//UUUU
void setHeaderFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes) { maHeaderFillAttributes = rFillAttributes; }
diff --git a/include/svx/passwd.hxx b/include/svx/passwd.hxx
index 920fa19..901488c 100644
--- a/include/svx/passwd.hxx
+++ b/include/svx/passwd.hxx
@@ -52,7 +52,6 @@ private:
public:
SvxPasswordDialog( vcl::Window* pParent, bool bAllowEmptyPasswords = false, bool bDisableOldPassword = false );
virtual ~SvxPasswordDialog();
OUString GetOldPassword() const { return m_pOldPasswdED->GetText(); }
OUString GetNewPassword() const { return m_pNewPasswdED->GetText(); }
diff --git a/include/svx/prtqry.hxx b/include/svx/prtqry.hxx
index afe6b9b..a2f4e92 100644
--- a/include/svx/prtqry.hxx
+++ b/include/svx/prtqry.hxx
@@ -26,7 +26,6 @@ class SVX_DLLPUBLIC SvxPrtQryBox : public MessBox
{
public:
SvxPrtQryBox(vcl::Window* pParent);
virtual ~SvxPrtQryBox();
};
#endif
diff --git a/include/svx/rubydialog.hxx b/include/svx/rubydialog.hxx
index bd605a1..793fa88 100644
--- a/include/svx/rubydialog.hxx
+++ b/include/svx/rubydialog.hxx
@@ -143,7 +143,7 @@ class SvxRubyDialog : public SfxModelessDialog
void AssertOneEntry();
void Update();
virtual bool Close() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
long GetLastPos() const {return nLastPos;}
void SetLastPos(long nSet) {nLastPos = nSet;}
@@ -163,6 +163,7 @@ public:
SvxRubyDialog(SfxBindings *pBindings, SfxChildWindow *pCW,
vcl::Window* pParent);
virtual ~SvxRubyDialog();
virtual void dispose() SAL_OVERRIDE;
virtual void Activate() SAL_OVERRIDE;
virtual void Deactivate() SAL_OVERRIDE;
diff --git a/include/svx/ruler.hxx b/include/svx/ruler.hxx
index ff44a6c..9a1195d 100644
--- a/include/svx/ruler.hxx
+++ b/include/svx/ruler.hxx
@@ -254,6 +254,7 @@ public:
SvxRuler(vcl::Window* pParent, vcl::Window *pEditWin, sal_uInt16 nRulerFlags,
SfxBindings &rBindings, WinBits nWinStyle = WB_STDRULER);
virtual ~SvxRuler();
virtual void dispose() SAL_OVERRIDE;
void SetMinFrameSize(long lSize);
long GetMinFrameSize() const ;
diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx
index 6eac3d3..e4db4f0 100644
--- a/include/svx/sidebar/PanelLayout.hxx
+++ b/include/svx/sidebar/PanelLayout.hxx
@@ -34,6 +34,7 @@ public:
PanelLayout(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
const com::sun::star::uno::Reference<com::sun::star::frame::XFrame> &rFrame);
virtual ~PanelLayout();
virtual void dispose() SAL_OVERRIDE;
virtual Size GetOptimalSize() const SAL_OVERRIDE;
virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL) SAL_OVERRIDE;
diff --git a/include/svx/sidebar/PopupContainer.hxx b/include/svx/sidebar/PopupContainer.hxx
index f8f6f52..ff3c408 100644
--- a/include/svx/sidebar/PopupContainer.hxx
+++ b/include/svx/sidebar/PopupContainer.hxx
@@ -34,7 +34,6 @@ class SVX_DLLPUBLIC PopupContainer
{
public:
PopupContainer (vcl::Window* pParent);
virtual ~PopupContainer (void);
virtual bool Notify (NotifyEvent& rNEvt) SAL_OVERRIDE;
};
diff --git a/include/svx/sidebar/PopupControl.hxx b/include/svx/sidebar/PopupControl.hxx
index 84bed5a..626e707 100644
--- a/include/svx/sidebar/PopupControl.hxx
+++ b/include/svx/sidebar/PopupControl.hxx
@@ -38,7 +38,6 @@ public :
PopupControl (
vcl::Window* pParent,
const ResId& rResId);
virtual ~PopupControl (void);
virtual void Paint (const Rectangle& rect) SAL_OVERRIDE;
};
diff --git a/include/svx/sidebar/SidebarDialControl.hxx b/include/svx/sidebar/SidebarDialControl.hxx
index a77d0f4..52d798e 100644
--- a/include/svx/sidebar/SidebarDialControl.hxx
+++ b/include/svx/sidebar/SidebarDialControl.hxx
@@ -29,7 +29,6 @@ class SVX_DLLPUBLIC SidebarDialControl : public svx::DialControl
{
public:
SidebarDialControl (vcl::Window* pParent, WinBits nBits = 0);
virtual ~SidebarDialControl (void);
virtual Size GetOptimalSize() const SAL_OVERRIDE;
virtual void MouseButtonDown (const MouseEvent& rMEvt) SAL_OVERRIDE;
diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx b/include/svx/sidebar/ValueSetWithTextControl.hxx
index 33054ea..e0c941d 100644
--- a/include/svx/sidebar/ValueSetWithTextControl.hxx
+++ b/include/svx/sidebar/ValueSetWithTextControl.hxx
@@ -52,8 +52,6 @@ public:
vcl::Window* pParent,
const ResId& rResId);
virtual ~ValueSetWithTextControl(void);
// add item for control type IMAGE_TEXT
// if control type does not match IMAGE_TEXT no item is added.
// @param pSelectedItemImage
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 15d221b..35e259b 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -120,6 +120,7 @@ friend class SvxJSearchOptionsDialog;
public:
SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind );
virtual ~SvxSearchDialog();
virtual void dispose() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
diff --git a/include/svx/stddlg.hxx b/include/svx/stddlg.hxx
index 85cdf46c..a3e3df0 100644
--- a/include/svx/stddlg.hxx
+++ b/include/svx/stddlg.hxx
@@ -28,7 +28,6 @@ class SVX_DLLPUBLIC SvxStandardDialog: public SfxModalDialog
{
public:
SvxStandardDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription );
virtual ~SvxStandardDialog();
short Execute() SAL_OVERRIDE;
diff --git a/include/svx/swframeexample.hxx b/include/svx/swframeexample.hxx
index b6f698c..3ed7c44 100644
--- a/include/svx/swframeexample.hxx
+++ b/include/svx/swframeexample.hxx
@@ -74,7 +74,6 @@ protected:
public:
SvxSwFrameExample(vcl::Window* pParent, WinBits nStyle);
virtual ~SvxSwFrameExample();
inline void SetWrap(sal_uInt16 nW) { nWrap = nW; }
diff --git a/include/svx/txencbox.hxx b/include/svx/txencbox.hxx
index e0df5ad..43f028b 100644
--- a/include/svx/txencbox.hxx
+++ b/include/svx/txencbox.hxx
@@ -35,6 +35,7 @@ private:
public:
SvxTextEncodingBox( vcl::Window* pParent, WinBits nBits );
virtual ~SvxTextEncodingBox();
virtual void dispose() SAL_OVERRIDE;
/** Fill with all known encodings but exclude those matching one or more
given flags as defined in rtl/tencinfo.h
diff --git a/svx/inc/GalleryControl.hxx b/svx/inc/GalleryControl.hxx
index 8b58d76..11445db 100644
--- a/svx/inc/GalleryControl.hxx
+++ b/svx/inc/GalleryControl.hxx
@@ -43,7 +43,6 @@ public:
GalleryControl (
SfxBindings* pBindings,
vcl::Window* pParentWindow);
virtual ~GalleryControl (void);
bool GalleryKeyInput( const KeyEvent& rKEvt, vcl::Window* pWindow);
diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index 4a77603..5d1b8a9 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -80,7 +80,6 @@ private:
public:
GalleryToolBox( GalleryBrowser2* pParent );
virtual ~GalleryToolBox();
};
@@ -113,11 +112,11 @@ private:
GalleryIconView* mpIconView;
GalleryListView* mpListView;
GalleryPreview* mpPreview;
GalleryToolBox maViewBox;
FixedLine maSeparator;
FixedText maInfoBar;
VclPtr<GalleryToolBox> maViewBox;
VclPtr<FixedLine> maSeparator;
VclPtr<FixedText> maInfoBar;
Point maDragStartPos;
sal_uIntPtr mnCurActionPos;
sal_uIntPtr mnCurActionPos;
GalleryBrowserMode meMode;
GalleryBrowserMode meLastMode;
@@ -154,6 +153,7 @@ public:
GalleryBrowser2(vcl::Window* pParent, Gallery* pGallery);
virtual ~GalleryBrowser2();
virtual void dispose() SAL_OVERRIDE;
void SelectTheme( const OUString& rThemeName );
diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index 2e44db5..9583d43 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -69,6 +69,7 @@ protected:
public:
_SdrItemBrowserControl(vcl::Window* pParent, WinBits nBits=WB_3DLOOK|WB_BORDER|WB_TABSTOP);
virtual ~_SdrItemBrowserControl();
virtual void dispose() SAL_OVERRIDE;
void Clear();
void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=NULL);
sal_uIntPtr GetCurrentPos() const;
@@ -99,16 +100,17 @@ public:
#define WB_STDSIZEABLEFLOATWIN (WB_STDFLOATWIN|WB_3DLOOK|WB_CLOSEABLE|WB_SIZEMOVE)
class _SdrItemBrowserWindow: public FloatingWindow {
_SdrItemBrowserControl aBrowse;
VclPtr<_SdrItemBrowserControl> aBrowse;
public:
_SdrItemBrowserWindow(vcl::Window* pParent, WinBits nBits=WB_STDSIZEABLEDOCKWIN);
virtual ~_SdrItemBrowserWindow();
virtual void dispose() SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
void Clear() { aBrowse.Clear(); }
void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=NULL) { aBrowse.SetAttributes(pAttr,p2ndSet); }
const _SdrItemBrowserControl& GetBrowserControl() const { return aBrowse; }
_SdrItemBrowserControl& GetBrowserControl() { return aBrowse; }
void Clear() { aBrowse->Clear(); }
void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=NULL) { aBrowse->SetAttributes(pAttr,p2ndSet); }
const _SdrItemBrowserControl& GetBrowserControl() const { return aBrowse.get(); }
_SdrItemBrowserControl& GetBrowserControl() { return aBrowse.get(); }
};
class SdrView;
diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx
index a7657ee..dd97162 100644
--- a/svx/inc/tbunosearchcontrollers.hxx
+++ b/svx/inc/tbunosearchcontrollers.hxx
@@ -47,7 +47,6 @@ public:
FindTextFieldControl( vcl::Window* pParent, WinBits nStyle,
css::uno::Reference< css::frame::XFrame >& xFrame,
const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual ~FindTextFieldControl();
virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 215869e..4f79f3a 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -485,12 +485,18 @@ SvxBmpMask::SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window*
SvxBmpMask::~SvxBmpMask()
{
dispose();
}
void SvxBmpMask::dispose()
{
delete m_pQSet1;
delete m_pQSet2;
delete m_pQSet3;
delete m_pQSet4;
delete m_pCtlPipette;
delete pData;
SfxDockingWindow::dispose();
}
/** is called by a MaskSet when it is selected */
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index c94ed56..25016d3 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -86,10 +86,6 @@ SvxContourDlg::SvxContourDlg(SfxBindings* _pBindings, SfxChildWindow* pCW,
{
}
SvxContourDlg::~SvxContourDlg()
{
}
tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
const Rectangle* pRect,
const sal_uIntPtr nFlags )
@@ -282,9 +278,15 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow *
SvxSuperContourDlg::~SvxSuperContourDlg()
{
dispose();
}
void SvxSuperContourDlg::dispose()
{
SvtMiscOptions aMiscOptions;
aMiscOptions.RemoveListenerLink( LINK(this, SvxSuperContourDlg, MiscHdl) );
delete m_pContourWnd;
SvxContourDlg::dispose();
}
bool SvxSuperContourDlg::Close()
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index 75ec603..e9d4ffa 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -56,7 +56,7 @@ sal_uInt32& SvxShowCharSet::getSelectedChar()
SvxShowCharSet::SvxShowCharSet(vcl::Window* pParent)
: Control(pParent, WB_TABSTOP | WB_BORDER)
, m_pAccessible(NULL)
, aVscrollSB( this, WB_VERT)
, aVscrollSB( new ScrollBar(this, WB_VERT) )
{
init();
InitSettings( true, true );
@@ -69,8 +69,8 @@ void SvxShowCharSet::init()
m_nYGap = 0;
SetStyle( GetStyle() | WB_CLIPCHILDREN );
aVscrollSB.SetScrollHdl( LINK( this, SvxShowCharSet, VscrollHdl ) );
aVscrollSB.EnableDrag( true );
aVscrollSB->SetScrollHdl( LINK( this, SvxShowCharSet, VscrollHdl ) );
aVscrollSB->EnableDrag( true );
// other settings like aVscroll depend on selected font => see SetFont
bDrag = false;
@@ -190,7 +190,7 @@ void SvxShowCharSet::MouseMove( const MouseEvent& rMEvt )
void SvxShowCharSet::Command( const CommandEvent& rCEvt )
{
if( !HandleScrollCommand( rCEvt, 0, &aVscrollSB ) )
if( !HandleScrollCommand( rCEvt, 0, aVscrollSB.get() ) )
Control::Command( rCEvt );
}
@@ -213,8 +213,8 @@ sal_uInt16 SvxShowCharSet::GetColumnPos(sal_uInt16 _nPos) const
int SvxShowCharSet::FirstInView( void ) const
{
int nIndex = 0;
if( aVscrollSB.IsVisible() )
nIndex += aVscrollSB.GetThumbPos() * COLUMN_COUNT;
if( aVscrollSB->IsVisible() )
nIndex += aVscrollSB->GetThumbPos() * COLUMN_COUNT;
return nIndex;
}
@@ -365,8 +365,8 @@ void SvxShowCharSet::DrawChars_Impl( int n1, int n2 )
return;
Size aOutputSize = GetOutputSizePixel();
if (aVscrollSB.IsVisible())
aOutputSize.Width() -= aVscrollSB.GetOptimalSize().Width();
if (aVscrollSB->IsVisible())
aOutputSize.Width() -= aVscrollSB->GetOptimalSize().Width();
int i;
for ( i = 1; i < COLUMN_COUNT; ++i )
@@ -513,7 +513,7 @@ void SvxShowCharSet::SetFont( const vcl::Font& rFont )
getSelectedChar() = mpFontCharMap->GetCharFromIndex( nSelectedIndex );
Size aSize = GetOutputSizePixel();
long nSBWidth = aVscrollSB.GetOptimalSize().Width();
long nSBWidth = aVscrollSB->GetOptimalSize().Width();
aSize.Width() -= nSBWidth;
vcl::Font aFont = rFont;
@@ -528,18 +528,18 @@ void SvxShowCharSet::SetFont( const vcl::Font& rFont )
nX = aSize.Width() / COLUMN_COUNT;
nY = aSize.Height() / ROW_COUNT;
aVscrollSB.setPosSizePixel( aSize.Width(), 0, nSBWidth, aSize.Height() );
aVscrollSB.SetRangeMin( 0 );
aVscrollSB->setPosSizePixel( aSize.Width(), 0, nSBWidth, aSize.Height() );
aVscrollSB->SetRangeMin( 0 );
int nLastRow = (mpFontCharMap->GetCharCount() - 1 + COLUMN_COUNT) / COLUMN_COUNT;
aVscrollSB.SetRangeMax( nLastRow );
aVscrollSB.SetPageSize( ROW_COUNT-1 );
aVscrollSB.SetVisibleSize( ROW_COUNT );
aVscrollSB->SetRangeMax( nLastRow );
aVscrollSB->SetPageSize( ROW_COUNT-1 );
aVscrollSB->SetVisibleSize( ROW_COUNT );
// restore last selected unicode
int nMapIndex = mpFontCharMap->GetIndexFromChar( getSelectedChar() );
SelectIndex( nMapIndex );
aVscrollSB.Show();
aVscrollSB->Show();
// rearrange CharSet element in sync with nX- and nY-multiples
Size aDrawSize(nX * COLUMN_COUNT, nY * ROW_COUNT);
@@ -559,7 +559,7 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, bool bFocus )
sal_uInt32 cPrev = mpFontCharMap->GetPrevChar( getSelectedChar() );
int nMapIndex = mpFontCharMap->GetIndexFromChar( cPrev );
int nNewPos = nMapIndex / COLUMN_COUNT;
aVscrollSB.SetThumbPos( nNewPos );
aVscrollSB->SetThumbPos( nNewPos );
nSelectedIndex = bFocus ? nMapIndex+1 : -1;
Invalidate();
Update();
@@ -567,9 +567,9 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, bool bFocus )
else if( nNewIndex < FirstInView() )
{
// need to scroll up to see selected item
int nOldPos = aVscrollSB.GetThumbPos();
int nOldPos = aVscrollSB->GetThumbPos();
int nDelta = (FirstInView() - nNewIndex + COLUMN_COUNT-1) / COLUMN_COUNT;
aVscrollSB.SetThumbPos( nOldPos - nDelta );
aVscrollSB->SetThumbPos( nOldPos - nDelta );
nSelectedIndex = nNewIndex;
Invalidate();
if( nDelta )
@@ -578,15 +578,15 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, bool bFocus )
else if( nNewIndex > LastInView() )
{
// need to scroll down to see selected item
int nOldPos = aVscrollSB.GetThumbPos();
int nOldPos = aVscrollSB->GetThumbPos();
int nDelta = (nNewIndex - LastInView() + COLUMN_COUNT) / COLUMN_COUNT;
aVscrollSB.SetThumbPos( nOldPos + nDelta );
aVscrollSB->SetThumbPos( nOldPos + nDelta );
if( nNewIndex < mpFontCharMap->GetCharCount() )
{
nSelectedIndex = nNewIndex;
Invalidate();
}
if( nOldPos != aVscrollSB.GetThumbPos() )
if( nOldPos != aVscrollSB->GetThumbPos() )
{
Invalidate();
Update();
@@ -603,8 +603,8 @@ void SvxShowCharSet::SelectIndex( int nNewIndex, bool bFocus )
Point aOldPixel = MapIndexToPixel( nSelectedIndex );
aOldPixel.Move( +1, +1);
Size aOutputSize = GetOutputSizePixel();
if (aVscrollSB.IsVisible())
aOutputSize.Width() -= aVscrollSB.GetOptimalSize().Width();
if (aVscrollSB->IsVisible())
aOutputSize.Width() -= aVscrollSB->GetOptimalSize().Width();
DrawRect( getGridRectangle(aOldPixel, aOutputSize) );
SetLineColor( aLineCol );
SetFillColor( aFillCol );
@@ -655,7 +655,7 @@ void SvxShowCharSet::SelectCharacter( sal_UCS4 cNew, bool bFocus )
if( !bFocus )
{
// move selected item to top row if not in focus
aVscrollSB.SetThumbPos( nMapIndex / COLUMN_COUNT );
aVscrollSB->SetThumbPos( nMapIndex / COLUMN_COUNT );
Invalidate();
}
}
@@ -691,8 +691,15 @@ IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl)
SvxShowCharSet::~SvxShowCharSet()
{
dispose();
}
void SvxShowCharSet::dispose()
{
if ( m_pAccessible )
ReleaseAccessible();
aVscrollSB.disposeAndClear();
Control::dispose();
}
void SvxShowCharSet::ReleaseAccessible()
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
index e7f3542..514e3de 100644
--- a/svx/source/dialog/checklbx.cxx
+++ b/svx/source/dialog/checklbx.cxx
@@ -50,7 +50,13 @@ void SvxCheckListBox::SetNormalStaticImage(const Image& rNormalStaticImage)
SvxCheckListBox::~SvxCheckListBox()
{
dispose();
}
void SvxCheckListBox::dispose()
{
delete pCheckButton;
SvTreeListBox::dispose();
}
void SvxCheckListBox::Init_Impl()
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 70b82e5..336bfdc 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -105,10 +105,6 @@ void CompressGraphicsDialog::Initialize()
Update();
}
CompressGraphicsDialog::~CompressGraphicsDialog()
{
}
void CompressGraphicsDialog::Update()
{
GfxLinkType aLinkType = m_aGraphic.GetLink().GetType();
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
index 6cb3175..2b636c2 100644
--- a/svx/source/dialog/connctrl.cxx
+++ b/svx/source/dialog/connctrl.cxx
@@ -57,7 +57,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxXConnectionPreview(
SvxXConnectionPreview::~SvxXConnectionPreview()
{
dispose();
}
void SvxXConnectionPreview::dispose()
{
delete pObjList;
Control::dispose();
}
void SvxXConnectionPreview::Resize()
diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx
index 7b73b28..13bc7be 100644
--- a/svx/source/dialog/contimp.hxx
+++ b/svx/source/dialog/contimp.hxx
@@ -84,6 +84,7 @@ public:
SvxSuperContourDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
vcl::Window* pParent);
virtual ~SvxSuperContourDlg();
virtual void dispose() SAL_OVERRIDE;
void SetExecState( bool bEnable );
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
index cea52c2..8b4fded 100644
--- a/svx/source/dialog/contwnd.cxx
+++ b/svx/source/dialog/contwnd.cxx
@@ -43,10 +43,6 @@ ContourWindow::ContourWindow( vcl::Window* pParent, WinBits nBits ) :
SetWinStyle( WB_SDRMODE );
}
ContourWindow::~ContourWindow()
{
}
void ContourWindow::SetPolyPolygon( const tools::PolyPolygon& rPolyPoly )
{
SdrPage* pPage = (SdrPage*) pModel->GetPage( 0 );
diff --git a/svx/source/dialog/contwnd.hxx b/svx/source/dialog/contwnd.hxx
index 2bbf9a6f..e96118c 100644
--- a/svx/source/dialog/contwnd.hxx
+++ b/svx/source/dialog/contwnd.hxx
@@ -50,7 +50,6 @@ protected:
public:
ContourWindow(vcl::Window* pParent, WinBits nBits);
virtual ~ContourWindow();
void SetPolyPolygon( const tools::PolyPolygon& rPolyPoly );
const tools::PolyPolygon& GetPolyPolygon();
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 3cd2d26..48b50b0 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -112,7 +112,13 @@ SvxRedlinTable::SvxRedlinTable(SvSimpleTableContainer& rParent, WinBits nBits)
SvxRedlinTable::~SvxRedlinTable()
{
dispose();
}
void SvxRedlinTable::dispose()
{
delete pCommentSearcher;
SvSimpleTable::dispose();
}
sal_Int32 SvxRedlinTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* pRight)
@@ -411,7 +417,13 @@ void SvxTPView::DeactivatePage()
SvxTPView::~SvxTPView()
{
dispose();
}
void SvxTPView::dispose()
{
delete m_pViewData;
TabPage::dispose();
}
void SvxTPView::InsertWriterHeader()
@@ -1066,8 +1078,14 @@ SvxAcceptChgCtr::SvxAcceptChgCtr(vcl::Window* pParent, VclBuilderContainer* pTop
SvxAcceptChgCtr::~SvxAcceptChgCtr()
{
dispose();
}
void SvxAcceptChgCtr::dispose()
{
delete pTPView;
delete pTPFilter;
TabControl::dispose();
}
void SvxAcceptChgCtr::ShowFilterPage()
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx
index 55016d2..514dd15 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -267,10 +267,6 @@ DialControl::DialControl( vcl::Window* pParent, WinBits nBits ) :
Init( GetOutputSizePixel() );
}
DialControl::~DialControl()
{
}
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeDialControl(vcl::Window *pParent, VclBuilder::stringmap &)
{
return new DialControl(pParent, WB_TABSTOP);
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index ce43581..8cf27409c 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -69,8 +69,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvx3DPreviewControl(vc
Svx3DPreviewControl::~Svx3DPreviewControl()
{
dispose();
}
void Svx3DPreviewControl::dispose()
{
delete mp3DView;
delete mpModel;
Control::dispose();
}
void Svx3DPreviewControl::Construct()
@@ -272,12 +278,6 @@ Svx3DLightControl::Svx3DLightControl(vcl::Window* pParent, WinBits nStyle)
Construct2();
}
Svx3DLightControl::~Svx3DLightControl()
{
// SdrObjects like mpExpansionObject and mpLampBottomObject/mpLampShaftObject get deleted
// with deletion of the DrawingLayer and model
}
void Svx3DLightControl::Construct2()
{
{
@@ -948,10 +948,10 @@ basegfx::B3DVector Svx3DLightControl::GetLightDirection(sal_uInt32 nNum) const
SvxLightCtl3D::SvxLightCtl3D( vcl::Window* pParent)
: Control(pParent, WB_BORDER | WB_TABSTOP),
maLightControl(this, 0),
maHorScroller(this, WB_HORZ | WB_DRAG),
maVerScroller(this, WB_VERT | WB_DRAG),
maSwitcher(this, 0)
maLightControl(new Svx3DLightControl(this, 0)),
maHorScroller(new ScrollBar(this, WB_HORZ | WB_DRAG)),
maVerScroller(new ScrollBar(this, WB_VERT | WB_DRAG)),
maSwitcher(new PushButton(this, 0))
{
// init members
Init();
@@ -970,33 +970,33 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxLightCtl3D(vcl::Win
void SvxLightCtl3D::Init()
{
// #i58240# set HelpIDs for scrollbars and switcher
maHorScroller.SetHelpId(HID_CTRL3D_HSCROLL);
maVerScroller.SetHelpId(HID_CTRL3D_VSCROLL);
maSwitcher.SetHelpId(HID_CTRL3D_SWITCHER);
maSwitcher.SetAccessibleName(SVX_RESSTR(STR_SWITCH));
maHorScroller->SetHelpId(HID_CTRL3D_HSCROLL);
maVerScroller->SetHelpId(HID_CTRL3D_VSCROLL);
maSwitcher->SetHelpId(HID_CTRL3D_SWITCHER);
maSwitcher->SetAccessibleName(SVX_RESSTR(STR_SWITCH));
// Light preview
maLightControl.Show();
maLightControl.SetChangeCallback( LINK(this, SvxLightCtl3D, InternalInteractiveChange) );
maLightControl.SetSelectionChangeCallback( LINK(this, SvxLightCtl3D, InternalSelectionChange) );
maLightControl->Show();
maLightControl->SetChangeCallback( LINK(this, SvxLightCtl3D, InternalInteractiveChange) );
maLightControl->SetSelectionChangeCallback( LINK(this, SvxLightCtl3D, InternalSelectionChange) );
// Horiz Scrollbar
maHorScroller.Show();
maHorScroller.SetRange(Range(0, 36000));
maHorScroller.SetLineSize(100);
maHorScroller.SetPageSize(1000);
maHorScroller.SetScrollHdl( LINK(this, SvxLightCtl3D, ScrollBarMove) );
maHorScroller->Show();
maHorScroller->SetRange(Range(0, 36000));
maHorScroller->SetLineSize(100);
maHorScroller->SetPageSize(1000);
maHorScroller->SetScrollHdl( LINK(this, SvxLightCtl3D, ScrollBarMove) );
// Vert Scrollbar
maVerScroller.Show();
maVerScroller.SetRange(Range(0, 18000));
maVerScroller.SetLineSize(100);
maVerScroller.SetPageSize(1000);
maVerScroller.SetScrollHdl( LINK(this, SvxLightCtl3D, ScrollBarMove) );
maVerScroller->Show();
maVerScroller->SetRange(Range(0, 18000));
maVerScroller->SetLineSize(100);
maVerScroller->SetPageSize(1000);
maVerScroller->SetScrollHdl( LINK(this, SvxLightCtl3D, ScrollBarMove) );
// Switch Button
maSwitcher.Show();
maSwitcher.SetClickHdl( LINK(this, SvxLightCtl3D, ButtonPress) );
maSwitcher->Show();
maSwitcher->SetClickHdl( LINK(this, SvxLightCtl3D, ButtonPress) );
// check selection
CheckSelection();
@@ -1007,6 +1007,16 @@ void SvxLightCtl3D::Init()
SvxLightCtl3D::~SvxLightCtl3D()
{
dispose();
}
void SvxLightCtl3D::dispose()
{
maLightControl.disposeAndClear();
maHorScroller.disposeAndClear();
maVerScroller.disposeAndClear();
maSwitcher.disposeAndClear();
Control::dispose();
}
void SvxLightCtl3D::Resize()
@@ -1022,43 +1032,43 @@ void SvxLightCtl3D::NewLayout()
{
// Layout members
const Size aSize(GetOutputSizePixel());
const sal_Int32 nScrollSize(maHorScroller.GetSizePixel().Height());
const sal_Int32 nScrollSize(maHorScroller->GetSizePixel().Height());
// Preview control
Point aPoint(0, 0);
Size aDestSize(aSize.Width() - nScrollSize, aSize.Height() - nScrollSize);
maLightControl.SetPosSizePixel(aPoint, aDestSize);
maLightControl->SetPosSizePixel(aPoint, aDestSize);
// hor scrollbar
aPoint.Y() = aSize.Height() - nScrollSize;
aDestSize.Height() = nScrollSize;
maHorScroller.SetPosSizePixel(aPoint, aDestSize);
maHorScroller->SetPosSizePixel(aPoint, aDestSize);
// vert scrollbar
aPoint.X() = aSize.Width() - nScrollSize;
aPoint.Y() = 0;
aDestSize.Width() = nScrollSize;
aDestSize.Height() = aSize.Height() - nScrollSize;
maVerScroller.SetPosSizePixel(aPoint, aDestSize);
maVerScroller->SetPosSizePixel(aPoint, aDestSize);
// button
aPoint.Y() = aSize.Height() - nScrollSize;
aDestSize.Height() = nScrollSize;
maSwitcher.SetPosSizePixel(aPoint, aDestSize);
maSwitcher->SetPosSizePixel(aPoint, aDestSize);
}
void SvxLightCtl3D::CheckSelection()
{
const bool bSelectionValid(maLightControl.IsSelectionValid() || maLightControl.IsGeometrySelected());
maHorScroller.Enable(bSelectionValid);
maVerScroller.Enable(bSelectionValid);
const bool bSelectionValid(maLightControl->IsSelectionValid() || maLightControl->IsGeometrySelected());
maHorScroller->Enable(bSelectionValid);
maVerScroller->Enable(bSelectionValid);
if(bSelectionValid)
{
double fHor(0.0), fVer(0.0);
maLightControl.GetPosition(fHor, fVer);
maHorScroller.SetThumbPos( sal_Int32(fHor * 100.0) );
maVerScroller.SetThumbPos( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
maLightControl->GetPosition(fHor, fVer);
maHorScroller->SetThumbPos( sal_Int32(fHor * 100.0) );
maVerScroller->SetThumbPos( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
}
}
@@ -1066,7 +1076,7 @@ void SvxLightCtl3D::move( double fDeltaHor, double fDeltaVer )
{
double fHor(0.0), fVer(0.0);
maLightControl.GetPosition(fHor, fVer);
maLightControl->GetPosition(fHor, fVer);
fHor += fDeltaHor;
fVer += fDeltaVer;
@@ -1076,9 +1086,9 @@ void SvxLightCtl3D::move( double fDeltaHor, double fDeltaVer )
if ( fVer < -90.0 )
return;
maLightControl.SetPosition(fHor, fVer);
maHorScroller.SetThumbPos( sal_Int32(fHor * 100.0) );
maVerScroller.SetThumbPos( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
maLightControl->SetPosition(fHor, fVer);
maHorScroller->SetThumbPos( sal_Int32(fHor * 100.0) );
maVerScroller->SetThumbPos( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
if(maUserInteractiveChangeCallback.IsSet())
{
@@ -1124,9 +1134,9 @@ void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt )
}
case KEY_PAGEUP:
{
sal_Int32 nLight(maLightControl.GetSelectedLight() - 1);
sal_Int32 nLight(maLightControl->GetSelectedLight() - 1);
while((nLight >= 0) && !maLightControl.GetLightOnOff(nLight))
while((nLight >= 0) && !maLightControl->GetLightOnOff(nLight))
{
nLight--;
}
@@ -1135,7 +1145,7 @@ void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt )
{
nLight = 7;
while((nLight >= 0) && !maLightControl.GetLightOnOff(nLight))
while((nLight >= 0) && !maLightControl->GetLightOnOff(nLight))
{
nLight--;
}
@@ -1143,7 +1153,7 @@ void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt )
if(nLight >= 0)
{
maLightControl.SelectLight(nLight);
maLightControl->SelectLight(nLight);
CheckSelection();
if(maUserSelectionChangeCallback.IsSet())
@@ -1156,9 +1166,9 @@ void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt )
}
case KEY_PAGEDOWN:
{
sal_Int32 nLight(maLightControl.GetSelectedLight() - 1);
sal_Int32 nLight(maLightControl->GetSelectedLight() - 1);
while(nLight <= 7 && !maLightControl.GetLightOnOff(nLight))
while(nLight <= 7 && !maLightControl->GetLightOnOff(nLight))
{
nLight++;
}
@@ -1167,7 +1177,7 @@ void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt )
{
nLight = 0;
while(nLight <= 7 && !maLightControl.GetLightOnOff(nLight))
while(nLight <= 7 && !maLightControl->GetLightOnOff(nLight))
{
nLight++;
}
@@ -1175,7 +1185,7 @@ void SvxLightCtl3D::KeyInput( const KeyEvent& rKEvt )
if(nLight <= 7)
{
maLightControl.SelectLight(nLight);
maLightControl->SelectLight(nLight);
CheckSelection();
if(maUserSelectionChangeCallback.IsSet())
@@ -1202,16 +1212,16 @@ void SvxLightCtl3D::GetFocus()
{
CheckSelection();
Size aFocusSize = maLightControl.GetOutputSizePixel();
Size aFocusSize = maLightControl->GetOutputSizePixel();
aFocusSize.Width() -= 4;
aFocusSize.Height() -= 4;
Rectangle aFocusRect( Point( 2, 2 ), aFocusSize );
aFocusRect = maLightControl.PixelToLogic( aFocusRect );
aFocusRect = maLightControl->PixelToLogic( aFocusRect );
maLightControl.ShowFocus( aFocusRect );
maLightControl->ShowFocus( aFocusRect );
}
}
@@ -1219,15 +1229,15 @@ void SvxLightCtl3D::LoseFocus()
{
Control::LoseFocus();
maLightControl.HideFocus();
maLightControl->HideFocus();
}
IMPL_LINK_NOARG(SvxLightCtl3D, ScrollBarMove)
{
const sal_Int32 nHor(maHorScroller.GetThumbPos());
const sal_Int32 nVer(maVerScroller.GetThumbPos());
const sal_Int32 nHor(maHorScroller->GetThumbPos());
const sal_Int32 nVer(maVerScroller->GetThumbPos());
maLightControl.SetPosition(
maLightControl->SetPosition(
((double)nHor) / 100.0,
((double)((18000 - nVer) - 9000)) / 100.0);
@@ -1257,9 +1267,9 @@ IMPL_LINK_NOARG(SvxLightCtl3D, InternalInteractiveChange)
{
double fHor(0.0), fVer(0.0);
maLightControl.GetPosition(fHor, fVer);
maHorScroller.SetThumbPos( sal_Int32(fHor * 100.0) );
maVerScroller.SetThumbPos( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
maLightControl->GetPosition(fHor, fVer);
maHorScroller->SetThumbPos( sal_Int32(fHor * 100.0) );
maVerScroller->SetThumbPos( 18000 - sal_Int32((fVer + 90.0) * 100.0) );
if(maUserInteractiveChangeCallback.IsSet())
{
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 075cc89..46890c6 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -106,10 +106,16 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxRectCtl(vcl::Window
SvxRectCtl::~SvxRectCtl()
{
dispose();
}
void SvxRectCtl::dispose()
{
delete pBitmap;
if( pAccContext )
pAccContext->release();
Control::dispose();
}
@@ -841,7 +847,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxPixelCtl(vcl::Windo
SvxPixelCtl::~SvxPixelCtl( )
{
dispose();
}
void SvxPixelCtl::dispose()
{
delete []pPixel;
Control::dispose();
}
// Changes the foreground or Background color
@@ -1594,10 +1606,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeLineLB(vcl::Window *pP
return pListBox;
}
LineLB::~LineLB()
{
}
void LineLB::setAddStandardFields(bool bNew)
{
if(getAddStandardFields() != bNew)
@@ -1696,10 +1704,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeLineEndLB(vcl::Window
return pListBox;
}
LineEndLB::~LineEndLB(void)
{
}
void LineEndLB::Fill( const XLineEndListRef &pList, bool bStart )
{
if( !pList.is() )
@@ -1833,8 +1837,14 @@ SvxPreviewBase::SvxPreviewBase(vcl::Window* pParent)
SvxPreviewBase::~SvxPreviewBase()
{
dispose();
}
void SvxPreviewBase::dispose()
{
delete mpModel;
delete mpBufferDevice;
Control::dispose();
}
void SvxPreviewBase::LocalPrePaint()
@@ -1988,12 +1998,18 @@ Size SvxXLinePreview::GetOptimalSize() const
SvxXLinePreview::~SvxXLinePreview()
{
dispose();
}
void SvxXLinePreview::dispose()
{
SdrObject *pFoo = mpLineObjA;
SdrObject::Free( pFoo );
pFoo = mpLineObjB;
SdrObject::Free( pFoo );
pFoo = mpLineObjC;
SdrObject::Free( pFoo );
SvxPreviewBase::dispose();
}
@@ -2094,7 +2110,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxXRectPreview(vcl::W
SvxXRectPreview::~SvxXRectPreview()
{
dispose();
}
void SvxXRectPreview::dispose()
{
SdrObject::Free(mpRectangleObject);
SvxPreviewBase::dispose();
}
void SvxXRectPreview::SetAttributes(const SfxItemSet& rItemSet)
@@ -2149,8 +2171,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxXShadowPreview (vcl
SvxXShadowPreview::~SvxXShadowPreview()
{
dispose();
}
void SvxXShadowPreview::dispose()
{
SdrObject::Free(mpRectangleObject);
SdrObject::Free(mpRectangleShadow);
SvxPreviewBase::dispose();
}
void SvxXShadowPreview::SetRectangleAttributes(const SfxItemSet& rItemSet)
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index b0a0653..274bbaa 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -539,8 +539,14 @@ PluginProgressWindow::PluginProgressWindow( vcl::Window*
PluginProgressWindow::~PluginProgressWindow()
{
dispose();
}
void PluginProgressWindow::dispose()
{
if (m_xProgress.is())
m_xProgress->dispose();
vcl::Window::dispose();
}
@@ -808,10 +814,6 @@ RecovDocList::RecovDocList(SvSimpleTableContainer& rParent, ResMgr &rResMgr)
{
}
RecovDocList::~RecovDocList()
{
}
void RecovDocList::InitEntry(SvTreeListEntry* pEntry,
const OUString& rText,
const Image& rImage1,
@@ -901,7 +903,13 @@ RecoveryDialog::RecoveryDialog(vcl::Window* pParent, RecoveryCore* pCore)
RecoveryDialog::~RecoveryDialog()
{
dispose();
}
void RecoveryDialog::dispose()
{
delete m_pFileListLB;
Dialog::dispose();
}
short RecoveryDialog::execute()
@@ -1232,11 +1240,6 @@ BrokenRecoveryDialog::BrokenRecoveryDialog(vcl::Window* pParent ,
}
BrokenRecoveryDialog::~BrokenRecoveryDialog()
{
}
void BrokenRecoveryDialog::impl_refresh()
{
m_bExecutionNeeded = false;
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 98a054b..66ad4cf 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -502,7 +502,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxFontPrevWindow(vcl:
SvxFontPrevWindow::~SvxFontPrevWindow()
{
dispose();
}
void SvxFontPrevWindow::dispose()
{
delete pImpl;
vcl::Window::dispose();
}
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index 27a0677..9a4777c 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -243,6 +243,7 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx,
pCtrlItems[9] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWXVAL, *this, rBindings);
pCtrlItems[10] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWYVAL, *this, rBindings);
<<<<<<< HEAD
Size aSize = m_pTbxStyle->CalcWindowSizePixel();
m_pTbxStyle->SetSizePixel(aSize);
m_pTbxStyle->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectStyleHdl_Impl) );
@@ -281,6 +282,46 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx,
}
m_pShadowColorLB->SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) );
=======
Size aSize = aTbxStyle->CalcWindowSizePixel();
aTbxStyle->SetSizePixel(aSize);
aTbxStyle->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectStyleHdl_Impl) );
aTbxAdjust->SetSizePixel(aSize);
aTbxAdjust->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectAdjustHdl_Impl) );
aTbxShadow->SetSizePixel(aSize);
aTbxShadow->SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectShadowHdl_Impl) );
Link aLink = LINK(this, SvxFontWorkDialog, ModifyInputHdl_Impl);
aMtrFldDistance->SetModifyHdl( aLink );
aMtrFldTextStart->SetModifyHdl( aLink );
aMtrFldShadowX->SetModifyHdl( aLink );
aMtrFldShadowY->SetModifyHdl( aLink );
// Set System metric
const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
SetFieldUnit( *aMtrFldDistance.get(), eDlgUnit, true );
SetFieldUnit( *aMtrFldTextStart.get(), eDlgUnit, true );
SetFieldUnit( *aMtrFldShadowX.get(), eDlgUnit, true );
SetFieldUnit( *aMtrFldShadowY.get(), eDlgUnit, true );
if( eDlgUnit == FUNIT_MM )
{
aMtrFldDistance->SetSpinSize( 50 );
aMtrFldTextStart->SetSpinSize( 50 );
aMtrFldShadowX->SetSpinSize( 50 );
aMtrFldShadowY->SetSpinSize( 50 );
}
else
{
aMtrFldDistance->SetSpinSize( 10 );
aMtrFldTextStart->SetSpinSize( 10 );
aMtrFldShadowX->SetSpinSize( 10 );
aMtrFldShadowY->SetSpinSize( 10 );
}
aShadowColorLB->SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) );
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
aInputIdle.SetPriority(SchedulerPriority::LOWEST);
aInputIdle.SetIdleHdl(LINK(this, SvxFontWorkDialog, InputTimoutHdl_Impl));
@@ -288,8 +329,26 @@ SvxFontWorkDialog::SvxFontWorkDialog(SfxBindings *pBindinx,
SvxFontWorkDialog::~SvxFontWorkDialog()
{
dispose();
}
void SvxFontWorkDialog::dispose()
{
for (sal_uInt16 i = 0; i < CONTROLLER_COUNT; i++)
DELETEZ(pCtrlItems[i]);
aTbxStyle.disposeAndClear();
aTbxAdjust.disposeAndClear();
aFbDistance.disposeAndClear();
aMtrFldDistance.disposeAndClear();
aFbTextStart.disposeAndClear();
aMtrFldTextStart.disposeAndClear();
aTbxShadow.disposeAndClear();
aFbShadowX.disposeAndClear();
aMtrFldShadowX.disposeAndClear();
aFbShadowY.disposeAndClear();
aMtrFldShadowY.disposeAndClear();
aShadowColorLB.disposeAndClear();
SfxDockingWindow::dispose();
}
SfxChildAlignment SvxFontWorkDialog::CheckAlignment( SfxChildAlignment eActAlign,
@@ -347,11 +406,16 @@ void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem)
case XFT_SLANTY : nId = nStyleSlantYId; break;
default: ;//prevent warning
}
<<<<<<< HEAD
m_pTbxStyle->Enable();
=======
aTbxStyle->Enable();
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
// Make sure that there is always exactly one checked toolbox item.
if ( pItem->GetValue() == XFT_NONE )
{
<<<<<<< HEAD
m_pTbxStyle->CheckItem(nStyleRotateId, false);
m_pTbxStyle->CheckItem(nStyleUprightId, false);
m_pTbxStyle->CheckItem(nStyleSlantXId, false);
@@ -363,12 +427,29 @@ void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem)
{
m_pTbxStyle->CheckItem(nStyleOffId, false);
m_pTbxStyle->CheckItem(nId);
=======
aTbxStyle->CheckItem(TBI_STYLE_ROTATE, false);
aTbxStyle->CheckItem(TBI_STYLE_UPRIGHT, false);
aTbxStyle->CheckItem(TBI_STYLE_SLANTX, false);
aTbxStyle->CheckItem(TBI_STYLE_SLANTY, false);
aTbxStyle->CheckItem(TBI_STYLE_OFF, true);
}
else
{
aTbxStyle->CheckItem(TBI_STYLE_OFF, false);
aTbxStyle->CheckItem(nId);
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
nLastStyleTbxId = nId;
}
else
<<<<<<< HEAD
m_pTbxStyle->Disable();
=======
aTbxStyle->Disable();
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Set adjust buttons
@@ -379,6 +460,7 @@ void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem)
{
sal_uInt16 nId;
<<<<<<< HEAD
m_pTbxAdjust->Enable();
m_pMtrFldDistance->Enable();
@@ -398,14 +480,41 @@ void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem)
if ( !m_pTbxAdjust->IsItemChecked(nId) )
{
m_pTbxAdjust->CheckItem(nId);
=======
aTbxAdjust->Enable();
aMtrFldDistance->Enable();
if ( pItem->GetValue() == XFT_LEFT || pItem->GetValue() == XFT_RIGHT )
{
if ( pItem->GetValue() == XFT_LEFT ) nId = TBI_ADJUST_LEFT;
else nId = TBI_ADJUST_RIGHT;
aMtrFldTextStart->Enable();
}
else
{
if ( pItem->GetValue() == XFT_CENTER ) nId = TBI_ADJUST_CENTER;
else nId = TBI_ADJUST_AUTOSIZE;
aMtrFldTextStart->Disable();
}
if ( !aTbxAdjust->IsItemChecked(nId) )
{
aTbxAdjust->CheckItem(nId);
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
nLastAdjustTbxId = nId;
}
else
{
<<<<<<< HEAD
m_pTbxAdjust->Disable();
m_pMtrFldTextStart->Disable();
m_pMtrFldDistance->Disable();
=======
aTbxAdjust->Disable();
aMtrFldTextStart->Disable();
aMtrFldDistance->Disable();
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
@@ -414,9 +523,15 @@ void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem)
void SvxFontWorkDialog::SetDistance_Impl(const XFormTextDistanceItem* pItem)
{
// Use HasChildPathFocus() instead of HasFocus() at SpinFields
<<<<<<< HEAD
if ( pItem && !m_pMtrFldDistance->HasChildPathFocus() )
{
SetMetricValue(*m_pMtrFldDistance, pItem->GetValue(), SFX_MAPUNIT_100TH_MM);
=======
if ( pItem && !aMtrFldDistance->HasChildPathFocus() )
{
SetMetricValue( *aMtrFldDistance.get(), pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
@@ -425,9 +540,15 @@ void SvxFontWorkDialog::SetDistance_Impl(const XFormTextDistanceItem* pItem)
void SvxFontWorkDialog::SetStart_Impl(const XFormTextStartItem* pItem)
{
// Use HasChildPathFocus() instead of HasFocus() at SpinFields
<<<<<<< HEAD
if ( pItem && !m_pMtrFldTextStart->HasChildPathFocus() )
{
SetMetricValue(*m_pMtrFldTextStart, pItem->GetValue(), SFX_MAPUNIT_100TH_MM);
=======
if ( pItem && !aMtrFldTextStart->HasChildPathFocus() )
{
SetMetricValue( *aMtrFldTextStart.get(), pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
@@ -436,7 +557,11 @@ void SvxFontWorkDialog::SetStart_Impl(const XFormTextStartItem* pItem)
void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem)
{
if ( pItem )
<<<<<<< HEAD
m_pTbxAdjust->CheckItem(nAdjustMirrorId, pItem->GetValue());
=======
aTbxAdjust->CheckItem(TBI_ADJUST_MIRROR, pItem->GetValue());
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Set button for contour display
@@ -444,7 +569,11 @@ void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem)
void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem)
{
if ( pItem )
<<<<<<< HEAD
m_pTbxShadow->CheckItem(nShowFormId, !pItem->GetValue());
=======
aTbxShadow->CheckItem(TBI_SHOWFORM, !pItem->GetValue());
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Set button for text border
@@ -452,7 +581,11 @@ void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem)
void SvxFontWorkDialog::SetOutline_Impl(const XFormTextOutlineItem* pItem)
{
if ( pItem )
<<<<<<< HEAD
m_pTbxShadow->CheckItem(nOutlineId, pItem->GetValue());
=======
aTbxShadow->CheckItem(TBI_OUTLINE, pItem->GetValue());
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Set shadow buttons
@@ -464,6 +597,7 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
{
sal_uInt16 nId;
<<<<<<< HEAD
m_pTbxShadow->Enable();
if ( pItem->GetValue() == XFTSHADOW_NONE )
@@ -482,12 +616,33 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
m_pMtrFldShadowX->Enable();
m_pMtrFldShadowY->Enable();
m_pShadowColorLB->Enable();
=======
aTbxShadow->Enable();
if ( pItem->GetValue() == XFTSHADOW_NONE )
{
nId = TBI_SHADOW_OFF;
aFbShadowX->Hide();
aFbShadowY->Hide();
aMtrFldShadowX->Disable();
aMtrFldShadowY->Disable();
aShadowColorLB->Disable();
}
else
{
aFbShadowX->Show();
aFbShadowY->Show();
aMtrFldShadowX->Enable();
aMtrFldShadowY->Enable();
aShadowColorLB->Enable();
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
if ( pItem->GetValue() == XFTSHADOW_NORMAL )
{
nId = nShadowNormalId;
const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
<<<<<<< HEAD
m_pMtrFldShadowX->SetUnit( eDlgUnit );
m_pMtrFldShadowX->SetDecimalDigits(2);
m_pMtrFldShadowX->SetMin(LONG_MIN);
@@ -510,6 +665,30 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
{
SetMetricValue(*m_pMtrFldShadowX, nSaveShadowX, SFX_MAPUNIT_100TH_MM);
SetMetricValue(*m_pMtrFldShadowY, nSaveShadowY, SFX_MAPUNIT_100TH_MM);
=======
aMtrFldShadowX->SetUnit( eDlgUnit );
aMtrFldShadowX->SetDecimalDigits(2);
aMtrFldShadowX->SetMin(LONG_MIN);
aMtrFldShadowX->SetMax(LONG_MAX);
if( eDlgUnit == FUNIT_MM )
aMtrFldShadowX->SetSpinSize( 50 );
else
aMtrFldShadowX->SetSpinSize( 10 );
aMtrFldShadowY->SetUnit( eDlgUnit );
aMtrFldShadowY->SetDecimalDigits(2);
aMtrFldShadowY->SetMin(LONG_MIN);
aMtrFldShadowY->SetMax(LONG_MAX);
if( eDlgUnit == FUNIT_MM )
aMtrFldShadowY->SetSpinSize( 50 );
else
aMtrFldShadowY->SetSpinSize( 10 );
if ( bRestoreValues )
{
SetMetricValue( *aMtrFldShadowX.get(), nSaveShadowX, SFX_MAPUNIT_100TH_MM );
SetMetricValue( *aMtrFldShadowY.get(), nSaveShadowY, SFX_MAPUNIT_100TH_MM );
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
XFormTextShadowXValItem aXItem( nSaveShadowX );
XFormTextShadowYValItem aYItem( nSaveShadowY );
@@ -522,6 +701,7 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
{
nId = nShadowSlantId;
<<<<<<< HEAD
m_pMtrFldShadowX->SetUnit(FUNIT_DEGREE);
m_pMtrFldShadowX->SetDecimalDigits(1);
m_pMtrFldShadowX->SetMin(-1800);
@@ -538,6 +718,24 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
{
m_pMtrFldShadowX->SetValue(nSaveShadowAngle);
m_pMtrFldShadowY->SetValue(nSaveShadowSize);
=======
aMtrFldShadowX->SetUnit(FUNIT_CUSTOM);
aMtrFldShadowX->SetDecimalDigits(1);
aMtrFldShadowX->SetMin(-1800);
aMtrFldShadowX->SetMax( 1800);
aMtrFldShadowX->SetSpinSize(10);
aMtrFldShadowY->SetUnit(FUNIT_PERCENT);
aMtrFldShadowY->SetDecimalDigits(0);
aMtrFldShadowY->SetMin(-999);
aMtrFldShadowY->SetMax( 999);
aMtrFldShadowY->SetSpinSize(10);
if ( bRestoreValues )
{
aMtrFldShadowX->SetValue(nSaveShadowAngle);
aMtrFldShadowY->SetValue(nSaveShadowSize);
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
XFormTextShadowXValItem aXItem(nSaveShadowAngle);
XFormTextShadowYValItem aYItem(nSaveShadowSize);
GetBindings().GetDispatcher()->Execute(
@@ -546,9 +744,15 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
}
}
<<<<<<< HEAD
if ( !m_pTbxShadow->IsItemChecked(nId) )
{
m_pTbxShadow->CheckItem(nId);
=======
if ( !aTbxShadow->IsItemChecked(nId) )
{
aTbxShadow->CheckItem(nId);
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
nLastShadowTbxId = nId;
@@ -556,10 +760,17 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
}
else
{
<<<<<<< HEAD
m_pTbxShadow->Disable();
m_pMtrFldShadowX->Disable();
m_pMtrFldShadowY->Disable();
m_pShadowColorLB->Disable();
=======
aTbxShadow->Disable();
aMtrFldShadowX->Disable();
aMtrFldShadowY->Disable();
aShadowColorLB->Disable();
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
@@ -568,7 +779,11 @@ void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
void SvxFontWorkDialog::SetShadowColor_Impl(const XFormTextShadowColorItem* pItem)
{
if ( pItem )
<<<<<<< HEAD
m_pShadowColorLB->SelectEntry(pItem->GetColorValue());
=======
aShadowColorLB->SelectEntry(pItem->GetColorValue());
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
// Enter X-value for shadow in edit field
@@ -576,7 +791,11 @@ void SvxFontWorkDialog::SetShadowColor_Impl(const XFormTextShadowColorItem* pIte
void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
{
// Use HasChildPathFocus() instead of HasFocus() at SpinFields
<<<<<<< HEAD
if ( pItem && !m_pMtrFldShadowX->HasChildPathFocus() )
=======
if ( pItem && !aMtrFldShadowX->HasChildPathFocus() )
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
{
// #i19251#
// sal_Int32 nValue = pItem->GetValue();
@@ -585,7 +804,11 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
// The two involved fields/items are used double and contain/give different
// values regarding to the access method. Thus, here we need to separate the access
// methos regarding to the kind of value accessed.
<<<<<<< HEAD
if (m_pTbxShadow->IsItemChecked(nShadowSlantId))
=======
if(aTbxShadow->IsItemChecked(TBI_SHADOW_SLANT))
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
{
// #i19251#
// There is no value correction necessary at all, i think this
@@ -593,11 +816,19 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
// involved fields/items are used double and contain/give different
// values regarding to the access method.
// nValue = nValue - ( int( float( nValue ) / 360.0 ) * 360 );
<<<<<<< HEAD
m_pMtrFldShadowX->SetValue(pItem->GetValue());
}
else
{
SetMetricValue(*m_pMtrFldShadowX, pItem->GetValue(), SFX_MAPUNIT_100TH_MM);
=======
aMtrFldShadowX->SetValue(pItem->GetValue());
}
else
{
SetMetricValue( *aMtrFldShadowX.get(), pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
}
@@ -607,12 +838,17 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
void SvxFontWorkDialog::SetShadowYVal_Impl(const XFormTextShadowYValItem* pItem)
{
// Use HasChildPathFocus() instead of HasFocus() at SpinFields
<<<<<<< HEAD
if ( pItem && !m_pMtrFldShadowY->HasChildPathFocus() )
=======
if ( pItem && !aMtrFldShadowY->HasChildPathFocus() )
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
{
// #i19251#
// The two involved fields/items are used double and contain/give different
// values regarding to the access method. Thus, here we need to separate the access
// methos regarding to the kind of value accessed.
<<<<<<< HEAD
if (m_pTbxShadow->IsItemChecked(nShadowSlantId))
{
m_pMtrFldShadowY->SetValue(pItem->GetValue());
@@ -620,13 +856,26 @@ void SvxFontWorkDialog::SetShadowYVal_Impl(const XFormTextShadowYValItem* pItem)
else
{
SetMetricValue(*m_pMtrFldShadowY, pItem->GetValue(), SFX_MAPUNIT_100TH_MM);
=======
if(aTbxShadow->IsItemChecked(TBI_SHADOW_SLANT))
{
aMtrFldShadowY->SetValue(pItem->GetValue());
}
else
{
SetMetricValue( *aMtrFldShadowY.get(), pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
}
IMPL_LINK_NOARG(SvxFontWorkDialog, SelectStyleHdl_Impl)
{
<<<<<<< HEAD
sal_uInt16 nId = m_pTbxStyle->GetCurItemId();
=======
sal_uInt16 nId = aTbxStyle->GetCurItemId();
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
// Execute this block when a different toolbox item has been clicked or
// when the off item has been clicked. The later is necessary to
@@ -656,11 +905,19 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, SelectStyleHdl_Impl)
IMPL_LINK_NOARG(SvxFontWorkDialog, SelectAdjustHdl_Impl)
{
<<<<<<< HEAD
sal_uInt16 nId = m_pTbxAdjust->GetCurItemId();
=======
sal_uInt16 nId = aTbxAdjust->GetCurItemId();
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
if (nId == nAdjustMirrorId)
{
<<<<<<< HEAD
XFormTextMirrorItem aItem(m_pTbxAdjust->IsItemChecked(nId));
=======
XFormTextMirrorItem aItem(aTbxAdjust->IsItemChecked(nId));
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_MIRROR, SfxCallMode::SLOT, &aItem, 0L );
}
else if ( nId != nLastAdjustTbxId )
@@ -684,16 +941,28 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, SelectAdjustHdl_Impl)
IMPL_LINK_NOARG(SvxFontWorkDialog, SelectShadowHdl_Impl)
{
<<<<<<< HEAD
sal_uInt16 nId = m_pTbxShadow->GetCurItemId();
=======
sal_uInt16 nId = aTbxShadow->GetCurItemId();
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
if (nId == nShowFormId)
{
<<<<<<< HEAD
XFormTextHideFormItem aItem(!m_pTbxShadow->IsItemChecked(nId));
=======
XFormTextHideFormItem aItem(!aTbxShadow->IsItemChecked(nId));
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_HIDEFORM, SfxCallMode::RECORD, &aItem, 0L );
}
else if (nId == nOutlineId)
{
<<<<<<< HEAD
XFormTextOutlineItem aItem(m_pTbxShadow->IsItemChecked(nId));
=======
XFormTextOutlineItem aItem(aTbxShadow->IsItemChecked(nId));
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_OUTLINE, SfxCallMode::RECORD, &aItem, 0L );
}
else if (nId != nLastShadowTbxId)
@@ -702,13 +971,23 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, SelectShadowHdl_Impl)
if (nLastShadowTbxId == nShadowNormalId)
{
<<<<<<< HEAD
nSaveShadowX = GetCoreValue(*m_pMtrFldShadowX, SFX_MAPUNIT_100TH_MM);
nSaveShadowY = GetCoreValue(*m_pMtrFldShadowY, SFX_MAPUNIT_100TH_MM);
=======
nSaveShadowX = GetCoreValue( *aMtrFldShadowX.get(), SFX_MAPUNIT_100TH_MM );
nSaveShadowY = GetCoreValue( *aMtrFldShadowY.get(), SFX_MAPUNIT_100TH_MM );
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
else if (nLastShadowTbxId == nShadowSlantId)
{
<<<<<<< HEAD
nSaveShadowAngle = static_cast<long>(m_pMtrFldShadowX->GetValue());
nSaveShadowSize = static_cast<long>(m_pMtrFldShadowY->GetValue());
=======
nSaveShadowAngle = static_cast<long>(aMtrFldShadowX->GetValue());
nSaveShadowSize = static_cast<long>(aMtrFldShadowY->GetValue());
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
nLastShadowTbxId = nId;
@@ -735,6 +1014,7 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl)
// listen, this is however not possible at the moment due to compabillity
// issues.
const FieldUnit eDlgUnit = rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
<<<<<<< HEAD
if( eDlgUnit != m_pMtrFldDistance->GetUnit() )
{
SetFieldUnit(*m_pMtrFldDistance, eDlgUnit, true);
@@ -754,6 +1034,27 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl)
long nValue = GetCoreValue(*m_pMtrFldDistance, SFX_MAPUNIT_100TH_MM);
XFormTextDistanceItem aDistItem( nValue );
nValue = GetCoreValue(*m_pMtrFldTextStart, SFX_MAPUNIT_100TH_MM);
=======
if( eDlgUnit != aMtrFldDistance->GetUnit() )
{
SetFieldUnit( *aMtrFldDistance.get(), eDlgUnit, true );
SetFieldUnit( *aMtrFldTextStart.get(), eDlgUnit, true );
aMtrFldDistance->SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
aMtrFldTextStart->SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
}
if( eDlgUnit != aMtrFldShadowX->GetUnit() &&
aTbxShadow->IsItemChecked( TBI_SHADOW_NORMAL ) )
{
SetFieldUnit( *aMtrFldShadowX.get(), eDlgUnit, true );
SetFieldUnit( *aMtrFldShadowY.get(), eDlgUnit, true );
aMtrFldShadowX->SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
aMtrFldShadowY->SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
}
long nValue = GetCoreValue( *aMtrFldDistance.get(), SFX_MAPUNIT_100TH_MM );
XFormTextDistanceItem aDistItem( nValue );
nValue = GetCoreValue( *aMtrFldTextStart.get(), SFX_MAPUNIT_100TH_MM );
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
XFormTextStartItem aStartItem( nValue );
sal_Int32 nValueX(0L);
@@ -765,13 +1066,23 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl)
// methos regarding to the kind of value accessed.
if (nLastShadowTbxId == nShadowNormalId)
{
<<<<<<< HEAD
nValueX = GetCoreValue(*m_pMtrFldShadowX, SFX_MAPUNIT_100TH_MM);
nValueY = GetCoreValue(*m_pMtrFldShadowY, SFX_MAPUNIT_100TH_MM);
=======
nValueX = GetCoreValue( *aMtrFldShadowX.get(), SFX_MAPUNIT_100TH_MM );
nValueY = GetCoreValue( *aMtrFldShadowY.get(), SFX_MAPUNIT_100TH_MM );
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
else if (nLastShadowTbxId == nShadowSlantId)
{
<<<<<<< HEAD
nValueX = static_cast<long>(m_pMtrFldShadowX->GetValue());
nValueY = static_cast<long>(m_pMtrFldShadowY->GetValue());
=======
nValueX = static_cast<long>(aMtrFldShadowX->GetValue());
nValueY = static_cast<long>(aMtrFldShadowY->GetValue());
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
XFormTextShadowXValItem aShadowXItem( nValueX );
@@ -785,7 +1096,11 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl)
IMPL_LINK_NOARG(SvxFontWorkDialog, ColorSelectHdl_Impl)
{
<<<<<<< HEAD
XFormTextShadowColorItem aItem( "", m_pShadowColorLB->GetSelectEntryColor() );
=======
XFormTextShadowColorItem aItem( "", aShadowColorLB->GetSelectEntryColor() );
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_SHDWCOLOR, SfxCallMode::RECORD, &aItem, 0L );
return 0;
}
@@ -795,13 +1110,19 @@ void SvxFontWorkDialog::SetColorList(const XColorListRef &pList)
if ( pList.is() && pList != pColorList )
{
pColorList = pList;
<<<<<<< HEAD
m_pShadowColorLB->Clear();
m_pShadowColorLB->Fill(pColorList);
=======
aShadowColorLB->Clear();
aShadowColorLB->Fill(pColorList);
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
}
void SvxFontWorkDialog::ApplyImageList()
{
<<<<<<< HEAD
if (nLastShadowTbxId == nShadowSlantId)
{
m_pFbShadowX->SetImage(Image(SVX_RES(RID_SVXIMG_SHADOW_ANGLE)));
@@ -812,6 +1133,29 @@ void SvxFontWorkDialog::ApplyImageList()
m_pFbShadowX->SetImage(Image(SVX_RES(RID_SVXIMG_SHADOW_XDIST)));
m_pFbShadowY->SetImage(Image(SVX_RES(RID_SVXIMG_SHADOW_YDIST)));
}
=======
ImageList& rImgLst = maImageList;
aTbxStyle->SetImageList( rImgLst );
aTbxAdjust->SetImageList( rImgLst );
aTbxShadow->SetImageList( rImgLst );
switch( nLastShadowTbxId )
{
case TBI_SHADOW_SLANT:
aFbShadowX->SetImage( rImgLst.GetImage( TBI_SHADOW_ANGLE ) );
aFbShadowY->SetImage( rImgLst.GetImage( TBI_SHADOW_SIZE ) );
break;
default:
aFbShadowX->SetImage( rImgLst.GetImage( TBI_SHADOW_XDIST ) );
aFbShadowY->SetImage( rImgLst.GetImage( TBI_SHADOW_YDIST ) );
break;
}
aFbDistance->SetImage( rImgLst.GetImage( TBI_DISTANCE ) );
aFbTextStart->SetImage( rImgLst.GetImage( TBI_TEXTSTART ) );
>>>>>>> 71c7563... vcl: VclPtr conversion in svx (part1)
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/frmdirlbox.cxx b/svx/source/dialog/frmdirlbox.cxx
index de7ff69..5c2465d 100644
--- a/svx/source/dialog/frmdirlbox.cxx
+++ b/svx/source/dialog/frmdirlbox.cxx
@@ -44,10 +44,6 @@ FrameDirectionListBox::FrameDirectionListBox( vcl::Window* pParent, WinBits nBit
{
}
FrameDirectionListBox::~FrameDirectionListBox()
{
}
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeFrameDirectionListBox(vcl::Window *pParent, VclBuilder::stringmap &)
{
FrameDirectionListBox* pListBox = new FrameDirectionListBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_TABSTOP);
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 911a09a..305b226 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -269,6 +269,7 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) :
}
FrameSelectorImpl::~FrameSelectorImpl()
{
if( mpAccess )
mpAccess->Invalidate();
@@ -794,10 +795,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxFrameSelector(vcl::
return new FrameSelector(pParent);
}
FrameSelector::~FrameSelector()
{
}
void FrameSelector::Initialize( FrameSelFlags nFlags )
{
mxImpl->Initialize( nFlags );
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 2cbee88..d2d6d8a 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -84,6 +84,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeGraphCtrl(vcl::Window
GraphCtrl::~GraphCtrl()
{
dispose();
}
void GraphCtrl::dispose()
{
if( mpAccContext )
{
mpAccContext->disposing();
@@ -92,6 +97,7 @@ GraphCtrl::~GraphCtrl()
delete pView;
delete pModel;
delete pUserCall;
Control::dispose();
}
void GraphCtrl::SetWinStyle( WinBits nWinBits )
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index c62b4b1..dd463c0 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -203,7 +203,13 @@ SvxHFPage::SvxHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 n
SvxHFPage::~SvxHFPage()
{
dispose();
}
void SvxHFPage::dispose()
{
delete pBBSet;
SfxTabPage::dispose();
}
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 741379b..d6c3e7e 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -217,9 +217,15 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window
SvxIMapDlg::~SvxIMapDlg()
{
dispose();
}
void SvxIMapDlg::dispose()
{
// Delete URL-List
delete pIMapWnd;
delete pOwnData;
SfxModelessDialog::dispose();
}
bool SvxIMapDlg::Close()
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 536750d..17e6017 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -72,8 +72,14 @@ IMapWindow::IMapWindow( vcl::Window* pParent, WinBits nBits, const Reference< XF
IMapWindow::~IMapWindow()
{
dispose();
}
void IMapWindow::dispose()
{
SfxItemPool::Free(pIMapPool);
delete[] pItemInfo;
GraphCtrl::dispose();
}
Size IMapWindow::GetOptimalSize() const
diff --git a/svx/source/dialog/imapwnd.hxx b/svx/source/dialog/imapwnd.hxx
index 3d88924..9969c56 100644
--- a/svx/source/dialog/imapwnd.hxx
+++ b/svx/source/dialog/imapwnd.hxx
@@ -134,6 +134,7 @@ public:
IMapWindow( vcl::Window* pParent, WinBits nBits, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame );
virtual ~IMapWindow();
virtual void dispose() SAL_OVERRIDE;
bool ReplaceActualIMapInfo( const NotifyInfo& rNewInfo );
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 7606ee3..403f03e 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -499,11 +499,6 @@ SvxLanguageBox::SvxLanguageBox( vcl::Window* pParent, WinBits nBits, bool bCheck
ImplLanguageBoxBaseInit();
}
SvxLanguageBox::~SvxLanguageBox()
{
}
SvxLanguageComboBox::SvxLanguageComboBox( vcl::Window* pParent, WinBits nBits, bool bCheck )
: ComboBox( pParent, nBits )
, SvxLanguageBoxBase( bCheck )
@@ -520,11 +515,6 @@ SvxLanguageComboBox::SvxLanguageComboBox( vcl::Window* pParent, WinBits nBits, b
SetModifyHdl( LINK( this, SvxLanguageComboBox, EditModifyHdl ) );
}
SvxLanguageComboBox::~SvxLanguageComboBox()
{
}
sal_Int32 SvxLanguageBox::ImplInsertImgEntry( const OUString& rEntry, sal_Int32 nPos, bool bChecked )
{
return InsertEntry( rEntry, (bChecked ? m_aCheckedImage : m_aNotCheckedImage), nPos );
diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx
index 9015d1a..a256374 100644
--- a/svx/source/dialog/linkwarn.cxx
+++ b/svx/source/dialog/linkwarn.cxx
@@ -43,11 +43,17 @@ SvxLinkWarningDialog::SvxLinkWarningDialog( vcl::Window* pParent, const OUString
SvxLinkWarningDialog::~SvxLinkWarningDialog()
{
dispose();
}
void SvxLinkWarningDialog::dispose()
{
// save value of "warning off" checkbox, if necessary
SvtMiscOptions aMiscOpt;
bool bChecked = m_pWarningOnBox->IsChecked();
if ( aMiscOpt.ShowLinkWarningDialog() != bChecked )
aMiscOpt.SetShowLinkWarningDialog( bChecked );
MessageDialog::dispose();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx
index 1099559..3ba702b 100644
--- a/svx/source/dialog/measctrl.cxx
+++ b/svx/source/dialog/measctrl.cxx
@@ -78,6 +78,11 @@ Size SvxXMeasurePreview::GetOptimalSize() const
SvxXMeasurePreview::~SvxXMeasurePreview()
{
dispose();
}
void SvxXMeasurePreview::dispose()
{
// No one is deleting the MeasureObj? This is not only an error but also
// a memory leak (!). Main problem is that this object is still listening to
// a StyleSheet of the model which was set. Thus, if You want to keep the obnject,
@@ -86,6 +91,7 @@ SvxXMeasurePreview::~SvxXMeasurePreview()
delete pMeasureObj;
delete pModel;
Control::dispose();
}
void SvxXMeasurePreview::Paint( const Rectangle& )
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index 08a7e9c..6b6c245 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -90,8 +90,14 @@ SvxPageWindow::SvxPageWindow(vcl::Window* pParent)
SvxPageWindow::~SvxPageWindow()
{
dispose();
}
void SvxPageWindow::dispose()
{
delete pHdBorder;
delete pFtBorder;
vcl::Window::dispose();
}
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxPageWindow(vcl::Window *pParent, VclBuilder::stringmap &)
diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx
index c794ebb..8f80ab8 100644
--- a/svx/source/dialog/passwd.cxx
+++ b/svx/source/dialog/passwd.cxx
@@ -99,11 +99,4 @@ SvxPasswordDialog::SvxPasswordDialog(vcl::Window* pParent, bool bAllowEmptyPassw
SvxPasswordDialog::~SvxPasswordDialog()
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/prtqry.cxx b/svx/source/dialog/prtqry.cxx
index d14872f..9a6d750 100644
--- a/svx/source/dialog/prtqry.cxx
+++ b/svx/source/dialog/prtqry.cxx
@@ -37,9 +37,4 @@ SvxPrtQryBox::SvxPrtQryBox(vcl::Window* pParent) :
SetButtonHelpText( RET_OK, OUString() );
}
SvxPrtQryBox::~SvxPrtQryBox()
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 7c05cd5..2400f2d 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -263,9 +263,15 @@ SvxRubyDialog::SvxRubyDialog(SfxBindings *pBind, SfxChildWindow *pCW,
SvxRubyDialog::~SvxRubyDialog()
{
dispose();
}
void SvxRubyDialog::dispose()
{
ClearCharStyleList();
EventObject aEvent;
xImpl->disposing(aEvent);
SfxModelessDialog::dispose();
}
void SvxRubyDialog::ClearCharStyleList()
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index a8b7267..5820f28 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -345,6 +345,11 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWi
SvxSearchDialog::~SvxSearchDialog()
{
dispose();
}
void SvxSearchDialog::dispose()
{
Hide();
rBindings.EnterRegistrations();
@@ -359,6 +364,7 @@ SvxSearchDialog::~SvxSearchDialog()
delete pImpl;
delete pSearchList;
delete pReplaceList;
SfxModelessDialog::dispose();
}
void SvxSearchDialog::Construct_Impl()
diff --git a/svx/source/dialog/stddlg.cxx b/svx/source/dialog/stddlg.cxx
index d06e524..9ae4ca2 100644
--- a/svx/source/dialog/stddlg.cxx
+++ b/svx/source/dialog/stddlg.cxx
@@ -35,8 +35,4 @@ SvxStandardDialog::SvxStandardDialog(vcl::Window *pParent, const OUString& rID,
{
}
SvxStandardDialog::~SvxStandardDialog()
{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 3b6ad3f..32f3065 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -423,7 +423,13 @@ void SvxNumValueSet::init(sal_uInt16 nType)
SvxNumValueSet::~SvxNumValueSet()
{
dispose();
}
void SvxNumValueSet::dispose()
{
delete pVDev;
ValueSet::dispose();
}
void SvxNumValueSet::SetNumberingSettings(
@@ -487,8 +493,14 @@ void SvxBmpNumValueSet::init()
SvxBmpNumValueSet::~SvxBmpNumValueSet()
{
dispose();
}
void SvxBmpNumValueSet::dispose()
{
GalleryExplorer::EndLocking(GALLERY_THEME_BULLETS);
aFormatIdle.Stop();
SvxNumValueSet::dispose();
}
void SvxBmpNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 2ac5aae..b02eb03 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -341,6 +341,11 @@ SvxRuler::SvxRuler(
SvxRuler::~SvxRuler()
{
dispose();
}
void SvxRuler::dispose()
{
/* Destructor ruler; release internal buffer */
REMOVE_DEBUG_WINDOW
if(bListening)
@@ -353,6 +358,7 @@ SvxRuler::~SvxRuler()
delete[] pCtrlItem;
pBindings->LeaveRegistrations();
Ruler::dispose();
}
long SvxRuler::MakePositionSticky(long aPosition, long aPointOfReference, bool aSnapToFrameMargin) const
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index 236e5d6..4cc3151 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -62,10 +62,6 @@ Size SvxSwFrameExample::GetOptimalSize() const
return LogicToPixel(Size(52, 86), MapMode(MAP_APPFONT));
}
SvxSwFrameExample::~SvxSwFrameExample()
{
}
void SvxSwFrameExample::InitColors_Impl( void )
{
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index 1f453d5..2eb940b 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -59,7 +59,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxTextEncodingBox(vcl
SvxTextEncodingBox::~SvxTextEncodingBox()
{
dispose();
}
void SvxTextEncodingBox::dispose()
{
delete m_pEncTable;
ListBox::dispose();
}
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index 6a9bd08..cf12376 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -325,6 +325,11 @@ Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* p
Svx3DWin::~Svx3DWin()
{
dispose();
}
void Svx3DWin::dispose()
{
delete p3DView;
delete pVDev;
delete pModel;
@@ -336,6 +341,16 @@ Svx3DWin::~Svx3DWin()
delete mpRemember2DAttributes;
delete mpImpl;
aBtnGeo.disposeAndClear();
aBtnRepresentation.disposeAndClear();
aBtnLight.disposeAndClear();
aBtnTexture.disposeAndClear();
aBtnMaterial.disposeAndClear();
aBtnUpdate.disposeAndClear();
aBtnAssign.disposeAndClear();
SfxDockingWindow::dispose();
}
@@ -2270,7 +2285,7 @@ IMPL_LINK( Svx3DWin, ClickViewTypeHdl, void *, pBtn )
m_pBtnLight->Check( eViewType == VIEWTYPE_LIGHT );
m_pBtnTexture->Check( eViewType == VIEWTYPE_TEXTURE );
m_pBtnMaterial->Check( eViewType == VIEWTYPE_MATERIAL );
}
}
return 0L;
}
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index f905336..0ad429b 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -134,7 +134,13 @@ FmGridHeader::FmGridHeader( BrowseBox* pParent, WinBits nWinBits)
FmGridHeader::~FmGridHeader()
{
dispose();
}
void FmGridHeader::dispose()
{
delete m_pImpl;
FmGridHeader::dispose();
}
sal_uInt16 FmGridHeader::GetModelColumnPos(sal_uInt16 nId) const
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 84a3bde..a60522a 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -333,72 +333,92 @@ void DbGridControl::NavigationBar::PositionDataSource(sal_Int32 nRecord)
DbGridControl::NavigationBar::NavigationBar(vcl::Window* pParent, WinBits nStyle)
:Control(pParent, nStyle)
,m_aRecordText(this, WB_VCENTER)
,m_aAbsolute(this, WB_CENTER | WB_VCENTER)
,m_aRecordOf(this, WB_VCENTER)
,m_aRecordCount(this, WB_VCENTER)
,m_aFirstBtn(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS)
,m_aPrevBtn(this, WB_REPEAT|WB_RECTSTYLE|WB_NOPOINTERFOCUS)
,m_aNextBtn(this, WB_REPEAT|WB_RECTSTYLE|WB_NOPOINTERFOCUS)
,m_aLastBtn(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS)
,m_aNewBtn(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS)
,m_aRecordText(new FixedText(this, WB_VCENTER))
,m_aAbsolute(new DbGridControl::NavigationBar::AbsolutePos(this, WB_CENTER | WB_VCENTER))
,m_aRecordOf(new FixedText(this, WB_VCENTER))
,m_aRecordCount(new FixedText(this, WB_VCENTER))
,m_aFirstBtn(new ImageButton(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS))
,m_aPrevBtn(new ImageButton(this, WB_REPEAT|WB_RECTSTYLE|WB_NOPOINTERFOCUS))
,m_aNextBtn(new ImageButton(this, WB_REPEAT|WB_RECTSTYLE|WB_NOPOINTERFOCUS))
,m_aLastBtn(new ImageButton(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS))
,m_aNewBtn(new ImageButton(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS))
,m_nDefaultWidth(0)
,m_nCurrentPos(-1)
,m_bPositioning(false)
{
m_aFirstBtn.SetSymbol(SymbolType::FIRST);
m_aPrevBtn.SetSymbol(SymbolType::PREV);
m_aNextBtn.SetSymbol(SymbolType::NEXT);
m_aLastBtn.SetSymbol(SymbolType::LAST);
m_aNewBtn.SetModeImage(static_cast<DbGridControl*>(pParent)->GetImage(DbGridControl_Base::NEW));
m_aFirstBtn->SetSymbol(SymbolType::FIRST);
m_aPrevBtn->SetSymbol(SymbolType::PREV);
m_aNextBtn->SetSymbol(SymbolType::NEXT);
m_aLastBtn->SetSymbol(SymbolType::LAST);
m_aNewBtn->SetModeImage(static_cast<DbGridControl*>(pParent)->GetImage(DbGridControl_Base::NEW));
m_aFirstBtn.SetHelpId(HID_GRID_TRAVEL_FIRST);
m_aPrevBtn.SetHelpId(HID_GRID_TRAVEL_PREV);
m_aNextBtn.SetHelpId(HID_GRID_TRAVEL_NEXT);
m_aLastBtn.SetHelpId(HID_GRID_TRAVEL_LAST);
m_aNewBtn.SetHelpId(HID_GRID_TRAVEL_NEW);
m_aAbsolute.SetHelpId(HID_GRID_TRAVEL_ABSOLUTE);
m_aRecordCount.SetHelpId(HID_GRID_NUMBEROFRECORDS);
m_aFirstBtn->SetHelpId(HID_GRID_TRAVEL_FIRST);
m_aPrevBtn->SetHelpId(HID_GRID_TRAVEL_PREV);
m_aNextBtn->SetHelpId(HID_GRID_TRAVEL_NEXT);
m_aLastBtn->SetHelpId(HID_GRID_TRAVEL_LAST);
m_aNewBtn->SetHelpId(HID_GRID_TRAVEL_NEW);
m_aAbsolute->SetHelpId(HID_GRID_TRAVEL_ABSOLUTE);
m_aRecordCount->SetHelpId(HID_GRID_NUMBEROFRECORDS);
// Handler fuer Buttons einrichten
m_aFirstBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
m_aPrevBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
m_aNextBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
m_aLastBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
m_aNewBtn.SetClickHdl(LINK(this,NavigationBar,OnClick));
m_aFirstBtn->SetClickHdl(LINK(this,NavigationBar,OnClick));
m_aPrevBtn->SetClickHdl(LINK(this,NavigationBar,OnClick));
m_aNextBtn->SetClickHdl(LINK(this,NavigationBar,OnClick));
m_aLastBtn->SetClickHdl(LINK(this,NavigationBar,OnClick));
m_aNewBtn->SetClickHdl(LINK(this,NavigationBar,OnClick));
m_aRecordText.SetText(SVX_RESSTR(RID_STR_REC_TEXT));
m_aRecordOf.SetText(SVX_RESSTR(RID_STR_REC_FROM_TEXT));
m_aRecordCount.SetText(OUString('?'));
m_aRecordText->SetText(SVX_RESSTR(RID_STR_REC_TEXT));
m_aRecordOf->SetText(SVX_RESSTR(RID_STR_REC_FROM_TEXT));
m_aRecordCount->SetText(OUString('?'));
m_nDefaultWidth = ArrangeControls();
m_aFirstBtn.Disable();
m_aPrevBtn.Disable();
m_aNextBtn.Disable();
m_aLastBtn.Disable();
m_aNewBtn.Disable();
m_aRecordText.Disable();
m_aRecordOf.Disable();
m_aRecordCount.Disable();
m_aAbsolute.Disable();
m_aFirstBtn->Disable();
m_aPrevBtn->Disable();
m_aNextBtn->Disable();
m_aLastBtn->Disable();
m_aNewBtn->Disable();
m_aRecordText->Disable();
m_aRecordOf->Disable();
m_aRecordCount->Disable();
m_aAbsolute->Disable();
AllSettings aSettings = m_aNextBtn.GetSettings();
AllSettings aSettings = m_aNextBtn->GetSettings();
MouseSettings aMouseSettings = aSettings.GetMouseSettings();
aMouseSettings.SetButtonRepeat(aMouseSettings.GetButtonRepeat() / 4);
aSettings.SetMouseSettings(aMouseSettings);
m_aNextBtn.SetSettings(aSettings, true);
m_aPrevBtn.SetSettings(aSettings, true);
m_aNextBtn->SetSettings(aSettings, true);
m_aPrevBtn->SetSettings(aSettings, true);
m_aFirstBtn.Show();
m_aPrevBtn.Show();
m_aNextBtn.Show();
m_aLastBtn.Show();
m_aNewBtn.Show();
m_aRecordText.Show();
m_aRecordOf.Show();
m_aRecordCount.Show();
m_aAbsolute.Show();
m_aFirstBtn->Show();
m_aPrevBtn->Show();
m_aNextBtn->Show();
m_aLastBtn->Show();
m_aNewBtn->Show();
m_aRecordText->Show();
m_aRecordOf->Show();
m_aRecordCount->Show();
m_aAbsolute->Show();
}
DbGridControl::NavigationBar::~NavigationBar()
{
dispose();
}
void DbGridControl::NavigationBar::dispose()
{
m_aRecordText.disposeAndClear();
m_aAbsolute.disposeAndClear();
m_aRecordOf.disposeAndClear();
m_aRecordCount.disposeAndClear();
m_aFirstBtn.disposeAndClear();
m_aPrevBtn.disposeAndClear();
m_aNextBtn.disposeAndClear();
m_aLastBtn.disposeAndClear();
m_aNewBtn.disposeAndClear();
Control::dispose();
}
namespace
@@ -423,56 +443,56 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls()
sal_uInt16 nY = 0;
// Is the font of this edit larger than the field?
if (m_aAbsolute.GetTextHeight() > nH)
if (m_aAbsolute->GetTextHeight() > nH)
{
vcl::Font aApplFont (m_aAbsolute.GetFont());
const Size pointAbsoluteSize(m_aAbsolute.PixelToLogic( Size( 0, nH - 2 ), MapMode(MAP_POINT) ));
vcl::Font aApplFont (m_aAbsolute->GetFont());
const Size pointAbsoluteSize(m_aAbsolute->PixelToLogic( Size( 0, nH - 2 ), MapMode(MAP_POINT) ));
aApplFont.SetSize( pointAbsoluteSize );
m_aAbsolute.SetControlFont( aApplFont );
m_aAbsolute->SetControlFont( aApplFont );
aApplFont.SetTransparent( true );
m_aRecordText.SetControlFont( aApplFont );
m_aRecordOf.SetControlFont( aApplFont );
m_aRecordCount.SetControlFont( aApplFont );
m_aRecordText->SetControlFont( aApplFont );
m_aRecordOf->SetControlFont( aApplFont );
m_aRecordCount->SetControlFont( aApplFont );
}
// set size and position of the control
OUString aText = m_aRecordText.GetText();
long nTextWidth = m_aRecordText.GetTextWidth(aText);
m_aRecordText.SetPosPixel(Point(nX,nY));
m_aRecordText.SetSizePixel(Size(nTextWidth,nH));
OUString aText = m_aRecordText->GetText();
long nTextWidth = m_aRecordText->GetTextWidth(aText);
m_aRecordText->SetPosPixel(Point(nX,nY));
m_aRecordText->SetSizePixel(Size(nTextWidth,nH));
nX = sal::static_int_cast< sal_uInt16 >(nX + nTextWidth + aBorder.Width());
// count an extra hairspace (U+200A) left and right
const OUString sevenDigits(m_aAbsolute.CreateFieldText(6000000));
const OUString sevenDigits(m_aAbsolute->CreateFieldText(6000000));
const OUString hairSpace(static_cast<sal_Unicode>(0x200A));
OUString textPattern(hairSpace);
textPattern += sevenDigits;
textPattern += hairSpace;
nTextWidth = m_aAbsolute.GetTextWidth( textPattern );
m_aAbsolute.SetPosPixel(Point(nX,nY));
m_aAbsolute.SetSizePixel(Size(nTextWidth, nH));
nTextWidth = m_aAbsolute->GetTextWidth( textPattern );
m_aAbsolute->SetPosPixel(Point(nX,nY));
m_aAbsolute->SetSizePixel(Size(nTextWidth, nH));
nX = sal::static_int_cast< sal_uInt16 >(nX + nTextWidth + aBorder.Width());
aText = m_aRecordOf.GetText();
nTextWidth = m_aRecordOf.GetTextWidth(aText);
m_aRecordOf.SetPosPixel(Point(nX,nY));
m_aRecordOf.SetSizePixel(Size(nTextWidth,nH));
aText = m_aRecordOf->GetText();
nTextWidth = m_aRecordOf->GetTextWidth(aText);
m_aRecordOf->SetPosPixel(Point(nX,nY));
m_aRecordOf->SetSizePixel(Size(nTextWidth,nH));
nX = sal::static_int_cast< sal_uInt16 >(nX + nTextWidth + aBorder.Width());
textPattern = sevenDigits + " * (" + sevenDigits + ")";
nTextWidth = m_aRecordCount.GetTextWidth( textPattern );
m_aRecordCount.SetPosPixel(Point(nX,nY));
m_aRecordCount.SetSizePixel(Size(nTextWidth,nH));
nTextWidth = m_aRecordCount->GetTextWidth( textPattern );
m_aRecordCount->SetPosPixel(Point(nX,nY));
m_aRecordCount->SetSizePixel(Size(nTextWidth,nH));
nX = sal::static_int_cast< sal_uInt16 >(nX + nTextWidth + aBorder.Width());
Point aButtonPos(nX,nY);
const Size aButtonSize(nH,nH);
SetPosAndSize(m_aFirstBtn, aButtonPos, aButtonSize);
SetPosAndSize(m_aPrevBtn, aButtonPos, aButtonSize);
SetPosAndSize(m_aNextBtn, aButtonPos, aButtonSize);
SetPosAndSize(m_aLastBtn, aButtonPos, aButtonSize);
SetPosAndSize(m_aNewBtn, aButtonPos, aButtonSize);
SetPosAndSize(*m_aFirstBtn.get(), aButtonPos, aButtonSize);
SetPosAndSize(*m_aPrevBtn.get(), aButtonPos, aButtonSize);
SetPosAndSize(*m_aNextBtn.get(), aButtonPos, aButtonSize);
SetPosAndSize(*m_aLastBtn.get(), aButtonPos, aButtonSize);
SetPosAndSize(*m_aNewBtn.get(), aButtonPos, aButtonSize);
nX = sal::static_int_cast< sal_uInt16 >(aButtonPos.X() + 1);
@@ -486,15 +506,15 @@ IMPL_LINK(DbGridControl::NavigationBar, OnClick, Button *, pButton )
if (pParent->m_aMasterSlotExecutor.IsSet())
{
long lResult = 0;
if (pButton == &m_aFirstBtn)
if (pButton == m_aFirstBtn.get())
lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_FIRST));
else if( pButton == &m_aPrevBtn )
else if( pButton == m_aPrevBtn.get() )
lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_PREV));
else if( pButton == &m_aNextBtn )
else if( pButton == m_aNextBtn.get() )
lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_NEXT));
else if( pButton == &m_aLastBtn )
else if( pButton == m_aLastBtn.get() )
lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_LAST));
else if( pButton == &m_aNewBtn )
else if( pButton == m_aNewBtn.get() )
lResult = pParent->m_aMasterSlotExecutor.Call(reinterpret_cast<void*>(RECORD_NEW));
if (lResult)
@@ -502,15 +522,15 @@ IMPL_LINK(DbGridControl::NavigationBar, OnClick, Button *, pButton )
return 0;
}
if (pButton == &m_aFirstBtn)
if (pButton == m_aFirstBtn.get())
pParent->MoveToFirst();
else if( pButton == &m_aPrevBtn )
else if( pButton == m_aPrevBtn.get() )
pParent->MoveToPrev();
else if( pButton == &m_aNextBtn )
else if( pButton == m_aNextBtn.get() )
pParent->MoveToNext();
else if( pButton == &m_aLastBtn )
else if( pButton == m_aLastBtn.get() )
pParent->MoveToLast();
else if( pButton == &m_aNewBtn )
else if( pButton == m_aNewBtn.get() )
pParent->AppendNew();
return 0;
}
@@ -607,60 +627,60 @@ void DbGridControl::NavigationBar::SetState(sal_uInt16 nWhich)
switch (nWhich)
{
case NavigationBar::RECORD_FIRST:
pWnd = &m_aFirstBtn;
pWnd = m_aFirstBtn.get();
break;
case NavigationBar::RECORD_PREV:
pWnd = &m_aPrevBtn;
pWnd = m_aPrevBtn.get();
break;
case NavigationBar::RECORD_NEXT:
pWnd = &m_aNextBtn;
pWnd = m_aNextBtn.get();
break;
case NavigationBar::RECORD_LAST:
pWnd = &m_aLastBtn;
pWnd = m_aLastBtn.get();
break;
case NavigationBar::RECORD_NEW:
pWnd = &m_aNewBtn;
pWnd = m_aNewBtn.get();
break;
case NavigationBar::RECORD_ABSOLUTE:
pWnd = &m_aAbsolute;
pWnd = m_aAbsolute.get();
if (bAvailable)
{
if (pParent->m_nTotalCount >= 0)
{
if (pParent->IsCurrentAppending())
m_aAbsolute.SetMax(pParent->m_nTotalCount + 1);
m_aAbsolute->SetMax(pParent->m_nTotalCount + 1);
else
m_aAbsolute.SetMax(pParent->m_nTotalCount);
m_aAbsolute->SetMax(pParent->m_nTotalCount);
}
else
m_aAbsolute.SetMax(LONG_MAX);
m_aAbsolute->SetMax(LONG_MAX);
m_aAbsolute.SetValue(m_nCurrentPos + 1);
m_aAbsolute->SetValue(m_nCurrentPos + 1);
}
else
m_aAbsolute.SetText(OUString());
m_aAbsolute->SetText(OUString());
break;
case NavigationBar::RECORD_TEXT:
pWnd = &m_aRecordText;
pWnd = m_aRecordText.get();
break;
case NavigationBar::RECORD_OF:
pWnd = &m_aRecordOf;
pWnd = m_aRecordOf.get();
break;
case NavigationBar::RECORD_COUNT:
{
pWnd = &m_aRecordCount;
pWnd = m_aRecordCount.get();
OUString aText;
if (bAvailable)
{
if (pParent->GetOptions() & DbGridControl::OPT_INSERT)
{
if (pParent->IsCurrentAppending() && !pParent->IsModified())
aText = m_aAbsolute.CreateFieldText(pParent->GetRowCount());
aText = m_aAbsolute->CreateFieldText(pParent->GetRowCount());
else
aText = m_aAbsolute.CreateFieldText(pParent->GetRowCount() - 1);
aText = m_aAbsolute->CreateFieldText(pParent->GetRowCount() - 1);
}
else
aText = m_aAbsolute.CreateFieldText(pParent->GetRowCount());
aText = m_aAbsolute->CreateFieldText(pParent->GetRowCount());
if(!pParent->m_bRecordCountFinal)
aText += " *";
}
@@ -672,7 +692,7 @@ void DbGridControl::NavigationBar::SetState(sal_uInt16 nWhich)
{
OUString aExtendedInfo(aText);
aExtendedInfo += " (";
aExtendedInfo += m_aAbsolute.CreateFieldText(pParent->GetSelectRowCount());
aExtendedInfo += m_aAbsolute->CreateFieldText(pParent->GetSelectRowCount());
aExtendedInfo += ")";
pWnd->SetText(aExtendedInfo);
}
@@ -700,8 +720,8 @@ void DbGridControl::NavigationBar::Resize()
void DbGridControl::NavigationBar::Paint(const Rectangle& rRect)
{
Control::Paint(rRect);
Point aAbsolutePos = m_aAbsolute.GetPosPixel();
Size aAbsoluteSize = m_aAbsolute.GetSizePixel();
Point aAbsolutePos = m_aAbsolute->GetPosPixel();
Size aAbsoluteSize = m_aAbsolute->GetSizePixel();
DrawLine(Point(aAbsolutePos.X() - 1, 0 ),
Point(aAbsolutePos.X() - 1, aAbsolutePos.Y() + aAbsoluteSize.Height()));
@@ -714,15 +734,15 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType )
{
Control::StateChanged( nType );
vcl::Window* pWindows[] = { &m_aRecordText,
&m_aAbsolute,
&m_aRecordOf,
&m_aRecordCount,
&m_aFirstBtn,
&m_aPrevBtn,
&m_aNextBtn,
&m_aLastBtn,
&m_aNewBtn
vcl::Window* pWindows[] = { m_aRecordText.get(),
m_aAbsolute.get(),
m_aRecordOf.get(),
m_aRecordCount.get(),
m_aFirstBtn.get(),
m_aPrevBtn.get(),
m_aNextBtn.get(),
m_aLastBtn.get(),
m_aNewBtn.get()
};
switch ( nType )
@@ -868,7 +888,7 @@ DbGridControl::DbGridControl(
WinBits nBits)
:DbGridControl_Base(pParent, EBBF_NONE, nBits, DEFAULT_BROWSE_MODE )
,m_xContext(_rxContext)
,m_aBar(this)
,m_aBar(new DbGridControl::NavigationBar(this))
,m_nAsynAdjustEvent(0)
,m_pDataSourcePropMultiplexer(NULL)
,m_pDataSourcePropListener(NULL)
@@ -903,8 +923,8 @@ DbGridControl::DbGridControl(
{
OUString sName(SVX_RESSTR(RID_STR_NAVIGATIONBAR));
m_aBar.SetAccessibleName(sName);
m_aBar.Show();
m_aBar->SetAccessibleName(sName);
m_aBar->Show();
ImplInitWindow( InitAll );
}
@@ -931,6 +951,11 @@ void DbGridControl::Init()
DbGridControl::~DbGridControl()
{
dispose();
}
void DbGridControl::dispose()
{
RemoveColumns();
{
@@ -961,6 +986,9 @@ DbGridControl::~DbGridControl()
delete m_pDataCursor;
delete m_pSeekCursor;
m_aBar.disposeAndClear();
DbGridControl_Base::dispose();
}
void DbGridControl::StateChanged( StateChangedType nType )
@@ -1017,7 +1045,7 @@ void DbGridControl::Select()
DbGridControl_Base::Select();
// as the selected rows may have changed, update the according display in our navigation bar
m_aBar.InvalidateState(NavigationBar::RECORD_COUNT);
m_aBar->InvalidateState(NavigationBar::RECORD_COUNT);
if (m_pGridListener)
m_pGridListener->selectionChanged();
@@ -1036,7 +1064,7 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat )
{
if ( m_bNavigationBar )
{
m_aBar.EnableRTL( IsRTLEnabled() );
m_aBar->EnableRTL( IsRTLEnabled() );
}
}
@@ -1044,13 +1072,13 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat )
{
if ( m_bNavigationBar )
{
vcl::Font aFont = m_aBar.GetSettings().GetStyleSettings().GetFieldFont();
vcl::Font aFont = m_aBar->GetSettings().GetStyleSettings().GetFieldFont();
if ( IsControlFont() )
m_aBar.SetControlFont( GetControlFont() );
m_aBar->SetControlFont( GetControlFont() );
else
m_aBar.SetControlFont();
m_aBar->SetControlFont();
m_aBar.SetZoom( GetZoom() );
m_aBar->SetZoom( GetZoom() );
}
}
@@ -1109,7 +1137,7 @@ void DbGridControl::RemoveRows()
// reset number of sentences to zero in the browser
DbGridControl_Base::RemoveRows();
m_aBar.InvalidateAll(m_nCurrentPos, true);
m_aBar->InvalidateAll(m_nCurrentPos, true);
}
void DbGridControl::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY)
@@ -1117,9 +1145,9 @@ void DbGridControl::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY)
// positioning of the controls
if (m_bNavigationBar)
{
nX = m_aBar.GetDefaultWidth();
nX = m_aBar->GetDefaultWidth();
Rectangle aRect(GetControlArea());
m_aBar.SetPosSizePixel(Point(0,nY + 1), Size(nX, aRect.GetSize().Height() - 1));
m_aBar->SetPosSizePixel(Point(0,nY + 1), Size(nX, aRect.GetSize().Height() - 1));
}
}
@@ -1177,9 +1205,9 @@ void DbGridControl::EnableNavigationBar(bool bEnable)
if (bEnable)
{
m_aBar.Show();
m_aBar.Enable();
m_aBar.InvalidateAll(m_nCurrentPos, true);
m_aBar->Show();
m_aBar->Enable();
m_aBar->InvalidateAll(m_nCurrentPos, true);
if ( adjustModeForScrollbars( m_nMode, m_bNavigationBar, m_bHideScrollbars ) )
SetMode( m_nMode );
@@ -1193,8 +1221,8 @@ void DbGridControl::EnableNavigationBar(bool bEnable)
}
else
{
m_aBar.Hide();
m_aBar.Disable();
m_aBar->Hide();
m_aBar->Disable();
if ( adjustModeForScrollbars( m_nMode, m_bNavigationBar, m_bHideScrollbars ) )
SetMode( m_nMode );
@@ -1560,7 +1588,7 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt
if (!IsResizing() && GetRowCount())
RecalcRows(GetTopRow(), GetVisibleRows(), true);
m_aBar.InvalidateAll(m_nCurrentPos, true);
m_aBar->InvalidateAll(m_nCurrentPos, true);
SetUpdateMode(true);
// start listening on the seek cursor
@@ -1846,7 +1874,7 @@ void DbGridControl::RowInserted(long nRow, long nNumRows, bool bDoPaint, bool bK
m_nTotalCount += nNumRows;
DbGridControl_Base::RowInserted(nRow, nNumRows, bDoPaint, bKeepSelection);
m_aBar.InvalidateState(NavigationBar::RECORD_COUNT);
m_aBar->InvalidateState(NavigationBar::RECORD_COUNT);
}
}
@@ -1865,7 +1893,7 @@ void DbGridControl::RowRemoved(long nRow, long nNumRows, bool bDoPaint)
m_nTotalCount -= nNumRows;
DbGridControl_Base::RowRemoved(nRow, nNumRows, bDoPaint);
m_aBar.InvalidateState(NavigationBar::RECORD_COUNT);
m_aBar->InvalidateState(NavigationBar::RECORD_COUNT);
}
}
@@ -1916,7 +1944,7 @@ void DbGridControl::AdjustRows()
GoToRowColumnId(nNewPos, GetColumnId(GetCurColumnId()));
if (!IsResizing() && GetRowCount())
RecalcRows(GetTopRow(), GetVisibleRows(), true);
m_aBar.InvalidateAll(m_nCurrentPos, true);
m_aBar->InvalidateAll(m_nCurrentPos, true);
}
else // too few
RowInserted(GetRowCount(), -nDelta, true);
@@ -1929,7 +1957,7 @@ void DbGridControl::AdjustRows()
else
m_nTotalCount = GetRowCount();
}
m_aBar.InvalidateState(NavigationBar::RECORD_COUNT);
m_aBar->InvalidateState(NavigationBar::RECORD_COUNT);
}
DbGridControl_Base::RowStatus DbGridControl::GetRowStatus(long nRow) const
@@ -2096,7 +2124,7 @@ void DbGridControl::CursorMoved()
}
DbGridControl_Base::CursorMoved();
m_aBar.InvalidateAll(m_nCurrentPos);
m_aBar->InvalidateAll(m_nCurrentPos);
// select the new column when they moved
if ( IsDesignMode() && GetSelectedColumnCount() > 0 && GetCurColumnId() )
@@ -2203,7 +2231,7 @@ void DbGridControl::AdjustDataSource(bool bFull)
// if the data cursor was moved from outside, this section is voided
SetNoSelection();
m_aBar.InvalidateAll(m_nCurrentPos, m_xCurrentRow.Is());
m_aBar->InvalidateAll(m_nCurrentPos, m_xCurrentRow.Is());
}
sal_Int32 DbGridControl::AlignSeekCursor()
@@ -2496,7 +2524,7 @@ void DbGridControl::MoveToPosition(sal_uInt32 nPos)
}
}
DbGridControl_Base::GoToRow(nPos);
m_aBar.InvalidateAll(m_nCurrentPos);
m_aBar->InvalidateAll(m_nCurrentPos);
}
void DbGridControl::AppendNew()
@@ -2551,7 +2579,7 @@ void DbGridControl::SetDesignMode(bool bMode)
GetDataWindow().SetMouseTransparent(bMode);
SetMouseTransparent(bMode);
m_aBar.InvalidateAll(m_nCurrentPos, true);
m_aBar->InvalidateAll(m_nCurrentPos, true);
}
}
@@ -2686,7 +2714,7 @@ void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) th
{
RowInserted(GetRowCount(), 1, true);
InvalidateStatusCell(m_nCurrentPos);
m_aBar.InvalidateAll(m_nCurrentPos);
m_aBar->InvalidateAll(m_nCurrentPos);
}
}
else
@@ -2698,7 +2726,7 @@ void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) th
{
RowRemoved(GetRowCount() - 1, 1, true);
InvalidateStatusCell(m_nCurrentPos);
m_aBar.InvalidateAll(m_nCurrentPos);
m_aBar->InvalidateAll(m_nCurrentPos);
}
}
}
@@ -2907,7 +2935,7 @@ void DbGridControl::CellModified()
// increment RowCount
RowInserted(GetRowCount(), 1, true);
InvalidateStatusCell(m_nCurrentPos);
m_aBar.InvalidateAll(m_nCurrentPos);
m_aBar->InvalidateAll(m_nCurrentPos);
}
}
else if (m_xCurrentRow->GetStatus() != GRS_MODIFIED)
@@ -2990,7 +3018,7 @@ void DbGridControl::Undo()
{ // maybe we already removed it (in resetCurrentRow, called if the above moveToInsertRow
// caused our data source form to be reset - which should be the usual case ....)
RowRemoved(GetRowCount() - 1, 1, true);
m_aBar.InvalidateAll(m_nCurrentPos);
m_aBar->InvalidateAll(m_nCurrentPos);
}
RowModified(m_nCurrentPos);
@@ -3017,7 +3045,7 @@ void DbGridControl::resetCurrentRow()
if (m_nCurrentPos == GetRowCount() - 2)
{
RowRemoved(GetRowCount() - 1, 1, true);
m_aBar.InvalidateAll(m_nCurrentPos);
m_aBar->InvalidateAll(m_nCurrentPos);
}
}
}
@@ -3184,7 +3212,7 @@ bool DbGridControl::SaveRow()
bool DbGridControl::PreNotify(NotifyEvent& rEvt)
{
// do not handle events of the Navbar
if (m_aBar.IsWindowOrChild(rEvt.GetWindow()))
if (m_aBar->IsWindowOrChild(rEvt.GetWindow()))
return BrowseBox::PreNotify(rEvt);
switch (rEvt.GetType())
@@ -3601,7 +3629,7 @@ Reference<XAccessible > DbGridControl::CreateAccessibleControl( sal_Int32 _nInde
Reference<XAccessible > xRet;
if ( _nIndex == DbGridControl_Base::GetAccessibleControlCount() )
{
xRet = m_aBar.GetAccessible();
xRet = m_aBar->GetAccessible();
}
else
xRet = DbGridControl_Base::CreateAccessibleControl( _nIndex );
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 8ecf292..2554578 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -142,7 +142,13 @@ namespace svxform
DataTreeListBox::~DataTreeListBox()
{
dispose();
}
void DataTreeListBox::dispose()
{
DeleteAndClear();
SvTreeListBox::dispose();
}
sal_Int8 DataTreeListBox::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
@@ -368,10 +374,6 @@ namespace svxform
ItemSelectHdl( m_pItemList );
}
XFormsPage::~XFormsPage()
{
}
IMPL_LINK_NOARG(XFormsPage, TbxSelectHdl)
{
DoToolBoxAction( m_pToolBox->GetCurItemId() );
@@ -1405,6 +1407,11 @@ namespace svxform
DataNavigatorWindow::~DataNavigatorWindow()
{
dispose();
}
void DataNavigatorWindow::dispose()
{
SvtViewOptions aViewOpt( E_TABDIALOG, CFGNAME_DATANAVIGATOR );
aViewOpt.SetPageID( static_cast< sal_Int32 >( m_pTabCtrl->GetCurPageId() ) );
Any aAny;
@@ -1423,6 +1430,7 @@ namespace svxform
m_xFrame->removeFrameActionListener( xListener );
RemoveBroadcaster();
m_xDataListener.clear();
vcl::Window::dispose();
}
@@ -2131,24 +2139,30 @@ namespace svxform
WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_ROLLABLE|WB_3DLOOK|WB_DOCKABLE) ),
SfxControllerItem( SID_FM_DATANAVIGATOR_CONTROL, *_pBindings ),
m_aDataWin( this, _pBindings )
m_aDataWin( new DataNavigatorWindow(this, _pBindings) )
{
SetText( SVX_RES( RID_STR_DATANAVIGATOR ) );
Size aSize = m_aDataWin.GetOutputSizePixel();
Size aSize = m_aDataWin->GetOutputSizePixel();
Size aLogSize = PixelToLogic( aSize, MAP_APPFONT );
SfxDockingWindow::SetFloatingSize( aLogSize );
m_aDataWin.Show();
m_aDataWin->Show();
}
DataNavigator::~DataNavigator()
{
dispose();
}
void DataNavigator::dispose()
{
m_aDataWin.disposeAndClear();
SfxDockingWindow::dispose();
}
void DataNavigator::StateChanged( sal_uInt16 , SfxItemState , const SfxPoolItem* )
{
@@ -2203,7 +2217,7 @@ namespace svxform
Point aExplPos = LogicToPixel( Point(1,1), MAP_APPFONT );
Size aExplSize = LogicToPixel( aLogExplSize, MAP_APPFONT );
m_aDataWin.SetPosSizePixel( aExplPos, aExplSize );
m_aDataWin->SetPosSizePixel( aExplPos, aExplSize );
}
@@ -2269,6 +2283,11 @@ namespace svxform
AddDataItemDialog::~AddDataItemDialog()
{
dispose();
}
void AddDataItemDialog::dispose()
{
if ( m_xTempBinding.is() )
{
Reference< css::xforms::XModel > xModel( m_xUIHelper, UNO_QUERY );
@@ -2291,6 +2310,7 @@ namespace svxform
// remove binding, if it does not convey 'useful' information
m_xUIHelper->removeBindingIfUseless( m_xBinding );
}
ModalDialog::dispose();
}
@@ -2872,7 +2892,13 @@ namespace svxform
NamespaceItemDialog::~NamespaceItemDialog()
{
dispose();
}
void NamespaceItemDialog::dispose()
{
delete m_pNamespacesList;
ModalDialog::dispose();
}
@@ -3063,9 +3089,15 @@ namespace svxform
AddSubmissionDialog::~AddSubmissionDialog()
{
dispose();
}
void AddSubmissionDialog::dispose()
{
// #i38991# if we have added a binding, we need to remove it as well.
if( m_xCreatedBinding.is() && m_xUIHelper.is() )
m_xUIHelper->removeBindingIfUseless( m_xCreatedBinding );
ModalDialog::dispose();
}
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 03132a7..d5a48f6 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1150,8 +1150,14 @@ FmFilterNavigator::FmFilterNavigator( vcl::Window* pParent )
FmFilterNavigator::~FmFilterNavigator()
{
dispose();
}
void FmFilterNavigator::dispose()
{
EndListening( *m_pModel );
delete m_pModel;
SvTreeListBox::dispose();
}
@@ -1861,7 +1867,13 @@ FmFilterNavigatorWin::FmFilterNavigatorWin( SfxBindings* _pBindings, SfxChildWin
FmFilterNavigatorWin::~FmFilterNavigatorWin()
{
dispose();
}
void FmFilterNavigatorWin::dispose()
{
delete m_pNavigator;
SfxDockingWindow::dispose();
}
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 57def61..f3a4326 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -253,6 +253,11 @@ void FmPropBrw::Resize()
FmPropBrw::~FmPropBrw()
{
dispose();
}
void FmPropBrw::dispose()
{
if (m_xBrowserController.is())
implDetachController();
try
@@ -275,6 +280,7 @@ FmPropBrw::~FmPropBrw()
{
DBG_UNHANDLED_EXCEPTION();
}
SfxFloatingWindow::dispose();
}
diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx
index 4a7a53b..49caf56b 100644
--- a/svx/source/form/fmexpl.cxx
+++ b/svx/source/form/fmexpl.cxx
@@ -514,7 +514,13 @@ namespace svxform
NavigatorFrame::~NavigatorFrame()
{
dispose();
}
void NavigatorFrame::dispose()
{
delete m_pNavigatorTree;
SfxDockingWindow::dispose();
}
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 46a444d..7fd2630 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -162,6 +162,11 @@ namespace svxform
NavigatorTree::~NavigatorTree()
{
dispose();
}
void NavigatorTree::dispose()
{
if( nEditEvent )
Application::RemoveUserEvent( nEditEvent );
@@ -172,6 +177,7 @@ namespace svxform
EndListening( *m_pNavModel );
Clear();
delete m_pNavModel;
SvTreeListBox::dispose();
}
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 6328a45..19a306d 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -114,11 +114,6 @@ FmFieldWinListBox::FmFieldWinListBox( FmFieldWin* pParent )
}
FmFieldWinListBox::~FmFieldWinListBox()
{
}
sal_Int8 FmFieldWinListBox::AcceptDrop( const AcceptDropEvent& /*rEvt*/ )
{
return DND_ACTION_NONE;
@@ -192,6 +187,11 @@ FmFieldWin::FmFieldWin(SfxBindings* _pBindings, SfxChildWindow* _pMgr, vcl::Wind
FmFieldWin::~FmFieldWin()
{
dispose();
}
void FmFieldWin::dispose()
{
if (m_pChangeListener)
{
m_pChangeListener->dispose();
@@ -200,6 +200,7 @@ FmFieldWin::~FmFieldWin()
}
delete pListBox;
delete pData;
SfxFloatingWindow::dispose();
}
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index 3c3e8f7..6cd514a 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -59,11 +59,6 @@ SvxFmAbsRecWin::SvxFmAbsRecWin( vcl::Window* _pParent, SfxToolBoxControl* _pCont
}
SvxFmAbsRecWin::~SvxFmAbsRecWin()
{
}
void SvxFmAbsRecWin::FirePosition( bool _bForce )
{
if ( _bForce || IsValueChangedFromSaved() )
diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx
index 5c3679e..02a5089 100644
--- a/svx/source/gallery2/GalleryControl.cxx
+++ b/svx/source/gallery2/GalleryControl.cxx
@@ -65,10 +65,6 @@ GalleryControl::GalleryControl (
InitSettings();
}
GalleryControl::~GalleryControl (void)
{
}
void GalleryControl::InitSettings (void)
{
SetBackground( Wallpaper( GALLERY_DLG_COLOR ) );
@@ -181,19 +177,19 @@ bool GalleryControl::GalleryKeyInput( const KeyEvent& rKEvt, vcl::Window* )
if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
mpBrowser2->GetViewWindow()->GrabFocus();
else if( mpBrowser2->GetViewWindow()->HasFocus() )
mpBrowser2->maViewBox.GrabFocus();
else if( mpBrowser2->maViewBox.HasFocus() )
mpBrowser1->maNewTheme.GrabFocus();
mpBrowser2->maViewBox->GrabFocus();
else if( mpBrowser2->maViewBox->HasFocus() )
mpBrowser1->maNewTheme->GrabFocus();
else
mpBrowser1->mpThemes->GrabFocus();
}
else
{
if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
mpBrowser1->maNewTheme.GrabFocus();
else if( mpBrowser1->maNewTheme.HasFocus() )
mpBrowser2->maViewBox.GrabFocus();
else if( mpBrowser2->maViewBox.HasFocus() )
mpBrowser1->maNewTheme->GrabFocus();
else if( mpBrowser1->maNewTheme->HasFocus() )
mpBrowser2->maViewBox->GrabFocus();
else if( mpBrowser2->maViewBox->HasFocus() )
mpBrowser2->GetViewWindow()->GrabFocus();
else
mpBrowser1->mpThemes->GrabFocus();
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index f6af4e4..e245dee 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -51,10 +51,6 @@ GalleryButton::GalleryButton( GalleryBrowser1* pParent, WinBits nWinBits ) :
{
}
GalleryButton::~GalleryButton()
{
}
void GalleryButton::KeyInput( const KeyEvent& rKEvt )
{
if( !static_cast< GalleryBrowser1* >( GetParent() )->KeyInput( rKEvt, this ) )
@@ -69,10 +65,6 @@ GalleryThemeListBox::GalleryThemeListBox( GalleryBrowser1* pParent, WinBits nWin
InitSettings();
}
GalleryThemeListBox::~GalleryThemeListBox()
{
}
void GalleryThemeListBox::InitSettings()
{
SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
@@ -119,7 +111,7 @@ GalleryBrowser1::GalleryBrowser1(
const ::boost::function<void(void)>& rThemeSlectionHandler)
:
Control ( pParent, WB_TABSTOP ),
maNewTheme ( this, WB_3DLOOK ),
maNewTheme ( new GalleryButton(this, WB_3DLOOK) ),
mpThemes ( new GalleryThemeListBox( this, WB_TABSTOP | WB_3DLOOK | WB_BORDER | WB_HSCROLL | WB_VSCROLL | WB_AUTOHSCROLL | WB_SORT ) ),
mpGallery ( pGallery ),
mpExchangeData ( new ExchangeData ),
@@ -132,13 +124,13 @@ GalleryBrowser1::GalleryBrowser1(
{
StartListening( *mpGallery );
maNewTheme.SetHelpId( HID_GALLERY_NEWTHEME );
maNewTheme.SetText( GAL_RESSTR(RID_SVXSTR_GALLERY_CREATETHEME));
maNewTheme.SetClickHdl( LINK( this, GalleryBrowser1, ClickNewThemeHdl ) );
maNewTheme->SetHelpId( HID_GALLERY_NEWTHEME );
maNewTheme->SetText( GAL_RESSTR(RID_SVXSTR_GALLERY_CREATETHEME));
maNewTheme->SetClickHdl( LINK( this, GalleryBrowser1, ClickNewThemeHdl ) );
// disable creation of new themes if a writable directory is not available
if( mpGallery->GetUserURL().GetProtocol() == INetProtocol::NotValid )
maNewTheme.Disable();
maNewTheme->Disable();
mpThemes->SetHelpId( HID_GALLERY_THEMELIST );
mpThemes->SetSelectHdl( LINK( this, GalleryBrowser1, SelectThemeHdl ) );
@@ -148,17 +140,24 @@ GalleryBrowser1::GalleryBrowser1(
ImplInsertThemeEntry( mpGallery->GetThemeInfo( i ) );
ImplAdjustControls();
maNewTheme.Show( true );
maNewTheme->Show( true );
mpThemes->Show( true );
}
GalleryBrowser1::~GalleryBrowser1()
{
dispose();
}
void GalleryBrowser1::dispose()
{
EndListening( *mpGallery );
delete mpThemes;
mpThemes = NULL;
delete mpExchangeData;
mpExchangeData = NULL;
maNewTheme.disposeAndClear();
Control::dispose();
}
sal_uIntPtr GalleryBrowser1::ImplInsertThemeEntry( const GalleryThemeEntry* pEntry )
@@ -190,7 +189,7 @@ void GalleryBrowser1::ImplAdjustControls()
const long nNewThemeHeight = LogicToPixel( Size( 0, 14 ), MAP_APPFONT ).Height();
const long nStartY = nNewThemeHeight + 4;
maNewTheme.SetPosSizePixel( Point(),
maNewTheme->SetPosSizePixel( Point(),
Size( aOutSize.Width(), nNewThemeHeight ) );
mpThemes->SetPosSizePixel( Point( 0, nStartY ),
diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx
index ce391f0d..1b24dd9 100644
--- a/svx/source/gallery2/galbrws1.hxx
+++ b/svx/source/gallery2/galbrws1.hxx
@@ -41,7 +41,6 @@ private:
public:
GalleryButton( GalleryBrowser1* pParent, WinBits nWinBits );
virtual ~GalleryButton();
};
// - GalleryThemeListBox -
@@ -58,7 +57,6 @@ protected:
public:
GalleryThemeListBox( GalleryBrowser1* pParent, WinBits nWinBits );
virtual ~GalleryThemeListBox();
};
// - GalleryBrowser1 -
@@ -82,7 +80,7 @@ class GalleryBrowser1 : public Control, SfxListener
private:
GalleryButton maNewTheme;
VclPtr<GalleryButton> maNewTheme;
GalleryThemeListBox* mpThemes;
Gallery* mpGallery;
ExchangeData* mpExchangeData;
@@ -127,6 +125,7 @@ public:
const ::boost::function<sal_Bool(const KeyEvent&,Window*)>& rKeyInputHandler,
const ::boost::function<void(void)>& rThemeSlectionHandler);
virtual ~GalleryBrowser1();
virtual void dispose() SAL_OVERRIDE;
void SelectTheme( const OUString& rThemeName ) { mpThemes->SelectEntry( rThemeName ); SelectThemeHdl( NULL ); }
void SelectTheme( sal_uIntPtr nThemePos ) { mpThemes->SelectEntryPos( (sal_uInt16) nThemePos ); SelectThemeHdl( NULL ); }
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index e23ab73..83849bf 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -403,10 +403,6 @@ GalleryToolBox::GalleryToolBox( GalleryBrowser2* pParent ) :
{
}
GalleryToolBox::~GalleryToolBox()
{
}
void GalleryToolBox::KeyInput( const KeyEvent& rKEvt )
{
if( !static_cast< GalleryBrowser2* >( GetParent() )->KeyInput( rKEvt, this ) )
@@ -421,9 +417,9 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) :
mpIconView ( new GalleryIconView( this, NULL ) ),
mpListView ( new GalleryListView( this, NULL ) ),
mpPreview ( new GalleryPreview(this) ),
maViewBox ( this ),
maSeparator ( this, WB_VERT ),
maInfoBar ( this, WB_LEFT | WB_VCENTER ),
maViewBox ( new GalleryToolBox(this) ),
maSeparator ( new FixedLine(this, WB_VERT) ),
maInfoBar ( new FixedText(this, WB_LEFT | WB_VCENTER) ),
mnCurActionPos ( 0xffffffff ),
meMode ( GALLERYBROWSERMODE_NONE ),
meLastMode ( GALLERYBROWSERMODE_NONE )
@@ -438,29 +434,29 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) :
Image aDummyImage;
const Link aSelectHdl( LINK( this, GalleryBrowser2, SelectObjectHdl ) );
vcl::Font aInfoFont( maInfoBar.GetControlFont() );
vcl::Font aInfoFont( maInfoBar->GetControlFont() );
maMiscOptions.AddListenerLink( LINK( this, GalleryBrowser2, MiscHdl ) );
maViewBox.InsertItem( TBX_ID_ICON, aDummyImage );
maViewBox.SetItemBits( TBX_ID_ICON, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
maViewBox.SetHelpId( TBX_ID_ICON, HID_GALLERY_ICONVIEW );
maViewBox.SetQuickHelpText( TBX_ID_ICON, GAL_RESSTR(RID_SVXSTR_GALLERY_ICONVIEW) );
maViewBox->InsertItem( TBX_ID_ICON, aDummyImage );
maViewBox->SetItemBits( TBX_ID_ICON, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
maViewBox->SetHelpId( TBX_ID_ICON, HID_GALLERY_ICONVIEW );
maViewBox->SetQuickHelpText( TBX_ID_ICON, GAL_RESSTR(RID_SVXSTR_GALLERY_ICONVIEW) );
maViewBox.InsertItem( TBX_ID_LIST, aDummyImage );
maViewBox.SetItemBits( TBX_ID_LIST, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
maViewBox.SetHelpId( TBX_ID_LIST, HID_GALLERY_LISTVIEW );
maViewBox.SetQuickHelpText( TBX_ID_LIST, GAL_RESSTR(RID_SVXSTR_GALLERY_LISTVIEW) );
maViewBox->InsertItem( TBX_ID_LIST, aDummyImage );
maViewBox->SetItemBits( TBX_ID_LIST, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK );
maViewBox->SetHelpId( TBX_ID_LIST, HID_GALLERY_LISTVIEW );
maViewBox->SetQuickHelpText( TBX_ID_LIST, GAL_RESSTR(RID_SVXSTR_GALLERY_LISTVIEW) );
MiscHdl( NULL );
maViewBox.SetSelectHdl( LINK( this, GalleryBrowser2, SelectTbxHdl ) );
maViewBox.Show();
maViewBox->SetSelectHdl( LINK( this, GalleryBrowser2, SelectTbxHdl ) );
maViewBox->Show();
mpIconView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS));
mpListView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS));
maInfoBar.Show();
maSeparator.Show();
maInfoBar->Show();
maSeparator->Show();
mpIconView->SetSelectHdl( aSelectHdl );
mpListView->SetSelectHdl( aSelectHdl );
@@ -469,15 +465,20 @@ GalleryBrowser2::GalleryBrowser2( vcl::Window* pParent, Gallery* pGallery ) :
SetMode( ( GALLERYBROWSERMODE_PREVIEW != GalleryBrowser2::meInitMode ) ? GalleryBrowser2::meInitMode : GALLERYBROWSERMODE_ICON );
if(maInfoBar.GetText().isEmpty())
if(maInfoBar->GetText().isEmpty())
mpIconView->SetAccessibleRelationLabeledBy(mpIconView);
else
mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar);
mpIconView->SetAccessibleRelationLabeledBy(maInfoBar.get());
mpIconView->SetAccessibleRelationMemberOf(mpIconView);
}
GalleryBrowser2::~GalleryBrowser2()
{
dispose();
}
void GalleryBrowser2::dispose()
{
maMiscOptions.RemoveListenerLink( LINK( this, GalleryBrowser2, MiscHdl ) );
delete mpPreview;
@@ -486,23 +487,26 @@ GalleryBrowser2::~GalleryBrowser2()
if( mpCurTheme )
mpGallery->ReleaseTheme( mpCurTheme, *this );
maSeparator.disposeAndClear();
maInfoBar.disposeAndClear();
maViewBox.disposeAndClear();
Control::dispose();
}
void GalleryBrowser2::InitSettings()
{
vcl::Font aInfoFont( maInfoBar.GetControlFont() );
vcl::Font aInfoFont( maInfoBar->GetControlFont() );
aInfoFont.SetWeight( WEIGHT_BOLD );
aInfoFont.SetColor( GALLERY_FG_COLOR );
maInfoBar.SetControlFont( aInfoFont );
maInfoBar->SetControlFont( aInfoFont );
maInfoBar.SetBackground( Wallpaper( GALLERY_DLG_COLOR ) );
maInfoBar.SetControlBackground( GALLERY_DLG_COLOR );
maInfoBar->SetBackground( Wallpaper( GALLERY_DLG_COLOR ) );
maInfoBar->SetControlBackground( GALLERY_DLG_COLOR );
maSeparator.SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
maSeparator.SetControlBackground( GALLERY_BG_COLOR );
maSeparator.SetControlForeground( GALLERY_FG_COLOR );
maSeparator->SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
maSeparator->SetControlBackground( GALLERY_BG_COLOR );
maSeparator->SetControlForeground( GALLERY_FG_COLOR );
}
void GalleryBrowser2::DataChanged( const DataChangedEvent& rDCEvt )
@@ -522,14 +526,14 @@ void GalleryBrowser2::Resize()
mpPreview->Hide();
const Size aOutSize( GetOutputSizePixel() );
const Size aBoxSize( maViewBox.GetOutputSizePixel() );
const Size aBoxSize( maViewBox->GetOutputSizePixel() );
const long nOffset = 2, nSepWidth = 2;
const long nInfoBarX = aBoxSize.Width() + ( nOffset * 3 ) + nSepWidth;
const Point aPt( 0, aBoxSize.Height() + 3 );
const Size aSz( aOutSize.Width(), aOutSize.Height() - aPt.Y() );
maSeparator.SetPosSizePixel( Point( aBoxSize.Width() + nOffset, 0 ), Size( nSepWidth, aBoxSize.Height() ) );
maInfoBar.SetPosSizePixel( Point( nInfoBarX, 0 ), Size( aOutSize.Width() - nInfoBarX, aBoxSize.Height() ) );
maSeparator->SetPosSizePixel( Point( aBoxSize.Width() + nOffset, 0 ), Size( nSepWidth, aBoxSize.Height() ) );
maInfoBar->SetPosSizePixel( Point( nInfoBarX, 0 ), Size( aOutSize.Width() - nInfoBarX, aBoxSize.Height() ) );
mpIconView->SetPosSizePixel( aPt, aSz );
mpListView->SetPosSizePixel( aPt, aSz );
@@ -661,7 +665,7 @@ bool GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, vcl::Window* pWindow )
if (pParentControl != NULL)
bRet = pParentControl->GalleryKeyInput(rKEvt, pWindow);
if( !bRet && !maViewBox.HasFocus() && nItemId && mpCurTheme )
if( !bRet && !maViewBox->HasFocus() && nItemId && mpCurTheme )
{
sal_uInt16 nExecuteId = 0;
INetURLObject aURL;
@@ -764,14 +768,14 @@ void GalleryBrowser2::SelectTheme( const OUString& rThemeName )
Resize();
ImplUpdateViews( 1 );
maViewBox.EnableItem( TBX_ID_ICON, true );
maViewBox.EnableItem( TBX_ID_LIST, true );
maViewBox.CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, true );
maViewBox->EnableItem( TBX_ID_ICON, true );
maViewBox->EnableItem( TBX_ID_LIST, true );
maViewBox->CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, true );
if(maInfoBar.GetText().isEmpty())
if(maInfoBar->GetText().isEmpty())
mpIconView->SetAccessibleRelationLabeledBy(mpIconView);
else
mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar);
mpIconView->SetAccessibleRelationLabeledBy(maInfoBar.get());
mpIconView->SetAccessibleRelationMemberOf(mpIconView);
}
@@ -793,11 +797,11 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode )
mpIconView->Show();
maViewBox.EnableItem( TBX_ID_ICON, true );
maViewBox.EnableItem( TBX_ID_LIST, true );
maViewBox->EnableItem( TBX_ID_ICON, true );
maViewBox->EnableItem( TBX_ID_LIST, true );
maViewBox.CheckItem( TBX_ID_ICON, true );
maViewBox.CheckItem( TBX_ID_LIST, false );
maViewBox->CheckItem( TBX_ID_ICON, true );
maViewBox->CheckItem( TBX_ID_LIST, false );
}
break;
@@ -811,11 +815,11 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode )
mpListView->Show();
maViewBox.EnableItem( TBX_ID_ICON, true );
maViewBox.EnableItem( TBX_ID_LIST, true );
maViewBox->EnableItem( TBX_ID_ICON, true );
maViewBox->EnableItem( TBX_ID_LIST, true );
maViewBox.CheckItem( TBX_ID_ICON, false );
maViewBox.CheckItem( TBX_ID_LIST, true );
maViewBox->CheckItem( TBX_ID_ICON, false );
maViewBox->CheckItem( TBX_ID_LIST, true );
}
break;
@@ -841,8 +845,8 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode )
if( mpCurTheme && mpCurTheme->GetObjectKind( nPos ) == SGA_OBJ_SOUND )
mpPreview->PreviewMedia( mpCurTheme->GetObjectURL( nPos ) );
maViewBox.EnableItem( TBX_ID_ICON, false );
maViewBox.EnableItem( TBX_ID_LIST, false );
maViewBox->EnableItem( TBX_ID_ICON, false );
maViewBox->EnableItem( TBX_ID_LIST, false );
}
}
break;
@@ -957,7 +961,7 @@ void GalleryBrowser2::ImplUpdateViews( sal_uInt16 nSelectionId )
void GalleryBrowser2::ImplUpdateInfoBar()
{
if( mpCurTheme )
maInfoBar.SetText( mpCurTheme->GetName() );
maInfoBar->SetText( mpCurTheme->GetName() );
}
sal_uIntPtr GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& rSelPos )
@@ -1337,7 +1341,7 @@ IMPL_LINK( GalleryBrowser2, SelectTbxHdl, ToolBox*, pBox )
IMPL_LINK_NOARG(GalleryBrowser2, MiscHdl)
{
maViewBox.SetOutStyle( maMiscOptions.GetToolboxStyle() );
maViewBox->SetOutStyle( maMiscOptions.GetToolboxStyle() );
BitmapEx aIconBmpEx = BitmapEx( Image( GAL_RES( RID_SVXIMG_GALLERY_VIEW_ICON ) ).GetBitmapEx() );
BitmapEx aListBmpEx = BitmapEx( Image( GAL_RES( RID_SVXIMG_GALLERY_VIEW_LIST ) ).GetBitmapEx() );
@@ -1350,9 +1354,9 @@ IMPL_LINK_NOARG(GalleryBrowser2, MiscHdl)
aListBmpEx.Scale( aLargeSize );
}
maViewBox.SetItemImage(TBX_ID_ICON, Image(aIconBmpEx));
maViewBox.SetItemImage(TBX_ID_LIST, Image(aListBmpEx));
maViewBox.SetSizePixel( maViewBox.CalcWindowSizePixel() );
maViewBox->SetItemImage(TBX_ID_ICON, Image(aIconBmpEx));
maViewBox->SetItemImage(TBX_ID_LIST, Image(aListBmpEx));
maViewBox->SetSizePixel( maViewBox->CalcWindowSizePixel() );
Resize();
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index 605f933..9b643a7 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -288,10 +288,6 @@ GalleryIconView::GalleryIconView( GalleryBrowser2* pParent, GalleryTheme* pTheme
SetItemHeight( S_THUMB + 6 );
}
GalleryIconView::~GalleryIconView()
{
}
void GalleryIconView::InitSettings()
{
SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
@@ -431,10 +427,6 @@ GalleryListView::GalleryListView( GalleryBrowser2* pParent, GalleryTheme* pTheme
InsertDataColumn( GALLERY_BRWBOX_TITLE, GAL_RESSTR(RID_SVXSTR_GALLERY_TITLE), 256 );
}
GalleryListView::~GalleryListView()
{
}
void GalleryListView::InitSettings()
{
SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 49bb1e3..9c54186 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -129,6 +129,7 @@ namespace svxform
public:
DataTreeListBox( vcl::Window* pParent, WinBits nBits );
virtual ~DataTreeListBox();
virtual void dispose() SAL_OVERRIDE;
virtual PopupMenu* CreateContextMenu( void ) SAL_OVERRIDE;
virtual void ExcecuteContextMenuAction( sal_uInt16 _nSelectedPopupEntry ) SAL_OVERRIDE;
@@ -288,7 +289,6 @@ namespace svxform
public:
XFormsPage( vcl::Window* pParent, DataNavigatorWindow* _pNaviWin, DataGroupType _eGroup );
virtual ~XFormsPage();
virtual void Resize() SAL_OVERRIDE;
@@ -372,6 +372,7 @@ namespace svxform
public:
DataNavigatorWindow( vcl::Window* pParent, SfxBindings* pBindings );
virtual ~DataNavigatorWindow();
virtual void dispose() SAL_OVERRIDE;
void SetDocModified();
void NotifyChanges( bool _bLoadAll = false );
@@ -388,11 +389,11 @@ namespace svxform
class DataNavigator : public SfxDockingWindow, public SfxControllerItem
{
private:
DataNavigatorWindow m_aDataWin;
VclPtr<DataNavigatorWindow> m_aDataWin;
protected:
virtual void Resize() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
virtual Size CalcDockingSize( SfxChildAlignment ) SAL_OVERRIDE;
virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment ) SAL_OVERRIDE;
@@ -400,6 +401,7 @@ namespace svxform
public:
DataNavigator( SfxBindings* pBindings, SfxChildWindow* pMgr, vcl::Window* pParent );
virtual ~DataNavigator();
virtual void dispose() SAL_OVERRIDE;
using Window::Update;
using SfxDockingWindow::StateChanged;
@@ -470,6 +472,7 @@ namespace svxform
AddDataItemDialog(
vcl::Window* pParent, ItemNode* _pNode, const XFormsUIHelper1_ref& _rUIHelper );
virtual ~AddDataItemDialog();
virtual void dispose() SAL_OVERRIDE;
void InitText( DataItemType _eType );
};
@@ -533,6 +536,7 @@ namespace svxform
public:
NamespaceItemDialog( AddConditionDialog* pParent, XNameContainer_ref& _rContainer );
virtual ~NamespaceItemDialog();
virtual void dispose() SAL_OVERRIDE;
};
@@ -593,6 +597,7 @@ namespace svxform
AddSubmissionDialog( vcl::Window* pParent, ItemNode* _pNode,
const XFormsUIHelper1_ref& _rUIHelper );
virtual ~AddSubmissionDialog();
virtual void dispose() SAL_OVERRIDE;
inline const XSubmission_ref& GetNewSubmission() const { return m_xNewSubmission; }
};
diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx
index 4241576..216ca9e 100644
--- a/svx/source/inc/docrecovery.hxx
+++ b/svx/source/inc/docrecovery.hxx
@@ -306,6 +306,7 @@ class PluginProgressWindow : public vcl::Window
PluginProgressWindow( vcl::Window* pParent ,
const css::uno::Reference< css::lang::XComponent >& xProgress);
virtual ~PluginProgressWindow();
virtual void dispose() SAL_OVERRIDE;
};
class PluginProgress : public ::cppu::WeakImplHelper2< css::task::XStatusIndicator ,
@@ -479,10 +480,6 @@ class RecovDocList : public SvSimpleTable
RecovDocList(SvSimpleTableContainer& rParent, ResMgr& rResMgr);
/** @short TODO */
virtual ~RecovDocList();
/** @short TODO */
virtual void InitEntry(SvTreeListEntry* pEntry,
const OUString& rText,
const Image& rImage1,
@@ -530,6 +527,7 @@ class RecoveryDialog : public Dialog
RecoveryCore* pCore );
virtual ~RecoveryDialog();
virtual void dispose() SAL_OVERRIDE;
// IRecoveryUpdateListener
virtual void updateItems() SAL_OVERRIDE;
@@ -579,10 +577,6 @@ class BrokenRecoveryDialog : public ModalDialog
/** @short TODO */
virtual ~BrokenRecoveryDialog();
/** @short TODO */
bool isExecutionNeeded();
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index 2ae3ff3..0fbd751 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -254,6 +254,7 @@ class FmFilterNavigator : public SvTreeListBox, public SfxListener
public:
FmFilterNavigator( vcl::Window* pParent );
virtual ~FmFilterNavigator();
virtual void dispose() SAL_OVERRIDE;
void UpdateContent(
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & xControllers,
@@ -327,6 +328,7 @@ public:
FmFilterNavigatorWin( SfxBindings *pBindings, SfxChildWindow *pMgr,
vcl::Window* pParent );
virtual ~FmFilterNavigatorWin();
virtual void dispose() SAL_OVERRIDE;
void UpdateContent( FmFormShell* pFormShell );
void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE;
diff --git a/svx/source/inc/fmPropBrw.hxx b/svx/source/inc/fmPropBrw.hxx
index a092468..fdd9d67 100644
--- a/svx/source/inc/fmPropBrw.hxx
+++ b/svx/source/inc/fmPropBrw.hxx
@@ -83,6 +83,7 @@ public:
const SfxChildWinInfo* _pInfo
);
virtual ~FmPropBrw();
virtual void dispose() SAL_OVERRIDE;
using SfxFloatingWindow::StateChanged;
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index 4c52705..e5baf40 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -501,6 +501,7 @@ namespace svxform
public:
NavigatorTree(vcl::Window* pParent );
virtual ~NavigatorTree();
virtual void dispose() SAL_OVERRIDE;
void Clear();
void UpdateContent( FmFormShell* pFormShell );
@@ -570,6 +571,7 @@ namespace svxform
NavigatorFrame( SfxBindings *pBindings, SfxChildWindow *pMgr,
vcl::Window* pParent );
virtual ~NavigatorFrame();
virtual void dispose() SAL_OVERRIDE;
void UpdateContent( FmFormShell* pFormShell );
void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE;
diff --git a/svx/source/inc/tabwin.hxx b/svx/source/inc/tabwin.hxx
index 368da98..67230a9 100644
--- a/svx/source/inc/tabwin.hxx
+++ b/svx/source/inc/tabwin.hxx
@@ -42,7 +42,6 @@ protected:
public:
FmFieldWinListBox( FmFieldWin* pParent );
virtual ~FmFieldWinListBox();
sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) SAL_OVERRIDE;
sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) SAL_OVERRIDE;
@@ -88,6 +87,7 @@ public:
SfxChildWindow *pMgr, vcl::Window* pParent);
virtual ~FmFieldWin();
virtual void dispose() SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
diff --git a/svx/source/inc/tbxform.hxx b/svx/source/inc/tbxform.hxx
index e9290a0..12bccf1 100644
--- a/svx/source/inc/tbxform.hxx
+++ b/svx/source/inc/tbxform.hxx
@@ -32,7 +32,6 @@ class SvxFmAbsRecWin : public NumericField
// for invalidating our content whe losing the focus
public:
SvxFmAbsRecWin( vcl::Window* _pParent, SfxToolBoxControl* _pController );
virtual ~SvxFmAbsRecWin();
virtual void KeyInput( const KeyEvent& rKeyEvt ) SAL_OVERRIDE;
virtual void LoseFocus() SAL_OVERRIDE;
diff --git a/svx/source/sidebar/EmptyPanel.cxx b/svx/source/sidebar/EmptyPanel.cxx
index 2d28f8a..3a25381 100644
--- a/svx/source/sidebar/EmptyPanel.cxx
+++ b/svx/source/sidebar/EmptyPanel.cxx
@@ -28,10 +28,10 @@ namespace svx { namespace sidebar {
EmptyPanel::EmptyPanel (vcl::Window* pParent)
: Control(pParent, SVX_RES(RID_SIDEBAR_EMPTY_PANEL)),
maMessageControl(this, SVX_RES(FT_MESSAGE))
maMessageControl(new FixedText(this, SVX_RES(FT_MESSAGE)))
{
maMessageControl.setPosSizePixel(5,5, 250,15);
maMessageControl.SetStyle(WB_WORDBREAK);// | WB_NOMNEMONICS);
maMessageControl->setPosSizePixel(5,5, 250,15);
maMessageControl->SetStyle(WB_WORDBREAK);// | WB_NOMNEMONICS);
//maMessageControl.GetStyle()
// & ~(WB_NOMULTILINE | WB_PATHELLIPSIS)
// | WB_WORDBREAK | WB_NOMNEMONICS);
@@ -39,24 +39,28 @@ EmptyPanel::EmptyPanel (vcl::Window* pParent)
SetBackground(Wallpaper());
maMessageControl.Show();
maMessageControl->Show();
Show();
}
EmptyPanel::~EmptyPanel (void)
EmptyPanel::~EmptyPanel()
{
dispose();
}
void EmptyPanel::dispose()
{
Control::dispose();
}
void EmptyPanel::Resize (void)
{
const Size aSize (GetSizePixel());
maMessageControl.SetSizePixel(aSize);
maMessageControl->SetSizePixel(aSize);
}
diff --git a/svx/source/sidebar/EmptyPanel.hxx b/svx/source/sidebar/EmptyPanel.hxx
index de166cf..36e0c7b 100644
--- a/svx/source/sidebar/EmptyPanel.hxx
+++ b/svx/source/sidebar/EmptyPanel.hxx
@@ -35,12 +35,13 @@ class EmptyPanel
{
public:
EmptyPanel (vcl::Window* pParent);
virtual ~EmptyPanel (void);
virtual ~EmptyPanel();
virtual void dispose() SAL_OVERRIDE;
virtual void Resize (void) SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
private:
FixedText maMessageControl;
VclPtr<FixedText> maMessageControl;
};
} } // end of namespace ::svx::sidebar
diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx
index 829fd3b..23934f6 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -26,8 +26,14 @@ PanelLayout::PanelLayout(vcl::Window* pParent, const OString& rID, const OUStrin
PanelLayout::~PanelLayout()
{
dispose();
}
void PanelLayout::dispose()
{
m_bInClose = true;
m_aPanelLayoutIdle.Stop();
Control::dispose();
}
Size PanelLayout::GetOptimalSize() const
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index 024ed48..43cf9d5 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -114,12 +114,6 @@ AreaPropertyPanel::AreaPropertyPanel(
AreaPropertyPanel::~AreaPropertyPanel()
{
}
void AreaPropertyPanel::Initialize()
{
maGradientLinear.SetXOffset(DEFAULT_CENTERX);
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hxx b/svx/source/sidebar/area/AreaPropertyPanel.hxx
index a2a9f42..aec98db 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.hxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.hxx
@@ -151,7 +151,6 @@ private:
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings);
virtual ~AreaPropertyPanel(void);
void SetupIcons(void);
void Initialize();
diff --git a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
index ebe4210..2ba2230 100644
--- a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
+++ b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
@@ -56,50 +56,50 @@ AreaTransparencyGradientControl::AreaTransparencyGradientControl (
vcl::Window* pParent,
AreaPropertyPanel& rPanel)
: PopupControl( pParent,SVX_RES(RID_POPUPPANEL_AREAPAGE_TRGR)),
maFtTrgrCenterX(this, SVX_RES(FT_TRGR_CENTER_X)),
maMtrTrgrCenterX(this, SVX_RES(MTR_TRGR_CENTER_X)),
maFtTrgrCenterY(this, SVX_RES(FT_TRGR_CENTER_Y)),
maMtrTrgrCenterY(this, SVX_RES(MTR_TRGR_CENTER_Y)),
maFtTrgrAngle(this, SVX_RES(FT_TRGR_ANGLE)),
maMtrTrgrAngle(this, SVX_RES(MTR_TRGR_ANGLE)),
maBtnLeft45(this, SVX_RES(BTN_LEFT_SECOND)),
maBtnRight45(this, SVX_RES(BTN_RIGHT_FIRST)),
maFtTrgrStartValue(this, SVX_RES(FT_TRGR_START_VALUE)),
maMtrTrgrStartValue(this, SVX_RES(MTR_TRGR_START_VALUE)),
maFtTrgrEndValue(this, SVX_RES(FT_TRGR_END_VALUE)),
maMtrTrgrEndValue(this, SVX_RES(MTR_TRGR_END_VALUE)),
maFtTrgrBorder(this, SVX_RES(FT_TRGR_BORDER)),
maMtrTrgrBorder(this, SVX_RES(MTR_TRGR_BORDER)),
maFtTrgrCenterX(new FixedText(this, SVX_RES(FT_TRGR_CENTER_X))),
maMtrTrgrCenterX(new MetricField(this, SVX_RES(MTR_TRGR_CENTER_X))),
maFtTrgrCenterY(new FixedText(this, SVX_RES(FT_TRGR_CENTER_Y))),
maMtrTrgrCenterY(new MetricField(this, SVX_RES(MTR_TRGR_CENTER_Y))),
maFtTrgrAngle(new FixedText(this, SVX_RES(FT_TRGR_ANGLE))),
maMtrTrgrAngle(new MetricField(this, SVX_RES(MTR_TRGR_ANGLE))),
maBtnLeft45(new ToolBox(this, SVX_RES(BTN_LEFT_SECOND))),
maBtnRight45(new ToolBox(this, SVX_RES(BTN_RIGHT_FIRST))),
maFtTrgrStartValue(new FixedText(this, SVX_RES(FT_TRGR_START_VALUE))),
maMtrTrgrStartValue(new MetricField(this, SVX_RES(MTR_TRGR_START_VALUE))),
maFtTrgrEndValue(new FixedText(this, SVX_RES(FT_TRGR_END_VALUE))),
maMtrTrgrEndValue(new MetricField(this, SVX_RES(MTR_TRGR_END_VALUE))),
maFtTrgrBorder(new FixedText(this, SVX_RES(FT_TRGR_BORDER))),
maMtrTrgrBorder(new MetricField(this, SVX_RES(MTR_TRGR_BORDER))),
maRotLeft( SVX_RES(IMG_ROT_LEFT)),
maRotRight( SVX_RES(IMG_ROT_RIGHT)),
mrAreaPropertyPanel(rPanel),
mpBindings(NULL)
{
Link aLink = LINK( this, AreaTransparencyGradientControl, ModifiedTrgrHdl_Impl);
maMtrTrgrCenterX.SetModifyHdl( aLink );
maMtrTrgrCenterY.SetModifyHdl( aLink );
maMtrTrgrAngle.SetModifyHdl( aLink );
maMtrTrgrBorder.SetModifyHdl( aLink );
maMtrTrgrStartValue.SetModifyHdl( aLink );
maMtrTrgrEndValue.SetModifyHdl( aLink );
maMtrTrgrCenterX->SetModifyHdl( aLink );
maMtrTrgrCenterY->SetModifyHdl( aLink );
maMtrTrgrAngle->SetModifyHdl( aLink );
maMtrTrgrBorder->SetModifyHdl( aLink );
maMtrTrgrStartValue->SetModifyHdl( aLink );
maMtrTrgrEndValue->SetModifyHdl( aLink );
aLink = LINK( this, AreaTransparencyGradientControl, Left_Click45_Impl);
maBtnLeft45.SetSelectHdl( aLink );
maBtnLeft45->SetSelectHdl( aLink );
aLink = LINK( this, AreaTransparencyGradientControl, Right_Click45_Impl);
maBtnRight45.SetSelectHdl( aLink );
maBtnLeft45.SetItemImage(1,maRotLeft);
Size aTbxSize = maBtnLeft45.CalcWindowSizePixel();
maBtnLeft45.SetOutputSizePixel( aTbxSize );
maBtnLeft45.SetQuickHelpText(1, SVX_RESSTR(STR_HELP_LEFT)); //acc wj
maBtnRight45->SetSelectHdl( aLink );
maBtnLeft45->SetItemImage(1,maRotLeft);
Size aTbxSize = maBtnLeft45->CalcWindowSizePixel();
maBtnLeft45->SetOutputSizePixel( aTbxSize );
maBtnLeft45->SetQuickHelpText(1, SVX_RESSTR(STR_HELP_LEFT)); //acc wj
maBtnRight45.SetItemImage(1,maRotRight);
aTbxSize = maBtnRight45.CalcWindowSizePixel();
maBtnRight45.SetOutputSizePixel( aTbxSize );
maBtnRight45.SetQuickHelpText(1, SVX_RESSTR(STR_HELP_RIGHT)); //acc wj
maBtnRight45->SetItemImage(1,maRotRight);
aTbxSize = maBtnRight45->CalcWindowSizePixel();
maBtnRight45->SetOutputSizePixel( aTbxSize );
maBtnRight45->SetQuickHelpText(1, SVX_RESSTR(STR_HELP_RIGHT)); //acc wj
maBtnLeft45.SetBackground(Wallpaper());
maBtnLeft45.SetPaintTransparent(true);
maBtnRight45.SetBackground(Wallpaper());
maBtnRight45.SetPaintTransparent(true);
maBtnLeft45->SetBackground(Wallpaper());
maBtnLeft45->SetPaintTransparent(true);
maBtnRight45->SetBackground(Wallpaper());
maBtnRight45->SetPaintTransparent(true);
FreeResource();
mpBindings = mrAreaPropertyPanel.GetBindings();
@@ -108,8 +108,28 @@ AreaTransparencyGradientControl::AreaTransparencyGradientControl (
AreaTransparencyGradientControl::~AreaTransparencyGradientControl (void)
AreaTransparencyGradientControl::~AreaTransparencyGradientControl()
{
dispose();
}
void AreaTransparencyGradientControl::dispose()
{
maFtTrgrCenterX.disposeAndClear();
maMtrTrgrCenterX.disposeAndClear();
maFtTrgrCenterY.disposeAndClear();
maMtrTrgrCenterY.disposeAndClear();
maFtTrgrAngle.disposeAndClear();
maMtrTrgrAngle.disposeAndClear();
maBtnLeft45.disposeAndClear();
maBtnRight45.disposeAndClear();
maFtTrgrStartValue.disposeAndClear();
maMtrTrgrStartValue.disposeAndClear();
maFtTrgrEndValue.disposeAndClear();
maMtrTrgrEndValue.disposeAndClear();
maFtTrgrBorder.disposeAndClear();
maMtrTrgrBorder.disposeAndClear();
PopupControl::dispose();
}
void AreaTransparencyGradientControl::Rearrange(XFillFloatTransparenceItem* pGradientItem)
@@ -123,60 +143,60 @@ void AreaTransparencyGradientControl::Rearrange(XFillFloatTransparenceItem* pGra
aSize2 = LogicToPixel( aSize2, MapMode(MAP_APPFONT) );
long aPosY = 0;
Point aPointAngle;
Size aSizeAngle = maMtrTrgrAngle.GetSizePixel();
Size aTbxSize = maBtnLeft45.CalcWindowSizePixel();
Size aSizeAngle = maMtrTrgrAngle->GetSizePixel();
Size aTbxSize = maBtnLeft45->CalcWindowSizePixel();
switch(eXGS)
{
case css::awt::GradientStyle_LINEAR:
case css::awt::GradientStyle_AXIAL:
maFtTrgrCenterX.Hide();
maMtrTrgrCenterX.Hide();
maFtTrgrCenterY.Hide();
maMtrTrgrCenterY.Hide();
maFtTrgrAngle.Show();
maFtTrgrAngle.SetPosPixel(APOS1_1);
maMtrTrgrAngle.Show();
maMtrTrgrAngle.SetPosPixel(APOS2_1);
maFtTrgrStartValue.SetPosPixel(APOS1_3);
maMtrTrgrStartValue.SetPosPixel(APOS1_4);
maFtTrgrEndValue.SetPosPixel(APOS2_3);
maMtrTrgrEndValue.SetPosPixel(APOS2_4);
maFtTrgrBorder.SetPosPixel(APOS1_5);
maMtrTrgrBorder.SetPosPixel(APOS1_6);
maFtTrgrCenterX->Hide();
maMtrTrgrCenterX->Hide();
maFtTrgrCenterY->Hide();
maMtrTrgrCenterY->Hide();
maFtTrgrAngle->Show();
maFtTrgrAngle->SetPosPixel(APOS1_1);
maMtrTrgrAngle->Show();
maMtrTrgrAngle->SetPosPixel(APOS2_1);
maFtTrgrStartValue->SetPosPixel(APOS1_3);
maMtrTrgrStartValue->SetPosPixel(APOS1_4);
maFtTrgrEndValue->SetPosPixel(APOS2_3);
maMtrTrgrEndValue->SetPosPixel(APOS2_4);
maFtTrgrBorder->SetPosPixel(APOS1_5);
maMtrTrgrBorder->SetPosPixel(APOS1_6);
maBtnLeft45.Show();
maBtnRight45.Show();
maBtnLeft45->Show();
maBtnRight45->Show();
aPointAngle = maMtrTrgrAngle.GetPosPixel();
aPointAngle = maMtrTrgrAngle->GetPosPixel();
aPosY = aPointAngle.getY() + aSizeAngle.getHeight() - aTbxSize.getHeight();
maBtnLeft45.SetPosPixel(Point(APOS_Left_Right_1.getX(), aPosY));
maBtnRight45.SetPosPixel(Point(APOS_Left_Right_2.getX(), aPosY));
maBtnLeft45->SetPosPixel(Point(APOS_Left_Right_1.getX(), aPosY));
maBtnRight45->SetPosPixel(Point(APOS_Left_Right_2.getX(), aPosY));
SetSizePixel(aSize2);
break;
case css::awt::GradientStyle_RADIAL:
maFtTrgrCenterX.Show();
maFtTrgrCenterX.SetPosPixel(APOS1_1);
maMtrTrgrCenterX.Show();
maMtrTrgrCenterX.SetPosPixel(APOS2_1);
maFtTrgrCenterY.Show();
maFtTrgrCenterY.SetPosPixel(APOS1_2);
maMtrTrgrCenterY.Show();
maMtrTrgrCenterY.SetPosPixel(APOS2_2);
maFtTrgrAngle.Hide();
maMtrTrgrAngle.Hide();
maFtTrgrStartValue.SetPosPixel(APOS1_3);
maMtrTrgrStartValue.SetPosPixel(APOS1_4);
maFtTrgrEndValue.SetPosPixel(APOS2_3);
maMtrTrgrEndValue.SetPosPixel(APOS2_4);
maFtTrgrBorder.SetPosPixel(APOS1_5);
maMtrTrgrBorder.SetPosPixel(APOS1_6);
maFtTrgrCenterX->Show();
maFtTrgrCenterX->SetPosPixel(APOS1_1);
maMtrTrgrCenterX->Show();
maMtrTrgrCenterX->SetPosPixel(APOS2_1);
maFtTrgrCenterY->Show();
maFtTrgrCenterY->SetPosPixel(APOS1_2);
maMtrTrgrCenterY->Show();
maMtrTrgrCenterY->SetPosPixel(APOS2_2);
maFtTrgrAngle->Hide();
maMtrTrgrAngle->Hide();
maFtTrgrStartValue->SetPosPixel(APOS1_3);
maMtrTrgrStartValue->SetPosPixel(APOS1_4);
maFtTrgrEndValue->SetPosPixel(APOS2_3);
maMtrTrgrEndValue->SetPosPixel(APOS2_4);
maFtTrgrBorder->SetPosPixel(APOS1_5);
maMtrTrgrBorder->SetPosPixel(APOS1_6);
maBtnLeft45.Hide();
maBtnRight45.Hide();
maBtnLeft45->Hide();
maBtnRight45->Hide();
SetSizePixel(aSize2);
@@ -185,34 +205,34 @@ void AreaTransparencyGradientControl::Rearrange(XFillFloatTransparenceItem* pGra
case css::awt::GradientStyle_ELLIPTICAL:
case css::awt::GradientStyle_SQUARE:
case css::awt::GradientStyle_RECT:
maFtTrgrCenterX.Show();
maFtTrgrCenterX.SetPosPixel(APOS1_1);
maMtrTrgrCenterX.Show();
maMtrTrgrCenterX.SetPosPixel(APOS2_1);
maFtTrgrCenterY.Show();
maFtTrgrCenterY.SetPosPixel(APOS1_2);
maMtrTrgrCenterY.Show();
maMtrTrgrCenterY.SetPosPixel(APOS2_2);
maFtTrgrAngle.Show();
maFtTrgrAngle.SetPosPixel(APOS1_3);
maMtrTrgrAngle.Show();
maMtrTrgrAngle.SetPosPixel(APOS1_4);
maFtTrgrCenterX->Show();
maFtTrgrCenterX->SetPosPixel(APOS1_1);
maMtrTrgrCenterX->Show();
maMtrTrgrCenterX->SetPosPixel(APOS2_1);
maFtTrgrCenterY->Show();
maFtTrgrCenterY->SetPosPixel(APOS1_2);
maMtrTrgrCenterY->Show();
maMtrTrgrCenterY->SetPosPixel(APOS2_2);
maFtTrgrAngle->Show();
maFtTrgrAngle->SetPosPixel(APOS1_3);
maMtrTrgrAngle->Show();
maMtrTrgrAngle->SetPosPixel(APOS1_4);
maFtTrgrStartValue.SetPosPixel(APOS1_5);
maMtrTrgrStartValue.SetPosPixel(APOS1_6);
maFtTrgrEndValue.SetPosPixel(APOS2_5);
maMtrTrgrEndValue.SetPosPixel(APOS2_6);
maFtTrgrBorder.SetPosPixel(APOS1_7);
maMtrTrgrBorder.SetPosPixel(APOS1_8);
maFtTrgrStartValue->SetPosPixel(APOS1_5);
maMtrTrgrStartValue->SetPosPixel(APOS1_6);
maFtTrgrEndValue->SetPosPixel(APOS2_5);
maMtrTrgrEndValue->SetPosPixel(APOS2_6);
maFtTrgrBorder->SetPosPixel(APOS1_7);
maMtrTrgrBorder->SetPosPixel(APOS1_8);
maBtnLeft45.Show();
maBtnRight45.Show();
maBtnLeft45->Show();
maBtnRight45->Show();
aPointAngle = maMtrTrgrAngle.GetPosPixel();
aPointAngle = maMtrTrgrAngle->GetPosPixel();
aPosY = aPointAngle.getY() + aSizeAngle.getHeight() - aTbxSize.getHeight();
maBtnLeft45.SetPosPixel(Point(APOS_Left_Right_3.getX(), aPosY));
maBtnRight45.SetPosPixel(Point(APOS_Left_Right_4.getX(), aPosY));
maBtnLeft45->SetPosPixel(Point(APOS_Left_Right_3.getX(), aPosY));
maBtnRight45->SetPosPixel(Point(APOS_Left_Right_4.getX(), aPosY));
SetSizePixel(aSize);
@@ -247,12 +267,12 @@ void AreaTransparencyGradientControl::InitStatus(XFillFloatTransparenceItem* pGr
{
aGradient = rGradient;
}
maMtrTrgrCenterX.SetValue(aGradient.GetXOffset());
maMtrTrgrCenterY.SetValue(aGradient.GetYOffset());
maMtrTrgrAngle.SetValue(aGradient.GetAngle() / 10);
maMtrTrgrStartValue.SetValue((sal_uInt16)((((sal_uInt16)aGradient.GetStartColor().GetRed() + 1) * 100) / 255));
maMtrTrgrEndValue.SetValue((sal_uInt16)((((sal_uInt16)aGradient.GetEndColor().GetRed() + 1) * 100) / 255));
maMtrTrgrBorder.SetValue(aGradient.GetBorder());
maMtrTrgrCenterX->SetValue(aGradient.GetXOffset());
maMtrTrgrCenterY->SetValue(aGradient.GetYOffset());
maMtrTrgrAngle->SetValue(aGradient.GetAngle() / 10);
maMtrTrgrStartValue->SetValue((sal_uInt16)((((sal_uInt16)aGradient.GetStartColor().GetRed() + 1) * 100) / 255));
maMtrTrgrEndValue->SetValue((sal_uInt16)((((sal_uInt16)aGradient.GetEndColor().GetRed() + 1) * 100) / 255));
maMtrTrgrBorder->SetValue(aGradient.GetBorder());
}
@@ -261,21 +281,21 @@ void AreaTransparencyGradientControl::InitStatus(XFillFloatTransparenceItem* pGr
void AreaTransparencyGradientControl::ExecuteValueModify( sal_uInt8 nStartCol, sal_uInt8 nEndCol )
{
//Added
sal_Int16 aMtrValue = (sal_Int16)maMtrTrgrAngle.GetValue();
sal_Int16 aMtrValue = (sal_Int16)maMtrTrgrAngle->GetValue();
while(aMtrValue<0)
aMtrValue += 360;
sal_uInt16 nVal = aMtrValue/360;
nVal = aMtrValue - nVal*360;
maMtrTrgrAngle.SetValue(nVal);
maMtrTrgrAngle->SetValue(nVal);
//End of new code
XGradient aTmpGradient(
Color(nStartCol, nStartCol, nStartCol),
Color(nEndCol, nEndCol, nEndCol),
(css::awt::GradientStyle)(mrAreaPropertyPanel.GetSelectedTransparencyTypeIndex()-2),
(sal_uInt16)maMtrTrgrAngle.GetValue() * 10,
(sal_uInt16)maMtrTrgrCenterX.GetValue(),
(sal_uInt16)maMtrTrgrCenterY.GetValue(),
(sal_uInt16)maMtrTrgrBorder.GetValue(),
(sal_uInt16)maMtrTrgrAngle->GetValue() * 10,
(sal_uInt16)maMtrTrgrCenterX->GetValue(),
(sal_uInt16)maMtrTrgrCenterY->GetValue(),
(sal_uInt16)maMtrTrgrBorder->GetValue(),
100, 100);
mrAreaPropertyPanel.SetGradient(aTmpGradient);
@@ -292,8 +312,8 @@ void AreaTransparencyGradientControl::ExecuteValueModify( sal_uInt8 nStartCol, s
IMPL_LINK_NOARG(AreaTransparencyGradientControl, ModifiedTrgrHdl_Impl)
{
sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue.GetValue() * 255) / 100);
sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue.GetValue() * 255) / 100);
sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue->GetValue() * 255) / 100);
sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue->GetValue() * 255) / 100);
ExecuteValueModify( nStartCol, nEndCol );
return 0L;
}
@@ -303,13 +323,13 @@ IMPL_LINK_NOARG(AreaTransparencyGradientControl, ModifiedTrgrHdl_Impl)
IMPL_LINK_NOARG(AreaTransparencyGradientControl, Left_Click45_Impl)
{
sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue.GetValue() * 255) / 100);
sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue.GetValue() * 255) / 100);
sal_uInt16 aTemp = (sal_uInt16)maMtrTrgrAngle.GetValue();
sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue->GetValue() * 255) / 100);
sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue->GetValue() * 255) / 100);
sal_uInt16 aTemp = (sal_uInt16)maMtrTrgrAngle->GetValue();
if(aTemp>=315)
aTemp -= 360;
aTemp += 45;
maMtrTrgrAngle.SetValue(aTemp);
maMtrTrgrAngle->SetValue(aTemp);
ExecuteValueModify( nStartCol, nEndCol );
return 0L;
}
@@ -319,13 +339,13 @@ IMPL_LINK_NOARG(AreaTransparencyGradientControl, Left_Click45_Impl)
IMPL_LINK_NOARG(AreaTransparencyGradientControl, Right_Click45_Impl)
{
sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue.GetValue() * 255) / 100);
sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue.GetValue() * 255) / 100);
sal_uInt16 aTemp = (sal_uInt16)maMtrTrgrAngle.GetValue();
sal_uInt8 nStartCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrStartValue->GetValue() * 255) / 100);
sal_uInt8 nEndCol = (sal_uInt8)(((sal_uInt16)maMtrTrgrEndValue->GetValue() * 255) / 100);
sal_uInt16 aTemp = (sal_uInt16)maMtrTrgrAngle->GetValue();
if(aTemp<45)
aTemp += 360;
aTemp -= 45;
maMtrTrgrAngle.SetValue(aTemp);
maMtrTrgrAngle->SetValue(aTemp);
ExecuteValueModify( nStartCol, nEndCol );
return 0L;
}
diff --git a/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx b/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
index 8a52617..eb8cfc3 100644
--- a/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
+++ b/svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
@@ -41,7 +41,8 @@ public:
AreaTransparencyGradientControl (
vcl::Window* pParent,
AreaPropertyPanel& rPanel);
virtual ~AreaTransparencyGradientControl (void);
virtual ~AreaTransparencyGradientControl();
virtual void dispose() SAL_OVERRIDE;
void Rearrange(XFillFloatTransparenceItem* pGradientItem);
void InitStatus(XFillFloatTransparenceItem* pGradientItem);
@@ -49,20 +50,20 @@ public:
void SetControlState_Impl(css::awt::GradientStyle eXGS);
private:
FixedText maFtTrgrCenterX;
MetricField maMtrTrgrCenterX;
FixedText maFtTrgrCenterY;
MetricField maMtrTrgrCenterY;
FixedText maFtTrgrAngle;
MetricField maMtrTrgrAngle;
ToolBox maBtnLeft45;
ToolBox maBtnRight45;
FixedText maFtTrgrStartValue;
MetricField maMtrTrgrStartValue;
FixedText maFtTrgrEndValue;
MetricField maMtrTrgrEndValue;
FixedText maFtTrgrBorder;
MetricField maMtrTrgrBorder;
VclPtr<FixedText> maFtTrgrCenterX;
VclPtr<MetricField> maMtrTrgrCenterX;
VclPtr<FixedText> maFtTrgrCenterY;
VclPtr<MetricField> maMtrTrgrCenterY;
VclPtr<FixedText> maFtTrgrAngle;
VclPtr<MetricField> maMtrTrgrAngle;
VclPtr<ToolBox> maBtnLeft45;
VclPtr<ToolBox> maBtnRight45;
VclPtr<FixedText> maFtTrgrStartValue;
VclPtr<MetricField> maMtrTrgrStartValue;
VclPtr<FixedText> maFtTrgrEndValue;
VclPtr<MetricField> maMtrTrgrEndValue;
VclPtr<FixedText> maFtTrgrBorder;
VclPtr<MetricField> maMtrTrgrBorder;
Image maRotLeft;
Image maRotRight;
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
index dd371df..b1e6075 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
@@ -68,12 +68,6 @@ GraphicPropertyPanel::GraphicPropertyPanel(
GraphicPropertyPanel::~GraphicPropertyPanel()
{
}
void GraphicPropertyPanel::Initialize()
{
mpMtrBrightness->SetModifyHdl( LINK( this, GraphicPropertyPanel, ModifyBrightnessHdl ) );
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
index 8f3babc..11cb228 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
@@ -98,7 +98,6 @@ private:
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings);
virtual ~GraphicPropertyPanel();
void SetupIcons(void);
void Initialize();
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.cxx b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
index 7f4925b..70fae60 100644
--- a/svx/source/sidebar/insert/InsertPropertyPanel.cxx
+++ b/svx/source/sidebar/insert/InsertPropertyPanel.cxx
@@ -75,13 +75,19 @@ InsertPropertyPanel::InsertPropertyPanel (
InsertPropertyPanel::~InsertPropertyPanel (void)
InsertPropertyPanel::~InsertPropertyPanel()
{
dispose();
}
void InsertPropertyPanel::dispose()
{
// Remove window child listener.
vcl::Window* pTopWindow = this;
while (pTopWindow->GetParent() != NULL)
pTopWindow = pTopWindow->GetParent();
pTopWindow->RemoveChildEventListener(LINK(this, InsertPropertyPanel, WindowEventListener));
PanelLayout::dispose();
}
diff --git a/svx/source/sidebar/insert/InsertPropertyPanel.hxx b/svx/source/sidebar/insert/InsertPropertyPanel.hxx
index b0a5426..391b69f 100644
--- a/svx/source/sidebar/insert/InsertPropertyPanel.hxx
+++ b/svx/source/sidebar/insert/InsertPropertyPanel.hxx
@@ -41,7 +41,8 @@ public:
InsertPropertyPanel (
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame);
virtual ~InsertPropertyPanel (void);
virtual ~InsertPropertyPanel();
virtual void dispose() SAL_OVERRIDE;
private:
ToolBox* mpStandardShapesToolBox;
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index 052e16e..d830f33 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -192,10 +192,6 @@ LinePropertyPanel::LinePropertyPanel(
Initialize();
}
LinePropertyPanel::~LinePropertyPanel()
{
}
void LinePropertyPanel::Initialize()
{
mpIMGWidthIcon.reset(new Image[8]);
diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx b/svx/source/sidebar/line/LinePropertyPanel.hxx
index 586573f..84354e4 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.hxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.hxx
@@ -157,7 +157,6 @@ private:
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings);
virtual ~LinePropertyPanel(void);
PopupControl* CreateLineWidthPopupControl (PopupContainer* pParent);
};
diff --git a/svx/source/sidebar/line/LineWidthControl.cxx b/svx/source/sidebar/line/LineWidthControl.cxx
index bf87a3d..4e394f8 100644
--- a/svx/source/sidebar/line/LineWidthControl.cxx
+++ b/svx/source/sidebar/line/LineWidthControl.cxx
@@ -41,10 +41,10 @@ LineWidthControl::LineWidthControl (
: svx::sidebar::PopupControl(pParent,SVX_RES(RID_POPUPPANEL_LINEPAGE_WIDTH)),
mrLinePropertyPanel(rPanel),
mpBindings(NULL),
maVSWidth( this, SVX_RES(VS_WIDTH)),
maFTCus( this, SVX_RES(FT_CUSTOME)),
maFTWidth( this, SVX_RES(FT_LINE_WIDTH)),
maMFWidth( this, SVX_RES(MF_WIDTH)),
maVSWidth(new LineWidthValueSet(this, SVX_RES(VS_WIDTH))),
maFTCus( new FixedText(this, SVX_RES(FT_CUSTOME))),
maFTWidth( new FixedText(this, SVX_RES(FT_LINE_WIDTH))),
maMFWidth( new MetricField(this, SVX_RES(MF_WIDTH))),
meMapUnit(SFX_MAPUNIT_TWIP),
rStr(NULL),
mstrPT(SVX_RESSTR(STR_PT)),
@@ -64,9 +64,19 @@ LineWidthControl::LineWidthControl (
LineWidthControl::~LineWidthControl (void)
LineWidthControl::~LineWidthControl()
{
dispose();
}
void LineWidthControl::dispose()
{
delete[] rStr;
maVSWidth.disposeAndClear();
maFTCus.disposeAndClear();
maFTWidth.disposeAndClear();
maMFWidth.disposeAndClear();
svx::sidebar::PopupControl::dispose();
}
@@ -104,33 +114,33 @@ void LineWidthControl::Paint(const Rectangle& rect)
void LineWidthControl::Initialize()
{
maVSWidth.SetStyle( maVSWidth.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );// WB_NAMEFIELD | WB_ITEMBORDER |WB_DOUBLEBORDER | WB_NONEFIELD |
maVSWidth->SetStyle( maVSWidth->GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );// WB_NAMEFIELD | WB_ITEMBORDER |WB_DOUBLEBORDER | WB_NONEFIELD |
//for high contrast wj
if(GetSettings().GetStyleSettings().GetHighContrastMode())
{
maVSWidth.SetColor(GetSettings().GetStyleSettings().GetMenuColor());
maVSWidth->SetColor(GetSettings().GetStyleSettings().GetMenuColor());
// maBorder.SetBackground(GetSettings().GetStyleSettings().GetMenuColor());
maFTWidth.SetBackground(GetSettings().GetStyleSettings().GetMenuColor());
maFTWidth->SetBackground(GetSettings().GetStyleSettings().GetMenuColor());
}
else
{
maVSWidth.SetColor(COL_WHITE);
maVSWidth->SetColor(COL_WHITE);
// maBorder.SetBackground(Wallpaper(COL_WHITE));
maFTWidth.SetBackground(Wallpaper(COL_WHITE));
maFTWidth->SetBackground(Wallpaper(COL_WHITE));
}
sal_Int64 nFirst= maMFWidth.Denormalize( maMFWidth.GetFirst( FUNIT_TWIP ) );
sal_Int64 nLast = maMFWidth.Denormalize( maMFWidth.GetLast( FUNIT_TWIP ) );
sal_Int64 nMin = maMFWidth.Denormalize( maMFWidth.GetMin( FUNIT_TWIP ) );
sal_Int64 nMax = maMFWidth.Denormalize( maMFWidth.GetMax( FUNIT_TWIP ) );
maMFWidth.SetSpinSize( 10 );
maMFWidth.SetUnit( FUNIT_POINT );
if( maMFWidth.GetDecimalDigits() > 1 )
maMFWidth.SetDecimalDigits( 1 );
maMFWidth.SetFirst( maMFWidth.Normalize( nFirst ), FUNIT_TWIP );
maMFWidth.SetLast( maMFWidth.Normalize( nLast ), FUNIT_TWIP );
maMFWidth.SetMin( maMFWidth.Normalize( nMin ), FUNIT_TWIP );
maMFWidth.SetMax( maMFWidth.Normalize( nMax ), FUNIT_TWIP );
sal_Int64 nFirst= maMFWidth->Denormalize( maMFWidth->GetFirst( FUNIT_TWIP ) );
sal_Int64 nLast = maMFWidth->Denormalize( maMFWidth->GetLast( FUNIT_TWIP ) );
sal_Int64 nMin = maMFWidth->Denormalize( maMFWidth->GetMin( FUNIT_TWIP ) );
sal_Int64 nMax = maMFWidth->Denormalize( maMFWidth->GetMax( FUNIT_TWIP ) );
maMFWidth->SetSpinSize( 10 );
maMFWidth->SetUnit( FUNIT_POINT );
if( maMFWidth->GetDecimalDigits() > 1 )
maMFWidth->SetDecimalDigits( 1 );
maMFWidth->SetFirst( maMFWidth->Normalize( nFirst ), FUNIT_TWIP );
maMFWidth->SetLast( maMFWidth->Normalize( nLast ), FUNIT_TWIP );
maMFWidth->SetMin( maMFWidth->Normalize( nMin ), FUNIT_TWIP );
maMFWidth->SetMax( maMFWidth->Normalize( nMax ), FUNIT_TWIP );
rStr = new OUString[9];
//modify,
@@ -157,28 +167,28 @@ void LineWidthControl::Initialize()
for(sal_uInt16 i = 1 ; i <= 9 ; i++)
{
maVSWidth.InsertItem(i);
maVSWidth.SetItemText(i, rStr[i-1]);
maVSWidth->InsertItem(i);
maVSWidth->SetItemText(i, rStr[i-1]);
}
maVSWidth.SetUnit(rStr);
maVSWidth.SetItemData(1, reinterpret_cast<void*>(5));
maVSWidth.SetItemData(2, reinterpret_cast<void*>(8));
maVSWidth.SetItemData(3, reinterpret_cast<void*>(10));
maVSWidth.SetItemData(4, reinterpret_cast<void*>(15));
maVSWidth.SetItemData(5, reinterpret_cast<void*>(23));
maVSWidth.SetItemData(6, reinterpret_cast<void*>(30));
maVSWidth.SetItemData(7, reinterpret_cast<void*>(45));
maVSWidth.SetItemData(8, reinterpret_cast<void*>(60));
maVSWidth.SetImage(maIMGCusGray);
maVSWidth->SetUnit(rStr);
maVSWidth->SetItemData(1, reinterpret_cast<void*>(5));
maVSWidth->SetItemData(2, reinterpret_cast<void*>(8));
maVSWidth->SetItemData(3, reinterpret_cast<void*>(10));
maVSWidth->SetItemData(4, reinterpret_cast<void*>(15));
maVSWidth->SetItemData(5, reinterpret_cast<void*>(23));
maVSWidth->SetItemData(6, reinterpret_cast<void*>(30));
maVSWidth->SetItemData(7, reinterpret_cast<void*>(45));
maVSWidth->SetItemData(8, reinterpret_cast<void*>(60));
maVSWidth->SetImage(maIMGCusGray);
maVSWidth.SetSelItem(0);
maVSWidth->SetSelItem(0);
Link aLink = LINK( this, LineWidthControl, VSSelectHdl ) ;
maVSWidth.SetSelectHdl(aLink);
maVSWidth->SetSelectHdl(aLink);
aLink = LINK(this, LineWidthControl, MFModifyHdl);
maMFWidth.SetModifyHdl(aLink);
maMFWidth->SetModifyHdl(aLink);
maVSWidth.StartSelection();
maVSWidth.Show();
maVSWidth->StartSelection();
maVSWidth->Show();
}
@@ -187,9 +197,9 @@ void LineWidthControl::Initialize()
void LineWidthControl::GetFocus()
{
if(!mbVSFocus)
maMFWidth.GrabFocus();
maMFWidth->GrabFocus();
else
maVSWidth.GrabFocus();
maVSWidth->GrabFocus();
}
@@ -198,7 +208,7 @@ void LineWidthControl::GetFocus()
void LineWidthControl::SetWidthSelect( long lValue, bool bValuable, SfxMapUnit eMapUnit)
{
mbVSFocus = true;
maVSWidth.SetSelItem(0);
maVSWidth->SetSelItem(0);
mbCloseByEdit = false;
meMapUnit = eMapUnit;
SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_LINE_WIDTH_GLOBAL_VALUE );
@@ -212,54 +222,54 @@ void LineWidthControl::SetWidthSelect( long lValue, bool bValuable, SfxMapUnit e
OUString aWinData( aTmp );
mnCustomWidth = aWinData.toInt32();
mbCustom = true;
maVSWidth.SetImage(maIMGCus);
maVSWidth.SetCusEnable(true);
maVSWidth->SetImage(maIMGCus);
maVSWidth->SetCusEnable(true);
OUString aStrTip( OUString::number( (double)mnCustomWidth / 10));
aStrTip += mstrPT;
maVSWidth.SetItemText(9, aStrTip);
maVSWidth->SetItemText(9, aStrTip);
}
else
{
mbCustom = false;
maVSWidth.SetImage(maIMGCusGray);
maVSWidth.SetCusEnable(false);
maVSWidth->SetImage(maIMGCusGray);
maVSWidth->SetCusEnable(false);
//modify
//String aStrTip(String(SVX_RES(STR_WIDTH_LAST_CUSTOM)));
//maVSWidth.SetItemText(9, aStrTip);
maVSWidth.SetItemText(9, rStr[8]);
//maVSWidth->SetItemText(9, aStrTip);
maVSWidth->SetItemText(9, rStr[8]);
}
if(bValuable)
{
sal_Int64 nVal = OutputDevice::LogicToLogic( lValue, (MapUnit)eMapUnit, MAP_100TH_MM );
nVal = maMFWidth.Normalize( nVal );
maMFWidth.SetValue( nVal, FUNIT_100TH_MM );
nVal = maMFWidth->Normalize( nVal );
maMFWidth->SetValue( nVal, FUNIT_100TH_MM );
}
else
{
maMFWidth.SetText( "" );
maMFWidth->SetText( "" );
}
MapUnit eOrgUnit = (MapUnit)eMapUnit;
MapUnit ePntUnit( MAP_TWIP );
lValue = LogicToLogic( lValue , eOrgUnit, ePntUnit );
OUString strCurrValue = maMFWidth.GetText();
OUString strCurrValue = maMFWidth->GetText();
sal_uInt16 i = 0;
for(; i < 8; i++)
if(strCurrValue == rStr[i])
{
maVSWidth.SetSelItem(i+1);
maVSWidth->SetSelItem(i+1);
break;
}
if (i>=8)
{
mbVSFocus = false;
maVSWidth.SetSelItem(0);
maVSWidth->SetSelItem(0);
}
maVSWidth.Format();
maVSWidth.StartSelection();
maVSWidth->Format();
maVSWidth->StartSelection();
}
@@ -269,11 +279,11 @@ IMPL_LINK(LineWidthControl, VSSelectHdl, void *, pControl)
{
if(pControl == &maVSWidth)
{
sal_uInt16 iPos = maVSWidth.GetSelectItemId();
sal_uInt16 iPos = maVSWidth->GetSelectItemId();
if(iPos >= 1 && iPos <= 8)
{
sal_IntPtr nVal = LogicToLogic(reinterpret_cast<sal_IntPtr>(maVSWidth.GetItemData( iPos )), MAP_POINT, (MapUnit)meMapUnit);
nVal = maMFWidth.Denormalize(nVal);
sal_IntPtr nVal = LogicToLogic(reinterpret_cast<sal_IntPtr>(maVSWidth->GetItemData( iPos )), MAP_POINT, (MapUnit)meMapUnit);
nVal = maMFWidth->Denormalize(nVal);
XLineWidthItem aWidthItem( nVal );
mpBindings->GetDispatcher()->Execute(SID_ATTR_LINE_WIDTH, SfxCallMode::RECORD, &aWidthItem, 0L);
mrLinePropertyPanel.SetWidthIcon(iPos);
@@ -287,7 +297,7 @@ IMPL_LINK(LineWidthControl, VSSelectHdl, void *, pControl)
if(mbCustom)
{
long nVal = LogicToLogic(mnCustomWidth , MAP_POINT, (MapUnit)meMapUnit);
nVal = maMFWidth.Denormalize(nVal);
nVal = maMFWidth->Denormalize(nVal);
XLineWidthItem aWidthItem( nVal );
mpBindings->GetDispatcher()->Execute(SID_ATTR_LINE_WIDTH, SfxCallMode::RECORD, &aWidthItem, 0L);
mrLinePropertyPanel.SetWidth(nVal);
@@ -296,10 +306,10 @@ IMPL_LINK(LineWidthControl, VSSelectHdl, void *, pControl)
}
else
{
maVSWidth.SetNoSelection(); //add , set no selection and keep the last select item
maVSWidth.Format();
maVSWidth->SetNoSelection(); //add , set no selection and keep the last select item
maVSWidth->Format();
Invalidate();
maVSWidth.StartSelection();
maVSWidth->StartSelection();
}
//modify end
}
@@ -316,16 +326,16 @@ IMPL_LINK(LineWidthControl, MFModifyHdl, void *, pControl)
{
if(pControl == &maMFWidth)
{
if(maVSWidth.GetSelItem())
if(maVSWidth->GetSelItem())
{
maVSWidth.SetSelItem(0);
maVSWidth.Format();
maVSWidth->SetSelItem(0);
maVSWidth->Format();
Invalidate();
maVSWidth.StartSelection();
maVSWidth->StartSelection();
}
long nTmp = static_cast<long>(maMFWidth.GetValue());
long nTmp = static_cast<long>(maMFWidth->GetValue());
long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)meMapUnit );
sal_Int32 nNewWidth = (short)maMFWidth.Denormalize( nVal );
sal_Int32 nNewWidth = (short)maMFWidth->Denormalize( nVal );
XLineWidthItem aWidthItem(nNewWidth);
mpBindings->GetDispatcher()->Execute(SID_ATTR_LINE_WIDTH, SfxCallMode::RECORD, &aWidthItem, 0L);
diff --git a/svx/source/sidebar/line/LineWidthControl.hxx b/svx/source/sidebar/line/LineWidthControl.hxx
index c290438..5af2602 100644
--- a/svx/source/sidebar/line/LineWidthControl.hxx
+++ b/svx/source/sidebar/line/LineWidthControl.hxx
@@ -37,7 +37,8 @@ class LineWidthControl
{
public:
LineWidthControl (vcl::Window* pParent, LinePropertyPanel& rPanel);
virtual ~LineWidthControl (void);
virtual ~LineWidthControl();
virtual void dispose() SAL_OVERRIDE;
virtual void GetFocus() SAL_OVERRIDE;
virtual void Paint(const Rectangle& rect) SAL_OVERRIDE;
@@ -47,12 +48,12 @@ public:
long GetTmpCustomWidth() { return mnTmpCustomWidth;}
private:
LinePropertyPanel& mrLinePropertyPanel;
LinePropertyPanel& mrLinePropertyPanel;
SfxBindings* mpBindings;
LineWidthValueSet maVSWidth;
FixedText maFTCus;
FixedText maFTWidth;
MetricField maMFWidth;
VclPtr<LineWidthValueSet> maVSWidth;
VclPtr<FixedText> maFTCus;
VclPtr<FixedText> maFTWidth;
VclPtr<MetricField> maMFWidth;
SfxMapUnit meMapUnit;
OUString* rStr;
OUString mstrPT;
diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx
index d9af174..c9e7ecd 100644
--- a/svx/source/sidebar/line/LineWidthValueSet.cxx
+++ b/svx/source/sidebar/line/LineWidthValueSet.cxx
@@ -39,10 +39,16 @@ LineWidthValueSet::LineWidthValueSet (
LineWidthValueSet::~LineWidthValueSet (void)
LineWidthValueSet::~LineWidthValueSet()
{
dispose();
}
void LineWidthValueSet::dispose()
{
delete pVDev;
delete[] strUnit;
ValueSet::dispose();
}
diff --git a/svx/source/sidebar/line/LineWidthValueSet.hxx b/svx/source/sidebar/line/LineWidthValueSet.hxx
index 75c2b69..55901d2 100644
--- a/svx/source/sidebar/line/LineWidthValueSet.hxx
+++ b/svx/source/sidebar/line/LineWidthValueSet.hxx
@@ -29,7 +29,8 @@ class LineWidthValueSet
{
public:
LineWidthValueSet (vcl::Window* pParent, const ResId& rResId);
virtual ~LineWidthValueSet (void);
virtual ~LineWidthValueSet();
virtual void dispose() SAL_OVERRIDE;
void SetUnit(OUString* str);
void SetSelItem(sal_uInt16 nSel);
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 136e2c3..9f3fe4a 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -92,10 +92,6 @@ ParaLineSpacingControl::ParaLineSpacingControl(sal_uInt16 nId)
Initialize();
}
ParaLineSpacingControl::~ParaLineSpacingControl()
{
}
void ParaLineSpacingControl::Initialize()
{
const SfxPoolItem* pItem;
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
index 07fb087..cabcba5 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
@@ -30,7 +30,6 @@ class ParaLineSpacingControl : public SfxPopupWindow
{
public:
ParaLineSpacingControl(sal_uInt16 nId);
virtual ~ParaLineSpacingControl();
private:
SfxMapUnit meLNSpaceUnit;
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 632ef57..93a7896 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -191,10 +191,6 @@ void ParaPropertyPanel::DataChanged (const DataChangedEvent& rEvent)
(void)rEvent;
}
ParaPropertyPanel::~ParaPropertyPanel()
{
}
void ParaPropertyPanel::ReSize(bool /* bSize */)
{
if (mxSidebar.is())
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
index a6b3f74..f49ce15 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
@@ -113,7 +113,6 @@ private:
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings,
const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
virtual ~ParaPropertyPanel (void);
DECL_LINK(ModifyIndentHdl_Impl, void*);
DECL_LINK(ClickIndent_IncDec_Hdl_Impl, ToolBox*);
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index d4011d6..6d4d5ea 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -117,10 +117,6 @@ PosSizePropertyPanel::PosSizePropertyPanel(
PosSizePropertyPanel::~PosSizePropertyPanel()
{
}
namespace
{
bool hasText(const SdrView& rSdrView)
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index e9d66567..2eb297d 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -160,7 +160,6 @@ private:
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings,
const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
virtual ~PosSizePropertyPanel();
void MetricState( SfxItemState eState, const SfxPoolItem* pState );
FieldUnit GetCurrentUnit( SfxItemState eState, const SfxPoolItem* pState );
diff --git a/svx/source/sidebar/possize/SidebarDialControl.cxx b/svx/source/sidebar/possize/SidebarDialControl.cxx
index 2f422a9..df10da6 100644
--- a/svx/source/sidebar/possize/SidebarDialControl.cxx
+++ b/svx/source/sidebar/possize/SidebarDialControl.cxx
@@ -35,10 +35,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSidebarDialControl(vcl
return new SidebarDialControl(pParent, WB_TABSTOP);
}
SidebarDialControl::~SidebarDialControl (void)
{
}
Size SidebarDialControl::GetOptimalSize() const
{
return LogicToPixel(Size(10, 10), MAP_APPFONT);
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
index 3a798f2..c029a8f 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
@@ -36,13 +36,13 @@ TextCharacterSpacingControl::TextCharacterSpacingControl (
: PopupControl( pParent,SVX_RES(RID_POPUPPANEL_TEXTPAGE_SPACING))
, mrTextPropertyPanel(rPanel)
, mpBindings(pBindings)
, maVSSpacing (ValueSetWithTextControl::IMAGE_TEXT,this, SVX_RES(VS_SPACING))
, maLastCus (this, SVX_RES(FT_LASTCUSTOM))
, maVSSpacing (new ValueSetWithTextControl(ValueSetWithTextControl::IMAGE_TEXT,this, SVX_RES(VS_SPACING)))
, maLastCus (new FixedText(this, SVX_RES(FT_LASTCUSTOM)))
//, maBorder (this, SVX_RES(CT_BORDER))
, maFTSpacing (this, SVX_RES(FT_SPACING))
, maLBKerning (this, SVX_RES(LB_KERNING))
, maFTBy (this, SVX_RES(FT_BY))
, maEditKerning (this, SVX_RES(ED_KERNING))
, maFTSpacing (new FixedText(this, SVX_RES(FT_SPACING)))
, maLBKerning (new ListBox(this, SVX_RES(LB_KERNING)))
, maFTBy (new FixedText(this, SVX_RES(FT_BY)))
, maEditKerning (new MetricField(this, SVX_RES(ED_KERNING)))
, mpImg (NULL)
, mpImgSel (NULL)
@@ -65,36 +65,49 @@ TextCharacterSpacingControl::TextCharacterSpacingControl (
initial();
FreeResource();
Link aLink = LINK(this, TextCharacterSpacingControl, KerningSelectHdl);
maLBKerning.SetSelectHdl(aLink);
maLBKerning->SetSelectHdl(aLink);
aLink =LINK(this, TextCharacterSpacingControl, KerningModifyHdl);
maEditKerning.SetModifyHdl(aLink);
maEditKerning->SetModifyHdl(aLink);
}
TextCharacterSpacingControl::~TextCharacterSpacingControl()
{
dispose();
}
void TextCharacterSpacingControl::dispose()
{
delete[] mpImg;
delete[] mpImgSel;
delete[] mpStr;
delete[] mpStrTip;
maVSSpacing.disposeAndClear();
maLastCus.disposeAndClear();
maFTSpacing.disposeAndClear();
maLBKerning.disposeAndClear();
maFTBy.disposeAndClear();
maEditKerning.disposeAndClear();
svx::sidebar::PopupControl::dispose();
}
void TextCharacterSpacingControl::initial()
{
maVSSpacing.SetStyle( maVSSpacing.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );
maVSSpacing->SetStyle( maVSSpacing->GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );
{
maVSSpacing.SetControlBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
maVSSpacing->SetControlBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
maVSSpacing.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
maVSSpacing->SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
maVSSpacing.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
maVSSpacing->SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
maFTSpacing.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
maFTSpacing->SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
maFTBy.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
maFTBy->SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
}
@@ -128,21 +141,21 @@ void TextCharacterSpacingControl::initial()
mpStrTip[4] = SVX_RESSTR(STR_VERY_LOOSE_TIP);
for (int i=0;i<5;i++)
maVSSpacing.AddItem(mpImg[i], &mpImgSel[i],mpStr[i],&mpStrTip[i]);
maVSSpacing->AddItem(mpImg[i], &mpImgSel[i],mpStr[i],&mpStrTip[i]);
maVSSpacing.AddItem( maImgCus, 0, maStrCus, 0 );
maVSSpacing->AddItem( maImgCus, 0, maStrCus, 0 );
maVSSpacing.SetNoSelection();
maVSSpacing->SetNoSelection();
Link aLink = LINK(this, TextCharacterSpacingControl,VSSelHdl );
maVSSpacing.SetSelectHdl(aLink);
maVSSpacing.StartSelection();
maVSSpacing.Show();
maVSSpacing->SetSelectHdl(aLink);
maVSSpacing->StartSelection();
maVSSpacing->Show();
}
void TextCharacterSpacingControl::Rearrange(bool bLBAvailable,bool bAvailable, long nKerning)
{
mbVS = true;
maVSSpacing.SetNoSelection();
maVSSpacing->SetNoSelection();
SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_SPACING_GLOBAL_VALUE );
if ( aWinOpt.Exists() )
{
@@ -164,131 +177,131 @@ void TextCharacterSpacingControl::Rearrange(bool bLBAvailable,bool bAvailable, l
if( !mnLastCus )
{
maVSSpacing.ReplaceItemImages(6, maImgCusGrey,0);
maVSSpacing->ReplaceItemImages(6, maImgCusGrey,0);
}
else
{
//set custom tips
maVSSpacing.ReplaceItemImages(6, maImgCus,0);
maVSSpacing->ReplaceItemImages(6, maImgCus,0);
if(mnCustomKern > 0)
{
OUString aStrTip( maStrCusE); //LAST CUSTOM no tip defect //add
aStrTip += OUString::number( (double)mnCustomKern / 10);
aStrTip += " " + maStrUnit; // modify
maVSSpacing.SetItemText(6,aStrTip);
maVSSpacing->SetItemText(6,aStrTip);
}
else if(mnCustomKern < 0)
{
OUString aStrTip(maStrCusC) ; //LAST CUSTOM no tip defect //add
aStrTip += OUString::number( (double)-mnCustomKern / 10);
aStrTip += " " + maStrUnit; // modify
maVSSpacing.SetItemText( 6, aStrTip );
maVSSpacing->SetItemText( 6, aStrTip );
}
else
{
OUString aStrTip(maStrCusN) ; //LAST CUSTOM no tip defect //add
maVSSpacing.SetItemText( 6, aStrTip );
maVSSpacing->SetItemText( 6, aStrTip );
}
}
if(bLBAvailable && bAvailable)
{
maLBKerning.Enable();
maFTSpacing.Enable();
maLBKerning->Enable();
maFTSpacing->Enable();
SfxMapUnit eUnit = mrTextPropertyPanel.GetSpaceController().GetCoreMetric();
MapUnit eOrgUnit = (MapUnit)eUnit;
MapUnit ePntUnit( MAP_POINT );
long nBig = maEditKerning.Normalize(nKerning);
long nBig = maEditKerning->Normalize(nKerning);
nKerning = LogicToLogic( nBig, eOrgUnit, ePntUnit );
if ( nKerning > 0 )
{
maFTBy.Enable();
maEditKerning.Enable();
maEditKerning.SetMax( 9999 );
maEditKerning.SetLast( 9999 );
maEditKerning.SetValue( nKerning );
maLBKerning.SelectEntryPos( SIDEBAR_SPACE_EXPAND );
maFTBy->Enable();
maEditKerning->Enable();
maEditKerning->SetMax( 9999 );
maEditKerning->SetLast( 9999 );
maEditKerning->SetValue( nKerning );
maLBKerning->SelectEntryPos( SIDEBAR_SPACE_EXPAND );
if(nKerning == 30)
{
maVSSpacing.SelectItem(4);
maVSSpacing->SelectItem(4);
}
else if(nKerning == 60)
{
maVSSpacing.SelectItem(5);
maVSSpacing->SelectItem(5);
}
else
{
maVSSpacing.SetNoSelection();
maVSSpacing.SelectItem(0);
maVSSpacing->SetNoSelection();
maVSSpacing->SelectItem(0);
mbVS = false;
}
}
else if ( nKerning < 0 )
{
maFTBy.Enable();
maEditKerning.Enable();
maEditKerning.SetValue( -nKerning );
maLBKerning.SelectEntryPos( SIDEBAR_SPACE_CONDENSED );
maFTBy->Enable();
maEditKerning->Enable();
maEditKerning->SetValue( -nKerning );
maLBKerning->SelectEntryPos( SIDEBAR_SPACE_CONDENSED );
long nMax = mrTextPropertyPanel.GetSelFontSize()/6;
maEditKerning.SetMax( maEditKerning.Normalize( nMax ), FUNIT_POINT );
maEditKerning.SetLast( maEditKerning.GetMax( maEditKerning.GetUnit() ) );
maEditKerning->SetMax( maEditKerning->Normalize( nMax ), FUNIT_POINT );
maEditKerning->SetLast( maEditKerning->GetMax( maEditKerning->GetUnit() ) );
if( nKerning == -30 )
{
maVSSpacing.SelectItem(1);
maVSSpacing->SelectItem(1);
}
else if( nKerning == -15 )
{
maVSSpacing.SelectItem(2);
maVSSpacing->SelectItem(2);
}
else
{
maVSSpacing.SetNoSelection();
maVSSpacing.SelectItem(0);
maVSSpacing->SetNoSelection();
maVSSpacing->SelectItem(0);
mbVS = false;
}
}
else
{
maVSSpacing.SelectItem(3);
maLBKerning.SelectEntryPos( SIDEBAR_SPACE_NORMAL );
maFTBy.Disable();
maEditKerning.Disable();
maEditKerning.SetValue( 0 );
maEditKerning.SetMax( 9999 );
maEditKerning.SetLast( 9999 );
maVSSpacing->SelectItem(3);
maLBKerning->SelectEntryPos( SIDEBAR_SPACE_NORMAL );
maFTBy->Disable();
maEditKerning->Disable();
maEditKerning->SetValue( 0 );
maEditKerning->SetMax( 9999 );
maEditKerning->SetLast( 9999 );
}
}
else if(bLBAvailable && !bAvailable)
{
//modified
maVSSpacing.SetNoSelection();
maVSSpacing.SelectItem(0);
maVSSpacing->SetNoSelection();
maVSSpacing->SelectItem(0);
mbVS = false;
maLBKerning.Enable();
maFTSpacing.Enable();
maLBKerning.SetNoSelection();
maEditKerning.SetText(OUString());
maEditKerning.Disable();
maFTBy.Disable();
maLBKerning->Enable();
maFTSpacing->Enable();
maLBKerning->SetNoSelection();
maEditKerning->SetText(OUString());
maEditKerning->Disable();
maFTBy->Disable();
}
else
{
maVSSpacing.SetNoSelection();
maVSSpacing.SelectItem(0);
maVSSpacing->SetNoSelection();
maVSSpacing->SelectItem(0);
mbVS = false;
maEditKerning.SetText(OUString());
maLBKerning.SetNoSelection();
maLBKerning.Disable();
maFTSpacing.Disable();
maEditKerning.Disable();
maFTBy.Disable();
maEditKerning->SetText(OUString());
maLBKerning->SetNoSelection();
maLBKerning->Disable();
maFTSpacing->Disable();
maEditKerning->Disable();
maFTBy->Disable();
}
GetFocus();
maVSSpacing.Format();
maVSSpacing.StartSelection();
maVSSpacing->Format();
maVSSpacing->StartSelection();
}
IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
{
@@ -296,14 +309,14 @@ IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
if(pControl == &maVSSpacing)
{
sal_uInt16 iPos = maVSSpacing.GetSelectItemId();
sal_uInt16 iPos = maVSSpacing->GetSelectItemId();
short nKern = 0;
SfxMapUnit eUnit = mrTextPropertyPanel.GetSpaceController().GetCoreMetric();
long nVal = 0;
if(iPos == 1)
{
nVal = LogicToLogic(30, MAP_POINT, (MapUnit)eUnit);
nKern = (short)maEditKerning.Denormalize(nVal);
nKern = (short)maEditKerning->Denormalize(nVal);
SvxKerningItem aKernItem(-nKern, SID_ATTR_CHAR_KERNING);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L);
mnLastCus = SPACING_CLOSE_BY_CLICK_ICON;
@@ -311,7 +324,7 @@ IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
else if(iPos == 2)
{
nVal = LogicToLogic(15, MAP_POINT, (MapUnit)eUnit);
nKern = (short)maEditKerning.Denormalize(nVal);
nKern = (short)maEditKerning->Denormalize(nVal);
SvxKerningItem aKernItem(-nKern, SID_ATTR_CHAR_KERNING);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L);
mnLastCus = SPACING_CLOSE_BY_CLICK_ICON;
@@ -325,7 +338,7 @@ IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
else if(iPos == 4)
{
nVal = LogicToLogic(30, MAP_POINT, (MapUnit)eUnit);
nKern = (short)maEditKerning.Denormalize(nVal);
nKern = (short)maEditKerning->Denormalize(nVal);
SvxKerningItem aKernItem(nKern, SID_ATTR_CHAR_KERNING);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L);
mnLastCus = SPACING_CLOSE_BY_CLICK_ICON;
@@ -333,7 +346,7 @@ IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
else if(iPos == 5)
{
nVal = LogicToLogic(60, MAP_POINT, (MapUnit)eUnit);
nKern = (short)maEditKerning.Denormalize(nVal);
nKern = (short)maEditKerning->Denormalize(nVal);
SvxKerningItem aKernItem(nKern, SID_ATTR_CHAR_KERNING);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L);
mnLastCus = SPACING_CLOSE_BY_CLICK_ICON;
@@ -344,17 +357,17 @@ IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
if(mbCusEnable)
{
nVal = LogicToLogic(mnCustomKern, MAP_POINT, (MapUnit)eUnit);
nKern = (short)maEditKerning.Denormalize(nVal);
nKern = (short)maEditKerning->Denormalize(nVal);
SvxKerningItem aKernItem(nKern , SID_ATTR_CHAR_KERNING);
mpBindings->GetDispatcher()->Execute(SID_ATTR_CHAR_KERNING, SfxCallMode::RECORD, &aKernItem, 0L);
mnLastCus = SPACING_CLOSE_BY_CLICK_ICON;
}
else
{
maVSSpacing.SetNoSelection(); //add , set no selection and keep the last select item
maVSSpacing.Format();
maVSSpacing->SetNoSelection(); //add , set no selection and keep the last select item
maVSSpacing->Format();
Invalidate();
maVSSpacing.StartSelection();
maVSSpacing->StartSelection();
}
//modify end
}
@@ -370,67 +383,67 @@ IMPL_LINK(TextCharacterSpacingControl, VSSelHdl, void *, pControl)
IMPL_LINK(TextCharacterSpacingControl, KerningSelectHdl, ListBox*, EMPTYARG)
{
if ( maLBKerning.GetSelectEntryPos() > 0 )
if ( maLBKerning->GetSelectEntryPos() > 0 )
{
maFTBy.Enable();
maEditKerning.Enable();
maFTBy->Enable();
maEditKerning->Enable();
}
else
{
maEditKerning.SetValue( 0 );
maFTBy.Disable();
maEditKerning.Disable();
maEditKerning->SetValue( 0 );
maFTBy->Disable();
maEditKerning->Disable();
}
if ( maVSSpacing.GetSelectItemId() > 0 )
if ( maVSSpacing->GetSelectItemId() > 0 )
{
maVSSpacing.SetNoSelection();
maVSSpacing.SelectItem(0);
maVSSpacing.Format();
maVSSpacing->SetNoSelection();
maVSSpacing->SelectItem(0);
maVSSpacing->Format();
Invalidate();
maVSSpacing.StartSelection();
maVSSpacing->StartSelection();
}
KerningModifyHdl( NULL );
return 0;
}
IMPL_LINK(TextCharacterSpacingControl, KerningModifyHdl, MetricField*, EMPTYARG)
{
if ( maVSSpacing.GetSelectItemId() > 0 )
if ( maVSSpacing->GetSelectItemId() > 0 )
{
maVSSpacing.SetNoSelection();
maVSSpacing.SelectItem(0);
maVSSpacing.Format();
maVSSpacing->SetNoSelection();
maVSSpacing->SelectItem(0);
maVSSpacing->Format();
Invalidate();
maVSSpacing.StartSelection();
maVSSpacing->StartSelection();
}
sal_uInt16 nPos = maLBKerning.GetSelectEntryPos();
sal_uInt16 nPos = maLBKerning->GetSelectEntryPos();
short nKern = 0;
SfxMapUnit eUnit = mrTextPropertyPanel.GetSpaceController().GetCoreMetric();
mnLastCus = SPACING_CLOSE_BY_CUS_EDIT;
if ( nPos == SIDEBAR_SPACE_EXPAND || nPos == SIDEBAR_SPACE_CONDENSED )
{
long nTmp = static_cast<long>(maEditKerning.GetValue());
long nTmp = static_cast<long>(maEditKerning->GetValue());
if ( nPos == SIDEBAR_SPACE_CONDENSED )
{
long nMax = mrTextPropertyPanel.GetSelFontSize()/6;
maEditKerning.SetMax( maEditKerning.Normalize( nMax ), FUNIT_TWIP );
maEditKerning.SetLast( maEditKerning.GetMax( maEditKerning.GetUnit() ) );
if(nTmp > maEditKerning.GetMax())
nTmp = maEditKerning.GetMax();
maEditKerning->SetMax( maEditKerning->Normalize( nMax ), FUNIT_TWIP );
maEditKerning->SetLast( maEditKerning->GetMax( maEditKerning->GetUnit() ) );
if(nTmp > maEditKerning->GetMax())
nTmp = maEditKerning->GetMax();
mnCustomKern = -nTmp;
long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)eUnit );
nKern = (short)maEditKerning.Denormalize( nVal );
nKern = (short)maEditKerning->Denormalize( nVal );
nKern *= - 1;
}
else
{
maEditKerning.SetMax( 9999 );
maEditKerning.SetLast( 9999 );
if(nTmp > maEditKerning.GetMax(FUNIT_TWIP))
nTmp = maEditKerning.GetMax(FUNIT_TWIP);
maEditKerning->SetMax( 9999 );
maEditKerning->SetLast( 9999 );
if(nTmp > maEditKerning->GetMax(FUNIT_TWIP))
nTmp = maEditKerning->GetMax(FUNIT_TWIP);
mnCustomKern = nTmp;
long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)eUnit );
nKern = (short)maEditKerning.Denormalize( nVal );
nKern = (short)maEditKerning->Denormalize( nVal );
}
}
else
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
index b96dd89..7d5289f 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx
@@ -45,6 +45,7 @@ public:
svx::sidebar::TextPropertyPanel& rPanel,
SfxBindings* pBindings);
virtual ~TextCharacterSpacingControl();
virtual void dispose() SAL_OVERRIDE;
void Rearrange(bool bLBAvailable,bool bAvailable, long nKerning);
//virtual void Paint(const Rectangle& rect);
@@ -57,14 +58,14 @@ private:
svx::sidebar::TextPropertyPanel& mrTextPropertyPanel;
SfxBindings* mpBindings;
ValueSetWithTextControl maVSSpacing;
VclPtr<ValueSetWithTextControl> maVSSpacing;
FixedText maLastCus;
VclPtr<FixedText> maLastCus;
FixedText maFTSpacing;
ListBox maLBKerning;
FixedText maFTBy;
MetricField maEditKerning;
VclPtr<FixedText> maFTSpacing;
VclPtr<ListBox> maLBKerning;
VclPtr<FixedText> maFTBy;
VclPtr<MetricField> maEditKerning;
Image* mpImg;
Image* mpImgSel;
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 5744f0a..ee30483 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -114,10 +114,6 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref
mlKerning = 0;
}
TextPropertyPanel::~TextPropertyPanel (void)
{
}
void TextPropertyPanel::HandleContextChange (
const ::sfx2::sidebar::EnumContext& rContext)
{
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx
index f0734da..87b12dc 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.hxx
@@ -102,7 +102,6 @@ private:
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings,
const ::sfx2::sidebar::EnumContext& rContext);
virtual ~TextPropertyPanel (void);
PopupControl* CreateCharacterSpacingControl (PopupContainer* pParent);
diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx
index 61f94f8..054fac0 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.cxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.cxx
@@ -35,8 +35,8 @@ TextUnderlineControl::TextUnderlineControl (
: svx::sidebar::PopupControl( pParent,SVX_RES(RID_POPUPPANEL_TEXTPAGE_UNDERLINE))
, mrTextPropertyPanel(rPanel)
, mpBindings(pBindings)
, maVSUnderline( this, SVX_RES(VS_UNDERLINE))
, maPBOptions (this, SVX_RES(PB_OPTIONS) )
, maVSUnderline(new ValueSet(this, SVX_RES(VS_UNDERLINE)))
, maPBOptions (new PushButton(this, SVX_RES(PB_OPTIONS)))
, maIMGSingle (SVX_RES(IMG_SINGLE))
, maIMGDouble (SVX_RES(IMG_DOUBLE))
@@ -67,136 +67,136 @@ TextUnderlineControl::TextUnderlineControl (
void TextUnderlineControl::initial()
{
maVSUnderline.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
maVSUnderline->SetColor(GetSettings().GetStyleSettings().GetHighContrastMode() ?
GetSettings().GetStyleSettings().GetMenuColor() :
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
maVSUnderline.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
GetSettings().GetStyleSettings().GetMenuColor():
maVSUnderline->SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode() ?
GetSettings().GetStyleSettings().GetMenuColor() :
sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
Link aLink = LINK( this, TextUnderlineControl, PBClickHdl ) ;
maPBOptions.SetClickHdl(aLink);
maPBOptions->SetClickHdl(aLink);
maVSUnderline.SetStyle( maVSUnderline.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );
maVSUnderline->SetStyle( maVSUnderline->GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT );
// 'none' item
maVSUnderline.SetStyle( maVSUnderline.GetStyle()| WB_NONEFIELD | WB_MENUSTYLEVALUESET );
maVSUnderline.SetText( SVX_RESSTR(STR_WITHOUT) );
maVSUnderline->SetStyle( maVSUnderline->GetStyle()| WB_NONEFIELD | WB_MENUSTYLEVALUESET );
maVSUnderline->SetText( SVX_RESSTR(STR_WITHOUT) );
maVSUnderline.InsertItem(1, maIMGSingle, SVX_RESSTR(STR_SINGLE));
maVSUnderline.SetItemData(1, reinterpret_cast<void*>(UNDERLINE_SINGLE));
maVSUnderline->InsertItem(1, maIMGSingle, SVX_RESSTR(STR_SINGLE));
maVSUnderline->SetItemData(1, reinterpret_cast<void*>(UNDERLINE_SINGLE));
maVSUnderline.InsertItem(2, maIMGDouble, SVX_RESSTR(STR_DOUBLE));
maVSUnderline.SetItemData(2, reinterpret_cast<void*>(UNDERLINE_DOUBLE));
maVSUnderline->InsertItem(2, maIMGDouble, SVX_RESSTR(STR_DOUBLE));
maVSUnderline->SetItemData(2, reinterpret_cast<void*>(UNDERLINE_DOUBLE));
maVSUnderline.InsertItem(3, maIMGBold, SVX_RESSTR(STR_BOLD));
maVSUnderline.SetItemData(3, reinterpret_cast<void*>(UNDERLINE_BOLD));
maVSUnderline->InsertItem(3, maIMGBold, SVX_RESSTR(STR_BOLD));
maVSUnderline->SetItemData(3, reinterpret_cast<void*>(UNDERLINE_BOLD));
maVSUnderline.InsertItem(4, maIMGDot, SVX_RESSTR(STR_DOT));
maVSUnderline.SetItemData(4, reinterpret_cast<void*>(UNDERLINE_DOTTED));
maVSUnderline->InsertItem(4, maIMGDot, SVX_RESSTR(STR_DOT));
maVSUnderline->SetItemData(4, reinterpret_cast<void*>(UNDERLINE_DOTTED));
maVSUnderline.InsertItem(5, maIMGDotBold, SVX_RESSTR(STR_DOT_BOLD));
maVSUnderline.SetItemData(5, reinterpret_cast<void*>(UNDERLINE_BOLDDOTTED));
maVSUnderline->InsertItem(5, maIMGDotBold, SVX_RESSTR(STR_DOT_BOLD));
maVSUnderline->SetItemData(5, reinterpret_cast<void*>(UNDERLINE_BOLDDOTTED));
maVSUnderline.InsertItem(6, maIMGDash, SVX_RESSTR(STR_DASH));
maVSUnderline.SetItemData(6, reinterpret_cast<void*>(UNDERLINE_DASH));
maVSUnderline->InsertItem(6, maIMGDash, SVX_RESSTR(STR_DASH));
maVSUnderline->SetItemData(6, reinterpret_cast<void*>(UNDERLINE_DASH));
maVSUnderline.InsertItem(7, maIMGDashLong, SVX_RESSTR(STR_DASH_LONG));
maVSUnderline.SetItemData(7, reinterpret_cast<void*>(UNDERLINE_LONGDASH));
maVSUnderline->InsertItem(7, maIMGDashLong, SVX_RESSTR(STR_DASH_LONG));
maVSUnderline->SetItemData(7, reinterpret_cast<void*>(UNDERLINE_LONGDASH));
maVSUnderline.InsertItem(8, maIMGDashDot, SVX_RESSTR(STR_DASH_DOT));
maVSUnderline.SetItemData(8, reinterpret_cast<void*>(UNDERLINE_DASHDOT));
maVSUnderline->InsertItem(8, maIMGDashDot, SVX_RESSTR(STR_DASH_DOT));
maVSUnderline->SetItemData(8, reinterpret_cast<void*>(UNDERLINE_DASHDOT));
maVSUnderline.InsertItem(9, maIMGDashDotDot, SVX_RESSTR(STR_DASH_DOT_DOT));
maVSUnderline.SetItemData(9, reinterpret_cast<void*>(UNDERLINE_DASHDOTDOT));
maVSUnderline->InsertItem(9, maIMGDashDotDot, SVX_RESSTR(STR_DASH_DOT_DOT));
maVSUnderline->SetItemData(9, reinterpret_cast<void*>(UNDERLINE_DASHDOTDOT));
maVSUnderline.InsertItem(10, maIMGWave, SVX_RESSTR(STR_WAVE));
maVSUnderline.SetItemData(10, reinterpret_cast<void*>(UNDERLINE_WAVE));
maVSUnderline->InsertItem(10, maIMGWave, SVX_RESSTR(STR_WAVE));
maVSUnderline->SetItemData(10, reinterpret_cast<void*>(UNDERLINE_WAVE));
maVSUnderline.SetColCount( 1 );
maVSUnderline->SetColCount( 1 );
aLink = LINK( this, TextUnderlineControl, VSSelectHdl ) ;
maVSUnderline.SetSelectHdl(aLink);
maVSUnderline->SetSelectHdl(aLink);
maVSUnderline.StartSelection();
maVSUnderline.Show();
maVSUnderline->StartSelection();
maVSUnderline->Show();
}
void TextUnderlineControl::Rearrange(FontUnderline eLine)
{
maVSUnderline.SetItemImage(1, maIMGSingle);
maVSUnderline.SetItemImage(2, maIMGDouble );
maVSUnderline.SetItemImage(3, maIMGBold);
maVSUnderline.SetItemImage(4, maIMGDot);
maVSUnderline.SetItemImage(5, maIMGDotBold);
maVSUnderline.SetItemImage(6, maIMGDash);
maVSUnderline.SetItemImage(7, maIMGDashLong);
maVSUnderline.SetItemImage(8, maIMGDashDot);
maVSUnderline.SetItemImage(9, maIMGDashDotDot);
maVSUnderline.SetItemImage(10, maIMGWave);
maVSUnderline->SetItemImage(1, maIMGSingle);
maVSUnderline->SetItemImage(2, maIMGDouble );
maVSUnderline->SetItemImage(3, maIMGBold);
maVSUnderline->SetItemImage(4, maIMGDot);
maVSUnderline->SetItemImage(5, maIMGDotBold);
maVSUnderline->SetItemImage(6, maIMGDash);
maVSUnderline->SetItemImage(7, maIMGDashLong);
maVSUnderline->SetItemImage(8, maIMGDashDot);
maVSUnderline->SetItemImage(9, maIMGDashDotDot);
maVSUnderline->SetItemImage(10, maIMGWave);
switch(eLine)
{
case UNDERLINE_SINGLE:
maVSUnderline.SetItemImage(1, maIMGSingleSel);
maVSUnderline.SelectItem(1);
maVSUnderline.GrabFocus();
maVSUnderline->SetItemImage(1, maIMGSingleSel);
maVSUnderline->SelectItem(1);
maVSUnderline->GrabFocus();
break;
case UNDERLINE_DOUBLE:
maVSUnderline.SetItemImage(2, maIMGDoubleSel);
maVSUnderline.SelectItem(2);
maVSUnderline.GrabFocus();
maVSUnderline->SetItemImage(2, maIMGDoubleSel);
maVSUnderline->SelectItem(2);
maVSUnderline->GrabFocus();
break;
case UNDERLINE_BOLD:
maVSUnderline.SetItemImage(3, maIMGBoldSel);
maVSUnderline.SelectItem(3);
maVSUnderline.GrabFocus();
maVSUnderline->SetItemImage(3, maIMGBoldSel);
maVSUnderline->SelectItem(3);
maVSUnderline->GrabFocus();
break;
case UNDERLINE_DOTTED:
maVSUnderline.SetItemImage(4, maIMGDotSel);
maVSUnderline.SelectItem(4);
maVSUnderline.GrabFocus();
maVSUnderline->SetItemImage(4, maIMGDotSel);
maVSUnderline->SelectItem(4);
maVSUnderline->GrabFocus();
break;
case UNDERLINE_BOLDDOTTED:
maVSUnderline.SetItemImage(5, maIMGDotBoldSel);
maVSUnderline.SelectItem(5);
maVSUnderline.GrabFocus();
maVSUnderline->SetItemImage(5, maIMGDotBoldSel);
maVSUnderline->SelectItem(5);
maVSUnderline->GrabFocus();
break;
case UNDERLINE_DASH:
maVSUnderline.SetItemImage(6, maIMGDashSel);
maVSUnderline.SelectItem(6);
maVSUnderline.GrabFocus();
maVSUnderline->SetItemImage(6, maIMGDashSel);
maVSUnderline->SelectItem(6);
maVSUnderline->GrabFocus();
break;
case UNDERLINE_LONGDASH:
maVSUnderline.SetItemImage(7, maIMGDashLongSel);
maVSUnderline.SelectItem(7);
maVSUnderline.GrabFocus();
maVSUnderline->SetItemImage(7, maIMGDashLongSel);
maVSUnderline->SelectItem(7);
maVSUnderline->GrabFocus();
break;
case UNDERLINE_DASHDOT:
maVSUnderline.SetItemImage(8, maIMGDashDotSel);
maVSUnderline.SelectItem(8);
maVSUnderline.GrabFocus();
maVSUnderline->SetItemImage(8, maIMGDashDotSel);
maVSUnderline->SelectItem(8);
maVSUnderline->GrabFocus();
break;
case UNDERLINE_DASHDOTDOT:
maVSUnderline.SetItemImage(9, maIMGDashDotDotSel);
maVSUnderline.SelectItem(9);
maVSUnderline.GrabFocus();
maVSUnderline->SetItemImage(9, maIMGDashDotDotSel);
maVSUnderline->SelectItem(9);
maVSUnderline->GrabFocus();
break;
case UNDERLINE_WAVE:
maVSUnderline.SetItemImage(10, maIMGWaveSel);
maVSUnderline.SelectItem(10);
maVSUnderline.GrabFocus();
maVSUnderline->SetItemImage(10, maIMGWaveSel);
maVSUnderline->SelectItem(10);
maVSUnderline->GrabFocus();
break;
case UNDERLINE_NONE:
maVSUnderline.SelectItem(0);
maVSUnderline.GrabFocus();
maVSUnderline->SelectItem(0);
maVSUnderline->GrabFocus();
break;
default:
maVSUnderline.SelectItem(1);
maVSUnderline.SetNoSelection();
maPBOptions.GrabFocus();
maVSUnderline->SelectItem(1);
maVSUnderline->SetNoSelection();
maPBOptions->GrabFocus();
}
maVSUnderline.StartSelection();
maVSUnderline->StartSelection();
}
@@ -204,10 +204,10 @@ IMPL_LINK(TextUnderlineControl, VSSelectHdl, void *, pControl)
{
if ( pControl == &maVSUnderline )
{
const sal_uInt16 iPos = maVSUnderline.GetSelectItemId();
const sal_uInt16 iPos = maVSUnderline->GetSelectItemId();
const FontUnderline eUnderline = ( iPos == 0 )
? UNDERLINE_NONE
: static_cast<FontUnderline>(reinterpret_cast<sal_uInt64>(maVSUnderline.GetItemData( iPos )));
: static_cast<FontUnderline>(reinterpret_cast<sal_uInt64>(maVSUnderline->GetItemData( iPos )));
SvxUnderlineItem aLineItem(eUnderline, SID_ATTR_CHAR_UNDERLINE);
@@ -220,7 +220,7 @@ IMPL_LINK(TextUnderlineControl, VSSelectHdl, void *, pControl)
IMPL_LINK(TextUnderlineControl, PBClickHdl, PushButton *, pPBtn)
{
if(pPBtn == &maPBOptions)
if(pPBtn == maPBOptions.get())
{
if (mpBindings)
{
diff --git a/svx/source/sidebar/text/TextUnderlineControl.hxx b/svx/source/sidebar/text/TextUnderlineControl.hxx
index 5e32256..8f4192e 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.hxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.hxx
@@ -41,8 +41,8 @@ public:
private:
svx::sidebar::TextPropertyPanel& mrTextPropertyPanel;
SfxBindings* mpBindings;
ValueSet maVSUnderline;
PushButton maPBOptions;
VclPtr<ValueSet> maVSUnderline;
VclPtr<PushButton> maPBOptions;
Image maIMGSingle;
Image maIMGDouble;
diff --git a/svx/source/sidebar/tools/PopupContainer.cxx b/svx/source/sidebar/tools/PopupContainer.cxx
index 1c37b6c..f869c16 100644
--- a/svx/source/sidebar/tools/PopupContainer.cxx
+++ b/svx/source/sidebar/tools/PopupContainer.cxx
@@ -30,13 +30,6 @@ PopupContainer::PopupContainer (vcl::Window* pParent)
PopupContainer::~PopupContainer (void)
{
}
bool PopupContainer::Notify (NotifyEvent& rEvent)
{
if (rEvent.GetType() == MouseNotifyEvent::LOSEFOCUS)
diff --git a/svx/source/sidebar/tools/PopupControl.cxx b/svx/source/sidebar/tools/PopupControl.cxx
index d8c6865..f4ed820 100644
--- a/svx/source/sidebar/tools/PopupControl.cxx
+++ b/svx/source/sidebar/tools/PopupControl.cxx
@@ -38,13 +38,6 @@ PopupControl::PopupControl (
PopupControl::~PopupControl (void)
{
}
void PopupControl::Paint (const Rectangle& rBox)
{
Control::Paint(rBox);
diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index 5ef7f36c..85fb324 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -42,11 +42,6 @@ ValueSetWithTextControl::ValueSetWithTextControl(
}
ValueSetWithTextControl::~ValueSetWithTextControl(void)
{
}
void ValueSetWithTextControl::AddItem(
const Image& rItemImage,
const Image* pSelectedItemImage,
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 581fc86..eb1fcfb 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -170,14 +170,9 @@ public:
pBrowse(pBrowse_)
{}
virtual ~ImpItemEdit();
virtual void KeyInput(const KeyEvent& rEvt) SAL_OVERRIDE;
};
ImpItemEdit::~ImpItemEdit()
{
}
void ImpItemEdit::KeyInput(const KeyEvent& rKEvt)
{
_SdrItemBrowserControl* pBrowseMerk = pBrowse;
@@ -217,11 +212,17 @@ _SdrItemBrowserControl::_SdrItemBrowserControl(vcl::Window* pParent, WinBits nBi
_SdrItemBrowserControl::~_SdrItemBrowserControl()
{
dispose();
}
void _SdrItemBrowserControl::dispose()
{
delete pEditControl;
delete pAktChangeEntry;
Clear();
BrowseBox::dispose();
}
void _SdrItemBrowserControl::ImpCtor()
@@ -1046,25 +1047,32 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem
_SdrItemBrowserWindow::_SdrItemBrowserWindow(vcl::Window* pParent, WinBits nBits):
FloatingWindow(pParent,nBits),
aBrowse(this)
aBrowse(new _SdrItemBrowserControl(this))
{
SetOutputSizePixel(aBrowse.GetSizePixel());
SetOutputSizePixel(aBrowse->GetSizePixel());
SetText(OUString("Joe's ItemBrowser"));
aBrowse.Show();
aBrowse->Show();
}
_SdrItemBrowserWindow::~_SdrItemBrowserWindow()
{
dispose();
}
void _SdrItemBrowserWindow::dispose()
{
aBrowse.disposeAndClear();
FloatingWindow::dispose();
}
void _SdrItemBrowserWindow::Resize()
{
aBrowse.SetSizePixel(GetOutputSizePixel());
aBrowse->SetSizePixel(GetOutputSizePixel());
}
void _SdrItemBrowserWindow::GetFocus()
{
aBrowse.GrabFocus();
aBrowse->GrabFocus();
}
// - SdrItemBrowser -
diff --git a/svx/source/tbxctrls/colorwindow.hxx b/svx/source/tbxctrls/colorwindow.hxx
index 6cfecdfc..a05ec80 100644
--- a/svx/source/tbxctrls/colorwindow.hxx
+++ b/svx/source/tbxctrls/colorwindow.hxx
@@ -67,7 +67,6 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
const OUString& rWndTitle,
vcl::Window* pParentWindow);
virtual ~SvxColorWindow_Impl();
void StartSelection();
virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index f78e827..a5e8777 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -186,7 +186,7 @@ SvxColorDockingWindow::SvxColorDockingWindow
SfxDockingWindow( _pBindings, pCW, _pParent, WB_MOVEABLE|WB_CLOSEABLE|WB_SIZEABLE|WB_DOCKABLE ),
pColorList (),
aColorSet ( this ),
aColorSet ( new SvxColorValueSet_docking(this) ),
nLeftSlot ( SID_ATTR_FILL_COLOR ),
nRightSlot ( SID_ATTR_LINE_COLOR ),
nCols ( 20 ),
@@ -197,9 +197,9 @@ SvxColorDockingWindow::SvxColorDockingWindow
SetSizePixel(LogicToPixel(Size(150, 22), MapMode(MAP_APPFONT)));
SetHelpId(HID_CTRL_COLOR);
aColorSet.SetSelectHdl( LINK( this, SvxColorDockingWindow, SelectHdl ) );
aColorSet.SetHelpId(HID_COLOR_CTL_COLORS);
aColorSet.SetPosSizePixel(LogicToPixel(Point(2, 2), MapMode(MAP_APPFONT)),
aColorSet->SetSelectHdl( LINK( this, SvxColorDockingWindow, SelectHdl ) );
aColorSet->SetHelpId(HID_COLOR_CTL_COLORS);
aColorSet->SetPosSizePixel(LogicToPixel(Point(2, 2), MapMode(MAP_APPFONT)),
LogicToPixel(Size(146, 18), MapMode(MAP_APPFONT)));
// Get the model from the view shell. Using SfxObjectShell::Current()
@@ -230,21 +230,28 @@ SvxColorDockingWindow::SvxColorDockingWindow
}
}
aItemSize = aColorSet.CalcItemSizePixel(Size(aColorSet.getEntryEdgeLength(), aColorSet.getEntryEdgeLength()));
aItemSize.Width() = aItemSize.Width() + aColorSet.getEntryEdgeLength();
aItemSize = aColorSet->CalcItemSizePixel(Size(aColorSet->getEntryEdgeLength(), aColorSet->getEntryEdgeLength()));
aItemSize.Width() = aItemSize.Width() + aColorSet->getEntryEdgeLength();
aItemSize.Width() /= 2;
aItemSize.Height() = aItemSize.Height() + aColorSet.getEntryEdgeLength();
aItemSize.Height() = aItemSize.Height() + aColorSet->getEntryEdgeLength();
aItemSize.Height() /= 2;
SetSize();
aColorSet.Show();
aColorSet->Show();
if (_pBindings != NULL)
StartListening( *_pBindings, true );
}
SvxColorDockingWindow::~SvxColorDockingWindow()
{
dispose();
}
void SvxColorDockingWindow::dispose()
{
EndListening( GetBindings() );
aColorSet.disposeAndClear();
SfxDockingWindow::dispose();
}
void SvxColorDockingWindow::Notify( SfxBroadcaster& , const SfxHint& rHint )
@@ -264,10 +271,10 @@ void SvxColorDockingWindow::FillValueSet()
if( pColorList.is() )
{
nCount = pColorList->Count();
aColorSet.Clear();
aColorSet->Clear();
// create the first entry for 'invisible/none'
const Size aColorSize(aColorSet.getEntryEdgeLength(), aColorSet.getEntryEdgeLength());
const Size aColorSize(aColorSet->getEntryEdgeLength(), aColorSet->getEntryEdgeLength());
long nPtX = aColorSize.Width() - 1;
long nPtY = aColorSize.Height() - 1;
VirtualDevice aVD;
@@ -280,9 +287,9 @@ void SvxColorDockingWindow::FillValueSet()
Bitmap aBmp( aVD.GetBitmap( Point(), aColorSize ) );
aColorSet.InsertItem( (sal_uInt16)1, Image(aBmp), SVX_RESSTR( RID_SVXSTR_INVISIBLE ) );
aColorSet->InsertItem( (sal_uInt16)1, Image(aBmp), SVX_RESSTR( RID_SVXSTR_INVISIBLE ) );
aColorSet.addEntriesForXColorList(*pColorList, 2);
aColorSet->addEntriesForXColorList(*pColorList, 2);
}
}
@@ -300,31 +307,31 @@ void SvxColorDockingWindow::SetSize()
nLines++;
// Scrollbar setzen/entfernen
WinBits nBits = aColorSet.GetStyle();
WinBits nBits = aColorSet->GetStyle();
if ( static_cast<long>(nLines) * nCols >= nCount )
nBits &= ~WB_VSCROLL;
else
nBits |= WB_VSCROLL;
aColorSet.SetStyle( nBits );
aColorSet->SetStyle( nBits );
// ScrollBar ?
long nScrollWidth = aColorSet.GetScrollWidth();
long nScrollWidth = aColorSet->GetScrollWidth();
if( nScrollWidth > 0 )
{
// Spalten mit ScrollBar berechnen
nCols = (sal_uInt16) ( ( aSize.Width() - nScrollWidth ) / aItemSize.Width() );
}
aColorSet.SetColCount( nCols );
aColorSet->SetColCount( nCols );
if( IsFloatingMode() )
aColorSet.SetLineCount( nLines );
aColorSet->SetLineCount( nLines );
else
{
aColorSet.SetLineCount( 0 ); // sonst wird LineHeight ignoriert
aColorSet.SetItemHeight( aItemSize.Height() );
aColorSet->SetLineCount( 0 ); // sonst wird LineHeight ignoriert
aColorSet->SetItemHeight( aItemSize.Height() );
}
aColorSet.SetPosSizePixel( Point( 2, 2 ), aSize );
aColorSet->SetPosSizePixel( Point( 2, 2 ), aSize );
}
bool SvxColorDockingWindow::Close()
@@ -339,11 +346,11 @@ bool SvxColorDockingWindow::Close()
IMPL_LINK_NOARG(SvxColorDockingWindow, SelectHdl)
{
SfxDispatcher* pDispatcher = GetBindings().GetDispatcher();
sal_uInt16 nPos = aColorSet.GetSelectItemId();
Color aColor( aColorSet.GetItemColor( nPos ) );
OUString aStr( aColorSet.GetItemText( nPos ) );
sal_uInt16 nPos = aColorSet->GetSelectItemId();
Color aColor( aColorSet->GetItemColor( nPos ) );
OUString aStr( aColorSet->GetItemText( nPos ) );
if (aColorSet.IsLeftButton())
if (aColorSet->IsLeftButton())
{
if ( nLeftSlot == SID_ATTR_FILL_COLOR )
{
@@ -444,15 +451,15 @@ void SvxColorDockingWindow::Resizing( Size& rNewSize )
nLines = 1;
// Scrollbar setzen/entfernen
WinBits nBits = aColorSet.GetStyle();
WinBits nBits = aColorSet->GetStyle();
if ( static_cast<long>(nLines) * nCols >= nCount )
nBits &= ~WB_VSCROLL;
else
nBits |= WB_VSCROLL;
aColorSet.SetStyle( nBits );
aColorSet->SetStyle( nBits );
// ScrollBar ?
long nScrollWidth = aColorSet.GetScrollWidth();
long nScrollWidth = aColorSet->GetScrollWidth();
if( nScrollWidth > 0 )
{
// Spalten mit ScrollBar berechnen
@@ -489,7 +496,7 @@ void SvxColorDockingWindow::GetFocus (void)
SfxDockingWindow::GetFocus();
// Grab the focus to the color value set so that it can be controlled
// with the keyboard.
aColorSet.GrabFocus();
aColorSet->GrabFocus();
}
bool SvxColorDockingWindow::Notify( NotifyEvent& rNEvt )
diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index c889e98..0ce6f92 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -562,8 +562,14 @@ FillControl::FillControl(vcl::Window* pParent,WinBits nStyle)
FillControl::~FillControl()
{
dispose();
}
void FillControl::dispose()
{
delete mpLbFillType;
delete mpLbFillAttr;
vcl::Window::dispose();
}
void FillControl::InitializeFillStyleAccordingToGivenFillType(drawing::FillStyle aFillStyle)
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index c4df8a5..a0ec590 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -95,12 +95,6 @@ FontWorkGalleryDialog::FontWorkGalleryDialog( SdrView* pSdrView, vcl::Window* pP
}
FontWorkGalleryDialog::~FontWorkGalleryDialog()
{
}
void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId)
{
// Ueber die Gallery werden die Favoriten eingelesen
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index e42c3ce1..99093aa 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -98,9 +98,7 @@ protected:
virtual void Modify() SAL_OVERRIDE;
public:
ImplGrafMetricField( vcl::Window* pParent, const OUString& aCmd, const Reference< XFrame >& rFrame );
virtual ~ImplGrafMetricField();
void Update( const SfxPoolItem* pItem );
};
@@ -143,10 +141,6 @@ ImplGrafMetricField::ImplGrafMetricField( vcl::Window* pParent, const OUString&
maIdle.SetIdleHdl( LINK( this, ImplGrafMetricField, ImplModifyHdl ) );
}
ImplGrafMetricField::~ImplGrafMetricField()
{
}
void ImplGrafMetricField::Modify()
{
maIdle.Start();
@@ -243,8 +237,8 @@ class ImplGrafControl : public Control
{
using Window::Update;
private:
FixedImage maImage;
ImplGrafMetricField maField;
VclPtr<FixedImage> maImage;
VclPtr<ImplGrafMetricField> maField;
protected:
@@ -254,9 +248,10 @@ public:
ImplGrafControl( vcl::Window* pParent, const OUString& rCmd, const Reference< XFrame >& rFrame );
virtual ~ImplGrafControl();
virtual void dispose() SAL_OVERRIDE;
void Update( const SfxPoolItem* pItem ) { maField.Update( pItem ); }
void SetText( const OUString& rStr ) SAL_OVERRIDE { maField.SetText( rStr ); }
void Update( const SfxPoolItem* pItem ) { maField->Update( pItem ); }
void SetText( const OUString& rStr ) SAL_OVERRIDE { maField->SetText( rStr ); }
};
ImplGrafControl::ImplGrafControl(
@@ -264,20 +259,20 @@ ImplGrafControl::ImplGrafControl(
const OUString& rCmd,
const Reference< XFrame >& rFrame
) : Control( pParent, WB_TABSTOP )
, maImage( this )
, maField( this, rCmd, rFrame )
, maImage( new FixedImage(this) )
, maField( new ImplGrafMetricField(this, rCmd, rFrame) )
{
ResId aResId( ImplGetRID( rCmd ), DIALOG_MGR() ) ;
Image aImage( aResId );
Size aImgSize( aImage.GetSizePixel() );
Size aFldSize( maField.GetSizePixel() );
Size aFldSize( maField->GetSizePixel() );
long nFldY, nImgY;
maImage.SetImage( aImage );
maImage.SetSizePixel( aImgSize );
maImage->SetImage( aImage );
maImage->SetSizePixel( aImgSize );
// we want to see the backbround of the toolbox, not of the FixedImage or Control
maImage.SetBackground( Wallpaper( COL_TRANSPARENT ) );
maImage->SetBackground( Wallpaper( COL_TRANSPARENT ) );
SetBackground( Wallpaper( COL_TRANSPARENT ) );
if( aImgSize.Height() > aFldSize.Height() )
@@ -286,26 +281,32 @@ ImplGrafControl::ImplGrafControl(
nFldY = 0, nImgY = ( aFldSize.Height() - aImgSize.Height() ) >> 1;
long nOffset = SYMBOL_TO_FIELD_OFFSET / 2;
maImage.SetPosPixel( Point( nOffset, nImgY ) );
maField.SetPosPixel( Point( aImgSize.Width() + SYMBOL_TO_FIELD_OFFSET, nFldY ) );
maImage->SetPosPixel( Point( nOffset, nImgY ) );
maField->SetPosPixel( Point( aImgSize.Width() + SYMBOL_TO_FIELD_OFFSET, nFldY ) );
SetSizePixel( Size( aImgSize.Width() + aFldSize.Width() + SYMBOL_TO_FIELD_OFFSET + nOffset,
std::max( aImgSize.Height(), aFldSize.Height() ) ) );
SetBackground( Wallpaper() ); // transparent background
maImage.Show();
maImage->Show();
maField.SetHelpId( OUStringToOString( rCmd, RTL_TEXTENCODING_UTF8 ) );
maField.Show();
maField->SetHelpId( OUStringToOString( rCmd, RTL_TEXTENCODING_UTF8 ) );
maField->Show();
}
ImplGrafControl::~ImplGrafControl()
{
dispose();
}
void ImplGrafControl::dispose()
{
Control::dispose();
}
void ImplGrafControl::GetFocus()
{
maField.GrabFocus();
maField->GrabFocus();
}
class ImplGrafModeControl : public ListBox
@@ -321,9 +322,7 @@ private:
void ImplReleaseFocus();
public:
ImplGrafModeControl( vcl::Window* pParent, const Reference< XFrame >& rFrame );
virtual ~ImplGrafModeControl();
void Update( const SfxPoolItem* pItem );
};
@@ -343,10 +342,6 @@ ImplGrafModeControl::ImplGrafModeControl( vcl::Window* pParent, const Reference<
Show();
}
ImplGrafModeControl::~ImplGrafModeControl()
{
}
void ImplGrafModeControl::Select()
{
if ( !IsTravelSelect() )
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index 92a017f..3b15a2a 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -71,12 +71,6 @@ SvxLineBox::SvxLineBox( vcl::Window* pParent, const Reference< XFrame >& rFrame,
SvxLineBox::~SvxLineBox()
{
}
IMPL_LINK_NOARG(SvxLineBox, DelayHdl_Impl)
{
if ( GetEntryCount() == 0 )
@@ -282,12 +276,6 @@ SvxMetricField::SvxMetricField(
SvxMetricField::~SvxMetricField()
{
}
void SvxMetricField::Update( const XLineWidthItem* pItem )
{
if ( pItem )
@@ -436,12 +424,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxFillTypeBox(vcl::Wi
SvxFillTypeBox::~SvxFillTypeBox()
{
}
bool SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt )
{
MouseNotifyEvent nType = rNEvt.GetType();
@@ -523,12 +505,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxFillAttrBox(vcl::Wi
SvxFillAttrBox::~SvxFillAttrBox()
{
}
bool SvxFillAttrBox::PreNotify( NotifyEvent& rNEvt )
{
MouseNotifyEvent nType = rNEvt.GetType();
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index c9c98d2..49a8337 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -45,7 +45,7 @@ SFX_IMPL_TOOLBOX_CONTROL(SvxColumnsToolBoxControl,SfxUInt16Item);
class TableWindow : public SfxPopupWindow
{
private:
PushButton aTableButton;
VclPtr<PushButton> aTableButton;
::Color aLineColor;
::Color aFillColor;
::Color aHighlightFillColor;
@@ -79,6 +79,7 @@ public:
ToolBox& rParentTbx,
const Reference< XFrame >& rFrame );
virtual ~TableWindow();
virtual void dispose() SAL_OVERRIDE;
void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
@@ -109,7 +110,7 @@ IMPL_LINK_NOARG(TableWindow, SelectHdl)
TableWindow::TableWindow( sal_uInt16 nSlotId, const OUString& rCmd, const OUString& rText,
ToolBox& rParentTbx, const Reference< XFrame >& rFrame )
: SfxPopupWindow( nSlotId, rFrame, WinBits( WB_STDPOPUP ) )
, aTableButton( this )
, aTableButton( new PushButton(this) )
, nCol( 0 )
, nLine( 0 )
, bInitialKeyInput(false)
@@ -143,11 +144,11 @@ TableWindow::TableWindow( sal_uInt16 nSlotId, const OUString& rCmd, const OUStri
SetText( rText );
aTableButton.SetPosSizePixel( Point( mnTablePosX, mnTableHeight + 5 ),
aTableButton->SetPosSizePixel( Point( mnTablePosX, mnTableHeight + 5 ),
Size( mnTableWidth - mnTablePosX, 24 ) );
aTableButton.SetText( SVX_RESSTR( RID_SVXSTR_MORE ) );
aTableButton.SetClickHdl( LINK( this, TableWindow, SelectHdl ) );
aTableButton.Show();
aTableButton->SetText( SVX_RESSTR( RID_SVXSTR_MORE ) );
aTableButton->SetClickHdl( LINK( this, TableWindow, SelectHdl ) );
aTableButton->Show();
SetOutputSizePixel( Size( mnTableWidth + 3, mnTableHeight + 33 ) );
}
@@ -156,9 +157,14 @@ TableWindow::TableWindow( sal_uInt16 nSlotId, const OUString& rCmd, const OUStri
TableWindow::~TableWindow()
{
dispose();
}
void TableWindow::dispose()
{
aTableButton.disposeAndClear();
SfxPopupWindow::dispose();
}
SfxPopupWindow* TableWindow::Clone() const
{
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index bee2f93..8128f3e 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -256,7 +256,7 @@ SvxLineEndWindow::SvxLineEndWindow(
SfxPopupWindow( nSlotId,
rFrame,
WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
aLineEndSet ( new ValueSet(this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT )) ),
nCols ( 2 ),
nLines ( 12 ),
nLineEndWidth ( 400 ),
@@ -277,7 +277,7 @@ SvxLineEndWindow::SvxLineEndWindow(
rFrame,
pParentWindow,
WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
aLineEndSet ( new ValueSet(this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) )),
nCols ( 2 ),
nLines ( 12 ),
nLineEndWidth ( 400 ),
@@ -294,7 +294,7 @@ void SvxLineEndWindow::implInit()
SfxObjectShell* pDocSh = SfxObjectShell::Current();
SetHelpId( HID_POPUP_LINEEND );
aLineEndSet.SetHelpId( HID_POPUP_LINEEND_CTRL );
aLineEndSet->SetHelpId( HID_POPUP_LINEEND_CTRL );
if ( pDocSh )
{
@@ -308,8 +308,8 @@ void SvxLineEndWindow::implInit()
}
DBG_ASSERT( pLineEndList.is(), "LineEndList not found" );
aLineEndSet.SetSelectHdl( LINK( this, SvxLineEndWindow, SelectHdl ) );
aLineEndSet.SetColCount( nCols );
aLineEndSet->SetSelectHdl( LINK( this, SvxLineEndWindow, SelectHdl ) );
aLineEndSet->SetColCount( nCols );
// ValueSet fill with entries of LineEndList
FillValueSet();
@@ -317,7 +317,7 @@ void SvxLineEndWindow::implInit()
AddStatusListener( OUString( ".uno:LineEndListState" ));
//ChangeHelpId( HID_POPUP_LINEENDSTYLE );
aLineEndSet.Show();
aLineEndSet->Show();
}
SfxPopupWindow* SvxLineEndWindow::Clone() const
@@ -329,15 +329,20 @@ SfxPopupWindow* SvxLineEndWindow::Clone() const
SvxLineEndWindow::~SvxLineEndWindow()
{
dispose();
}
void SvxLineEndWindow::dispose()
{
aLineEndSet.disposeAndClear();
SfxPopupWindow::dispose();
}
IMPL_LINK_NOARG(SvxLineEndWindow, SelectHdl)
{
boost::scoped_ptr<XLineEndItem> pLineEndItem;
boost::scoped_ptr<XLineStartItem> pLineStartItem;
sal_uInt16 nId = aLineEndSet.GetSelectItemId();
sal_uInt16 nId = aLineEndSet->GetSelectItemId();
if( nId == 1 )
{
@@ -380,7 +385,7 @@ IMPL_LINK_NOARG(SvxLineEndWindow, SelectHdl)
/* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call.
This instance may be deleted in the meantime (i.e. when a dialog is opened
while in Dispatch()), accessing members will crash in this case. */
aLineEndSet.SetNoSelection();
aLineEndSet->SetNoSelection();
SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ),
OUString( ".uno:LineEndStyle" ),
@@ -415,8 +420,8 @@ void SvxLineEndWindow::FillValueSet()
Point aPt1( aBmpSize.Width(), 0 );
aVD.DrawBitmap( Point(), aBmp );
aLineEndSet.InsertItem(1, Image(aVD.GetBitmap(aPt0, aBmpSize)), pEntry->GetName());
aLineEndSet.InsertItem(2, Image(aVD.GetBitmap(aPt1, aBmpSize)), pEntry->GetName());
aLineEndSet->InsertItem(1, Image(aVD.GetBitmap(aPt0, aBmpSize)), pEntry->GetName());
aLineEndSet->InsertItem(2, Image(aVD.GetBitmap(aPt1, aBmpSize)), pEntry->GetName());
delete pLineEndList->Remove( nCount );
@@ -428,13 +433,13 @@ void SvxLineEndWindow::FillValueSet()
OSL_ENSURE( !aBmp.IsEmpty(), "UI bitmap was not created" );
aVD.DrawBitmap( aPt0, aBmp );
aLineEndSet.InsertItem((sal_uInt16)((i+1L)*2L+1L),
aLineEndSet->InsertItem((sal_uInt16)((i+1L)*2L+1L),
Image(aVD.GetBitmap(aPt0, aBmpSize)), pEntry->GetName());
aLineEndSet.InsertItem((sal_uInt16)((i+2L)*2L),
aLineEndSet->InsertItem((sal_uInt16)((i+2L)*2L),
Image(aVD.GetBitmap(aPt1, aBmpSize)), pEntry->GetName());
}
nLines = std::min( (sal_uInt16)(nCount + 1), (sal_uInt16) MAX_LINES );
aLineEndSet.SetLineCount( nLines );
aLineEndSet->SetLineCount( nLines );
SetSize();
}
@@ -451,15 +456,15 @@ void SvxLineEndWindow::Resize()
mbInResize = true;
if ( !IsRollUp() )
{
aLineEndSet.SetColCount( nCols );
aLineEndSet.SetLineCount( nLines );
aLineEndSet->SetColCount( nCols );
aLineEndSet->SetLineCount( nLines );
SetSize();
Size aSize = GetOutputSizePixel();
aSize.Width() -= 4;
aSize.Height() -= 4;
aLineEndSet.SetPosSizePixel( Point( 2, 2 ), aSize );
aLineEndSet->SetPosSizePixel( Point( 2, 2 ), aSize );
}
//SfxPopupWindow::Resize();
mbInResize = false;
@@ -474,10 +479,10 @@ void SvxLineEndWindow::Resizing( Size& rNewSize )
aBitmapSize.Width() += 6;
aBitmapSize.Height() += 6;
Size aItemSize = aLineEndSet.CalcItemSizePixel( aBitmapSize ); // -> Member
Size aItemSize = aLineEndSet->CalcItemSizePixel( aBitmapSize ); // -> Member
//Size aOldSize = GetOutputSizePixel(); // for width
sal_uInt16 nItemCount = aLineEndSet.GetItemCount(); // -> Member
sal_uInt16 nItemCount = aLineEndSet->GetItemCount(); // -> Member
// identify columns
long nItemW = aItemSize.Width();
@@ -517,7 +522,7 @@ void SvxLineEndWindow::Resizing( Size& rNewSize )
void SvxLineEndWindow::StartSelection()
{
aLineEndSet.StartSelection();
aLineEndSet->StartSelection();
}
@@ -540,7 +545,7 @@ void SvxLineEndWindow::StateChanged(
pLineEndList = static_cast<const SvxLineEndListItem*>(pState)->GetLineEndList();
DBG_ASSERT( pLineEndList.is(), "LineEndList not found" );
aLineEndSet.Clear();
aLineEndSet->Clear();
FillValueSet();
Size aSize = GetOutputSizePixel();
@@ -569,23 +574,23 @@ void SvxLineEndWindow::SetSize()
//if( !bPopupMode )
if( !IsInPopupMode() )
{
sal_uInt16 nItemCount = aLineEndSet.GetItemCount(); // -> Member
sal_uInt16 nItemCount = aLineEndSet->GetItemCount(); // -> Member
sal_uInt16 nMaxLines = nItemCount / nCols; // -> Member ?
if( nItemCount % nCols )
nMaxLines++;
WinBits nBits = aLineEndSet.GetStyle();
WinBits nBits = aLineEndSet->GetStyle();
if ( nLines == nMaxLines )
nBits &= ~WB_VSCROLL;
else
nBits |= WB_VSCROLL;
aLineEndSet.SetStyle( nBits );
aLineEndSet->SetStyle( nBits );
}
Size aSize( aBmpSize );
aSize.Width() += 6;
aSize.Height() += 6;
aSize = aLineEndSet.CalcWindowSizePixel( aSize );
aSize = aLineEndSet->CalcWindowSizePixel( aSize );
aSize.Width() += 4;
aSize.Height() += 4;
SetOutputSizePixel( aSize );
@@ -599,7 +604,7 @@ void SvxLineEndWindow::GetFocus (void)
SfxPopupWindow::GetFocus();
// Grab the focus to the line ends value set so that it can be controlled
// with the keyboard.
aLineEndSet.GrabFocus();
aLineEndSet->GrabFocus();
}
SvxLineEndToolBoxControl::SvxLineEndToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ) :
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 8782e76..51cb5e1 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -121,6 +121,7 @@ public:
SvxStyleBox_Impl( vcl::Window* pParent, const OUString& rCommand, SfxStyleFamily eFamily, const Reference< XDispatchProvider >& rDispatchProvider,
const Reference< XFrame >& _xFrame,const OUString& rClearFormatKey, const OUString& rMoreKey, bool bInSpecialMode );
virtual ~SvxStyleBox_Impl();
virtual void dispose() SAL_OVERRIDE;
void SetFamily( SfxStyleFamily eNewFamily );
inline bool IsVisible() { return bVisible; }
@@ -197,6 +198,7 @@ public:
, WinBits nStyle = WB_SORT
);
virtual ~SvxFontNameBox_Impl();
virtual void dispose() SAL_OVERRIDE;
void FillList();
void Update( const SvxFontItem* pFontItem );
@@ -235,9 +237,9 @@ class SvxFrameWindow_Impl : public SfxPopupWindow
using FloatingWindow::StateChanged;
private:
SvxFrmValueSet_Impl aFrameSet;
ImageList aImgList;
bool bParagraphMode;
VclPtr<SvxFrmValueSet_Impl> aFrameSet;
ImageList aImgList;
bool bParagraphMode;
DECL_LINK( SelectHdl, void * );
@@ -250,6 +252,8 @@ protected:
public:
SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow );
virtual ~SvxFrameWindow_Impl();
virtual void dispose() SAL_OVERRIDE;
void StartSelection();
virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
@@ -261,7 +265,7 @@ public:
class SvxLineWindow_Impl : public SfxPopupWindow
{
private:
LineListBox m_aLineStyleLb;
VclPtr<LineListBox> m_aLineStyleLb;
bool m_bIsWriter;
DECL_LINK( SelectHdl, void * );
@@ -274,7 +278,8 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
public:
SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow );
virtual ~SvxLineWindow_Impl() { dispose(); }
virtual void dispose() SAL_OVERRIDE { m_aLineStyleLb.disposeAndClear(); }
virtual SfxPopupWindow* Clone() const SAL_OVERRIDE;
};
@@ -327,8 +332,14 @@ SvxStyleBox_Impl::SvxStyleBox_Impl(vcl::Window* pParent,
SvxStyleBox_Impl::~SvxStyleBox_Impl()
{
dispose();
}
void SvxStyleBox_Impl::dispose()
{
for(int i = 0; i < MAX_STYLES_ENTRIES; i++)
delete m_pButtons[i];
ComboBox::dispose();
}
void SvxStyleBox_Impl::ReleaseFocus()
@@ -870,7 +881,13 @@ SvxFontNameBox_Impl::SvxFontNameBox_Impl( vcl::Window* pParent, const Reference<
SvxFontNameBox_Impl::~SvxFontNameBox_Impl()
{
dispose();
}
void SvxFontNameBox_Impl::dispose()
{
GetSubEdit()->RemoveEventListener( LINK( this, SvxFontNameBox_Impl, CheckAndMarkUnknownFont ));
FontNameBox::dispose();
}
void SvxFontNameBox_Impl::FillList()
@@ -1222,10 +1239,6 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
}
}
SvxColorWindow_Impl::~SvxColorWindow_Impl()
{
}
void SvxColorWindow_Impl::KeyInput( const KeyEvent& rKEvt )
{
mpColorSet->KeyInput(rKEvt);
@@ -1443,7 +1456,7 @@ Color BorderColorStatus::GetColor()
SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow ) :
SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION ) ),
aFrameSet ( this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ),
aFrameSet ( new SvxFrmValueSet_Impl(this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT )) ),
bParagraphMode(false)
{
BindListener();
@@ -1473,27 +1486,34 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( sal_uInt16 nId, const Reference< XFram
sal_uInt16 i = 0;
for ( i=1; i<9; i++ )
aFrameSet.InsertItem( i, aImgList.GetImage(i) );
aFrameSet->InsertItem( i, aImgList.GetImage(i) );
//bParagraphMode should have been set in StateChanged
if ( !bParagraphMode )
for ( i = 9; i < 13; i++ )
aFrameSet.InsertItem( i, aImgList.GetImage(i) );
aFrameSet->InsertItem( i, aImgList.GetImage(i) );
aFrameSet.SetColCount( 4 );
aFrameSet.SetSelectHdl( LINK( this, SvxFrameWindow_Impl, SelectHdl ) );
aFrameSet->SetColCount( 4 );
aFrameSet->SetSelectHdl( LINK( this, SvxFrameWindow_Impl, SelectHdl ) );
lcl_CalcSizeValueSet( *this, aFrameSet, Size( 20 * pParentWindow->GetDPIScaleFactor(), 20 * pParentWindow->GetDPIScaleFactor() ));
lcl_CalcSizeValueSet( *this, *aFrameSet.get(), Size( 20 * pParentWindow->GetDPIScaleFactor(), 20 * pParentWindow->GetDPIScaleFactor() ));
SetHelpId( HID_POPUP_FRAME );
SetText( SVX_RESSTR(RID_SVXSTR_FRAME) );
aFrameSet.SetAccessibleName( SVX_RESSTR(RID_SVXSTR_FRAME) );
aFrameSet.Show();
aFrameSet->SetAccessibleName( SVX_RESSTR(RID_SVXSTR_FRAME) );
aFrameSet->Show();
}
SvxFrameWindow_Impl::~SvxFrameWindow_Impl()
{
dispose();
}
void SvxFrameWindow_Impl::dispose()
{
UnbindListener();
aFrameSet.disposeAndClear();
SfxPopupWindow::dispose();
}
SfxPopupWindow* SvxFrameWindow_Impl::Clone() const
@@ -1504,12 +1524,12 @@ SfxPopupWindow* SvxFrameWindow_Impl::Clone() const
vcl::Window* SvxFrameWindow_Impl::GetPreferredKeyInputWindow()
{
return &aFrameSet;
return aFrameSet.get();
}
void SvxFrameWindow_Impl::GetFocus()
{
aFrameSet.GrabFocus();
aFrameSet->GrabFocus();
}
void SvxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
@@ -1520,10 +1540,10 @@ void SvxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
{
aImgList = ImageList( SVX_RES( RID_SVXIL_FRAME ) );
sal_uInt16 nNumOfItems = aFrameSet.GetItemCount();
sal_uInt16 nNumOfItems = aFrameSet->GetItemCount();
for( sal_uInt16 i = 1 ; i <= nNumOfItems ; ++i )
aFrameSet.SetItemImage( i, aImgList.GetImage( i ) );
aFrameSet->SetItemImage( i, aImgList.GetImage( i ) );
}
}
@@ -1548,8 +1568,8 @@ IMPL_LINK_NOARG(SvxFrameWindow_Impl, SelectHdl)
*pRight = 0,
*pTop = 0,
*pBottom = 0;
sal_uInt16 nSel = aFrameSet.GetSelectItemId();
sal_uInt16 nModifier = aFrameSet.GetModifier();
sal_uInt16 nSel = aFrameSet->GetSelectItemId();
sal_uInt16 nModifier = aFrameSet->GetModifier();
sal_uInt8 nValidFlags = 0;
theDefLine.GuessLinesWidths(theDefLine.GetBorderLineStyle(),
@@ -1643,7 +1663,7 @@ IMPL_LINK_NOARG(SvxFrameWindow_Impl, SelectHdl)
/* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call.
This instance may be deleted in the meantime (i.e. when a dialog is opened
while in Dispatch()), accessing members will crash in this case. */
aFrameSet.SetNoSelection();
aFrameSet->SetNoSelection();
SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ),
OUString( ".uno:SetBorderStyle" ),
@@ -1654,7 +1674,7 @@ IMPL_LINK_NOARG(SvxFrameWindow_Impl, SelectHdl)
void SvxFrameWindow_Impl::Resize()
{
const Size aSize(this->GetOutputSizePixel());
aFrameSet.SetPosSizePixel(Point(2,2), Size(aSize.Width() - 4, aSize.Height() - 4));
aFrameSet->SetPosSizePixel(Point(2,2), Size(aSize.Width() - 4, aSize.Height() - 4));
}
void SvxFrameWindow_Impl::StateChanged(
@@ -1668,27 +1688,27 @@ void SvxFrameWindow_Impl::StateChanged(
{
bParagraphMode = pItem->GetValue();
//initial calls mustn't insert or remove elements
if(aFrameSet.GetItemCount())
if(aFrameSet->GetItemCount())
{
bool bTableMode = ( aFrameSet.GetItemCount() == 12 );
bool bTableMode = ( aFrameSet->GetItemCount() == 12 );
bool bResize = false;
if ( bTableMode && bParagraphMode )
{
for ( sal_uInt16 i = 9; i < 13; i++ )
aFrameSet.RemoveItem(i);
aFrameSet->RemoveItem(i);
bResize = true;
}
else if ( !bTableMode && !bParagraphMode )
{
for ( sal_uInt16 i = 9; i < 13; i++ )
aFrameSet.InsertItem( i, aImgList.GetImage(i) );
aFrameSet->InsertItem( i, aImgList.GetImage(i) );
bResize = true;
}
if ( bResize )
{
lcl_CalcSizeValueSet( *this, aFrameSet,Size( 20, 20 ));
lcl_CalcSizeValueSet( *this, *aFrameSet.get(), Size( 20, 20 ));
}
}
}
@@ -1698,7 +1718,7 @@ void SvxFrameWindow_Impl::StateChanged(
void SvxFrameWindow_Impl::StartSelection()
{
aFrameSet.StartSelection();
aFrameSet->StartSelection();
}
bool SvxFrameWindow_Impl::Close()
@@ -1714,7 +1734,7 @@ static Color lcl_mediumColor( Color aMain, Color /*aDefault*/ )
SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame >& rFrame, vcl::Window* pParentWindow ) :
SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP | WB_OWNERDRAWDECORATION | WB_AUTOSIZE ) ),
m_aLineStyleLb( this )
m_aLineStyleLb( new LineListBox(this) )
{
try
{
@@ -1725,46 +1745,46 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame
{
}
m_aLineStyleLb.setPosSizePixel( 2, 2, 110, 140 );
m_aLineStyleLb->setPosSizePixel( 2, 2, 110, 140 );
SetOutputSizePixel( Size( 114, 144 ) );
m_aLineStyleLb.SetSourceUnit( FUNIT_TWIP );
m_aLineStyleLb.SetNone( SVX_RESSTR(RID_SVXSTR_NONE) );
m_aLineStyleLb->SetSourceUnit( FUNIT_TWIP );
m_aLineStyleLb->SetNone( SVX_RESSTR(RID_SVXSTR_NONE) );
using namespace table::BorderLineStyle;
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( SOLID ), SOLID );
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( DOTTED ), DOTTED );
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( DASHED ), DASHED );
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SOLID ), SOLID );
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( DOTTED ), DOTTED );
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( DASHED ), DASHED );
// Double lines
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( DOUBLE ), DOUBLE );
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_SMALLGAP ), THINTHICK_SMALLGAP, 20 );
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_MEDIUMGAP ), THINTHICK_MEDIUMGAP );
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_LARGEGAP ), THINTHICK_LARGEGAP );
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_SMALLGAP ), THICKTHIN_SMALLGAP, 20 );
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_MEDIUMGAP ), THICKTHIN_MEDIUMGAP );
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_LARGEGAP ), THICKTHIN_LARGEGAP );
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( DOUBLE ), DOUBLE );
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_SMALLGAP ), THINTHICK_SMALLGAP, 20 );
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_MEDIUMGAP ), THINTHICK_MEDIUMGAP );
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_LARGEGAP ), THINTHICK_LARGEGAP );
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_SMALLGAP ), THICKTHIN_SMALLGAP, 20 );
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_MEDIUMGAP ), THICKTHIN_MEDIUMGAP );
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_LARGEGAP ), THICKTHIN_LARGEGAP );
// Engraved / Embossed
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( EMBOSSED ), EMBOSSED, 15,
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( EMBOSSED ), EMBOSSED, 15,
&SvxBorderLine::threeDLightColor, &SvxBorderLine::threeDDarkColor,
&lcl_mediumColor );
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( ENGRAVED ), ENGRAVED, 15,
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( ENGRAVED ), ENGRAVED, 15,
&SvxBorderLine::threeDDarkColor, &SvxBorderLine::threeDLightColor,
&lcl_mediumColor );
// Inset / Outset
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( OUTSET ), OUTSET, 10,
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( OUTSET ), OUTSET, 10,
&SvxBorderLine::lightColor, &SvxBorderLine::darkColor );
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( INSET ), INSET, 10,
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( INSET ), INSET, 10,
&SvxBorderLine::darkColor, &SvxBorderLine::lightColor );
m_aLineStyleLb.SetWidth( 20 ); // 1pt by default
m_aLineStyleLb->SetWidth( 20 ); // 1pt by default
m_aLineStyleLb.SetSelectHdl( LINK( this, SvxLineWindow_Impl, SelectHdl ) );
m_aLineStyleLb->SetSelectHdl( LINK( this, SvxLineWindow_Impl, SelectHdl ) );
SetHelpId( HID_POPUP_LINE );
SetText( SVX_RESSTR(RID_SVXSTR_FRAME_STYLE) );
m_aLineStyleLb.Show();
m_aLineStyleLb->Show();
}
SfxPopupWindow* SvxLineWindow_Impl::Clone() const
@@ -1775,9 +1795,9 @@ SfxPopupWindow* SvxLineWindow_Impl::Clone() const
IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl)
{
SvxLineItem aLineItem( SID_FRAME_LINESTYLE );
SvxBorderStyle nStyle = SvxBorderStyle( m_aLineStyleLb.GetSelectEntryStyle() );
SvxBorderStyle nStyle = SvxBorderStyle( m_aLineStyleLb->GetSelectEntryStyle() );
if ( m_aLineStyleLb.GetSelectEntryPos( ) > 0 )
if ( m_aLineStyleLb->GetSelectEntryPos( ) > 0 )
{
SvxBorderLine aTmp;
aTmp.SetBorderLineStyle( nStyle );
@@ -1804,7 +1824,7 @@ IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl)
void SvxLineWindow_Impl::Resize()
{
m_aLineStyleLb.Resize();
m_aLineStyleLb->Resize();
}
bool SvxLineWindow_Impl::Close()
@@ -1814,12 +1834,12 @@ bool SvxLineWindow_Impl::Close()
vcl::Window* SvxLineWindow_Impl::GetPreferredKeyInputWindow()
{
return &m_aLineStyleLb;
return m_aLineStyleLb.get();
}
void SvxLineWindow_Impl::GetFocus()
{
m_aLineStyleLb.GrabFocus();
m_aLineStyleLb->GrabFocus();
}
void SvxLineWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 61846913..4931df0 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -139,10 +139,6 @@ FindTextFieldControl::FindTextFieldControl( vcl::Window* pParent, WinBits nStyle
EnableAutocomplete(true, true);
}
FindTextFieldControl::~FindTextFieldControl()
{
}
void FindTextFieldControl::Remember_Impl(const OUString& rStr)
{
sal_uInt16 nCount = GetEntryCount();
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index da04cd6..3cae7ea 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -542,9 +542,15 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( vcl::Window* pParent )
ChineseDictionaryDialog::~ChineseDictionaryDialog()
{
dispose();
}
void ChineseDictionaryDialog::dispose()
{
m_xContext=0;
delete m_pCT_DictionaryToSimplified;
delete m_pCT_DictionaryToTraditional;
ModalDialog::dispose();
}
void ChineseDictionaryDialog::setDirectionAndTextConversionOptions( bool bDirectionToSimplified, sal_Int32 nTextConversionOptions /*i18n::TextConversionOption*/ )
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
index 97cef0a..6b50ef7 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
@@ -113,6 +113,7 @@ class ChineseDictionaryDialog : public ModalDialog
public:
ChineseDictionaryDialog( vcl::Window* pParent );
virtual ~ChineseDictionaryDialog();
virtual void dispose() SAL_OVERRIDE;
//this method should be called once before calling execute
void setDirectionAndTextConversionOptions( bool bDirectionToSimplified, sal_Int32 nTextConversionOptions /*i18n::TextConversionOption*/ );
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
index 8dec51d..2253d34 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
@@ -63,12 +63,18 @@ ChineseTranslationDialog::ChineseTranslationDialog( vcl::Window* pParent )
ChineseTranslationDialog::~ChineseTranslationDialog()
{
dispose();
}
void ChineseTranslationDialog::dispose()
{
if(m_pDictionaryDialog)
{
if(m_pDictionaryDialog->IsInExecute())
m_pDictionaryDialog->EndDialog();
delete m_pDictionaryDialog;
}
ModalDialog::dispose();
}
void ChineseTranslationDialog::getSettings( bool& rbDirectionToSimplified
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx
index 5e1f090..6afeadf 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx
@@ -39,6 +39,7 @@ class ChineseTranslationDialog : public ModalDialog
public:
ChineseTranslationDialog( vcl::Window* pParent );
virtual ~ChineseTranslationDialog();
virtual void dispose() SAL_OVERRIDE;
void getSettings( bool& rbDirectionToSimplified
, bool& rbTranslateCommonTerms ) const;
diff --git a/svx/workben/pixelctl.cxx b/svx/workben/pixelctl.cxx
index 09cb020..4144488 100644
--- a/svx/workben/pixelctl.cxx
+++ b/svx/workben/pixelctl.cxx
@@ -79,11 +79,12 @@ SAL_IMPLEMENT_MAIN()
class MyWin : public WorkWindow
{
SvxPixelCtl maPixelCtl;
VclPtr<SvxPixelCtl> maPixelCtl;
public:
MyWin( vcl::Window* pParent, WinBits nWinStyle );
virtual ~MyWin() { dispose(); }
virtual void dispose() SAL_OVERRIDE;
void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
@@ -106,13 +107,19 @@ void Main()
MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) :
WorkWindow( pParent, nWinStyle ),
maPixelCtl( this )
maPixelCtl( new SvxPixelCtl(this) )
{
maPixelCtl.SetPosSizePixel( Point( 10, 10 ), Size( 200, 200 ) );
maPixelCtl.Show();
maPixelCtl->SetPosSizePixel( Point( 10, 10 ), Size( 200, 200 ) );
maPixelCtl->Show();
}
void MyWin::dispose()
{
maPixelCtl.disposeAndClear();
WorkWindow::dispose();
}
bool MyWin::Close()
{
bool bRet = WorkWindow::Close();