diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-06 09:46:57 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-06 16:45:13 +0000 |
commit | c7258cfccdf9f4c5235da1b135801f957a5b0ec1 (patch) | |
tree | d5af5085ad1327afe2d41045ea452e017fea1fb6 /include | |
parent | 027c383584bff4ea2aa7aa2b9e294e614087f28f (diff) |
shared_ptr<T>(new T(args)) -> make_shared<T>(args)
and boost:make_shared->std::make_shared
Change-Id: Ic1e187c52c856a7b27817967b2caa8920f23a98d
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/configuration.hxx | 22 | ||||
-rw-r--r-- | include/svtools/PlaceEditDialog.hxx | 10 | ||||
-rw-r--r-- | include/toolkit/awt/vclxprinter.hxx | 8 | ||||
-rw-r--r-- | include/vcl/IconThemeScanner.hxx | 5 | ||||
-rw-r--r-- | include/vcl/oldprintadaptor.hxx | 2 | ||||
-rw-r--r-- | include/vcl/print.hxx | 14 | ||||
-rw-r--r-- | include/vcl/settings.hxx | 12 | ||||
-rw-r--r-- | include/vcl/window.hxx | 4 |
8 files changed, 38 insertions, 39 deletions
diff --git a/include/comphelper/configuration.hxx b/include/comphelper/configuration.hxx index 9be907c2ef69..74ed03226722 100644 --- a/include/comphelper/configuration.hxx +++ b/include/comphelper/configuration.hxx @@ -14,12 +14,12 @@ #include <boost/noncopyable.hpp> #include <boost/optional.hpp> -#include <boost/shared_ptr.hpp> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Reference.hxx> #include <comphelper/comphelperdllapi.h> #include <comphelper/processfactory.hxx> #include <sal/types.h> +#include <memory> namespace com { namespace sun { namespace star { namespace configuration { class XReadWriteAccess; } @@ -45,7 +45,7 @@ namespace detail { class ConfigurationWrapper; } /// directly. class COMPHELPER_DLLPUBLIC ConfigurationChanges: private boost::noncopyable { public: - static boost::shared_ptr< ConfigurationChanges > create( + static std::shared_ptr<ConfigurationChanges> create( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context = comphelper::getProcessComponentContext()); @@ -94,7 +94,7 @@ public: com::sun::star::uno::Any getPropertyValue(OUString const & path) const; void setPropertyValue( - boost::shared_ptr< ConfigurationChanges > const & batch, + std::shared_ptr< ConfigurationChanges > const & batch, OUString const & path, com::sun::star::uno::Any const & value) const; @@ -102,7 +102,7 @@ public: OUString const & path) const; void setLocalizedPropertyValue( - boost::shared_ptr< ConfigurationChanges > const & batch, + std::shared_ptr< ConfigurationChanges > const & batch, OUString const & path, com::sun::star::uno::Any const & value) const; @@ -113,7 +113,7 @@ public: com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameReplace > getGroupReadWrite( - boost::shared_ptr< ConfigurationChanges > const & batch, + std::shared_ptr< ConfigurationChanges > const & batch, OUString const & path) const; com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > @@ -121,10 +121,10 @@ public: com::sun::star::uno::Reference< com::sun::star::container::XNameContainer > getSetReadWrite( - boost::shared_ptr< ConfigurationChanges > const & batch, + std::shared_ptr< ConfigurationChanges > const & batch, OUString const & path) const; - boost::shared_ptr< ConfigurationChanges > createChanges() const; + std::shared_ptr< ConfigurationChanges > createChanges() const; private: com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > @@ -199,7 +199,7 @@ template< typename T, typename U > struct ConfigurationProperty: /// For nillable properties, U is of type boost::optional<U'>. static void set( U const & value, - boost::shared_ptr< ConfigurationChanges > const & batch, + std::shared_ptr< ConfigurationChanges > const & batch, com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context = comphelper::getProcessComponentContext()) { @@ -245,7 +245,7 @@ template< typename T, typename U > struct ConfigurationLocalizedProperty: /// For nillable properties, U is of type boost::optional<U'>. static void set( U const & value, - boost::shared_ptr< ConfigurationChanges > const & batch, + std::shared_ptr< ConfigurationChanges > const & batch, com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context = comphelper::getProcessComponentContext()) { @@ -278,7 +278,7 @@ template< typename T > struct ConfigurationGroup: private boost::noncopyable { /// modifications via the given changes batch. static com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameReplace > - get(boost::shared_ptr< ConfigurationChanges > const & batch, + get(std::shared_ptr< ConfigurationChanges > const & batch, com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context = comphelper::getProcessComponentContext()) { @@ -311,7 +311,7 @@ template< typename T > struct ConfigurationSet: private boost::noncopyable { /// modifications via the given changes batch. static com::sun::star::uno::Reference< com::sun::star::container::XNameContainer > - get(boost::shared_ptr< ConfigurationChanges > const & batch, + get(std::shared_ptr< ConfigurationChanges > const & batch, com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & context = comphelper::getProcessComponentContext()) { diff --git a/include/svtools/PlaceEditDialog.hxx b/include/svtools/PlaceEditDialog.hxx index 7990542d3c07..5cdad02f1807 100644 --- a/include/svtools/PlaceEditDialog.hxx +++ b/include/svtools/PlaceEditDialog.hxx @@ -21,7 +21,7 @@ #include <svtools/inettbc.hxx> #include <svtools/place.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> #include <vector> class SVT_DLLPUBLIC PlaceEditDialog : public ModalDialog @@ -30,7 +30,7 @@ private : Edit* m_pEDServerName; ListBox* m_pLBServerType; - boost::shared_ptr< DetailsContainer > m_pCurrentDetails; + std::shared_ptr< DetailsContainer > m_xCurrentDetails; Edit* m_pEDUsername; OKButton* m_pBTOk; @@ -44,16 +44,16 @@ private : the m_aDetailsContainer[0] will be shown for the type corresponding to entry 0 in the listbox. */ - std::vector< boost::shared_ptr< DetailsContainer > > m_aDetailsContainers; + std::vector< std::shared_ptr< DetailsContainer > > m_aDetailsContainers; public : PlaceEditDialog( vcl::Window* pParent); - PlaceEditDialog(vcl::Window* pParent, const boost::shared_ptr<Place> &pPlace ); + PlaceEditDialog(vcl::Window* pParent, const std::shared_ptr<Place> &rPlace ); virtual ~PlaceEditDialog(); // Returns a place instance with given information - boost::shared_ptr<Place> GetPlace(); + std::shared_ptr<Place> GetPlace(); OUString GetServerName() { return m_pEDServerName->GetText(); } OUString GetServerUrl(); diff --git a/include/toolkit/awt/vclxprinter.hxx b/include/toolkit/awt/vclxprinter.hxx index 434c47a2c2da..71289fe86857 100644 --- a/include/toolkit/awt/vclxprinter.hxx +++ b/include/toolkit/awt/vclxprinter.hxx @@ -56,7 +56,7 @@ class VCLXPrinterPropertySet :public VCLXPrinterPropertySet_Base ,public ::cppu::OPropertySetHelper { protected: - boost::shared_ptr<Printer> mpPrinter; + std::shared_ptr<Printer> mxPrinter; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > mxPrnDevice; sal_Int16 mnOrientation; @@ -65,7 +65,7 @@ public: VCLXPrinterPropertySet( const OUString& rPrinterName ); virtual ~VCLXPrinterPropertySet(); - Printer* GetPrinter() const { return mpPrinter.get(); } + Printer* GetPrinter() const { return mxPrinter.get(); } ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice > GetDevice(); // ::com::sun::star::uno::XInterface @@ -107,8 +107,8 @@ typedef ::cppu::ImplInheritanceHelper1 < VCLXPrinterPropertySet > VCLXPrinter_Base; class VCLXPrinter: public VCLXPrinter_Base { - boost::shared_ptr<vcl::OldStylePrintAdaptor> mpListener; - JobSetup maInitJobSetup; + std::shared_ptr<vcl::OldStylePrintAdaptor> mxListener; + JobSetup maInitJobSetup; public: VCLXPrinter( const OUString& rPrinterName ); virtual ~VCLXPrinter(); diff --git a/include/vcl/IconThemeScanner.hxx b/include/vcl/IconThemeScanner.hxx index f8654903d1ab..028173e9de59 100644 --- a/include/vcl/IconThemeScanner.hxx +++ b/include/vcl/IconThemeScanner.hxx @@ -15,7 +15,7 @@ #include <rtl/ustring.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> #include <vector> // forward declaration of unit test class. Required for friend relationship. @@ -39,8 +39,7 @@ public: /** Factory method to create the object. * Provide a path to search for IconThemes. */ - static boost::shared_ptr<IconThemeScanner> - Create(const OUString &path); + static std::shared_ptr<IconThemeScanner> Create(const OUString &path); /** This method will return the standard path where icon themes are located. */ diff --git a/include/vcl/oldprintadaptor.hxx b/include/vcl/oldprintadaptor.hxx index fe7154832298..72d1163d67c4 100644 --- a/include/vcl/oldprintadaptor.hxx +++ b/include/vcl/oldprintadaptor.hxx @@ -29,7 +29,7 @@ namespace vcl { ImplOldStyleAdaptorData* mpData; public: - OldStylePrintAdaptor( const boost::shared_ptr< Printer >& ); + OldStylePrintAdaptor(const std::shared_ptr<Printer>&); virtual ~OldStylePrintAdaptor(); void StartPage(); diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index d6cfc2d1010b..45226f0c8f0f 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -35,7 +35,7 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/view/PrintableState.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <set> #include <unordered_map> @@ -238,7 +238,7 @@ private: SAL_DLLPRIVATE void ImplUpdateFontList(); SAL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup&, bool bMatchNearest ); - SAL_DLLPRIVATE bool StartJob( const OUString& rJobName, boost::shared_ptr<vcl::PrinterController>& ); + SAL_DLLPRIVATE bool StartJob( const OUString& rJobName, std::shared_ptr<vcl::PrinterController>& ); static SAL_DLLPRIVATE sal_uLong ImplSalPrinterErrorCodeToVCL( sal_uLong nError ); @@ -386,7 +386,7 @@ public: starts a print job asynchronously (that is will return */ - static void PrintJob( const boost::shared_ptr<vcl::PrinterController>& i_pController, + static void PrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController, const JobSetup& i_rInitSetup ); virtual bool HasMirroredGraphics() const SAL_OVERRIDE; @@ -407,7 +407,7 @@ public: // implementation detail of PrintJob being asynchronous // not exported, not usable outside vcl - static void SAL_DLLPRIVATE ImplPrintJob( const boost::shared_ptr<vcl::PrinterController>& i_pController, + static void SAL_DLLPRIVATE ImplPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController, const JobSetup& i_rInitSetup ); }; @@ -419,7 +419,7 @@ class VCL_DLLPUBLIC PrinterController { ImplPrinterControllerData* mpImplData; protected: - PrinterController( const boost::shared_ptr<Printer>& ); + PrinterController( const std::shared_ptr<Printer>& ); public: enum NupOrderType { LRTB, TBLR, TBRL, RLTB }; @@ -462,7 +462,7 @@ public: virtual ~PrinterController(); - const boost::shared_ptr<Printer>& getPrinter() const; + const std::shared_ptr<Printer>& getPrinter() const; /* for implementations: get current job properties as changed by e.g. print dialog this gets the current set of properties initially told to Printer::PrintJob @@ -543,7 +543,7 @@ public: SAL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf, bool i_bMayUseCache = false ); VCL_PLUGIN_PUBLIC PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache = false ); VCL_PLUGIN_PUBLIC void printFilteredPage( int i_nPage ); - SAL_DLLPRIVATE void setPrinter( const boost::shared_ptr<Printer>& ); + SAL_DLLPRIVATE void setPrinter( const std::shared_ptr<Printer>& ); SAL_DLLPRIVATE void setOptionChangeHdl( const Link& ); VCL_PLUGIN_PUBLIC void createProgressDialog(); VCL_PLUGIN_PUBLIC bool isProgressCanceled() const; diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index c701654770dd..204a05d7470d 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -32,7 +32,7 @@ #include <o3tl/typed_flags_set.hxx> #include <boost/optional.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> class CollatorWrapper; class LocaleDataWrapper; @@ -70,7 +70,7 @@ class VCL_DLLPUBLIC MouseSettings { private: void CopyData(); - boost::shared_ptr<ImplMouseData> mpData; + std::shared_ptr<ImplMouseData> mxData; public: MouseSettings(); @@ -201,7 +201,7 @@ class VCL_DLLPUBLIC StyleSettings void CopyData(); private: - boost::shared_ptr<ImplStyleData> mpData; + std::shared_ptr<ImplStyleData> mxData; public: StyleSettings(); @@ -573,7 +573,7 @@ class VCL_DLLPUBLIC MiscSettings void CopyData(); private: - boost::shared_ptr<ImplMiscData> mpData; + std::shared_ptr<ImplMiscData> mxData; public: MiscSettings(); @@ -598,7 +598,7 @@ public: class VCL_DLLPUBLIC HelpSettings { void CopyData(); - boost::shared_ptr<ImplHelpData> mpData; + std::shared_ptr<ImplHelpData> mxData; public: HelpSettings(); @@ -632,7 +632,7 @@ class VCL_DLLPUBLIC AllSettings private: void CopyData(); - boost::shared_ptr<ImplAllSettingsData> mpData; + std::shared_ptr<ImplAllSettingsData> mxData; public: AllSettings(); diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index e9c272d29588..b329f454cf68 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -39,7 +39,7 @@ #include <rtl/ref.hxx> #include <cppuhelper/weakref.hxx> #include <com/sun/star/uno/Reference.hxx> -#include <boost/shared_ptr.hpp> +#include <memory> class VirtualDevice; struct ImplDelData; @@ -1396,7 +1396,7 @@ public: * Adds this widget to the xGroup VclSizeGroup * */ - void add_to_size_group(boost::shared_ptr< VclSizeGroup > xGroup); + void add_to_size_group(std::shared_ptr<VclSizeGroup> xGroup); void remove_from_all_size_groups(); /* |