Kaydet (Commit) a6ab5fa0 authored tarafından Michael Stahl's avatar Michael Stahl

Revert "svidl: write dependencies with cygwin paths"

This reverts commit a042c2a6.

A GNU make that understands native Win32 paths is required now anyway,
so revert this.

Conflicts:
	idl/source/prj/database.cxx

Change-Id: I6eb77d4b02728269f8dc484444df0cabc8c29b3e
üst aee01f80
......@@ -833,49 +833,6 @@ void SvIdlDataBase::AddDepFile(String const& rFileName)
m_DepFiles.insert(rFileName);
}
#ifdef WNT
static OString
lcl_ConvertToCygwin(OString const& rString)
{
sal_Int32 i = 0;
sal_Int32 const len = rString.getLength();
OStringBuffer buf(len + 16);
if ((2 <= len) && (':' == rString[1]))
{
buf.append("/cygdrive/");
buf.append(static_cast<sal_Char>(tolower(rString[0])));
i = 2;
}
for (; i < len; ++i)
{
sal_Char const c(rString[i]);
switch (c)
{
case '\\':
buf.append('/');
break;
case ' ':
buf.append("\\ ");
break;
default:
buf.append(c);
break;
}
}
return buf.makeStringAndClear();
}
#endif
static OString
lcl_Convert(OUString const& rString)
{
return
#ifdef WNT
lcl_ConvertToCygwin
#endif
(OUStringToOString(rString, RTL_TEXTENCODING_UTF8));
}
struct WriteDep
{
SvFileStream & m_rStream;
......@@ -883,14 +840,14 @@ struct WriteDep
void operator() (OUString const& rItem)
{
m_rStream << " \\\n ";
m_rStream << lcl_Convert(rItem).getStr();
m_rStream << OUStringToOString(rItem, RTL_TEXTENCODING_UTF8).getStr();
}
};
bool SvIdlDataBase::WriteDepFile(
SvFileStream & rStream, OUString const& rTarget)
{
rStream << lcl_Convert(rTarget).getStr();
rStream << OUStringToOString(rTarget, RTL_TEXTENCODING_UTF8).getStr();
rStream << " :";
::std::for_each(m_DepFiles.begin(), m_DepFiles.end(), WriteDep(rStream));
return rStream.GetError() == SVSTREAM_OK;
......
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