summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-11 14:02:42 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-05-12 09:40:38 +0100
commit936a49646738452f7331ed9a47ac015db9ee7295 (patch)
tree7dff1a6db99e3e28b8bc2226d07b29d5f2b5cd0b /vcl/source
parentab81e3bff2a1844be67209bc8947d539edbaf8e6 (diff)
Switch VclBuilder constructors to use VclPtr.
Change-Id: Id35a86eb52bbde6ca09a5e61a0b1a79b23be8faf
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/builder.cxx5
-rw-r--r--vcl/source/window/printdlg.cxx4
2 files changed, 6 insertions, 3 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index d687b60a8940..645338674715 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1757,7 +1757,10 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
customMakeWidget pFunction = reinterpret_cast<customMakeWidget>(osl_getFunctionSymbol((oslModule) RTLD_DEFAULT, sFunction.pData));
#endif
if (pFunction)
- xWindow = VclPtr<vcl::Window>(pFunction(pParent, rMap), SAL_NO_ACQUIRE);
+ {
+ VclPtr<vcl::Window> xParent(pParent);
+ pFunction(xWindow, xParent, rMap);
+ }
}
}
SAL_WARN_IF(!xWindow, "vcl.layout", "probably need to implement " << name.getStr() << " or add a make" << name.getStr() << " function");
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index ecc8d7afd487..16b76c45a69e 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -55,13 +55,13 @@ using namespace com::sun::star::beans;
VCL_BUILDER_DECL_FACTORY(PrintPreviewWindow)
{
(void)rMap;
- return new PrintDialog::PrintPreviewWindow(pParent);
+ rRet = VclPtr<PrintDialog::PrintPreviewWindow>::Create(pParent);
}
VCL_BUILDER_DECL_FACTORY(ShowNupOrderWindow)
{
(void)rMap;
- return new PrintDialog::ShowNupOrderWindow(pParent);
+ rRet = VclPtr<PrintDialog::ShowNupOrderWindow>::Create(pParent);
}
PrintDialog::PrintPreviewWindow::PrintPreviewWindow( vcl::Window* i_pParent )