hold and return SalI18NImeStatus using std::unique_ptr
Change-Id: I3657980045290a4d65b2944afac04d610c0a94fd Reviewed-on: https://gerrit.libreoffice.org/55496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
508175a8af
commit
382aab381b
8 changed files with 12 additions and 12 deletions
|
@ -127,8 +127,8 @@ public:
|
|||
|
||||
// SalTimer
|
||||
virtual SalTimer* CreateSalTimer() = 0;
|
||||
// SalI18NImeStatus
|
||||
virtual SalI18NImeStatus*
|
||||
// interface to ime status window, only used by the X11 backend
|
||||
virtual std::unique_ptr<SalI18NImeStatus>
|
||||
CreateI18NImeStatus();
|
||||
// SalSystem
|
||||
virtual SalSystem* CreateSalSystem() = 0;
|
||||
|
|
|
@ -340,7 +340,7 @@ struct ImplSVData
|
|||
Application* mpApp = nullptr; // pApp
|
||||
VclPtr<WorkWindow> mpDefaultWin; // Default-Window
|
||||
bool mbDeInit = false; // Is VCL deinitializing
|
||||
SalI18NImeStatus* mpImeStatus = nullptr; // interface to ime status window
|
||||
std::unique_ptr<SalI18NImeStatus> mpImeStatus; // interface to ime status window, only used by the X11 backend
|
||||
SalSystem* mpSalSystem = nullptr; // SalSystem interface
|
||||
bool mbResLocaleSet = false; // SV-Resource-Manager
|
||||
std::locale maResLocale; // Resource locale
|
||||
|
|
|
@ -193,7 +193,7 @@ public:
|
|||
virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) override;
|
||||
virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow ) override;
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
virtual SalI18NImeStatus* CreateI18NImeStatus() override;
|
||||
virtual std::unique_ptr<SalI18NImeStatus> CreateI18NImeStatus() override;
|
||||
#endif
|
||||
virtual SalSystem* CreateSalSystem() override;
|
||||
virtual SalInfoPrinter* CreateInfoPrinter(SalPrinterQueueInfo* pPrinterQueueInfo, ImplJobSetup* pJobSetup) override;
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
virtual GenPspGraphics *CreatePrintGraphics() override;
|
||||
|
||||
virtual SalTimer* CreateSalTimer() override;
|
||||
virtual SalI18NImeStatus* CreateI18NImeStatus() override;
|
||||
virtual std::unique_ptr<SalI18NImeStatus> CreateI18NImeStatus() override;
|
||||
virtual SalSystem* CreateSalSystem() override;
|
||||
virtual SalBitmap* CreateSalBitmap() override;
|
||||
virtual SalSession* CreateSalSession() override;
|
||||
|
|
|
@ -107,9 +107,9 @@ bool SalInstance::CallEventCallback( void const * pEvent, int nBytes )
|
|||
return m_pEventInst.is() && m_pEventInst->dispatchEvent( pEvent, nBytes );
|
||||
}
|
||||
|
||||
SalI18NImeStatus* SalInstance::CreateI18NImeStatus()
|
||||
std::unique_ptr<SalI18NImeStatus> SalInstance::CreateI18NImeStatus()
|
||||
{
|
||||
return new SalI18NImeStatus;
|
||||
return std::unique_ptr<SalI18NImeStatus>(new SalI18NImeStatus);
|
||||
}
|
||||
|
||||
SalTimer::~SalTimer() COVERITY_NOEXCEPT_FALSE
|
||||
|
|
|
@ -433,8 +433,7 @@ void DeInitVCL()
|
|||
vcl::DeleteOnDeinitBase::ImplDeleteOnDeInit();
|
||||
|
||||
// give ime status a chance to destroy its own windows
|
||||
delete pSVData->mpImeStatus;
|
||||
pSVData->mpImeStatus = nullptr;
|
||||
pSVData->mpImeStatus.reset();
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
OStringBuffer aBuf( 256 );
|
||||
|
|
|
@ -431,9 +431,9 @@ void X11ImeStatus::toggle()
|
|||
vcl::I18NStatus::get().toggleStatusWindow();
|
||||
}
|
||||
|
||||
SalI18NImeStatus* X11SalInstance::CreateI18NImeStatus()
|
||||
std::unique_ptr<SalI18NImeStatus> X11SalInstance::CreateI18NImeStatus()
|
||||
{
|
||||
return new X11ImeStatus();
|
||||
return std::unique_ptr<SalI18NImeStatus>(new X11ImeStatus());
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <unx/gtk/gtksalmenu.hxx>
|
||||
#include <headless/svpvd.hxx>
|
||||
#include <headless/svpbmp.hxx>
|
||||
#include <salimestatus.hxx>
|
||||
#include <vcl/inputtypes.hxx>
|
||||
#include <unx/genpspgraphics.h>
|
||||
#include <rtl/strbuf.hxx>
|
||||
|
@ -226,7 +227,7 @@ SalObject* GtkInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWind
|
|||
}
|
||||
|
||||
#if !GTK_CHECK_VERSION(3,0,0)
|
||||
SalI18NImeStatus* GtkInstance::CreateI18NImeStatus()
|
||||
std::unique_ptr<SalI18NImeStatus> GtkInstance::CreateI18NImeStatus()
|
||||
{
|
||||
//we want the default SalInstance::CreateI18NImeStatus returns the no-op
|
||||
//stub here, not the X11Instance::CreateI18NImeStatus which the gtk2
|
||||
|
|
Loading…
Reference in a new issue