[Libreoffice-commits] core.git: 2 commits - sc/qa sc/source sd/source
Stephan Bergmann
sbergman at redhat.com
Sun Oct 16 14:18:40 UTC 2016
sc/qa/unit/subsequent_export-test.cxx | 8 ++++++++
sc/source/ui/docshell/docsh4.cxx | 4 ++--
sd/source/ui/dlg/filedlg.cxx | 4 ++--
sd/source/ui/remotecontrol/BluetoothServer.cxx | 6 +++---
sd/source/ui/remotecontrol/DiscoveryService.cxx | 6 ++++--
sd/source/ui/remotecontrol/WINNetworkService.cxx | 2 +-
sd/source/ui/remotecontrol/WINNetworkService.hxx | 8 ++++----
7 files changed, 24 insertions(+), 14 deletions(-)
New commits:
commit 4cfb22aaf50f93019ee888e84a2db2efd048b894
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Oct 14 16:53:50 2016 +0200
clang-cl loplugin: sc
Change-Id: I24d091174ab602ecf80c65ad75fd450e55cb01ac
Reviewed-on: https://gerrit.libreoffice.org/29856
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 693990d..9a47f47 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -141,7 +141,9 @@ public:
void testCeilingFloorXLS();
void testCeilingFloorODS();
+#if !defined _WIN32
void testRelativePaths();
+#endif
void testSheetProtection();
void testPivotTableXLSX();
@@ -151,7 +153,9 @@ public:
void testLinkedGraphicRT();
void testImageWithSpecialID();
+#if !defined _WIN32
void testSupBookVirtualPath();
+#endif
void testSheetLocalRangeNameXLS();
void testSheetTextBoxHyperlink();
void testFontSize();
@@ -2622,6 +2626,7 @@ void ScExportTest::testCeilingFloorODS()
testCeilingFloor(FORMAT_ODS);
}
+#if !defined _WIN32
void ScExportTest::testRelativePaths()
{
ScDocShellRef xDocSh = loadDoc("fdo79305.", FORMAT_ODS);
@@ -2634,6 +2639,7 @@ void ScExportTest::testRelativePaths()
// make sure that the URL is relative
CPPUNIT_ASSERT(aURL.startsWith(".."));
}
+#endif
namespace {
@@ -3025,6 +3031,7 @@ void ScExportTest::tearDown()
test::BootstrapFixture::tearDown();
}
+#if !defined _WIN32
void ScExportTest::testSupBookVirtualPath()
{
ScDocShellRef xShell = loadDoc("external-ref.", FORMAT_XLS);
@@ -3041,6 +3048,7 @@ void ScExportTest::testSupBookVirtualPath()
xDocSh->DoClose();
}
+#endif
void ScExportTest::testLinkedGraphicRT()
{
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index e9a362c..977f03e 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2195,10 +2195,10 @@ bool ScDocShell::DdeSetData( const OUString& rItem,
if( aDdeTextFmt == "CSV" ||
aDdeTextFmt == "FCSV" )
aObj.SetSeparator( ',' );
- return aObj.ImportData( rMimeType, rValue );
+ return ScImportExport::ImportData( rMimeType, rValue );
}
ScImportExport aObj( &aDocument, rItem );
- return aObj.IsRef() && aObj.ImportData( rMimeType, rValue );
+ return aObj.IsRef() && ScImportExport::ImportData( rMimeType, rValue );
}
#endif
commit 480e84d88d96d2d245b653613a9b83f3d7120ed8
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Oct 14 16:53:45 2016 +0200
clang-cl loplugin: sd
Change-Id: I26a1e20a3b811aea535994cda2e49a9c39df64b7
Reviewed-on: https://gerrit.libreoffice.org/29855
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 0f0c87d..e5823d1 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -273,9 +273,9 @@ SdOpenSoundFileDialog::SdOpenSoundFileDialog() :
mpImpl->AddFilter( aDescr, "*.svx");
#else
aDescr = SD_RESSTR(STR_WAV_FILE);
- mpImpl->AddFilter( aDescr, OUString("*.wav;*.mp3;*.ogg" ));
+ mpImpl->AddFilter( aDescr, "*.wav;*.mp3;*.ogg" );
aDescr = SD_RESSTR(STR_MIDI_FILE);
- mpImpl->AddFilter( aDescr, OUString("*.mid" ));
+ mpImpl->AddFilter( aDescr, "*.mid" );
#endif
}
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index f177d86..3002160 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -1336,7 +1336,7 @@ void SAL_CALL BluetoothServer::run()
aAddr.btAddr = 0;
aAddr.serviceClassId = GUID_NULL;
aAddr.port = BT_PORT_ANY; // Select any free socket.
- if ( bind( aSocket, (SOCKADDR*) &aAddr, sizeof(aAddr) ) == SOCKET_ERROR )
+ if ( bind( aSocket, reinterpret_cast<SOCKADDR*>(&aAddr), sizeof(aAddr) ) == SOCKET_ERROR )
{
closesocket( aSocket );
WSACleanup();
@@ -1372,7 +1372,7 @@ void SAL_CALL BluetoothServer::run()
L"LibreOffice Impress Remote Control");
aRecord.lpszComment = const_cast<wchar_t *>(
L"Remote control of presentations over bluetooth.");
- aRecord.lpServiceClassId = (LPGUID) &SerialPortServiceClass_UUID;
+ aRecord.lpServiceClassId = const_cast<LPGUID>(&SerialPortServiceClass_UUID);
aRecord.dwNameSpace = NS_BTH;
aRecord.dwNumberOfCsAddrs = 1;
aRecord.lpcsaBuffer = &aAddrInfo;
@@ -1396,7 +1396,7 @@ void SAL_CALL BluetoothServer::run()
while ( true )
{
SOCKET socket;
- if ( (socket = accept(aSocket, (sockaddr*) &aRemoteAddr, &aRemoteAddrLen)) == INVALID_SOCKET )
+ if ( (socket = accept(aSocket, reinterpret_cast<sockaddr*>(&aRemoteAddr), &aRemoteAddrLen)) == INVALID_SOCKET )
{
closesocket( aSocket );
WSACleanup();
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index 2ad0062..8112382 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -138,9 +138,11 @@ void DiscoveryService::setupSockets()
rc = setsockopt( mSocket, IPPROTO_IP, IP_ADD_MEMBERSHIP,
#ifdef _WIN32
- (const char*)
+ reinterpret_cast<const char*>(&multicastRequest),
+ #else
+ &multicastRequest,
#endif
- &multicastRequest, sizeof(multicastRequest));
+ sizeof(multicastRequest));
if (rc)
{
diff --git a/sd/source/ui/remotecontrol/WINNetworkService.cxx b/sd/source/ui/remotecontrol/WINNetworkService.cxx
index faedcf4..bd2decf 100644
--- a/sd/source/ui/remotecontrol/WINNetworkService.cxx
+++ b/sd/source/ui/remotecontrol/WINNetworkService.cxx
@@ -5,7 +5,7 @@
void sd::WINNetworkService::setup()
{
- DNSServiceErrorType err = DNSServiceRegister(&client, 0, 0, NULL, kREG_TYPE, "local", NULL, 1599, 1, "", NULL, this );
+ DNSServiceErrorType err = DNSServiceRegister(&client, 0, 0, nullptr, kREG_TYPE, "local", nullptr, 1599, 1, "", nullptr, this );
if (kDNSServiceErr_NoError != err)
SAL_WARN("sdremote.wifi", "DNSServiceRegister failed: " << err);
diff --git a/sd/source/ui/remotecontrol/WINNetworkService.hxx b/sd/source/ui/remotecontrol/WINNetworkService.hxx
index 1e32274..7c4ebda 100644
--- a/sd/source/ui/remotecontrol/WINNetworkService.hxx
+++ b/sd/source/ui/remotecontrol/WINNetworkService.hxx
@@ -15,11 +15,11 @@ namespace sd{
public:
WINNetworkService(const std::string& aname = "", unsigned int aport = 1599)
- : ZeroconfService(aname, aport), client(0) {}
- virtual ~WINNetworkService(){}
+ : ZeroconfService(aname, aport), client(nullptr) {}
+ virtual ~WINNetworkService() override {}
- void clear();
- void setup();
+ void clear() override;
+ void setup() override;
};
}
More information about the Libreoffice-commits
mailing list