diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-28 11:41:31 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-28 15:08:48 +0100 |
commit | e8b97a52c96df9c8e8055407b1e40ed7cb9cfc67 (patch) | |
tree | b322529f4a54a6427862cb20cb4cf87fb6a5d065 /sc/source/ui/sidebar | |
parent | 2b0be6c0e9d23f1b8535ba7033732ae2e3bfb5c9 (diff) | |
parent | 0cde74f788a054fa2b65107a030dd463b8d11c7a (diff) |
Merge remote-tracking branch 'origin/feature/vclptr'
Resolve several thousand lines of conflicts.
Conflicts:
accessibility/source/extended/accessiblelistbox.cxx
accessibility/source/standard/vclxaccessiblecombobox.cxx
accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
accessibility/source/standard/vclxaccessiblelistbox.cxx
accessibility/source/standard/vclxaccessibletextfield.cxx
basctl/source/basicide/basidesh.cxx
cui/source/inc/chardlg.hxx
cui/source/tabpages/tpbitmap.cxx
dbaccess/source/ui/dlg/UserAdmin.cxx
dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
extensions/source/propctrlr/propertyeditor.hxx
extensions/source/scanner/sanedlg.cxx
filter/source/pdf/impdialog.cxx
include/sfx2/mgetempl.hxx
include/sfx2/sidebar/SidebarToolBox.hxx
include/sfx2/viewsh.hxx
include/svtools/brwbox.hxx
include/svtools/filectrl.hxx
include/svtools/scrwin.hxx
include/svx/dlgctrl.hxx
include/svx/sidebar/Popup.hxx
include/svx/sidebar/PopupContainer.hxx
include/svx/sidebar/PopupControl.hxx
include/svx/sidebar/SidebarDialControl.hxx
include/svx/sidebar/ValueSetWithTextControl.hxx
sc/source/ui/condformat/condformatdlgentry.cxx
sc/source/ui/navipi/navipi.cxx
sc/source/ui/sidebar/CellBorderStyleControl.hxx
sd/source/ui/animations/CustomAnimationDialog.cxx
sd/source/ui/inc/DrawViewShell.hxx
sd/source/ui/inc/Ruler.hxx
sd/source/ui/inc/SlideSorter.hxx
sd/source/ui/inc/ViewTabBar.hxx
sd/source/ui/inc/Window.hxx
sd/source/ui/inc/morphdlg.hxx
sd/source/ui/inc/sdpreslt.hxx
sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx
sd/source/ui/sidebar/LayoutMenu.hxx
sd/source/ui/sidebar/MasterPagesSelector.hxx
sd/source/ui/sidebar/NavigatorWrapper.hxx
sd/source/ui/sidebar/PanelBase.hxx
sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
sd/source/ui/sidebar/RecentMasterPagesSelector.hxx
sd/source/ui/slideshow/showwindow.hxx
sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx
sd/source/ui/view/ViewShellBase.cxx
sd/source/ui/view/drviewsa.cxx
sfx2/source/appl/fileobj.hxx
sfx2/source/appl/opengrf.cxx
sfx2/source/control/thumbnailviewacc.hxx
sfx2/source/dialog/securitypage.cxx
sfx2/source/dialog/templdlg.cxx
sfx2/source/doc/docinsert.cxx
sfx2/source/doc/guisaveas.cxx
sfx2/source/inc/alienwarn.hxx
sfx2/source/sidebar/Deck.cxx
sfx2/source/sidebar/Deck.hxx
sfx2/source/sidebar/DeckTitleBar.cxx
sfx2/source/sidebar/DeckTitleBar.hxx
sfx2/source/sidebar/MenuButton.cxx
sfx2/source/sidebar/MenuButton.hxx
sfx2/source/sidebar/Panel.cxx
sfx2/source/sidebar/Panel.hxx
sfx2/source/sidebar/PanelTitleBar.hxx
sfx2/source/sidebar/SidebarDockingWindow.hxx
sfx2/source/sidebar/SidebarToolBox.cxx
sfx2/source/sidebar/TabBar.hxx
sfx2/source/sidebar/TabItem.cxx
sfx2/source/sidebar/TabItem.hxx
sfx2/source/sidebar/TitleBar.hxx
sfx2/source/toolbox/imgmgr.cxx
starmath/inc/edit.hxx
starmath/inc/smmod.hxx
starmath/qa/cppunit/test_starmath.cxx
starmath/source/edit.cxx
starmath/source/smmod.cxx
svtools/source/brwbox/brwbox1.cxx
svtools/source/brwbox/datwin.hxx
svtools/source/contnr/fileview.cxx
svtools/source/contnr/simptabl.cxx
svtools/source/control/filectrl.cxx
svtools/source/control/valueimp.hxx
svx/inc/GalleryControl.hxx
svx/source/dialog/dlgctrl.cxx
svx/source/dialog/swframeexample.cxx
svx/source/fmcomp/fmgridif.cxx
svx/source/gallery2/GalleryControl.cxx
svx/source/sidebar/EmptyPanel.hxx
svx/source/sidebar/area/AreaPropertyPanel.hxx
svx/source/sidebar/area/AreaTransparencyGradientControl.hxx
svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
svx/source/sidebar/insert/InsertPropertyPanel.cxx
svx/source/sidebar/insert/InsertPropertyPanel.hxx
svx/source/sidebar/line/LinePropertyPanel.hxx
svx/source/sidebar/line/LineWidthControl.cxx
svx/source/sidebar/line/LineWidthControl.hxx
svx/source/sidebar/line/LineWidthValueSet.hxx
svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
svx/source/sidebar/possize/SidebarDialControl.cxx
svx/source/sidebar/text/TextCharacterSpacingPopup.hxx
svx/source/sidebar/text/TextPropertyPanel.hxx
svx/source/sidebar/tools/PopupContainer.cxx
svx/source/sidebar/tools/PopupControl.cxx
svx/source/sidebar/tools/ValueSetWithTextControl.cxx
svx/source/svdraw/svdfmtf.hxx
svx/source/svdraw/svdibrow.cxx
svx/source/tbxctrls/colrctrl.cxx
svx/source/tbxctrls/tbcontrl.cxx
sw/source/ui/dbui/mmaddressblockpage.cxx
sw/source/ui/dialog/uiregionsw.cxx
sw/source/ui/index/cnttab.cxx
sw/source/uibase/inc/drpcps.hxx
sw/source/uibase/sidebar/PageColumnControl.hxx
sw/source/uibase/sidebar/PageMarginControl.hxx
sw/source/uibase/sidebar/PageOrientationControl.hxx
sw/source/uibase/sidebar/PagePropertyPanel.hxx
sw/source/uibase/sidebar/PageSizeControl.hxx
sw/source/uibase/uiview/view2.cxx
sw/source/uibase/utlui/navipi.cxx
vcl/inc/svdata.hxx
vcl/source/control/combobox.cxx
vcl/source/control/lstbox.cxx
vcl/source/window/dockwin.cxx
vcl/source/window/winproc.cxx
Change-Id: I056cf3026ff17d65cca0b6e6588bda4a88fa8d95
Diffstat (limited to 'sc/source/ui/sidebar')
-rw-r--r-- | sc/source/ui/sidebar/AlignmentPropertyPanel.cxx | 30 | ||||
-rw-r--r-- | sc/source/ui/sidebar/AlignmentPropertyPanel.hxx | 33 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx | 26 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx | 25 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellBorderStyleControl.cxx | 119 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellBorderStyleControl.hxx | 11 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellLineStyleControl.cxx | 78 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellLineStyleControl.hxx | 10 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellLineStyleValueSet.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/sidebar/CellLineStyleValueSet.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 24 | ||||
-rw-r--r-- | sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx | 28 | ||||
-rw-r--r-- | sc/source/ui/sidebar/ScPanelFactory.cxx | 46 |
13 files changed, 253 insertions, 188 deletions
diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx index e10b53830ffb..d1da58a3cd47 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx @@ -68,6 +68,28 @@ AlignmentPropertyPanel::AlignmentPropertyPanel( AlignmentPropertyPanel::~AlignmentPropertyPanel() { + disposeOnce(); +} + +void AlignmentPropertyPanel::dispose() +{ + mpFTLeftIndent.clear(); + mpMFLeftIndent.clear(); + mpCBXWrapText.clear(); + mpCBXMergeCell.clear(); + mpFtRotate.clear(); + mpCtrlDial.clear(); + mpMtrAngle.clear(); + mpCbStacked.clear(); + + maAlignHorControl.dispose(); + maLeftIndentControl.dispose(); + maMergeCellControl.dispose(); + maWrapTextControl.dispose(); + maAngleControl.dispose(); + maStackControl.dispose(); + + PanelLayout::dispose(); } void AlignmentPropertyPanel::Initialize() @@ -204,7 +226,7 @@ IMPL_LINK(AlignmentPropertyPanel, CBOXWrapTextClkHdl, void*, EMPTYARG) return 0; } -AlignmentPropertyPanel* AlignmentPropertyPanel::Create ( +VclPtr<vcl::Window> AlignmentPropertyPanel::Create ( vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings) @@ -216,10 +238,8 @@ AlignmentPropertyPanel* AlignmentPropertyPanel::Create ( if (pBindings == NULL) throw lang::IllegalArgumentException("no SfxBindings given to AlignmentPropertyPanel::Create", NULL, 2); - return new AlignmentPropertyPanel( - pParent, - rxFrame, - pBindings); + return VclPtr<AlignmentPropertyPanel>::Create( + pParent, rxFrame, pBindings); } void AlignmentPropertyPanel::DataChanged( diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx index 050c79d48b63..dab38a72a3ef 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx @@ -39,7 +39,7 @@ class AlignmentPropertyPanel public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface { public: - static AlignmentPropertyPanel* Create( + static VclPtr<vcl::Window> Create( vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings); @@ -58,16 +58,24 @@ public: SfxBindings* GetBindings() { return mpBindings;} + // constructor/destuctor + AlignmentPropertyPanel( + vcl::Window* pParent, + const css::uno::Reference<css::frame::XFrame>& rxFrame, + SfxBindings* pBindings); + virtual ~AlignmentPropertyPanel(); + virtual void dispose() SAL_OVERRIDE; + private: //ui controls - FixedText* mpFTLeftIndent; - MetricField* mpMFLeftIndent; - CheckBox* mpCBXWrapText; - CheckBox* mpCBXMergeCell; - FixedText* mpFtRotate; - svx::sidebar::SidebarDialControl* mpCtrlDial; - MetricBox* mpMtrAngle; - CheckBox* mpCbStacked; + VclPtr<FixedText> mpFTLeftIndent; + VclPtr<MetricField> mpMFLeftIndent; + VclPtr<CheckBox> mpCBXWrapText; + VclPtr<CheckBox> mpCBXMergeCell; + VclPtr<FixedText> mpFtRotate; + VclPtr<svx::sidebar::SidebarDialControl> mpCtrlDial; + VclPtr<MetricBox> mpMtrAngle; + VclPtr<CheckBox> mpCbStacked; ::sfx2::sidebar::ControllerItem maAlignHorControl; ::sfx2::sidebar::ControllerItem maLeftIndentControl; @@ -90,13 +98,6 @@ private: DECL_LINK( RotationHdl, void * ); DECL_LINK( ClickStackHdl, void * ); - // constructor/destuctor - AlignmentPropertyPanel( - vcl::Window* pParent, - const css::uno::Reference<css::frame::XFrame>& rxFrame, - SfxBindings* pBindings); - virtual ~AlignmentPropertyPanel(); - void Initialize(); void FormatDegrees(double& dTmp); }; diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx index 38c0154d3785..b3012fab9141 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx @@ -142,6 +142,24 @@ CellAppearancePropertyPanel::CellAppearancePropertyPanel( CellAppearancePropertyPanel::~CellAppearancePropertyPanel() { + disposeOnce(); +} + +void CellAppearancePropertyPanel::dispose() +{ + mpTBCellBorder.clear(); + mpTBLineStyle.clear(); + mpTBLineColor.clear(); + mpCBXShowGrid.clear(); + + maLineStyleControl.dispose(); + maBorderOuterControl.dispose(); + maBorderInnerControl.dispose(); + maGridShowControl.dispose(); + maBorderTLBRControl.dispose(); + maBorderBLTRControl.dispose(); + + PanelLayout::dispose(); } void CellAppearancePropertyPanel::Initialize() @@ -225,7 +243,7 @@ IMPL_LINK(CellAppearancePropertyPanel, CBOXGridShowClkHdl, void*, EMPTYARG) return 0; } -CellAppearancePropertyPanel* CellAppearancePropertyPanel::Create ( +VclPtr<vcl::Window> CellAppearancePropertyPanel::Create ( vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings) @@ -237,10 +255,8 @@ CellAppearancePropertyPanel* CellAppearancePropertyPanel::Create ( if (pBindings == NULL) throw lang::IllegalArgumentException("no SfxBindings given to CellAppearancePropertyPanel::Create", NULL, 2); - return new CellAppearancePropertyPanel( - pParent, - rxFrame, - pBindings); + return VclPtr<CellAppearancePropertyPanel>::Create( + pParent, rxFrame, pBindings); } void CellAppearancePropertyPanel::DataChanged( diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx index eb9e7dc45eb7..fc0395687e2a 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx @@ -50,7 +50,7 @@ private: friend class CellBorderStyleControl; public: - static CellAppearancePropertyPanel* Create( + static VclPtr<vcl::Window> Create( vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings); @@ -69,14 +69,22 @@ public: SfxBindings* GetBindings() { return mpBindings;} + // constructor/destuctor + CellAppearancePropertyPanel( + vcl::Window* pParent, + const css::uno::Reference<css::frame::XFrame>& rxFrame, + SfxBindings* pBindings); + virtual ~CellAppearancePropertyPanel(); + virtual void dispose() SAL_OVERRIDE; + private: //ui controls - ToolBox* mpTBCellBorder; - ToolBox* mpTBLineStyle; - ToolBox* mpTBLineColor; + VclPtr<ToolBox> mpTBCellBorder; + VclPtr<ToolBox> mpTBLineStyle; + VclPtr<ToolBox> mpTBLineColor; ::boost::scoped_ptr< CellBorderUpdater > mpCellBorderUpdater; - CheckBox* mpCBXShowGrid; + VclPtr<CheckBox> mpCBXShowGrid; ::sfx2::sidebar::ControllerItem maLineStyleControl; ::sfx2::sidebar::ControllerItem maBorderOuterControl; @@ -145,13 +153,6 @@ private: svx::sidebar::PopupControl* CreateCellBorderStylePopupControl(svx::sidebar::PopupContainer* pParent); void EndCellBorderStylePopupMode(); - // constructor/destuctor - CellAppearancePropertyPanel( - vcl::Window* pParent, - const css::uno::Reference<css::frame::XFrame>& rxFrame, - SfxBindings* pBindings); - virtual ~CellAppearancePropertyPanel(); - void Initialize(); void SetStyleIcon(); void UpdateControlState(); diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx index ad6507dcda71..ff09bcf7b5b0 100644 --- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx +++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx @@ -45,11 +45,11 @@ namespace sc { namespace sidebar { CellBorderStyleControl::CellBorderStyleControl(vcl::Window* pParent, CellAppearancePropertyPanel& rPanel) : svx::sidebar::PopupControl(pParent, ScResId(RID_POPUPPANEL_APPEARANCE_CELL_BORDERSTYLE)), mrCellAppearancePropertyPanel(rPanel), - maTBBorder1(this, ScResId(TB_BORDER1)), - maTBBorder2(this, ScResId(TB_BORDER2)), - maTBBorder3(this, ScResId(TB_BORDER3)), - maFL1(this, ScResId(FL_1)), - maFL2(this, ScResId(FL_2)), + maTBBorder1(VclPtr<ToolBox>::Create(this, ScResId(TB_BORDER1))), + maTBBorder2(VclPtr<ToolBox>::Create(this, ScResId(TB_BORDER2))), + maTBBorder3(VclPtr<ToolBox>::Create(this, ScResId(TB_BORDER3))), + maFL1(VclPtr<FixedLine>::Create(this, ScResId(FL_1))), + maFL2(VclPtr<FixedLine>::Create(this, ScResId(FL_2))), mpImageList(0) { Initialize(); @@ -58,7 +58,18 @@ CellBorderStyleControl::CellBorderStyleControl(vcl::Window* pParent, CellAppeara CellBorderStyleControl::~CellBorderStyleControl() { + disposeOnce(); +} + +void CellBorderStyleControl::dispose() +{ delete[] mpImageList; + maTBBorder1.disposeAndClear(); + maTBBorder2.disposeAndClear(); + maTBBorder3.disposeAndClear(); + maFL1.disposeAndClear(); + maFL2.disposeAndClear(); + svx::sidebar::PopupControl::dispose(); } void CellBorderStyleControl::Initialize() @@ -81,60 +92,60 @@ void CellBorderStyleControl::Initialize() mpImageList[14] = Image(ScResId(IMG_BORDER15)); mpImageList[15] = Image(ScResId(IMG_BORDER16)); - maTBBorder1.SetItemImage(TBI_BORDER1_NONE, mpImageList[0]); - maTBBorder1.SetItemImage(TBI_BORDER1_ALL, mpImageList[1]); - maTBBorder1.SetItemImage(TBI_BORDER1_OUTER, mpImageList[2]); - maTBBorder1.SetItemImage(TBI_BORDER1_OUTERBOLD, mpImageList[3]); - maTBBorder1.SetBackground(Wallpaper()); - maTBBorder1.SetPaintTransparent(true); - Size aTbxSize( maTBBorder1.CalcWindowSizePixel() ); - maTBBorder1.SetOutputSizePixel( aTbxSize ); + maTBBorder1->SetItemImage(TBI_BORDER1_NONE, mpImageList[0]); + maTBBorder1->SetItemImage(TBI_BORDER1_ALL, mpImageList[1]); + maTBBorder1->SetItemImage(TBI_BORDER1_OUTER, mpImageList[2]); + maTBBorder1->SetItemImage(TBI_BORDER1_OUTERBOLD, mpImageList[3]); + maTBBorder1->SetBackground(Wallpaper()); + maTBBorder1->SetPaintTransparent(true); + Size aTbxSize( maTBBorder1->CalcWindowSizePixel() ); + maTBBorder1->SetOutputSizePixel( aTbxSize ); Link aLink = LINK(this, CellBorderStyleControl, TB1SelectHdl); - maTBBorder1.SetSelectHdl ( aLink ); + maTBBorder1->SetSelectHdl ( aLink ); - maTBBorder2.SetLineCount(2); - maTBBorder2.InsertItem(TBI_BORDER2_LEFT, mpImageList[4]); - maTBBorder2.InsertItem(TBI_BORDER2_RIGHT, mpImageList[5]); - maTBBorder2.InsertItem(TBI_BORDER2_TOP, mpImageList[6]); - maTBBorder2.InsertItem(TBI_BORDER2_BOT, mpImageList[7]); - maTBBorder2.InsertBreak(); - maTBBorder2.InsertItem(TBI_BORDER2_BLTR, mpImageList[8]); - maTBBorder2.InsertItem(TBI_BORDER2_TLBR, mpImageList[9]); - maTBBorder2.InsertItem(TBI_BORDER2_TOPBOT, mpImageList[10]); - maTBBorder2.InsertItem(TBI_BORDER2_LEFTRIGHT, mpImageList[11]); - maTBBorder2.SetBackground(Wallpaper()); - maTBBorder2.SetPaintTransparent(true); - aTbxSize = maTBBorder2.CalcWindowSizePixel() ; - maTBBorder2.SetOutputSizePixel( aTbxSize ); - maTBBorder2.SetHelpId(TBI_BORDER2_LEFT, HID_PROPERTYPANEL_SC_BORDER_TBI_LEFT); - maTBBorder2.SetHelpId(TBI_BORDER2_RIGHT, HID_PROPERTYPANEL_SC_BORDER_TBI_RIGHT); - maTBBorder2.SetHelpId(TBI_BORDER2_TOP, HID_PROPERTYPANEL_SC_BORDER_TBI_TOP); - maTBBorder2.SetHelpId(TBI_BORDER2_BOT, HID_PROPERTYPANEL_SC_BORDER_TBI_BOT); - maTBBorder2.SetHelpId(TBI_BORDER2_BLTR, HID_PROPERTYPANEL_SC_BORDER_TBI_BLTR); - maTBBorder2.SetHelpId(TBI_BORDER2_TLBR, HID_PROPERTYPANEL_SC_BORDER_TBI_TLBR); - maTBBorder2.SetHelpId(TBI_BORDER2_TOPBOT, HID_PROPERTYPANEL_SC_BORDER_TBI_TOPBOT); - maTBBorder2.SetHelpId(TBI_BORDER2_LEFTRIGHT, HID_PROPERTYPANEL_SC_BORDER_TBI_LEFTRIGHT); - maTBBorder2.SetItemText(TBI_BORDER2_LEFT, ScResId(STR_BORDER_1)); - maTBBorder2.SetItemText(TBI_BORDER2_RIGHT, ScResId(STR_BORDER_2)); - maTBBorder2.SetItemText(TBI_BORDER2_TOP, ScResId(STR_BORDER_3)); - maTBBorder2.SetItemText(TBI_BORDER2_BOT, ScResId(STR_BORDER_4)); - maTBBorder2.SetItemText(TBI_BORDER2_BLTR, ScResId(STR_BORDER_5)); - maTBBorder2.SetItemText(TBI_BORDER2_TLBR, ScResId(STR_BORDER_6)); - maTBBorder2.SetItemText(TBI_BORDER2_TOPBOT, ScResId(STR_BORDER_7)); - maTBBorder2.SetItemText(TBI_BORDER2_LEFTRIGHT, ScResId(STR_BORDER_8)); + maTBBorder2->SetLineCount(2); + maTBBorder2->InsertItem(TBI_BORDER2_LEFT, mpImageList[4]); + maTBBorder2->InsertItem(TBI_BORDER2_RIGHT, mpImageList[5]); + maTBBorder2->InsertItem(TBI_BORDER2_TOP, mpImageList[6]); + maTBBorder2->InsertItem(TBI_BORDER2_BOT, mpImageList[7]); + maTBBorder2->InsertBreak(); + maTBBorder2->InsertItem(TBI_BORDER2_BLTR, mpImageList[8]); + maTBBorder2->InsertItem(TBI_BORDER2_TLBR, mpImageList[9]); + maTBBorder2->InsertItem(TBI_BORDER2_TOPBOT, mpImageList[10]); + maTBBorder2->InsertItem(TBI_BORDER2_LEFTRIGHT, mpImageList[11]); + maTBBorder2->SetBackground(Wallpaper()); + maTBBorder2->SetPaintTransparent(true); + aTbxSize = maTBBorder2->CalcWindowSizePixel() ; + maTBBorder2->SetOutputSizePixel( aTbxSize ); + maTBBorder2->SetHelpId(TBI_BORDER2_LEFT, HID_PROPERTYPANEL_SC_BORDER_TBI_LEFT); + maTBBorder2->SetHelpId(TBI_BORDER2_RIGHT, HID_PROPERTYPANEL_SC_BORDER_TBI_RIGHT); + maTBBorder2->SetHelpId(TBI_BORDER2_TOP, HID_PROPERTYPANEL_SC_BORDER_TBI_TOP); + maTBBorder2->SetHelpId(TBI_BORDER2_BOT, HID_PROPERTYPANEL_SC_BORDER_TBI_BOT); + maTBBorder2->SetHelpId(TBI_BORDER2_BLTR, HID_PROPERTYPANEL_SC_BORDER_TBI_BLTR); + maTBBorder2->SetHelpId(TBI_BORDER2_TLBR, HID_PROPERTYPANEL_SC_BORDER_TBI_TLBR); + maTBBorder2->SetHelpId(TBI_BORDER2_TOPBOT, HID_PROPERTYPANEL_SC_BORDER_TBI_TOPBOT); + maTBBorder2->SetHelpId(TBI_BORDER2_LEFTRIGHT, HID_PROPERTYPANEL_SC_BORDER_TBI_LEFTRIGHT); + maTBBorder2->SetItemText(TBI_BORDER2_LEFT, ScResId(STR_BORDER_1)); + maTBBorder2->SetItemText(TBI_BORDER2_RIGHT, ScResId(STR_BORDER_2)); + maTBBorder2->SetItemText(TBI_BORDER2_TOP, ScResId(STR_BORDER_3)); + maTBBorder2->SetItemText(TBI_BORDER2_BOT, ScResId(STR_BORDER_4)); + maTBBorder2->SetItemText(TBI_BORDER2_BLTR, ScResId(STR_BORDER_5)); + maTBBorder2->SetItemText(TBI_BORDER2_TLBR, ScResId(STR_BORDER_6)); + maTBBorder2->SetItemText(TBI_BORDER2_TOPBOT, ScResId(STR_BORDER_7)); + maTBBorder2->SetItemText(TBI_BORDER2_LEFTRIGHT, ScResId(STR_BORDER_8)); aLink = LINK(this, CellBorderStyleControl, TB2SelectHdl); - maTBBorder2.SetSelectHdl ( aLink ); + maTBBorder2->SetSelectHdl ( aLink ); - maTBBorder3.SetItemImage(TBI_BORDER3_S1, mpImageList[12]); - maTBBorder3.SetItemImage(TBI_BORDER3_S2, mpImageList[13]); - maTBBorder3.SetItemImage(TBI_BORDER3_S3, mpImageList[14]); - maTBBorder3.SetItemImage(TBI_BORDER3_S4, mpImageList[15]); - maTBBorder3.SetBackground(Wallpaper()); - maTBBorder3.SetPaintTransparent(true); - aTbxSize = maTBBorder3.CalcWindowSizePixel() ; - maTBBorder3.SetOutputSizePixel( aTbxSize ); + maTBBorder3->SetItemImage(TBI_BORDER3_S1, mpImageList[12]); + maTBBorder3->SetItemImage(TBI_BORDER3_S2, mpImageList[13]); + maTBBorder3->SetItemImage(TBI_BORDER3_S3, mpImageList[14]); + maTBBorder3->SetItemImage(TBI_BORDER3_S4, mpImageList[15]); + maTBBorder3->SetBackground(Wallpaper()); + maTBBorder3->SetPaintTransparent(true); + aTbxSize = maTBBorder3->CalcWindowSizePixel() ; + maTBBorder3->SetOutputSizePixel( aTbxSize ); aLink = LINK(this, CellBorderStyleControl, TB3SelectHdl); - maTBBorder3.SetSelectHdl ( aLink ); + maTBBorder3->SetSelectHdl ( aLink ); } IMPL_LINK(CellBorderStyleControl, TB1SelectHdl, ToolBox*, pToolBox) diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.hxx b/sc/source/ui/sidebar/CellBorderStyleControl.hxx index cf0db80ae3ef..706d10e7b11c 100644 --- a/sc/source/ui/sidebar/CellBorderStyleControl.hxx +++ b/sc/source/ui/sidebar/CellBorderStyleControl.hxx @@ -32,11 +32,11 @@ class CellBorderStyleControl : public svx::sidebar::PopupControl { private: CellAppearancePropertyPanel& mrCellAppearancePropertyPanel; - ToolBox maTBBorder1; - ToolBox maTBBorder2; - ToolBox maTBBorder3; - FixedLine maFL1; - FixedLine maFL2; + VclPtr<ToolBox> maTBBorder1; + VclPtr<ToolBox> maTBBorder2; + VclPtr<ToolBox> maTBBorder3; + VclPtr<FixedLine> maFL1; + VclPtr<FixedLine> maFL2; Image* mpImageList; void Initialize(); @@ -48,6 +48,7 @@ private: public: CellBorderStyleControl(vcl::Window* pParent, CellAppearancePropertyPanel& rPanel); virtual ~CellBorderStyleControl(); + virtual void dispose() SAL_OVERRIDE; }; } } // end of namespace svx::sidebar diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx b/sc/source/ui/sidebar/CellLineStyleControl.cxx index ac4d3467327b..0528df76bc98 100644 --- a/sc/source/ui/sidebar/CellLineStyleControl.cxx +++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx @@ -36,27 +36,39 @@ namespace sc { namespace sidebar { CellLineStyleControl::CellLineStyleControl(vcl::Window* pParent, CellAppearancePropertyPanel& rPanel) : svx::sidebar::PopupControl(pParent, ScResId(RID_POPUPPANEL_APPEARANCE_CELL_LINESTYLE)), mrCellAppearancePropertyPanel(rPanel), - maPushButtonMoreOptions(this, ScResId(PB_OPTIONS)), - maCellLineStyleValueSet(this, ScResId(VS_STYLE)), + maPushButtonMoreOptions(VclPtr<PushButton>::Create(this, ScResId(PB_OPTIONS))), + maCellLineStyleValueSet(VclPtr<sc::sidebar::CellLineStyleValueSet>::Create(this, ScResId(VS_STYLE))), mbVSfocus(true) { Initialize(); FreeResource(); } +CellLineStyleControl::~CellLineStyleControl() +{ + disposeOnce(); +} + +void CellLineStyleControl::dispose() +{ + maPushButtonMoreOptions.disposeAndClear(); + maCellLineStyleValueSet.disposeAndClear(); + svx::sidebar::PopupControl::dispose(); +} + void CellLineStyleControl::Initialize() { - //maPushButtonMoreOptions.SetIcoPosX(2); + //maPushButtonMoreOptions->SetIcoPosX(2); Link aLink = LINK(this, CellLineStyleControl, PBClickHdl); - maPushButtonMoreOptions.SetClickHdl(aLink); + maPushButtonMoreOptions->SetClickHdl(aLink); - maCellLineStyleValueSet.SetStyle(maCellLineStyleValueSet.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT); - maCellLineStyleValueSet.SetControlBackground(GetSettings().GetStyleSettings().GetMenuColor()); - maCellLineStyleValueSet.SetColor(GetSettings().GetStyleSettings().GetMenuColor()); + maCellLineStyleValueSet->SetStyle(maCellLineStyleValueSet->GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT); + maCellLineStyleValueSet->SetControlBackground(GetSettings().GetStyleSettings().GetMenuColor()); + maCellLineStyleValueSet->SetColor(GetSettings().GetStyleSettings().GetMenuColor()); for(sal_uInt16 i = 1 ; i <= 9 ; i++) { - maCellLineStyleValueSet.InsertItem(i); + maCellLineStyleValueSet->InsertItem(i); } maStr[0] = GetSettings().GetLocaleI18nHelper().GetNum( 5, 2 ) + "pt"; @@ -68,46 +80,46 @@ void CellLineStyleControl::Initialize() maStr[6] = GetSettings().GetLocaleI18nHelper().GetNum( 450, 2 ) + "pt"; maStr[7] = GetSettings().GetLocaleI18nHelper().GetNum( 505, 2 ) + "pt"; maStr[8] = GetSettings().GetLocaleI18nHelper().GetNum( 750, 2 ) + "pt"; - maCellLineStyleValueSet.SetUnit(&maStr[0]); + maCellLineStyleValueSet->SetUnit(&maStr[0]); for (sal_uInt16 i = 1; i <= CELL_LINE_STYLE_ENTRIES; ++i) { - maCellLineStyleValueSet.SetItemText(i, maStr[i-1]); + maCellLineStyleValueSet->SetItemText(i, maStr[i-1]); } SetAllNoSel(); aLink = LINK(this, CellLineStyleControl, VSSelectHdl); - maCellLineStyleValueSet.SetSelectHdl(aLink); - maCellLineStyleValueSet.StartSelection(); - maCellLineStyleValueSet.Show(); + maCellLineStyleValueSet->SetSelectHdl(aLink); + maCellLineStyleValueSet->StartSelection(); + maCellLineStyleValueSet->Show(); } void CellLineStyleControl::GetFocus() { if(!mbVSfocus) { - maPushButtonMoreOptions.GrabFocus(); + maPushButtonMoreOptions->GrabFocus(); } else { - maCellLineStyleValueSet.GrabFocus(); + maCellLineStyleValueSet->GrabFocus(); } } void CellLineStyleControl::SetAllNoSel() { - maCellLineStyleValueSet.SelectItem(0); - maCellLineStyleValueSet.SetNoSelection(); - maCellLineStyleValueSet.Format(); + maCellLineStyleValueSet->SelectItem(0); + maCellLineStyleValueSet->SetNoSelection(); + maCellLineStyleValueSet->Format(); Invalidate(); - maCellLineStyleValueSet.StartSelection(); + maCellLineStyleValueSet->StartSelection(); } IMPL_LINK(CellLineStyleControl, VSSelectHdl, void *, pControl) { if(pControl == &maCellLineStyleValueSet) { - const sal_uInt16 iPos(maCellLineStyleValueSet.GetSelectItemId()); + const sal_uInt16 iPos(maCellLineStyleValueSet->GetSelectItemId()); SvxLineItem aLineItem(SID_FRAME_LINESTYLE); using namespace ::com::sun::star::table::BorderLineStyle; editeng::SvxBorderStyle nStyle = SOLID; @@ -178,7 +190,7 @@ IMPL_LINK(CellLineStyleControl, VSSelectHdl, void *, pControl) IMPL_LINK(CellLineStyleControl, PBClickHdl, PushButton *, pPBtn) { - if(pPBtn == &maPushButtonMoreOptions) + if(pPBtn == maPushButtonMoreOptions.get()) { if(mrCellAppearancePropertyPanel.GetBindings()) { @@ -200,48 +212,48 @@ void CellLineStyleControl::SetLineStyleSelect(sal_uInt16 out, sal_uInt16 in, sal if(out == DEF_LINE_WIDTH_0 && in == 0 && dis == 0) //1 { - maCellLineStyleValueSet.SetSelItem(1); + maCellLineStyleValueSet->SetSelItem(1); } else if(out == DEF_LINE_WIDTH_2 && in == 0 && dis == 0) //2 { - maCellLineStyleValueSet.SetSelItem(2); + maCellLineStyleValueSet->SetSelItem(2); } else if(out == DEF_LINE_WIDTH_3 && in == 0 && dis == 0) //3 { - maCellLineStyleValueSet.SetSelItem(3); + maCellLineStyleValueSet->SetSelItem(3); } else if(out == DEF_LINE_WIDTH_4 && in == 0 && dis == 0) //4 { - maCellLineStyleValueSet.SetSelItem(4); + maCellLineStyleValueSet->SetSelItem(4); } else if(out == DEF_LINE_WIDTH_0 && in == DEF_LINE_WIDTH_0 && dis == DEF_LINE_WIDTH_1) //5 { - maCellLineStyleValueSet.SetSelItem(5); + maCellLineStyleValueSet->SetSelItem(5); } else if(out == DEF_LINE_WIDTH_0 && in == DEF_LINE_WIDTH_0 && dis == DEF_LINE_WIDTH_2) //6 { - maCellLineStyleValueSet.SetSelItem(6); + maCellLineStyleValueSet->SetSelItem(6); } else if(out == DEF_LINE_WIDTH_1 && in == DEF_LINE_WIDTH_2 && dis == DEF_LINE_WIDTH_1) //7 { - maCellLineStyleValueSet.SetSelItem(7); + maCellLineStyleValueSet->SetSelItem(7); } else if(out == DEF_LINE_WIDTH_2 && in == DEF_LINE_WIDTH_0 && dis == DEF_LINE_WIDTH_2) //8 { - maCellLineStyleValueSet.SetSelItem(8); + maCellLineStyleValueSet->SetSelItem(8); } else if(out == DEF_LINE_WIDTH_2 && in == DEF_LINE_WIDTH_2 && dis == DEF_LINE_WIDTH_2) //9 { - maCellLineStyleValueSet.SetSelItem(9); + maCellLineStyleValueSet->SetSelItem(9); } else { - maCellLineStyleValueSet.SetSelItem(0); + maCellLineStyleValueSet->SetSelItem(0); mbVSfocus = false; } - maCellLineStyleValueSet.Format(); - maCellLineStyleValueSet.StartSelection(); + maCellLineStyleValueSet->Format(); + maCellLineStyleValueSet->StartSelection(); } } } // end of namespace svx::sidebar diff --git a/sc/source/ui/sidebar/CellLineStyleControl.hxx b/sc/source/ui/sidebar/CellLineStyleControl.hxx index a00079ac8dbd..3b772db89fd9 100644 --- a/sc/source/ui/sidebar/CellLineStyleControl.hxx +++ b/sc/source/ui/sidebar/CellLineStyleControl.hxx @@ -31,8 +31,8 @@ class CellLineStyleControl : public svx::sidebar::PopupControl { private: CellAppearancePropertyPanel& mrCellAppearancePropertyPanel; - PushButton maPushButtonMoreOptions; - CellLineStyleValueSet maCellLineStyleValueSet; + VclPtr<PushButton> maPushButtonMoreOptions; + VclPtr<CellLineStyleValueSet> maCellLineStyleValueSet; OUString maStr[CELL_LINE_STYLE_ENTRIES]; /// bitfield @@ -46,18 +46,20 @@ private: public: CellLineStyleControl(vcl::Window* pParent, CellAppearancePropertyPanel& rPanel); + virtual ~CellLineStyleControl(); + virtual void dispose() SAL_OVERRIDE; void GetFocus() SAL_OVERRIDE; void SetLineStyleSelect(sal_uInt16 out, sal_uInt16 in, sal_uInt16 dis); ValueSet& GetValueSet() { - return maCellLineStyleValueSet; + return *maCellLineStyleValueSet.get(); } Control& GetPushButton() { - return maPushButtonMoreOptions; + return *maPushButtonMoreOptions.get(); } }; diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx index eae59d67fa17..800c8b3ddc69 100644 --- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx +++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx @@ -34,7 +34,13 @@ CellLineStyleValueSet::CellLineStyleValueSet( vcl::Window* pParent, const ResId& CellLineStyleValueSet::~CellLineStyleValueSet() { - delete pVDev; + disposeOnce(); +} + +void CellLineStyleValueSet::dispose() +{ + pVDev.disposeAndClear(); + ValueSet::dispose(); } void CellLineStyleValueSet::SetUnit(const OUString* str) diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.hxx b/sc/source/ui/sidebar/CellLineStyleValueSet.hxx index 969f346005d4..45cbb91fd509 100644 --- a/sc/source/ui/sidebar/CellLineStyleValueSet.hxx +++ b/sc/source/ui/sidebar/CellLineStyleValueSet.hxx @@ -29,12 +29,13 @@ namespace sc { namespace sidebar { class CellLineStyleValueSet : public ValueSet { private: - VirtualDevice* pVDev; + VclPtr<VirtualDevice> pVDev; sal_uInt16 nSelItem; OUString maStrUnit[CELL_LINE_STYLE_ENTRIES]; public: CellLineStyleValueSet( vcl::Window* pParent, const ResId& rResId); virtual ~CellLineStyleValueSet(); + virtual void dispose() SAL_OVERRIDE; void SetUnit(const OUString* str); void SetSelItem(sal_uInt16 nSel); diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index c37fc116b58b..3d59a6dfce51 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -70,6 +70,22 @@ NumberFormatPropertyPanel::NumberFormatPropertyPanel( NumberFormatPropertyPanel::~NumberFormatPropertyPanel() { + disposeOnce(); +} + +void NumberFormatPropertyPanel::dispose() +{ + mpLbCategory.clear(); + mpTBCategory.clear(); + mpEdDecimals.clear(); + mpEdLeadZeroes.clear(); + mpBtnNegRed.clear(); + mpBtnThousand.clear(); + + maNumFormatControl.dispose(); + maFormatControl.dispose(); + + PanelLayout::dispose(); } void NumberFormatPropertyPanel::Initialize() @@ -166,7 +182,7 @@ IMPL_LINK( NumberFormatPropertyPanel, NumFormatValueHdl, void*, EMPTYARG ) return 0L; } -NumberFormatPropertyPanel* NumberFormatPropertyPanel::Create ( +VclPtr<vcl::Window> NumberFormatPropertyPanel::Create ( vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings) @@ -178,10 +194,8 @@ NumberFormatPropertyPanel* NumberFormatPropertyPanel::Create ( if (pBindings == NULL) throw lang::IllegalArgumentException("no SfxBindings given to NumberFormatPropertyPanel::Create", NULL, 2); - return new NumberFormatPropertyPanel( - pParent, - rxFrame, - pBindings); + return VclPtr<NumberFormatPropertyPanel>::Create( + pParent, rxFrame, pBindings); } void NumberFormatPropertyPanel::DataChanged( diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx index 5fe5df1aeb63..9a162beaf1b5 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx @@ -37,7 +37,7 @@ class NumberFormatPropertyPanel { public: public: - static NumberFormatPropertyPanel* Create( + static VclPtr<vcl::Window> Create( vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings); @@ -56,14 +56,21 @@ public: SfxBindings* GetBindings() { return mpBindings;} + // constructor/destuctor + NumberFormatPropertyPanel( + vcl::Window* pParent, + const css::uno::Reference<css::frame::XFrame>& rxFrame, + SfxBindings* pBindings); + virtual ~NumberFormatPropertyPanel(); + virtual void dispose() SAL_OVERRIDE; private: //ui controls - ListBox* mpLbCategory; - ToolBox* mpTBCategory; - NumericField* mpEdDecimals; - NumericField* mpEdLeadZeroes; - CheckBox* mpBtnNegRed; - CheckBox* mpBtnThousand; + VclPtr<ListBox> mpLbCategory; + VclPtr<ToolBox> mpTBCategory; + VclPtr<NumericField> mpEdDecimals; + VclPtr<NumericField> mpEdLeadZeroes; + VclPtr<CheckBox> mpBtnNegRed; + VclPtr<CheckBox> mpBtnThousand; ::sfx2::sidebar::ControllerItem maNumFormatControl; ::sfx2::sidebar::ControllerItem maFormatControl; @@ -78,13 +85,6 @@ private: DECL_LINK(NumFormatSelectHdl, ListBox*); DECL_LINK(NumFormatValueHdl, void*); - // constructor/destuctor - NumberFormatPropertyPanel( - vcl::Window* pParent, - const css::uno::Reference<css::frame::XFrame>& rxFrame, - SfxBindings* pBindings); - virtual ~NumberFormatPropertyPanel(); - void Initialize(); }; diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx index cb1c23852bdc..24cf2ede34df 100644 --- a/sc/source/ui/sidebar/ScPanelFactory.cxx +++ b/sc/source/ui/sidebar/ScPanelFactory.cxx @@ -108,51 +108,31 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement ( "PanelFactory::createUIElement called without SfxBindings", NULL); + sal_Int32 nMinimumSize = -1; + VclPtr<vcl::Window> pPanel; if (rsResourceURL.endsWith("/AlignmentPropertyPanel")) - { - AlignmentPropertyPanel* pPanel = AlignmentPropertyPanel::Create( pParentWindow, xFrame, pBindings ); - xElement = sfx2::sidebar::SidebarPanelBase::Create( - rsResourceURL, - xFrame, - pPanel, - ui::LayoutSize(-1,-1,-1)); - } + pPanel = AlignmentPropertyPanel::Create( pParentWindow, xFrame, pBindings ); else if (rsResourceURL.endsWith("/CellAppearancePropertyPanel")) - { - CellAppearancePropertyPanel* pPanel = CellAppearancePropertyPanel::Create( pParentWindow, xFrame, pBindings ); - xElement = sfx2::sidebar::SidebarPanelBase::Create( - rsResourceURL, - xFrame, - pPanel, - ui::LayoutSize(-1,-1,-1)); - } + pPanel = CellAppearancePropertyPanel::Create( pParentWindow, xFrame, pBindings ); else if (rsResourceURL.endsWith("/NumberFormatPropertyPanel")) - { - NumberFormatPropertyPanel* pPanel = NumberFormatPropertyPanel::Create( pParentWindow, xFrame, pBindings ); - xElement = sfx2::sidebar::SidebarPanelBase::Create( - rsResourceURL, - xFrame, - pPanel, - ui::LayoutSize(-1,-1,-1)); - } + pPanel = NumberFormatPropertyPanel::Create( pParentWindow, xFrame, pBindings ); else if (rsResourceURL.endsWith("/NavigatorPanel")) { - vcl::Window* pPanel = new ScNavigatorDlg(pBindings, NULL, pParentWindow, false); - xElement = sfx2::sidebar::SidebarPanelBase::Create( - rsResourceURL, - xFrame, - pPanel, - ui::LayoutSize(0,-1,-1)); + pPanel = VclPtr<vcl::Window>(new ScNavigatorDlg(pBindings, NULL, pParentWindow, false), SAL_NO_ACQUIRE); + nMinimumSize = 0; } else if (rsResourceURL.endsWith("/FunctionsPanel")) { - vcl::Window* pPanel = new ScFunctionDockWin(pBindings, NULL, pParentWindow, ScResId(FID_FUNCTION_BOX)); + pPanel = VclPtr<vcl::Window>(new ScFunctionDockWin(pBindings, NULL, pParentWindow, ScResId(FID_FUNCTION_BOX)), SAL_NO_ACQUIRE);; + nMinimumSize = 0; + } + + if (pPanel) xElement = sfx2::sidebar::SidebarPanelBase::Create( rsResourceURL, xFrame, pPanel, - ui::LayoutSize(0,-1,-1)); - } + ui::LayoutSize(nMinimumSize,-1,-1)); } catch (const uno::RuntimeException &) { |