summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2013-03-08 14:14:46 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2013-03-13 16:26:10 +0100
commitbdfdd054bd25714f9c52c974f22228bee4bfbe67 (patch)
tree5d52309c4d07614d1e555af2e010544cdb3994a1 /comphelper
parent3909015f5dd1cbd18de80f38cd1fe675b7c59b7e (diff)
more subtle dependencies for cross-compilation
Now we build only what we really need for 'build' platform - there is new build-tools make target. The list of tools is in solenv/gbuild/extensions/pre_BuildTools.mk. Also similar is done to some extent for 'host' platform using gb_Module_add_targets_for_build which is ignored for 'host'. Change-Id: I6acd1762b16aca366aac1a0688500f27869cfca2
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/Module_comphelper.mk4
1 files changed, 1 insertions, 3 deletions
diff --git a/comphelper/Module_comphelper.mk b/comphelper/Module_comphelper.mk
index 004c02b12be2..57f1e224a5f1 100644
--- a/comphelper/Module_comphelper.mk
+++ b/comphelper/Module_comphelper.mk
@@ -20,15 +20,13 @@
$(eval $(call gb_Module_Module,comphelper))
$(eval $(call gb_Module_add_targets,comphelper,\
- Package_inc \
Library_comphelper \
+ Package_inc \
))
-ifneq ($(OOO_JUNIT_JAR),)
$(eval $(call gb_Module_add_subsequentcheck_targets,comphelper,\
JunitTest_comphelper_complex \
))
-endif
$(eval $(call gb_Module_add_check_targets,comphelper,\
CppunitTest_comphelper_test \
ss='upd'>desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx2
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx4
-rw-r--r--desktop/source/deployment/misc/lockfile.cxx4
7 files changed, 40 insertions, 21 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 6be6d6139bfa..6396a239f3cb 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2070,7 +2070,7 @@ void Desktop::OpenClients()
#if defined UNX
aHelpURLBuffer.append("&System=UNX");
#elif defined WNT
- aHelpURLBuffer.appendAscii("&System=WIN");
+ aHelpURLBuffer.append("&System=WIN");
#endif
Application::GetHelp()->Start(
aHelpURLBuffer.makeStringAndClear(), nullptr);
@@ -2664,7 +2664,7 @@ void Desktop::CheckFirstRun( )
HKEY hKey;
if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, "Software\\LibreOffice", &hKey ) )
{
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("RunQuickstartAtFirstStart"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
+ if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("RunQuickstartAtFirstStart"), nullptr, nullptr, reinterpret_cast<LPBYTE>(szValue), &nValueSize ) )
{
css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
css::office::Quickstart::createAutoStart(xContext, true/*Quickstart*/, true/*bAutostart*/);
diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx
index a674b5e156d1..c8226c6d3bbc 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -173,12 +173,12 @@ namespace desktop
RTL_TEXTENCODING_ASCII_US).getStr());
#else
// rest gets a dialog box
- CmdlineHelpDialog aDlg;
- aDlg.m_pftHead->SetText(aHelpMessage_version + aHelpMessage_head);
- aDlg.m_pftLeft->SetText(aHelpMessage_left);
- aDlg.m_pftRight->SetText(aHelpMessage_right);
- aDlg.m_pftBottom->SetText(aHelpMessage_bottom);
- aDlg.Execute();
+ ScopedVclPtrInstance<CmdlineHelpDialog> aDlg;
+ aDlg->m_pftHead->SetText(aHelpMessage_version + aHelpMessage_head);
+ aDlg->m_pftLeft->SetText(aHelpMessage_left);
+ aDlg->m_pftRight->SetText(aHelpMessage_right);
+ aDlg->m_pftBottom->SetText(aHelpMessage_bottom);
+ aDlg->Execute();
#endif
}
@@ -190,24 +190,38 @@ namespace desktop
fprintf(stdout, "%s", OUStringToOString(aVersionMsg, RTL_TEXTENCODING_ASCII_US).getStr());
#else
// Just re-use the help dialog for now.
- CmdlineHelpDialog aDlg;
- aDlg.m_pftHead->SetText(aVersionMsg);
- aDlg.m_pftLeft->SetText("");
- aDlg.m_pftRight->SetText("");
- aDlg.m_pftBottom->SetText("");
- aDlg.Execute();
+ ScopedVclPtrInstance<CmdlineHelpDialog> aDlg;
+ aDlg->m_pftHead->SetText(aVersionMsg);
+ aDlg->m_pftLeft->SetText("");
+ aDlg->m_pftRight->SetText("");
+ aDlg->m_pftBottom->SetText("");
+ aDlg->Execute();
#endif
}
#ifndef UNX
CmdlineHelpDialog::CmdlineHelpDialog()
- : ModalDialog( NULL, "CmdLineHelp", "desktop/ui/cmdlinehelp.ui" )
+ : ModalDialog( nullptr, "CmdLineHelp", "desktop/ui/cmdlinehelp.ui" )
{
get(m_pftHead, "header");
get(m_pftLeft, "left");
get(m_pftRight, "right");
get(m_pftBottom, "bottom");
}
+
+ CmdlineHelpDialog::~CmdlineHelpDialog()
+ {
+ disposeOnce();
+ }
+
+ void CmdlineHelpDialog::dispose()
+ {
+ m_pftHead.disposeAndClear();
+ m_pftLeft.disposeAndClear();
+ m_pftRight.disposeAndClear();
+ m_pftBottom.disposeAndClear();
+ ModalDialog::dispose();
+ }
#endif
}
diff --git a/desktop/source/app/cmdlinehelp.hxx b/desktop/source/app/cmdlinehelp.hxx
index d7b7233ab3ac..cbf1da41c35a 100644
--- a/desktop/source/app/cmdlinehelp.hxx
+++ b/desktop/source/app/cmdlinehelp.hxx
@@ -34,10 +34,15 @@ namespace desktop
public:
CmdlineHelpDialog();
+ ~CmdlineHelpDialog() override;
+
VclPtr<FixedText> m_pftHead;
VclPtr<FixedText> m_pftLeft;
VclPtr<FixedText> m_pftRight;
VclPtr<FixedText> m_pftBottom;
+
+ private:
+ void dispose() override;
};
#endif
}
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index a5be36c03789..7a2fd4624a58 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -1136,7 +1136,7 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) {
#if defined UNX
aHelpURLBuffer.append("&System=UNX");
#elif defined WNT
- aHelpURLBuffer.appendAscii("&System=WIN");
+ aHelpURLBuffer.append("&System=WIN");
#endif
ApplicationEvent* pAppEvent = new ApplicationEvent(
ApplicationEvent::Type::OpenHelpUrl,
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 7105f899f384..8409ca9bcf1c 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -682,7 +682,7 @@ void ExtensionCmdQueue::Thread::execute()
//Needed for use of the service "com.sun.star.system.SystemShellExecute" in
//DialogHelper::openWebBrowser
CoUninitialize();
- (void) CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+ (void) CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
#endif
for (;;)
{
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 3bb4ec041a40..01f1ab95dca1 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -471,7 +471,7 @@ void writeConsoleWithStream(OUString const & sText, HANDLE stream)
{
DWORD nWrittenChars = 0;
WriteFile(stream, sText.getStr(),
- sText.getLength() * 2, &nWrittenChars, NULL);
+ sText.getLength() * 2, &nWrittenChars, nullptr);
}
#else
void writeConsoleWithStream(OUString const & sText, FILE * stream)
@@ -506,7 +506,7 @@ OUString readConsole()
sal_Unicode aBuffer[1024];
DWORD dwRead = 0;
//unopkg.com feeds unopkg.exe with wchar_t|s
- if (ReadFile( GetStdHandle(STD_INPUT_HANDLE), &aBuffer, sizeof(aBuffer), &dwRead, NULL ) )
+ if (ReadFile( GetStdHandle(STD_INPUT_HANDLE), &aBuffer, sizeof(aBuffer), &dwRead, nullptr ) )
{
OSL_ASSERT((dwRead % 2) == 0);
OUString value( aBuffer, dwRead / 2);
diff --git a/desktop/source/deployment/misc/lockfile.cxx b/desktop/source/deployment/misc/lockfile.cxx
index f33cd703fa5d..fa30bf256fee 100644
--- a/desktop/source/deployment/misc/lockfile.cxx
+++ b/desktop/source/deployment/misc/lockfile.cxx
@@ -46,9 +46,9 @@ static OString impl_getHostname()
prevent windows from connecting to the net to get its own
hostname by using the netbios name
*/
- sal_Int32 sz = MAX_COMPUTERNAME_LENGTH + 1;
+ DWORD sz = MAX_COMPUTERNAME_LENGTH + 1;
char* szHost = new char[sz];
- if (GetComputerName(szHost, (LPDWORD)&sz))
+ if (GetComputerName(szHost, &sz))
aHost = OString(szHost);
else
aHost = OString("UNKNOWN");