remove ConnectionIdentifierType enum
since we only use the AsciiCString enumerator. Consequently simplify the GetConnectionIdentifier method Change-Id: I9e1a1318d2f12bfd18edeb8479e0e7171b22d0f1 Reviewed-on: https://gerrit.libreoffice.org/34026 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -104,6 +104,7 @@ for d in definitionSet:
|
||||
"vcl/source/filter/sgvmain.hxx",
|
||||
"vcl/source/filter/jpeg/transupp.h",
|
||||
"include/vcl/bitmapex.hxx", # TransparentType
|
||||
"vcl/inc/sft.hxx", # CompositeFlags, WidthClass, WeightClass
|
||||
# unit test code
|
||||
"cppu/source/uno/check.cxx",
|
||||
# general weird nonsense going on
|
||||
|
@@ -415,11 +415,9 @@ SalSession* SvpSalInstance::CreateSalSession()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void* SvpSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes )
|
||||
OUString SvpSalInstance::GetConnectionIdentifier()
|
||||
{
|
||||
rReturnedBytes = 1;
|
||||
rReturnedType = AsciiCString;
|
||||
return const_cast<char*>("");
|
||||
return OUString("");
|
||||
}
|
||||
|
||||
void SvpSalInstance::StopTimer()
|
||||
|
@@ -38,7 +38,7 @@ class DisplayConnectionDispatch :
|
||||
m_aHandlers;
|
||||
::std::list< css::uno::Reference< css::awt::XEventHandler > >
|
||||
m_aErrorHandlers;
|
||||
css::uno::Any m_aAny;
|
||||
OUString m_ConnectionIdentifier;
|
||||
public:
|
||||
DisplayConnectionDispatch();
|
||||
~DisplayConnectionDispatch() override;
|
||||
|
@@ -163,7 +163,7 @@ public:
|
||||
|
||||
virtual OpenGLContext* CreateOpenGLContext() override;
|
||||
|
||||
virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) override;
|
||||
virtual OUString GetConnectionIdentifier() override;
|
||||
|
||||
virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override;
|
||||
|
||||
|
@@ -116,8 +116,7 @@ public:
|
||||
virtual void DestroyMenuItem( SalMenuItem* ) override;
|
||||
virtual SalSession* CreateSalSession() override;
|
||||
virtual OpenGLContext* CreateOpenGLContext() override;
|
||||
virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType,
|
||||
int& rReturnedBytes ) override;
|
||||
virtual OUString GetConnectionIdentifier() override;
|
||||
virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType,
|
||||
const OUString& rDocumentService) override;
|
||||
|
||||
|
@@ -155,8 +155,7 @@ public:
|
||||
|
||||
bool CallEventCallback( void* pEvent, int nBytes );
|
||||
|
||||
enum ConnectionIdentifierType { AsciiCString, Blob };
|
||||
virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) = 0;
|
||||
virtual OUString GetConnectionIdentifier() = 0;
|
||||
|
||||
// dtrans implementation
|
||||
virtual css::uno::Reference< css::uno::XInterface > CreateClipboard( const css::uno::Sequence< css::uno::Any >& i_rArguments );
|
||||
|
@@ -108,7 +108,7 @@ namespace vcl
|
||||
KT_MICROSOFT = 2 /**< Microsoft table */
|
||||
};
|
||||
|
||||
/* Composite glyph flags definition */
|
||||
/** Composite glyph flags definition */
|
||||
enum CompositeFlags {
|
||||
ARG_1_AND_2_ARE_WORDS = 1,
|
||||
ARGS_ARE_XY_VALUES = 1<<1,
|
||||
|
@@ -77,7 +77,7 @@ public:
|
||||
virtual SalYieldResult DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong nReleased) override;
|
||||
virtual bool AnyInput( VclInputFlags nType ) override;
|
||||
|
||||
virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) override;
|
||||
virtual OUString GetConnectionIdentifier() override;
|
||||
void SetLib( SalXLib *pXLib ) { mpXLib = pXLib; }
|
||||
|
||||
virtual void AfterAppInit() override;
|
||||
|
@@ -71,7 +71,7 @@ public:
|
||||
virtual void DestroyMenuItem( SalMenuItem* ) override;
|
||||
virtual SalSession* CreateSalSession() override;
|
||||
virtual OpenGLContext* CreateOpenGLContext() override;
|
||||
virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) override;
|
||||
virtual OUString GetConnectionIdentifier() override;
|
||||
virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override;
|
||||
|
||||
virtual OUString getOSVersion() override;
|
||||
|
@@ -915,11 +915,9 @@ void AquaSalInstance::DestroyInfoPrinter( SalInfoPrinter* pPrinter )
|
||||
delete pPrinter;
|
||||
}
|
||||
|
||||
void* AquaSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes )
|
||||
OUString AquaSalInstance::GetConnectionIdentifier()
|
||||
{
|
||||
rReturnedBytes = 1;
|
||||
rReturnedType = AsciiCString;
|
||||
return const_cast<char *>("");
|
||||
return OUString("");
|
||||
}
|
||||
|
||||
// We need to re-encode file urls because osl_getFileURLFromSystemPath converts
|
||||
|
@@ -30,18 +30,7 @@ using namespace com::sun::star::awt;
|
||||
|
||||
DisplayConnectionDispatch::DisplayConnectionDispatch()
|
||||
{
|
||||
SalInstance::ConnectionIdentifierType eType;
|
||||
int nBytes;
|
||||
void* pBytes = ImplGetSVData()->mpDefInst->GetConnectionIdentifier( eType, nBytes );
|
||||
switch( eType )
|
||||
{
|
||||
case SalInstance::AsciiCString:
|
||||
m_aAny <<= OUString::createFromAscii( static_cast<sal_Char*>(pBytes) );
|
||||
break;
|
||||
case SalInstance::Blob:
|
||||
m_aAny <<= Sequence< sal_Int8 >( static_cast<sal_Int8*>(pBytes), nBytes );
|
||||
break;
|
||||
}
|
||||
m_ConnectionIdentifier = ImplGetSVData()->mpDefInst->GetConnectionIdentifier();
|
||||
}
|
||||
|
||||
DisplayConnectionDispatch::~DisplayConnectionDispatch()
|
||||
@@ -103,7 +92,7 @@ void SAL_CALL DisplayConnectionDispatch::removeErrorHandler( const css::uno::Ref
|
||||
|
||||
Any SAL_CALL DisplayConnectionDispatch::getIdentifier()
|
||||
{
|
||||
return m_aAny;
|
||||
return Any(m_ConnectionIdentifier);
|
||||
}
|
||||
|
||||
bool DisplayConnectionDispatch::dispatchEvent( void* pData, int nBytes )
|
||||
|
@@ -174,13 +174,10 @@ SalYieldResult X11SalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents,
|
||||
return mpXLib->Yield( bWait, bHandleAllCurrentEvents );
|
||||
}
|
||||
|
||||
void* X11SalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType,
|
||||
int& rReturnedBytes )
|
||||
OUString X11SalInstance::GetConnectionIdentifier()
|
||||
{
|
||||
static const char* pDisplay = getenv( "DISPLAY" );
|
||||
rReturnedType = AsciiCString;
|
||||
rReturnedBytes = pDisplay ? strlen( pDisplay )+1 : 1;
|
||||
return pDisplay ? const_cast<char *>(pDisplay) : const_cast<char *>("");
|
||||
return pDisplay ? OUString::createFromAscii(pDisplay) : OUString("");
|
||||
}
|
||||
|
||||
SalFrame *X11SalInstance::CreateFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle )
|
||||
|
@@ -917,11 +917,9 @@ void WinSalInstance::DestroyObject( SalObject* pObject )
|
||||
SendMessageW( mhComWnd, SAL_MSG_DESTROYOBJECT, 0, reinterpret_cast<LPARAM>(pObject) );
|
||||
}
|
||||
|
||||
void* WinSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes )
|
||||
OUString WinSalInstance::GetConnectionIdentifier()
|
||||
{
|
||||
rReturnedBytes = 1;
|
||||
rReturnedType = AsciiCString;
|
||||
return const_cast<char *>("");
|
||||
return OUString("");
|
||||
}
|
||||
|
||||
/** Add a file to the system shells recent document list if there is any.
|
||||
|
Reference in New Issue
Block a user