Commit f20d5bd9 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Remove excess whitespace

parent c261c25f
......@@ -35,7 +35,7 @@ struct VLCEnumConnectionsDereference
CONNECTDATA operator()(const map<DWORD,LPUNKNOWN>::iterator& i)
{
CONNECTDATA cd;
cd.dwCookie = i->first;
cd.pUnk = i->second;
return cd;
......
......@@ -193,9 +193,9 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
keyClose(keySetDef(keyCreate(hProgKey, "CLSID"),
psz_CLSID,
GUID_STRLEN));
//hSubKey = keyClose(keyCreate(hBaseKey, "Insertable"));
RegCloseKey(hProgKey);
}
if( isDefault )
......@@ -209,7 +209,7 @@ static HRESULT RegisterClassID(HKEY hParent, REFCLSID rclsid, unsigned int versi
keyClose(keySetDef(keyCreate(hProgKey, "CLSID"),
psz_CLSID,
GUID_STRLEN));
keyClose(keySetDef(keyCreate(hProgKey, "CurVer"),
progId));
}
......@@ -298,14 +298,14 @@ STDAPI DllRegisterServer(VOID)
char DllPath[MAX_PATH];
DWORD DllPathLen=GetModuleFileNameA(h_instance, DllPath, sizeof(DllPath)) ;
if( 0 == DllPathLen )
if( 0 == DllPathLen )
return E_UNEXPECTED;
HKEY hBaseKey;
if( ERROR_SUCCESS != RegOpenKeyExA(HKEY_CLASSES_ROOT, "CLSID", 0, KEY_CREATE_SUB_KEY, &hBaseKey) )
return SELFREG_E_CLASS;
RegisterClassID(hBaseKey, CLSID_VLCPlugin, 1, FALSE, DllPath, DllPathLen);
RegisterClassID(hBaseKey, CLSID_VLCPlugin2, 2, TRUE, DllPath, DllPathLen);
......@@ -459,4 +459,3 @@ STDAPI_(BOOL) DllMain(HANDLE hModule, DWORD fdwReason, LPVOID lpReserved )
};
#endif
......@@ -42,13 +42,13 @@ extern "C" const IID IID_IObjectSafety;
struct IObjectSafety : public IUnknown
{
virtual STDMETHODIMP GetInterfaceSafetyOptions(
virtual STDMETHODIMP GetInterfaceSafetyOptions(
REFIID riid,
DWORD __RPC_FAR *pdwSupportedOptions,
DWORD __RPC_FAR *pdwEnabledOptions
) = 0;
virtual STDMETHODIMP SetInterfaceSafetyOptions(
virtual STDMETHODIMP SetInterfaceSafetyOptions(
REFIID riid,
DWORD dwSupportedOptions,
DWORD dwOptionSetMask
......@@ -83,19 +83,19 @@ public:
STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
// IUnknown methods
STDMETHODIMP GetInterfaceSafetyOptions(
STDMETHODIMP GetInterfaceSafetyOptions(
REFIID riid,
DWORD *pdwSupportedOptions,
DWORD *pdwEnabledOptions
);
STDMETHODIMP SetInterfaceSafetyOptions(
STDMETHODIMP SetInterfaceSafetyOptions(
REFIID riid,
DWORD dwOptionSetMask,
DWORD dwEnabledOptions
);
private:
private:
VLCPlugin *_p_instance;
};
......
......@@ -35,10 +35,10 @@ public:
STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
{
if( NULL == ppv )
return E_POINTER;
return E_POINTER;
if( (IID_IUnknown == riid)
|| (IID_IOleWindow == riid)
|| (IID_IOleInPlaceObject == riid) )
|| (IID_IOleInPlaceObject == riid) )
{
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
......@@ -66,4 +66,3 @@ private:
};
#endif
......@@ -30,7 +30,7 @@
using namespace std;
VLCOleObject::VLCOleObject(VLCPlugin *p_instance) :
_p_clientsite(NULL), _p_instance(p_instance)
_p_clientsite(NULL), _p_instance(p_instance)
{
CreateOleAdviseHolder(&_p_advise_holder);
};
......@@ -242,7 +242,7 @@ STDMETHODIMP VLCOleObject::GetClientSite(LPOLECLIENTSITE *ppClientSite)
{
if( NULL == ppClientSite )
return E_POINTER;
if( NULL != _p_clientsite )
_p_clientsite->AddRef();
......@@ -295,7 +295,7 @@ STDMETHODIMP VLCOleObject::GetMoniker(DWORD dwAssign, DWORD dwWhichMoniker, LPMO
{
if( NULL != _p_clientsite )
return _p_clientsite->GetMoniker(dwAssign,dwWhichMoniker, ppMoniker);
return E_UNEXPECTED;
};
......
......@@ -37,7 +37,7 @@ public:
if( NULL == ppv )
return E_POINTER;
if( (IID_IUnknown == riid)
|| (IID_IOleObject == riid) )
|| (IID_IOleObject == riid) )
{
AddRef();
*ppv = reinterpret_cast<LPVOID>(this);
......
......@@ -243,4 +243,3 @@ STDMETHODIMP VLCPersistPropertyBag::Save(LPPROPERTYBAG pPropBag, BOOL fClearDirt
return S_OK;
};
......@@ -276,7 +276,7 @@ public:
(*p.first).second = val.second;
return S_OK;
};
// custom methods
HRESULT Load(LPSTREAM pStm)
......
......@@ -69,4 +69,3 @@ private:
};
#endif
......@@ -118,7 +118,7 @@ VLCPluginClass::VLCPluginClass(LONG *p_class_ref, HINSTANCE hInstance, REFCLSID
wClass.hbrBackground = NULL;
wClass.lpszMenuName = NULL;
wClass.lpszClassName = getInPlaceWndClassName();
_inplace_wndclass_atom = RegisterClass(&wClass);
}
else
......@@ -138,7 +138,7 @@ VLCPluginClass::VLCPluginClass(LONG *p_class_ref, HINSTANCE hInstance, REFCLSID
wClass.hbrBackground = NULL;
wClass.lpszMenuName = NULL;
wClass.lpszClassName = getVideoWndClassName();
_video_wndclass_atom = RegisterClass(&wClass);
}
else
......@@ -570,26 +570,26 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
if( RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\VideoLAN\\VLC",
0, KEY_READ, &h_key ) == ERROR_SUCCESS )
{
if( RegQueryValueEx( h_key, "InstallDir", 0, &i_type,
(LPBYTE)p_data, &i_data ) == ERROR_SUCCESS )
{
if( i_type == REG_SZ )
{
strcat( p_data, "\\plugins" );
ppsz_argv[ppsz_argc++] = "--plugin-path";
ppsz_argv[ppsz_argc++] = p_data;
}
}
RegCloseKey( h_key );
if( RegQueryValueEx( h_key, "InstallDir", 0, &i_type,
(LPBYTE)p_data, &i_data ) == ERROR_SUCCESS )
{
if( i_type == REG_SZ )
{
strcat( p_data, "\\plugins" );
ppsz_argv[ppsz_argc++] = "--plugin-path";
ppsz_argv[ppsz_argc++] = p_data;
}
}
RegCloseKey( h_key );
}
char p_path[MAX_PATH+1];
DWORD len = GetModuleFileNameA(DllGetModule(), p_path, sizeof(p_path));
if( len > 0 )
{
p_path[len] = '\0';
ppsz_argv[0] = p_path;
}
char p_path[MAX_PATH+1];
DWORD len = GetModuleFileNameA(DllGetModule(), p_path, sizeof(p_path));
if( len > 0 )
{
p_path[len] = '\0';
ppsz_argv[0] = p_path;
}
// make sure plugin isn't affected with VLC single instance mode
ppsz_argv[ppsz_argc++] = "--no-one-instance";
......@@ -631,7 +631,7 @@ HRESULT VLCPlugin::getVLC(libvlc_instance_t** pp_libvlc)
{
libvlc_audio_set_mute(_p_libvlc, TRUE, NULL);
}
// initial playlist item
if( SysStringLen(_bstr_mrl) > 0 )
{
......@@ -803,7 +803,7 @@ HRESULT VLCPlugin::onActivateInPlace(LPMSG lpMesg, HWND hwndParent, LPCRECT lprc
/*
** record keeping of control geometry within container
*/
*/
_posRect = posRect;
/*
......@@ -905,7 +905,7 @@ HRESULT VLCPlugin::onInPlaceDeactivate(void)
_videownd = NULL;
DestroyWindow(_inplacewnd);
_inplacewnd = NULL;
return S_OK;
};
......@@ -1162,4 +1162,3 @@ void VLCPlugin::fireOnStopEvent(void)
DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};
vlcConnectionPointContainer->fireEvent(DISPID_StopEvent, &dispparamsNoArgs);
};
......@@ -164,7 +164,7 @@ public:
_p_pict->AddRef();
return _p_pict;
};
BOOL hasFocus(void);
void setFocus(BOOL fFocus);
......@@ -272,4 +272,3 @@ private:
};
#endif
......@@ -57,4 +57,3 @@ STDMETHODIMP VLCProvideClassInfo::GetGUID(DWORD dwGuidKind, GUID *pGUID)
return S_OK;
};
......@@ -64,4 +64,3 @@ private:
};
#endif
......@@ -67,4 +67,3 @@ void VLCSupportErrorInfo::setErrorInfo(LPCOLESTR progid, REFIID riid, const char
SysFreeString(bstrDescription);
}
};
......@@ -126,11 +126,11 @@ HRESULT GetObjectProperty(LPUNKNOWN object, DISPID dispID, VARIANT& v)
HDC CreateDevDC(DVTARGETDEVICE *ptd)
{
HDC hdc=NULL;
if( NULL == ptd )
HDC hdc=NULL;
if( NULL == ptd )
{
hdc = CreateDC(TEXT("DISPLAY"), NULL, NULL, NULL);
}
hdc = CreateDC(TEXT("DISPLAY"), NULL, NULL, NULL);
}
else
{
LPDEVNAMES lpDevNames;
......@@ -184,4 +184,3 @@ void HimetricFromDP(HDC hdc, LPPOINT pt, int count)
++pt;
}
};
......@@ -27,7 +27,6 @@
class VLCControl : public IVLCControl
{
public:
VLCControl(VLCPlugin *p_instance) : _p_instance(p_instance), _p_typeinfo(NULL) {};
......@@ -92,7 +91,7 @@ public:
STDMETHODIMP put_AutoLoop(VARIANT_BOOL autoloop);
STDMETHODIMP get_AutoPlay(VARIANT_BOOL *autoplay);
STDMETHODIMP put_AutoPlay(VARIANT_BOOL autoplay);
static HRESULT CreateTargetOptions(int codePage, VARIANT *options, char ***cOptions, int *cOptionCount);
static void FreeTargetOptions(char **cOptions, int cOptionCount);
......@@ -102,8 +101,6 @@ private:
VLCPlugin *_p_instance;
ITypeInfo *_p_typeinfo;
};
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment