[Libreoffice-commits] .: 2 commits - solenv/gbuild svtools/source svx/source vcl/inc vcl/win
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Nov 30 05:06:25 PST 2011
solenv/gbuild/extensions/post_BuildplTargets.mk | 16 ++++++++--------
svtools/source/misc/transfer.cxx | 17 +++++++++--------
svx/source/dialog/sendreportw32.cxx | 5 +++--
vcl/inc/win/saldata.hxx | 2 +-
vcl/win/source/app/saldata.cxx | 6 +++---
5 files changed, 24 insertions(+), 22 deletions(-)
New commits:
commit 66a2598e164e2003bed045f03e9ed6c0921f7f2b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 30 10:38:17 2011 +0000
convert over hidden windows-only ByteStrings
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 9cf2990..aac7126 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -927,14 +927,15 @@ sal_Bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk,
memset( &rFDesc1, 0, sizeof( FILEDESCRIPTOR ) );
rFDesc1.dwFlags = FD_LINKUI;
- ByteString aStr( rBmk.GetDescription(), eSysCSet );
- for( sal_uInt16 nChar = 0; nChar < aStr.Len(); ++nChar )
- if( strchr( "\\/:*?\"<>|", aStr.GetChar( nChar ) ) )
- aStr.Erase( nChar--, 1 );
-
- aStr.Insert( "Shortcut to ", 0 );
- aStr += ".URL";
- strcpy( rFDesc1.cFileName, aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(rtl::OUStringToOString(
+ rBmk.GetDescription(), eSysCSet));
+ for( sal_uInt16 nChar = 0; nChar < aStr.getLength(); ++nChar )
+ if( strchr( "\\/:*?\"<>|", aStr[nChar] ) )
+ aStr.remove(nChar--, 1);
+
+ aStr.insert(0, RTL_CONSTASCII_STRINGPARAM("Shortcut to "));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(".URL"));
+ strcpy( rFDesc1.cFileName, aStr.getStr() );
maAny <<= aSeq;
}
diff --git a/svx/source/dialog/sendreportw32.cxx b/svx/source/dialog/sendreportw32.cxx
index 4f2a45c..514fd46 100644
--- a/svx/source/dialog/sendreportw32.cxx
+++ b/svx/source/dialog/sendreportw32.cxx
@@ -203,9 +203,10 @@ namespace svx{
if ( fp )
{
- ByteString strUTF8( GetUsing(), RTL_TEXTENCODING_UTF8 );
+ rtl::OString strUTF8(rtl::OUStringToOString(GetUsing(),
+ RTL_TEXTENCODING_UTF8));
- fwrite( strUTF8.GetBuffer(), 1, strUTF8.Len(), fp );
+ fwrite( strUTF8.getStr(), 1, strUTF8.getLength(), fp );
fclose( fp );
}
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index 7450af0..2d6bbf1 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -245,7 +245,7 @@ bool ImplIsFontAvailable( HDC hDC, const UniString& rName );
// \WIN\SOURCE\APP\SALDATA.CXX
rtl_TextEncoding ImplSalGetSystemEncoding();
-ByteString ImplSalGetWinAnsiString( const UniString& rStr, sal_Bool bFileName = FALSE );
+rtl::OString ImplSalGetWinAnsiString( const UniString& rStr, sal_Bool bFileName = FALSE );
UniString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen = STRING_LEN );
int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 );
diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx
index 0fd4cf7..854849f 100644
--- a/vcl/win/source/app/saldata.cxx
+++ b/vcl/win/source/app/saldata.cxx
@@ -53,12 +53,12 @@ rtl_TextEncoding ImplSalGetSystemEncoding()
// -----------------------------------------------------------------------
-ByteString ImplSalGetWinAnsiString( const UniString& rStr, sal_Bool bFileName )
+rtl::OString ImplSalGetWinAnsiString( const UniString& rStr, sal_Bool bFileName )
{
rtl_TextEncoding eEncoding = ImplSalGetSystemEncoding();
if ( bFileName )
{
- return ByteString( rStr, eEncoding,
+ return rtl::OUStringToOString( rStr, eEncoding,
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_UNDERLINE |
RTL_UNICODETOTEXT_FLAGS_INVALID_UNDERLINE |
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE |
@@ -67,7 +67,7 @@ ByteString ImplSalGetWinAnsiString( const UniString& rStr, sal_Bool bFileName )
}
else
{
- return ByteString( rStr, eEncoding,
+ return rtl::OUStringToOString( rStr, eEncoding,
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |
RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT |
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE |
commit bc340ff02dcc519dc4fa7770c3da6140048108c8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 30 10:05:43 2011 +0000
get findunusedcode target working
diff --git a/solenv/gbuild/extensions/post_BuildplTargets.mk b/solenv/gbuild/extensions/post_BuildplTargets.mk
index a053420..7e9b898 100644
--- a/solenv/gbuild/extensions/post_BuildplTargets.mk
+++ b/solenv/gbuild/extensions/post_BuildplTargets.mk
@@ -1,4 +1,4 @@
-# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
@@ -74,17 +74,18 @@ cross_toolset: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded
findunusedcode:
@which callcatcher > /dev/null 2>&1 || \
(echo "callcatcher not installed" && false)
+ @sed -e s,$(INPATH),callcatcher,g $(SRCDIR)/Env.Host.sh > $(SRCDIR)/Env.callcatcher.sh
@mkdir -p $(SRCDIR)/solenv/callcatcher/bin && \
ln -sf $(SRCDIR)/solenv/$(INPATH)/bin/dmake \
$(SRCDIR)/solenv/callcatcher/bin/dmake && \
- source <(sed -e s,$(INPATH),callcatcher,g $(SRCDIR)/Env.Host.sh) && \
+ source $(SRCDIR)/Env.callcatcher.sh && \
source $(SRCDIR)/solenv/bin/callcatchEnv.Set.sh && \
$(call gb_BuildplTarget_command,instsetoo_native,--all)
- @source <(sed -e s,$(INPATH),callcatcher,g $(SRCDIR)/Env.Host.sh) && \
+ @source $(SRCDIR)/Env.callcatcher.sh && \
callanalyse \
- $(WORKDIR)/LinkTarget/*/* \
- */$(OUTPATH)/bin/* \
- */$(OUTPATH)/lib/* > unusedcode.all
+ $$WORKDIR/LinkTarget/*/* \
+ */$$OUTPATH/bin/* \
+ */$$OUTPATH/lib/* > unusedcode.all
#because non-c++ symbols could be dlsymed lets make a list of class level
#unused methods which don't require much effort to determine if they need
#to be just removed, or put behind appropiate platform or debug level ifdefs
@@ -98,5 +99,4 @@ build: instsetoo_native
endif # gb_PARTIALBUILD
-# vim:set shiftwidth=4 softtabstop=4 noexpandtab:
-
+# vim: set noet sw=4:
More information about the Libreoffice-commits
mailing list