summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-19 23:21:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-20 11:01:54 +0100
commit5b5cd50a9b5e3c20937e4d4c0d0ecdbf2e1bf9fc (patch)
tree4cca865d53bc5e7056f7ea5baac6ee5c128a2fc9 /framework
parent157c4bd6fd142cf08f14330e6aaf57efbe55c48b (diff)
ByteString -> rtl::OStringBuffer
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/macros/generic.hxx14
-rw-r--r--framework/source/helper/persistentwindowstate.cxx4
-rw-r--r--framework/source/inc/pattern/window.hxx6
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx22
-rw-r--r--framework/source/loadenv/loadenv.cxx2
5 files changed, 19 insertions, 29 deletions
diff --git a/framework/inc/macros/generic.hxx b/framework/inc/macros/generic.hxx
index 86a5048055..d3f1af48bd 100644
--- a/framework/inc/macros/generic.hxx
+++ b/framework/inc/macros/generic.hxx
@@ -53,11 +53,9 @@ ________________________________________________________________________________
/*_________________________________________________________________________________________________________________
U2B( SUNICODEVALUE )
B2U( SASCIIVALUE )
- U2B_ENC( SUNICODEVALUE, AENCODING )
- B2U_ENC( SASCIIVALUE, AENCODING )
Use it to convert unicode strings to ascii values and reverse ...
- We use UTF8 as default textencoding. If you will change this use U2B_ENC and B2U_ENC!
+ We use UTF8 as default textencoding.
_________________________________________________________________________________________________________________*/
#define U2B( SUNICODEVALUE ) \
@@ -66,16 +64,6 @@ ________________________________________________________________________________
#define B2U( SASCIIVALUE ) \
::rtl::OStringToOUString( SASCIIVALUE, RTL_TEXTENCODING_UTF8 )
-#define U2B_ENC( SUNICODEVALUE, AENCODING ) \
- ::rtl::OUStringToOString( SUNICODEVALUE, AENCODING )
-
-#define B2U_ENC( SASCIIVALUE, AENCODING ) \
- ::rtl::OStringToOUString( SASCIIVALUE, AENCODING )
-
-//*****************************************************************************************************************
-// end of file
-//*****************************************************************************************************************
-
#endif // #ifndef __FRAMEWORK_MACROS_GENERIC_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 1e09aadaa1..e03c6a3e0c 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -297,7 +297,7 @@ void PersistentWindowState::implst_setWindowStateOnConfig(const css::uno::Refere
{
sal_uLong nMask = WINDOWSTATE_MASK_ALL;
nMask &= ~(WINDOWSTATE_MASK_MINIMIZED);
- sWindowState = B2U_ENC(
+ sWindowState = rtl::OStringToOUString(
((SystemWindow*)pWindow)->GetWindowState(nMask),
RTL_TEXTENCODING_UTF8);
}
@@ -341,7 +341,7 @@ void PersistentWindowState::implst_setWindowStateOnWindow(const css::uno::Refere
::rtl::OUString sOldWindowState = ::rtl::OStringToOUString( pSystemWindow->GetWindowState(), RTL_TEXTENCODING_ASCII_US );
if ( sOldWindowState != sWindowState )
- pSystemWindow->SetWindowState(U2B_ENC(sWindowState,RTL_TEXTENCODING_UTF8));
+ pSystemWindow->SetWindowState(rtl::OUStringToOString(sWindowState,RTL_TEXTENCODING_UTF8));
// <- SOLAR SAFE ------------------------
}
diff --git a/framework/source/inc/pattern/window.hxx b/framework/source/inc/pattern/window.hxx
index da45461a2f..f5003391e8 100644
--- a/framework/source/inc/pattern/window.hxx
+++ b/framework/source/inc/pattern/window.hxx
@@ -72,7 +72,7 @@ static ::rtl::OUString getWindowState(const css::uno::Reference< css::awt::XWind
if (!xWindow.is())
return ::rtl::OUString();
- ByteString sWindowState;
+ rtl::OString sWindowState;
// SOLAR SAFE -> ----------------------------
{
SolarMutexGuard aSolarGuard;
@@ -88,7 +88,7 @@ static ::rtl::OUString getWindowState(const css::uno::Reference< css::awt::XWind
}
// <- SOLAR SAFE ----------------------------
- return B2U_ENC(sWindowState,RTL_TEXTENCODING_UTF8);
+ return rtl::OStringToOUString(sWindowState,RTL_TEXTENCODING_UTF8);
}
//-----------------------------------------------
@@ -116,7 +116,7 @@ static void setWindowState(const css::uno::Reference< css::awt::XWindow >& xWind
)
)
{
- ((SystemWindow*)pWindow)->SetWindowState(U2B_ENC(sWindowState,RTL_TEXTENCODING_UTF8));
+ ((SystemWindow*)pWindow)->SetWindowState(OUStringToOString(sWindowState,RTL_TEXTENCODING_UTF8));
}
// <- SOLAR SAFE ----------------------------
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 52a8498fd0..8d0eed4ccb 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -93,6 +93,8 @@
#include <rtl/instance.hxx>
#include <unotools/cmdoptions.hxx>
+#include <rtl/strbuf.hxx>
+
#include <algorithm>
#include <boost/bind.hpp>
@@ -2313,11 +2315,11 @@ throw (RuntimeException)
RTL_LOGFILE_TRACE1( "framework (cd100003) ::LayoutManager::lock lockCount=%d", nLockCount );
#ifdef DBG_UTIL
- ByteString aStr("LayoutManager::lock ");
- aStr += ByteString::CreateFromInt32((long)this);
- aStr += " - ";
- aStr += ByteString::CreateFromInt32(nLockCount);
- OSL_TRACE( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("LayoutManager::lock "));
+ aStr.append(reinterpret_cast<sal_Int64>(this));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(" - "));
+ aStr.append(nLockCount);
+ OSL_TRACE(aStr.getStr());
#endif
Any a( nLockCount );
@@ -2335,11 +2337,11 @@ throw (RuntimeException)
RTL_LOGFILE_TRACE1( "framework (cd100003) ::LayoutManager::unlock lockCount=%d", nLockCount );
#ifdef DBG_UTIL
- ByteString aStr("LayoutManager::unlock ");
- aStr += ByteString::CreateFromInt32((long)this);
- aStr += " - ";
- aStr += ByteString::CreateFromInt32(nLockCount);
- OSL_TRACE( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("LayoutManager::unlock "));
+ aStr.append(reinterpret_cast<sal_Int64>(this));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(" - "));
+ aStr.append(nLockCount);
+ OSL_TRACE(aStr.getStr());
#endif
// conform to documentation: unlock with lock count == 0 means force a layout
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 49c28d6ea2..b1854ac52e 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1794,7 +1794,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
return;
SystemWindow* pSystemWindow = (SystemWindow*)pWindowCheck;
- pSystemWindow->SetWindowState(U2B_ENC(sWindowState,RTL_TEXTENCODING_UTF8));
+ pSystemWindow->SetWindowState(rtl::OUStringToOString(sWindowState,RTL_TEXTENCODING_UTF8));
// <- SOLAR SAFE
}
}