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 /extensions/source/scanner | |
parent | tdf#86606 Removal of additional direct formatting (diff) | |
parent | Make Window's inDispose map more precisely to mbInDtor. (diff) | |
download | core-e8b97a52c96df9c8e8055407b1e40ed7cb9cfc67.tar.gz core-e8b97a52c96df9c8e8055407b1e40ed7cb9cfc67.zip |
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 'extensions/source/scanner')
-rw-r--r-- | extensions/source/scanner/grid.cxx | 21 | ||||
-rw-r--r-- | extensions/source/scanner/grid.hxx | 11 | ||||
-rw-r--r-- | extensions/source/scanner/sanedlg.cxx | 67 | ||||
-rw-r--r-- | extensions/source/scanner/sanedlg.hxx | 49 | ||||
-rw-r--r-- | extensions/source/scanner/scanunx.cxx | 6 |
5 files changed, 106 insertions, 48 deletions
diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index 1056a1474c9b..346715b4bc28 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -120,6 +120,7 @@ public: GridWindow(vcl::Window* pParent); void Init(double* pXValues, double* pYValues, int nValues, bool bCutValues, const BitmapEx &rMarkerBitmap); virtual ~GridWindow(); + virtual void dispose() SAL_OVERRIDE; void setBoundings( double fMinX, double fMinY, double fMaxX, double fMaxY ); @@ -212,9 +213,29 @@ GridDialog::GridDialog(double* pXValues, double* pYValues, int nValues, vcl::Win m_pResetButton->SetClickHdl( LINK( this, GridDialog, ClickButtonHdl ) ); } +GridDialog::~GridDialog() +{ + disposeOnce(); +} + +void GridDialog::dispose() +{ + m_pOKButton.clear(); + m_pResetTypeBox.clear(); + m_pResetButton.clear(); + m_pGridWindow.clear(); + ModalDialog::dispose(); +} + GridWindow::~GridWindow() { + disposeOnce(); +} + +void GridWindow::dispose() +{ delete [] m_pNewYValues; + vcl::Window::dispose(); } double GridWindow::findMinX() diff --git a/extensions/source/scanner/grid.hxx b/extensions/source/scanner/grid.hxx index 6fca647facd5..940dec60097e 100644 --- a/extensions/source/scanner/grid.hxx +++ b/extensions/source/scanner/grid.hxx @@ -37,19 +37,20 @@ enum resetType class GridDialog : public ModalDialog { - OKButton* m_pOKButton; + VclPtr<OKButton> m_pOKButton; - ListBox* m_pResetTypeBox; - PushButton* m_pResetButton; + VclPtr<ListBox> m_pResetTypeBox; + VclPtr<PushButton> m_pResetButton; - GridWindow* m_pGridWindow; + VclPtr<GridWindow> m_pGridWindow; DECL_LINK( ClickButtonHdl, Button* ); public: GridDialog(double* pXValues, double* pYValues, int nValues, vcl::Window* pParent, bool bCutValues = true); - + virtual ~GridDialog(); + virtual void dispose() SAL_OVERRIDE; void setBoundings(double fMinX, double fMinY, double fMaxX, double fMaxY); double* getNewYValues(); }; diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index ae9c4d5cc00d..384be4d3371d 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -43,7 +43,7 @@ private: Rectangle maPreviewRect; Point maTopLeft, maBottomRight; Point maMinTopLeft, maMaxBottomRight; - SaneDlg* mpParentDialog; + VclPtr<SaneDlg> mpParentDialog; DragDirection meDragDirection; bool mbDragEnable; bool mbDragDrawn; @@ -61,6 +61,12 @@ public: , mbIsDragging(false) { } + virtual ~ScanPreview() { disposeOnce(); } + virtual void dispose() SAL_OVERRIDE + { + mpParentDialog.clear(); + vcl::Window::dispose(); + } void Init(SaneDlg *pParent) { mpParentDialog = pParent; @@ -151,8 +157,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeScanPreview(vcl::Windo OString sBorder = VclBuilder::extractCustomProperty(rMap); if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; - ScanPreview *pWindow = new ScanPreview(pParent, nWinStyle); - return pWindow; + return new ScanPreview(pParent, nWinStyle); } SaneDlg::SaneDlg( vcl::Window* pParent, Sane& rSane, bool bScanEnabled ) : @@ -239,7 +244,37 @@ SaneDlg::SaneDlg( vcl::Window* pParent, Sane& rSane, bool bScanEnabled ) : SaneDlg::~SaneDlg() { + disposeOnce(); +} + +void SaneDlg::dispose() +{ mrSane.SetReloadOptionsHdl( maOldLink ); + mpOKButton.clear(); + mpCancelButton.clear(); + mpDeviceInfoButton.clear(); + mpPreviewButton.clear(); + mpScanButton.clear(); + mpButtonOption.clear(); + mpOptionTitle.clear(); + mpOptionDescTxt.clear(); + mpVectorTxt.clear(); + mpLeftField.clear(); + mpTopField.clear(); + mpRightField.clear(); + mpBottomField.clear(); + mpDeviceBox.clear(); + mpReslBox.clear(); + mpAdvancedBox.clear(); + mpVectorBox.clear(); + mpQuantumRangeBox.clear(); + mpStringRangeBox.clear(); + mpBoolCheckBox.clear(); + mpStringEdit.clear(); + mpNumericEdit.clear(); + mpOptionBox.clear(); + mpPreview.clear(); + ModalDialog::dispose(); } namespace { @@ -256,8 +291,8 @@ short SaneDlg::Execute() { if( ! Sane::IsSane() ) { - MessageDialog aErrorBox(NULL, SaneResId(STR_COULD_NOT_BE_INIT)); - aErrorBox.Execute(); + ScopedVclPtrInstance< MessageDialog > aErrorBox(nullptr, SaneResId(STR_COULD_NOT_BE_INIT)); + aErrorBox->Execute(); return RET_CANCEL; } LoadState(); @@ -539,8 +574,8 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton ) aString = aString.replaceFirst( "%s", Sane::GetVendor( mrSane.GetDeviceNumber() ) ); aString = aString.replaceFirst( "%s", Sane::GetModel( mrSane.GetDeviceNumber() ) ); aString = aString.replaceFirst( "%s", Sane::GetType( mrSane.GetDeviceNumber() ) ); - MessageDialog aInfoBox(this, aString, VCL_MESSAGE_INFO); - aInfoBox.Execute(); + ScopedVclPtrInstance< MessageDialog > aInfoBox(this, aString, VCL_MESSAGE_INFO); + aInfoBox->Execute(); } else if( pButton == mpPreviewButton ) AcquirePreview(); @@ -568,11 +603,11 @@ IMPL_LINK( SaneDlg, ClickBtnHdl, Button*, pButton ) x[ i ] = (double)i; mrSane.GetOptionValue( mnCurrentOption, y.get() ); - GridDialog aGrid( x.get(), y.get(), nElements, this ); - aGrid.SetText( mrSane.GetOptionName( mnCurrentOption ) ); - aGrid.setBoundings( 0, mfMin, nElements, mfMax ); - if( aGrid.Execute() && aGrid.getNewYValues() ) - mrSane.SetOptionValue( mnCurrentOption, aGrid.getNewYValues() ); + ScopedVclPtrInstance< GridDialog > aGrid( x.get(), y.get(), nElements, this ); + aGrid->SetText( mrSane.GetOptionName( mnCurrentOption ) ); + aGrid->setBoundings( 0, mfMin, nElements, mfMax ); + if( aGrid->Execute() && aGrid->getNewYValues() ) + mrSane.SetOptionValue( mnCurrentOption, aGrid->getNewYValues() ); } break; case SANE_TYPE_BOOL: @@ -820,8 +855,8 @@ void SaneDlg::AcquirePreview() if( nOption == -1 ) { OUString aString(SaneResId(STR_SLOW_PREVIEW)); - MessageDialog aBox(this, aString, VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL); - if (aBox.Execute() == RET_CANCEL) + ScopedVclPtrInstance< MessageDialog > aBox(this, aString, VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL); + if (aBox->Execute() == RET_CANCEL) return; } else @@ -830,8 +865,8 @@ void SaneDlg::AcquirePreview() BitmapTransporter aTransporter; if( ! mrSane.Start( aTransporter ) ) { - MessageDialog aErrorBox(this, SaneResId(STR_ERROR_SCAN)); - aErrorBox.Execute(); + ScopedVclPtrInstance< MessageDialog > aErrorBox(this, SaneResId(STR_ERROR_SCAN)); + aErrorBox->Execute(); } else { diff --git a/extensions/source/scanner/sanedlg.hxx b/extensions/source/scanner/sanedlg.hxx index 57eaa54b0cb3..6aca2733c3a7 100644 --- a/extensions/source/scanner/sanedlg.hxx +++ b/extensions/source/scanner/sanedlg.hxx @@ -40,38 +40,38 @@ private: Link maOldLink; - OKButton* mpOKButton; - CancelButton* mpCancelButton; - PushButton* mpDeviceInfoButton; - PushButton* mpPreviewButton; - PushButton* mpScanButton; - PushButton* mpButtonOption; + VclPtr<OKButton> mpOKButton; + VclPtr<CancelButton> mpCancelButton; + VclPtr<PushButton> mpDeviceInfoButton; + VclPtr<PushButton> mpPreviewButton; + VclPtr<PushButton> mpScanButton; + VclPtr<PushButton> mpButtonOption; - FixedText* mpOptionTitle; - FixedText* mpOptionDescTxt; - FixedText* mpVectorTxt; + VclPtr<FixedText> mpOptionTitle; + VclPtr<FixedText> mpOptionDescTxt; + VclPtr<FixedText> mpVectorTxt; - MetricField* mpLeftField; - MetricField* mpTopField; - MetricField* mpRightField; - MetricField* mpBottomField; + VclPtr<MetricField> mpLeftField; + VclPtr<MetricField> mpTopField; + VclPtr<MetricField> mpRightField; + VclPtr<MetricField> mpBottomField; - ListBox* mpDeviceBox; - NumericBox* mpReslBox; - CheckBox* mpAdvancedBox; + VclPtr<ListBox> mpDeviceBox; + VclPtr<NumericBox> mpReslBox; + VclPtr<CheckBox> mpAdvancedBox; - NumericField* mpVectorBox; - ListBox* mpQuantumRangeBox; - ListBox* mpStringRangeBox; + VclPtr<NumericField> mpVectorBox; + VclPtr<ListBox> mpQuantumRangeBox; + VclPtr<ListBox> mpStringRangeBox; - CheckBox* mpBoolCheckBox; + VclPtr<CheckBox> mpBoolCheckBox; - Edit* mpStringEdit; - Edit* mpNumericEdit; + VclPtr<Edit> mpStringEdit; + VclPtr<Edit> mpNumericEdit; - SvTreeListBox* mpOptionBox; + VclPtr<SvTreeListBox> mpOptionBox; - ScanPreview* mpPreview; + VclPtr<ScanPreview> mpPreview; int mnCurrentOption; int mnCurrentElement; @@ -105,6 +105,7 @@ private: public: SaneDlg( vcl::Window*, Sane&, bool ); virtual ~SaneDlg(); + virtual void dispose() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE; void UpdateScanArea( bool ); diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx index a66d797587dc..7d4da1f523fe 100644 --- a/extensions/source/scanner/scanunx.cxx +++ b/extensions/source/scanner/scanunx.cxx @@ -299,9 +299,9 @@ sal_Bool ScannerManager::configureScannerAndScan( ScannerContext& scanner_contex ); pHolder->m_bBusy = true; - SaneDlg aDlg( NULL, pHolder->m_aSane, listener.is() ); - bRet = aDlg.Execute(); - bScan = aDlg.getDoScan(); + ScopedVclPtrInstance< SaneDlg > aDlg(nullptr, pHolder->m_aSane, listener.is()); + bRet = aDlg->Execute(); + bScan = aDlg->getDoScan(); pHolder->m_bBusy = false; } if ( bScan ) |