Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
34604446
Kaydet (Commit)
34604446
authored
Mar 14, 2017
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Various clang-cl/loplugin warnings
Change-Id: Ib18e04e5024d15f8bbbf4921932b07465fb1f32f
üst
b30173fd
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
59 additions
and
36 deletions
+59
-36
COMOpenDocuments.hpp
shell/inc/spsupp/COMOpenDocuments.hpp
+11
-4
COMRefCounted.hpp
shell/inc/spsupp/COMRefCounted.hpp
+3
-3
registrar.hpp
shell/inc/spsupp/registrar.hpp
+2
-2
spsuppClassFactory.hpp
shell/inc/spsupp/spsuppClassFactory.hpp
+4
-4
spsuppServ.hpp
shell/inc/spsupp/spsuppServ.hpp
+3
-3
contentreader.cxx
shell/source/win32/ooofilereader/contentreader.cxx
+3
-3
metainforeader.cxx
shell/source/win32/ooofilereader/metainforeader.cxx
+4
-4
smplmailsuppl.cxx
shell/source/win32/simplemail/smplmailsuppl.cxx
+1
-1
COMOpenDocuments.cxx
shell/source/win32/spsupp/COMOpenDocuments.cxx
+13
-7
spsuppClassFactory.cxx
shell/source/win32/spsupp/spsuppClassFactory.cxx
+0
-2
spsuppServ.cxx
shell/source/win32/spsupp/spsuppServ.cxx
+15
-3
No files found.
shell/inc/spsupp/COMOpenDocuments.hpp
Dosyayı görüntüle @
34604446
...
...
@@ -7,10 +7,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef
_COMOPENDOCUMENTS_HPP_
#define
_COMOPENDOCUMENTS_HPP_
#ifndef
INCLUDED_SHELL_INC_SPSUPP_COMOPENDOCUMENTS_HPP
#define
INCLUDED_SHELL_INC_SPSUPP_COMOPENDOCUMENTS_HPP
#if defined __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
#include "spsupp_h.h"
#if defined __clang__
#pragma clang diagnostic pop
#endif
#include "COMRefCounted.hpp"
#include "Objsafe.h"
#include "assert.h"
...
...
@@ -28,7 +35,7 @@ public:
};
COMOpenDocuments
();
virtual
~
COMOpenDocuments
();
virtual
~
COMOpenDocuments
()
override
;
// IUnknown methods
...
...
@@ -210,6 +217,6 @@ private:
COMObjectSafety
m_aObjectSafety
;
};
#endif
// _COMOPENDOCUMENTS_HPP_
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
shell/inc/spsupp/COMRefCounted.hpp
Dosyayı görüntüle @
34604446
...
...
@@ -7,8 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef
_COMREFCOUNTED_HPP_
#define
_COMREFCOUNTED_HPP_
#ifndef
INCLUDED_SHELL_INC_SPSUPP_COMREFCOUNTED_HPP
#define
INCLUDED_SHELL_INC_SPSUPP_COMREFCOUNTED_HPP
#include "objbase.h"
...
...
@@ -37,6 +37,6 @@ private:
long
m_nRef
=
1
;
// Created referenced
};
#endif
// _COMREFCOUNTED_HPP_
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
shell/inc/spsupp/registrar.hpp
Dosyayı görüntüle @
34604446
...
...
@@ -7,8 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef _REGISTRAR_H
#define _REGISTRAR_H
#ifndef
INCLUDED_SHELL_INC_SPSUPP
_REGISTRAR_H
#define
INCLUDED_SHELL_INC_SPSUPP
_REGISTRAR_H
#include "windows.h"
...
...
shell/inc/spsupp/spsuppClassFactory.hpp
Dosyayı görüntüle @
34604446
...
...
@@ -7,8 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef
_SPSUPPCLASSFACTORY_H_
#define
_SPSUPPCLASSFACTORY_H_
#ifndef
INCLUDED_SHELL_INC_SPSUPP_SPSUPPCLASSFACTORY_HPP
#define
INCLUDED_SHELL_INC_SPSUPP_SPSUPPCLASSFACTORY_HPP
#include "COMRefCounted.hpp"
...
...
@@ -16,7 +16,7 @@ class ClassFactory : public COMRefCounted<IClassFactory>
{
public
:
ClassFactory
();
virtual
~
ClassFactory
();
virtual
~
ClassFactory
()
override
;
// IUnknown methods
...
...
@@ -44,6 +44,6 @@ private:
static
long
m_nLockCount
;
};
#endif
// _SPSUPPCLASSFACTORY_H_
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
shell/inc/spsupp/spsuppServ.hpp
Dosyayı görüntüle @
34604446
...
...
@@ -7,14 +7,14 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef
_SPSUPPSERV_HPP_
#define
_SPSUPPSERV_HPP_
#ifndef
INCLUDED_SHELL_INC_SPSUPP_SPSUPPSERV_HPP
#define
INCLUDED_SHELL_INC_SPSUPP_SPSUPPSERV_HPP
#include <objbase.h>
ITypeLib
*
GetTypeLib
();
const
wchar_t
*
GetLOPath
();
#endif
// _SPSUPPSERV_HPP_
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
shell/source/win32/ooofilereader/contentreader.cxx
Dosyayı görüntüle @
34604446
...
...
@@ -88,7 +88,7 @@ ITag* CContentReader::chooseTagReader( const std::wstring& tag_name, const XmlTa
if
(
XmlAttributes
.
find
(
CONTENT_STYLE_STYLE_NAME
)
!=
XmlAttributes
.
end
())
return
new
CAutoStyleTag
(
XmlAttributes
);
else
return
new
CDummyTag
()
;
return
new
CDummyTag
;
}
else
if
(
(
tag_name
==
CONTENT_STYLE_PROPERTIES
)
||
(
tag_name
==
CONTENT_TEXT_STYLE_PROPERTIES
)
)
{
...
...
@@ -98,10 +98,10 @@ ITag* CContentReader::chooseTagReader( const std::wstring& tag_name, const XmlTa
ITag
*
pTagBuilder
=
m_TagBuilderStack
.
top
();
pTagBuilder
->
addAttributes
(
XmlAttributes
);
return
new
CDummyTag
()
;
return
new
CDummyTag
;
}
else
return
new
CDummyTag
()
;
return
new
CDummyTag
;
}
/** get style of the current content.
...
...
shell/source/win32/ooofilereader/metainforeader.cxx
Dosyayı görüntüle @
34604446
...
...
@@ -31,9 +31,9 @@ CBaseReader( DocumentName )
{
try
{
m_pKeywords_Builder
=
new
CKeywordsTag
(
)
;
m_pKeywords_Builder
=
new
CKeywordsTag
;
m_pSimple_Builder
=
new
CSimpleTag
(
);
m_pDummy_Builder
=
new
CDummyTag
(
)
;
m_pDummy_Builder
=
new
CDummyTag
;
//retrieve all information that is useful
m_AllMetaInfo
[
META_INFO_AUTHOR
]
=
EMPTY_XML_TAG
;
...
...
@@ -68,9 +68,9 @@ CBaseReader( stream )
{
try
{
m_pKeywords_Builder
=
new
CKeywordsTag
(
)
;
m_pKeywords_Builder
=
new
CKeywordsTag
;
m_pSimple_Builder
=
new
CSimpleTag
(
);
m_pDummy_Builder
=
new
CDummyTag
(
)
;
m_pDummy_Builder
=
new
CDummyTag
;
//retrieve all information that is useful
m_AllMetaInfo
[
META_INFO_AUTHOR
]
=
EMPTY_XML_TAG
;
...
...
shell/source/win32/simplemail/smplmailsuppl.cxx
Dosyayı görüntüle @
34604446
...
...
@@ -61,7 +61,7 @@ Reference<XSimpleMailClient> SAL_CALL CSmplMailSuppl::querySimpleMailClient()
if
((
handle
!=
INVALID_HANDLE_VALUE
)
&&
(
handle
!=
nullptr
))
{
FreeLibrary
(
handle
);
xSmplMailClient
.
set
(
new
CSmplMailClient
()
);
xSmplMailClient
.
set
(
new
CSmplMailClient
);
}
return
xSmplMailClient
;
}
...
...
shell/source/win32/spsupp/COMOpenDocuments.cxx
Dosyayı görüntüle @
34604446
...
...
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <sal/config.h>
#include <cstring>
#include "COMOpenDocuments.hpp"
#include "spsuppServ.hpp"
#include "stdio.h"
...
...
@@ -27,7 +31,9 @@ bool SecurityWarning(const wchar_t* sProgram, const wchar_t* sDocument)
// Returns S_OK if successful
HRESULT
LOStart
(
wchar_t
*
sCommandLine
)
{
STARTUPINFOW
si
=
{
sizeof
(
si
)
};
STARTUPINFOW
si
;
std
::
memset
(
&
si
,
0
,
sizeof
si
);
si
.
cb
=
sizeof
si
;
si
.
dwFlags
=
STARTF_USESHOWWINDOW
;
si
.
wShowWindow
=
SW_SHOW
;
PROCESS_INFORMATION
pi
=
{};
...
...
@@ -42,7 +48,7 @@ HRESULT LOStart(wchar_t* sCommandLine)
nullptr
,
dwError
,
MAKELANGID
(
LANG_NEUTRAL
,
SUBLANG_DEFAULT
),
(
LPWSTR
)
&
sMsgBuf
,
reinterpret_cast
<
LPWSTR
>
(
&
sMsgBuf
)
,
0
,
nullptr
);
size_t
nBufSize
=
wcslen
(
sMsgBuf
)
+
100
;
...
...
@@ -97,7 +103,7 @@ HRESULT STDMETHODCALLTYPE COMOpenDocuments::COMObjectSafety::GetInterfaceSafetyO
}
// We know about it; release reference and return required information
reinterpret
_cast
<
IUnknown
*>
(
ppvo
)
->
Release
();
static
_cast
<
IUnknown
*>
(
ppvo
)
->
Release
();
*
pdwSupportedOptions
=
iSupportedOptionsMask
;
*
pdwEnabledOptions
=
m_iEnabledOptions
;
return
S_OK
;
...
...
@@ -173,7 +179,7 @@ STDMETHODIMP COMOpenDocuments::QueryInterface(REFIID riid, void **ppvObject)
return
E_NOINTERFACE
;
}
reinterpret
_cast
<
IUnknown
*>
(
*
ppvObject
)
->
AddRef
();
static
_cast
<
IUnknown
*>
(
*
ppvObject
)
->
AddRef
();
return
S_OK
;
}
...
...
@@ -306,7 +312,7 @@ STDMETHODIMP COMOpenDocuments::CreateNewDocument2(
wchar_t
sCommandLine
[
32768
];
swprintf
(
sCommandLine
,
sizeof
(
sCommandLine
)
/
sizeof
(
*
sCommandLine
),
L"
\"
%s
\"
-n
\"
%s
\"
"
,
sProgram
,
bstrTemplateLocation
);
HRESULT
hr
=
LOStart
(
sCommandLine
);
*
pbResult
=
SUCCEEDED
(
hr
);
*
pbResult
=
VARIANT_BOOL
(
SUCCEEDED
(
hr
)
);
return
hr
;
}
...
...
@@ -356,7 +362,7 @@ STDMETHODIMP COMOpenDocuments::ViewDocument3(
wchar_t
sCommandLine
[
32768
];
swprintf
(
sCommandLine
,
sizeof
(
sCommandLine
)
/
sizeof
(
*
sCommandLine
),
L"
\"
%s
\"
--view
\"
%s
\"
"
,
sProgram
,
bstrDocumentLocation
);
HRESULT
hr
=
LOStart
(
sCommandLine
);
*
pbResult
=
SUCCEEDED
(
hr
);
*
pbResult
=
VARIANT_BOOL
(
SUCCEEDED
(
hr
)
);
return
hr
;
}
...
...
@@ -430,7 +436,7 @@ STDMETHODIMP COMOpenDocuments::EditDocument3(
wchar_t
sCommandLine
[
32768
];
swprintf
(
sCommandLine
,
sizeof
(
sCommandLine
)
/
sizeof
(
*
sCommandLine
),
L"
\"
%s
\"
-o
\"
%s
\"
"
,
sProgram
,
bstrDocumentLocation
);
HRESULT
hr
=
LOStart
(
sCommandLine
);
*
pbResult
=
SUCCEEDED
(
hr
);
*
pbResult
=
VARIANT_BOOL
(
SUCCEEDED
(
hr
)
);
return
hr
;
}
...
...
shell/source/win32/spsupp/spsuppClassFactory.cxx
Dosyayı görüntüle @
34604446
...
...
@@ -25,8 +25,6 @@ ClassFactory::~ClassFactory()
// IUnknown methods
const
wchar_t
*
GUID2Str
(
REFGUID
rGUID
);
STDMETHODIMP
ClassFactory
::
QueryInterface
(
REFIID
riid
,
void
**
ppvObject
)
...
...
shell/source/win32/spsupp/spsuppServ.cxx
Dosyayı görüntüle @
34604446
...
...
@@ -8,7 +8,15 @@
*/
// Include MIDL-generated file
#if defined __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wextra-tokens"
// "#endif !_MIDL_USE_GUIDDEF_" in midl-generated code
#endif
#include "spsupp_i.c"
#if defined __clang__
#pragma clang diagnostic pop
#endif
#include <memory>
#include "olectl.h"
...
...
@@ -17,8 +25,12 @@
#include "COMOpenDocuments.hpp"
#include "registrar.hpp"
namespace
{
HANDLE
g_hModule
;
}
ITypeLib
*
GetTypeLib
()
{
typedef
std
::
unique_ptr
<
ITypeLib
,
void
(
*
)(
IUnknown
*
p
)
>
ITypeLibGuard
;
...
...
@@ -26,7 +38,7 @@ ITypeLib* GetTypeLib()
if
(
!
aITypeLibGuard
.
get
())
{
wchar_t
szFile
[
MAX_PATH
];
if
(
GetModuleFileNameW
(
(
HMODULE
)
g_hModule
,
szFile
,
MAX_PATH
)
==
0
)
if
(
GetModuleFileNameW
(
static_cast
<
HMODULE
>
(
g_hModule
)
,
szFile
,
MAX_PATH
)
==
0
)
return
nullptr
;
ITypeLib
*
pTypeLib
;
HRESULT
hr
=
LoadTypeLib
(
szFile
,
&
pTypeLib
);
...
...
@@ -43,7 +55,7 @@ const wchar_t* GetLOPath()
if
(
*
sPath
==
0
)
{
// Initialization
if
(
GetModuleFileNameW
(
(
HMODULE
)
g_hModule
,
sPath
,
MAX_PATH
)
==
0
)
if
(
GetModuleFileNameW
(
static_cast
<
HMODULE
>
(
g_hModule
)
,
sPath
,
MAX_PATH
)
==
0
)
return
nullptr
;
wchar_t
*
pSlashPos
=
wcsrchr
(
sPath
,
L'\\'
);
if
(
pSlashPos
==
nullptr
)
...
...
@@ -107,7 +119,7 @@ STDAPI DllRegisterServer(void)
return
ResultFromScode
(
SELFREG_E_TYPELIB
);
wchar_t
szFile
[
MAX_PATH
];
if
(
GetModuleFileNameW
(
(
HMODULE
)
g_hModule
,
szFile
,
MAX_PATH
)
==
0
)
if
(
GetModuleFileNameW
(
static_cast
<
HMODULE
>
(
g_hModule
)
,
szFile
,
MAX_PATH
)
==
0
)
return
HRESULT_FROM_WIN32
(
GetLastError
());
HRESULT
hr
=
RegisterTypeLib
(
pTypeLib
,
szFile
,
nullptr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment