readUnicodeString can just return the string
seeing as no-one checks the return value, we don't need the intermediate temporary string
This commit is contained in:
parent
723613ab5c
commit
e443216ce2
@ -213,7 +213,7 @@ DlgEditor::DlgEditor( const ::com::sun::star::uno::Reference< ::com::sun::star::
|
||||
|
||||
SdrLayerAdmin& rAdmin = pDlgEdModel->GetLayerAdmin();
|
||||
rAdmin.NewLayer( rAdmin.GetControlLayerName() );
|
||||
rAdmin.NewLayer( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "HiddenLayer" ) ) );
|
||||
rAdmin.NewLayer( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenLayer")) );
|
||||
|
||||
pDlgEdPage = new DlgEdPage( *pDlgEdModel );
|
||||
pDlgEdModel->InsertPage( pDlgEdPage );
|
||||
@ -270,7 +270,7 @@ void DlgEditor::SetWindow( Window* pWindow_ )
|
||||
|
||||
pDlgEdView = new DlgEdView( pDlgEdModel, pWindow_, this );
|
||||
pDlgEdView->ShowSdrPage(pDlgEdView->GetModel()->GetPage(0));
|
||||
pDlgEdView->SetLayerVisible( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "HiddenLayer" ) ), sal_False );
|
||||
pDlgEdView->SetLayerVisible( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenLayer")), sal_False );
|
||||
pDlgEdView->SetMoveSnapOnlyTopLeft( sal_True );
|
||||
pDlgEdView->SetWorkArea( Rectangle( Point( 0, 0 ), pDlgEdPage->GetSize() ) );
|
||||
|
||||
|
@ -748,17 +748,19 @@ namespace cppcanvas
|
||||
filter.ImportGraphic (graphic, String (), mfStream);
|
||||
|
||||
// debug code - write the stream to debug file /tmp/emf-stream.emf
|
||||
EMFP_DEBUG(mfStream.Seek(0);
|
||||
static int emfp_debug_stream_numnber = 0;
|
||||
UniString emfp_debug_filename = UniString::CreateFromAscii( "/tmp/emf-embedded-stream" );
|
||||
emfp_debug_filename.Append( UniString::CreateFromInt32( emfp_debug_stream_numnber++ ));
|
||||
emfp_debug_filename.Append( UniString::CreateFromAscii( ".emf" ));
|
||||
EMFP_DEBUG(
|
||||
mfStream.Seek(0);
|
||||
static int emfp_debug_stream_numnber = 0;
|
||||
rtl::OUString emfp_debug_filename("/tmp/emf-embedded-stream");
|
||||
emfp_debug_filename += rtl::OUString::valueOf(emfp_debug_stream_numnber++);
|
||||
emfp_debug_filename += rtl::OUString(".emf");
|
||||
|
||||
SvFileStream file( emfp_debug_filename, STREAM_WRITE | STREAM_TRUNC );
|
||||
SvFileStream file( emfp_debug_filename, STREAM_WRITE | STREAM_TRUNC );
|
||||
|
||||
mfStream >> file;
|
||||
file.Flush();
|
||||
file.Close());
|
||||
mfStream >> file;
|
||||
file.Flush();
|
||||
file.Close()
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -766,33 +768,33 @@ namespace cppcanvas
|
||||
struct EMFPFont : public EMFPObject
|
||||
{
|
||||
sal_uInt32 version;
|
||||
float emSize;
|
||||
sal_uInt32 sizeUnit;
|
||||
sal_Int32 fontFlags;
|
||||
rtl::OUString family;
|
||||
float emSize;
|
||||
sal_uInt32 sizeUnit;
|
||||
sal_Int32 fontFlags;
|
||||
rtl::OUString family;
|
||||
|
||||
void Read (SvMemoryStream &s)
|
||||
{
|
||||
sal_uInt32 header;
|
||||
sal_uInt32 reserved;
|
||||
sal_uInt32 length;
|
||||
sal_uInt32 reserved;
|
||||
sal_uInt32 length;
|
||||
|
||||
s >> header >> emSize >> sizeUnit >> fontFlags >> reserved >> length;
|
||||
|
||||
OSL_ASSERT( ( header >> 12 ) == 0xdbc01 );
|
||||
OSL_ASSERT( ( header >> 12 ) == 0xdbc01 );
|
||||
|
||||
EMFP_DEBUG (printf ("EMF+\tfont\nEMF+\theader: 0x%08x version: 0x%08x size: %f unit: 0x%08x\n",(unsigned int) header >> 12, (unsigned int)header & 0x1fff, emSize, (unsigned int)sizeUnit));
|
||||
EMFP_DEBUG (printf ("EMF+\tflags: 0x%08x reserved: 0x%08x length: 0x%08x\n", (unsigned int)fontFlags, (unsigned int)reserved, (unsigned int)length));
|
||||
|
||||
if( length > 0 && length < 0x4000 ) {
|
||||
sal_Unicode *chars = (sal_Unicode *) alloca( sizeof( sal_Unicode ) * length );
|
||||
if( length > 0 && length < 0x4000 ) {
|
||||
sal_Unicode *chars = (sal_Unicode *) alloca( sizeof( sal_Unicode ) * length );
|
||||
|
||||
for( sal_uInt32 i = 0; i < length; i++ )
|
||||
s >> chars[ i ];
|
||||
for( sal_uInt32 i = 0; i < length; i++ )
|
||||
s >> chars[ i ];
|
||||
|
||||
family = ::rtl::OUString( chars, length );
|
||||
EMFP_DEBUG (printf ("EMF+\tfamily: %s\n", rtl::OUStringToOString( family, RTL_TEXTENCODING_UTF8).getStr()));
|
||||
}
|
||||
family = ::rtl::OUString( chars, length );
|
||||
EMFP_DEBUG (printf ("EMF+\tfamily: %s\n", rtl::OUStringToOString( family, RTL_TEXTENCODING_UTF8).getStr()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -893,7 +895,7 @@ namespace cppcanvas
|
||||
|
||||
rState.isFillColorSet = true;
|
||||
rState.isLineColorSet = false;
|
||||
SET_FILL_COLOR(brushIndexOrColor);
|
||||
SET_FILL_COLOR(brushIndexOrColor);
|
||||
|
||||
pPolyAction = ActionSharedPtr ( internal::PolyPolyActionFactory::createPolyPolyAction( localPolygon, rParms.mrCanvas, rState ) );
|
||||
|
||||
|
@ -34,9 +34,9 @@
|
||||
|
||||
// forward ---------------------------------------------------------------
|
||||
|
||||
#define CUI_MGR() (*CuiResMgr::GetResMgr())
|
||||
#define CUI_MGR() (*CuiResMgr::GetResMgr())
|
||||
#define CUI_RES(i) ResId(i,CUI_MGR())
|
||||
#define CUI_RESSTR(i) UniString(ResId(i,CUI_MGR()))
|
||||
#define CUI_RESSTR(i) ResId::toString(ResId(i,CUI_MGR()))
|
||||
|
||||
class ResMgr;
|
||||
struct CuiResMgr
|
||||
|
@ -601,7 +601,7 @@ sal_Bool EdtAutoCorrDoc::SetAttr( sal_uInt16 nStt, sal_uInt16 nEnd,
|
||||
{
|
||||
SfxItemPool* pPool = &pImpEE->GetEditDoc().GetItemPool();
|
||||
while ( pPool->GetSecondaryPool() &&
|
||||
!pPool->GetName().EqualsAscii( "EditEngineItemPool" ) )
|
||||
!pPool->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EditEngineItemPool")) )
|
||||
{
|
||||
pPool = pPool->GetSecondaryPool();
|
||||
|
||||
|
@ -169,12 +169,14 @@ EditPaM ImpEditEngine::ReadRTF( SvStream& rInput, EditSelection aSel )
|
||||
// The SvRTF parser expects the Which-mapping passed on in the pool, not
|
||||
// dependant on a secondary.
|
||||
SfxItemPool* pPool = &aEditDoc.GetItemPool();
|
||||
while ( pPool->GetSecondaryPool() && !pPool->GetName().EqualsAscii( "EditEngineItemPool" ) )
|
||||
while (pPool->GetSecondaryPool() && !pPool->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EditEngineItemPool")))
|
||||
{
|
||||
pPool = pPool->GetSecondaryPool();
|
||||
|
||||
}
|
||||
DBG_ASSERT( pPool && pPool->GetName().EqualsAscii( "EditEngineItemPool" ), "ReadRTF: no EditEnginePool!" );
|
||||
|
||||
DBG_ASSERT(pPool && pPool->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EditEngineItemPool")),
|
||||
"ReadRTF: no EditEnginePool!");
|
||||
|
||||
EditRTFParserRef xPrsr = new EditRTFParser( rInput, aSel, *pPool, this );
|
||||
SvParserState eState = xPrsr->CallParser();
|
||||
|
@ -4108,7 +4108,7 @@ SvxBrushItem::SvxBrushItem( const CntWallpaperItem& rItem, sal_uInt16 _nWhich )
|
||||
{
|
||||
aColor = rItem.GetColor();
|
||||
|
||||
if( rItem.GetBitmapURL().Len() )
|
||||
if (!rItem.GetBitmapURL().isEmpty())
|
||||
{
|
||||
pStrLink = new String( rItem.GetBitmapURL() );
|
||||
SetGraphicPos( WallpaperStyle2GraphicPos((WallpaperStyle)rItem.GetStyle() ) );
|
||||
|
@ -1197,7 +1197,7 @@ SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ )
|
||||
|
||||
const SfxItemPool *pPool = SfxItemPool::GetStoringPool();
|
||||
const bool bStoreDefTabs = pPool
|
||||
&& pPool->GetName().EqualsAscii("SWG")
|
||||
&& pPool->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SWG"))
|
||||
&& ::IsDefaultItem( this );
|
||||
|
||||
const short nTabs = Count();
|
||||
|
@ -40,9 +40,9 @@ class SvStream;
|
||||
class SVL_DLLPUBLIC CntWallpaperItem : public SfxPoolItem
|
||||
{
|
||||
private:
|
||||
UniString _aURL;
|
||||
rtl::OUString _aURL;
|
||||
Color _nColor;
|
||||
sal_uInt16 _nStyle;
|
||||
sal_uInt16 _nStyle;
|
||||
|
||||
public:
|
||||
TYPEINFO();
|
||||
@ -64,13 +64,13 @@ public:
|
||||
virtual bool PutValue ( const com::sun::star::uno::Any& rVal,
|
||||
sal_uInt8 nMemberId = 0 );
|
||||
|
||||
void SetBitmapURL( const UniString& rURL ) { _aURL = rURL; }
|
||||
void SetBitmapURL( const rtl::OUString& rURL ) { _aURL = rURL; }
|
||||
void SetColor( Color nColor ) { _nColor = nColor; }
|
||||
void SetStyle( sal_uInt16 nStyle ) { _nStyle = nStyle; }
|
||||
|
||||
const UniString& GetBitmapURL() const { return _aURL; }
|
||||
const rtl::OUString& GetBitmapURL() const { return _aURL; }
|
||||
Color GetColor() const { return _nColor; }
|
||||
sal_uInt16 GetStyle() const { return _nStyle; }
|
||||
sal_uInt16 GetStyle() const { return _nStyle; }
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -106,10 +106,10 @@ struct CntHTTPCookie
|
||||
|
||||
void read (SvStream& rStrm, bool bUnicode)
|
||||
{
|
||||
SfxPoolItem::readUnicodeString(rStrm, m_aName, bUnicode);
|
||||
SfxPoolItem::readUnicodeString(rStrm, m_aValue, bUnicode);
|
||||
SfxPoolItem::readUnicodeString(rStrm, m_aDomain, bUnicode);
|
||||
SfxPoolItem::readUnicodeString(rStrm, m_aPath, bUnicode);
|
||||
m_aName = SfxPoolItem::readUnicodeString(rStrm, bUnicode);
|
||||
m_aValue = SfxPoolItem::readUnicodeString(rStrm, bUnicode);
|
||||
m_aDomain = SfxPoolItem::readUnicodeString(rStrm, bUnicode);
|
||||
m_aPath = SfxPoolItem::readUnicodeString(rStrm, bUnicode);
|
||||
|
||||
sal_uInt32 nValue = 0;
|
||||
rStrm >> nValue;
|
||||
|
@ -144,7 +144,7 @@ protected:
|
||||
public:
|
||||
SfxItemPool( const SfxItemPool &rPool,
|
||||
sal_Bool bCloneStaticDefaults = sal_False );
|
||||
SfxItemPool( const UniString &rName,
|
||||
SfxItemPool( const rtl::OUString &rName,
|
||||
sal_uInt16 nStart, sal_uInt16 nEnd,
|
||||
const SfxItemInfo *pItemInfos,
|
||||
SfxPoolItem **pDefaults = 0,
|
||||
@ -173,7 +173,7 @@ public:
|
||||
const IntlWrapper * pIntlWrapper
|
||||
= 0 ) const;
|
||||
virtual SfxItemPool* Clone() const;
|
||||
const UniString& GetName() const;
|
||||
const rtl::OUString& GetName() const;
|
||||
|
||||
virtual const SfxPoolItem& Put( const SfxPoolItem&, sal_uInt16 nWhich = 0 );
|
||||
virtual void Remove( const SfxPoolItem& );
|
||||
|
@ -245,7 +245,7 @@ public:
|
||||
|
||||
@return True if the string was successfuly read and reconstructed.
|
||||
*/
|
||||
static bool readByteString(SvStream & rStream, UniString & rString);
|
||||
static rtl::OUString readByteString(SvStream & rStream);
|
||||
|
||||
/** Write a byte string representation of a Unicode string into a stream.
|
||||
|
||||
@ -255,7 +255,7 @@ public:
|
||||
@param rString Some Unicode string.
|
||||
*/
|
||||
static void writeByteString(SvStream & rStream,
|
||||
UniString const & rString);
|
||||
const rtl::OUString& rString);
|
||||
|
||||
/** Read in a Unicode string from either a streamed Unicode or byte string
|
||||
representation.
|
||||
@ -263,15 +263,12 @@ public:
|
||||
@param rStream Some (input) stream. If bUnicode is false, its
|
||||
Stream/TargetCharSets must be set to correct values!
|
||||
|
||||
@param rString On success, returns the reconstructed Unicode string.
|
||||
|
||||
@param bUnicode Whether to read in a stream Unicode (true) or byte
|
||||
string (false) representation.
|
||||
|
||||
@return True if the string was successfuly read and reconstructed.
|
||||
@return On success, returns the reconstructed Unicode string.
|
||||
*/
|
||||
static bool readUnicodeString(SvStream & rStream, UniString & rString,
|
||||
bool bUnicode);
|
||||
static rtl::OUString readUnicodeString(SvStream & rStream, bool bUnicode);
|
||||
|
||||
/** Write a Unicode string representation of a Unicode string into a
|
||||
stream.
|
||||
@ -281,7 +278,7 @@ public:
|
||||
@param rString Some Unicode string.
|
||||
*/
|
||||
static void writeUnicodeString(SvStream & rStream,
|
||||
UniString const & rString);
|
||||
const rtl::OUString& rString);
|
||||
|
||||
private:
|
||||
SfxPoolItem& operator=( const SfxPoolItem& ); // n.i.!!
|
||||
|
@ -43,7 +43,6 @@ namespace com { namespace sun { namespace star {
|
||||
} } }
|
||||
namespace rtl { class OUString; }
|
||||
class CharClass;
|
||||
class UniString;
|
||||
|
||||
//============================================================================
|
||||
namespace URIHelper {
|
||||
@ -61,9 +60,9 @@ namespace URIHelper {
|
||||
existence (see URIHelper::GetMaybeFileHdl), or use bCheckFileExists = false
|
||||
if you want to generate file URLs without checking for their existence.
|
||||
*/
|
||||
SVL_DLLPUBLIC UniString
|
||||
SVL_DLLPUBLIC rtl::OUString
|
||||
SmartRel2Abs(INetURLObject const & rTheBaseURIRef,
|
||||
UniString const & rTheRelURIRef,
|
||||
rtl::OUString const & rTheRelURIRef,
|
||||
Link const & rMaybeFileHdl = Link(),
|
||||
bool bCheckFileExists = true,
|
||||
bool bIgnoreFragment = false,
|
||||
@ -133,8 +132,8 @@ SVL_DLLPUBLIC rtl::OUString simpleNormalizedMakeRelative(
|
||||
rtl::OUString const & baseUriReference, rtl::OUString const & uriReference);
|
||||
|
||||
//============================================================================
|
||||
SVL_DLLPUBLIC UniString
|
||||
FindFirstURLInText(UniString const & rText,
|
||||
SVL_DLLPUBLIC rtl::OUString
|
||||
FindFirstURLInText(rtl::OUString const & rText,
|
||||
xub_StrLen & rBegin,
|
||||
xub_StrLen & rEnd,
|
||||
CharClass const & rCharClass,
|
||||
@ -170,8 +169,8 @@ FindFirstURLInText(UniString const & rText,
|
||||
|
||||
@return The input URI with any password component removed.
|
||||
*/
|
||||
SVL_DLLPUBLIC UniString
|
||||
removePassword(UniString const & rURI,
|
||||
SVL_DLLPUBLIC rtl::OUString
|
||||
removePassword(rtl::OUString const & rURI,
|
||||
INetURLObject::EncodeMechanism eEncodeMechanism
|
||||
= INetURLObject::WAS_ENCODED,
|
||||
INetURLObject::DecodeMechanism eDecodeMechanism
|
||||
|
@ -77,7 +77,7 @@ struct SfxItemPool_Impl
|
||||
SfxBroadcaster aBC;
|
||||
std::vector<SfxPoolItemArray_Impl*> maPoolItems;
|
||||
std::vector<SfxItemPoolUser*> maSfxItemPoolUsers; /// ObjectUser section
|
||||
UniString aName;
|
||||
rtl::OUString aName;
|
||||
SfxPoolItem** ppPoolDefaults;
|
||||
SfxPoolItem** ppStaticDefaults;
|
||||
SfxItemPool* mpMaster;
|
||||
@ -98,7 +98,7 @@ struct SfxItemPool_Impl
|
||||
bool bStreaming; // in Load() bzw. Store()
|
||||
bool mbPersistentRefCounts;
|
||||
|
||||
SfxItemPool_Impl( SfxItemPool* pMaster, const UniString& rName, sal_uInt16 nStart, sal_uInt16 nEnd )
|
||||
SfxItemPool_Impl( SfxItemPool* pMaster, const rtl::OUString& rName, sal_uInt16 nStart, sal_uInt16 nEnd )
|
||||
: maPoolItems(nEnd - nStart + 1, static_cast<SfxPoolItemArray_Impl*>(NULL))
|
||||
, aName(rName)
|
||||
, ppPoolDefaults(new SfxPoolItem* [nEnd - nStart + 1])
|
||||
|
@ -54,7 +54,7 @@ CntWallpaperItem::CntWallpaperItem( sal_uInt16 which, SvStream& rStream, sal_uIn
|
||||
{
|
||||
// Okay, data were stored by CntWallpaperItem.
|
||||
|
||||
readUnicodeString(rStream, _aURL, nVersion >= 1);
|
||||
_aURL = readUnicodeString(rStream, nVersion >= 1);
|
||||
// !!! Color stream operators do not work - they discard any
|
||||
// transparency info !!!
|
||||
_nColor.Read( rStream, sal_True );
|
||||
@ -76,7 +76,7 @@ CntWallpaperItem::CntWallpaperItem( sal_uInt16 which, SvStream& rStream, sal_uIn
|
||||
}
|
||||
|
||||
// Read SfxWallpaperItem's string member _aURL.
|
||||
readUnicodeString(rStream, _aURL, false);
|
||||
_aURL = readUnicodeString(rStream, false);
|
||||
|
||||
// "Read" SfxWallpaperItem's string member _aFilter.
|
||||
read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rStream);
|
||||
|
@ -83,8 +83,7 @@ SfxPoolItem* CntContentTypeItem::Create( SvStream& rStream,
|
||||
{
|
||||
// CntContentTypeItem used to be derived from CntStringItem, so take that
|
||||
// into account:
|
||||
UniString aValue;
|
||||
readUnicodeString(rStream, aValue, nItemVersion >= 1);
|
||||
rtl::OUString aValue = readUnicodeString(rStream, nItemVersion >= 1);
|
||||
sal_uInt32 nMagic = 0;
|
||||
rStream >> nMagic;
|
||||
if (nMagic == CNTSTRINGITEM_STREAM_MAGIC)
|
||||
|
@ -103,10 +103,10 @@ SfxBroadcaster& SfxItemPool::BC()
|
||||
|
||||
SfxItemPool::SfxItemPool
|
||||
(
|
||||
UniString const & rName, /* Name des Pools zur Idetifikation
|
||||
const rtl::OUString& rName, /* Name des Pools zur Idetifikation
|
||||
im File-Format */
|
||||
sal_uInt16 nStartWhich, /* erste Which-Id des Pools */
|
||||
sal_uInt16 nEndWhich, /* letzte Which-Id des Pools */
|
||||
sal_uInt16 nStartWhich, /* erste Which-Id des Pools */
|
||||
sal_uInt16 nEndWhich, /* letzte Which-Id des Pools */
|
||||
const SfxItemInfo* pInfos, /* SID-Map und Item-Flags */
|
||||
SfxPoolItem** pDefaults, /* Pointer auf statische Defaults,
|
||||
wird direkt vom Pool referenziert,
|
||||
@ -452,7 +452,7 @@ void SfxItemPool::SetDefaultMetric( SfxMapUnit eNewMetric )
|
||||
pImp->eDefMetric = eNewMetric;
|
||||
}
|
||||
|
||||
const UniString& SfxItemPool::GetName() const
|
||||
const rtl::OUString& SfxItemPool::GetName() const
|
||||
{
|
||||
return pImp->aName;
|
||||
}
|
||||
|
@ -142,8 +142,8 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion )
|
||||
sal_uInt16 nCurKey, eType = STARBASIC;
|
||||
String aLibName, aMacName;
|
||||
rStrm >> nCurKey;
|
||||
SfxPoolItem::readByteString(rStrm, aLibName);
|
||||
SfxPoolItem::readByteString(rStrm, aMacName);
|
||||
aLibName = SfxPoolItem::readByteString(rStrm);
|
||||
aMacName = SfxPoolItem::readByteString(rStrm);
|
||||
|
||||
if( SVX_MACROTBL_VERSION40 <= nVersion )
|
||||
rStrm >> eType;
|
||||
|
@ -559,7 +559,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
|
||||
|
||||
// Einzel-Header
|
||||
int bOwnPool = sal_True;
|
||||
UniString aExternName;
|
||||
rtl::OUString aExternName;
|
||||
{
|
||||
// Header-Record suchen
|
||||
SfxMiniRecordReader aPoolHeaderRec( &rStream, SFX_ITEMPOOL_REC_HEADER );
|
||||
@ -571,7 +571,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
|
||||
|
||||
// Header-lesen
|
||||
rStream >> pImp->nLoadingVersion;
|
||||
SfxPoolItem::readByteString(rStream, aExternName);
|
||||
aExternName = SfxPoolItem::readByteString(rStream);
|
||||
bOwnPool = aExternName == pImp->aName;
|
||||
|
||||
//! solange wir keine fremden Pools laden k"onnen
|
||||
@ -714,7 +714,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
|
||||
|
||||
// wenn nicht own-Pool, dann kein Name
|
||||
if ( aExternName != pImp->aName )
|
||||
pImp->aName.Erase();
|
||||
pImp->aName = rtl::OUString();
|
||||
|
||||
pImp->bStreaming = sal_False;
|
||||
return rStream;
|
||||
@ -743,10 +743,10 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
|
||||
}
|
||||
sal_uInt32 nAttribSize(0);
|
||||
int bOwnPool = sal_True;
|
||||
UniString aExternName;
|
||||
rtl::OUString aExternName;
|
||||
if ( pImp->nMajorVer > 1 || pImp->nMinorVer >= 2 )
|
||||
rStream >> pImp->nLoadingVersion;
|
||||
SfxPoolItem::readByteString(rStream, aExternName);
|
||||
aExternName = SfxPoolItem::readByteString(rStream);
|
||||
bOwnPool = aExternName == pImp->aName;
|
||||
pImp->bStreaming = sal_True;
|
||||
|
||||
@ -1020,7 +1020,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
|
||||
}
|
||||
|
||||
if ( aExternName != pImp->aName )
|
||||
pImp->aName.Erase();
|
||||
pImp->aName = rtl::OUString();
|
||||
|
||||
pImp->bStreaming = sal_False;
|
||||
return rStream;
|
||||
@ -1092,7 +1092,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
|
||||
// auf jeden Fall aufgel"ost werden.
|
||||
if ( !pRefPool )
|
||||
pRefPool = this;
|
||||
bool bResolvable = pRefPool->GetName().Len() > 0;
|
||||
bool bResolvable = !pRefPool->GetName().isEmpty();
|
||||
if ( !bResolvable )
|
||||
{
|
||||
// Bei einem anders aufgebauten Pool im Stream, mu\s die SlotId
|
||||
|
@ -185,34 +185,29 @@ SvStream& SfxPoolItem::Store(SvStream &rStream, sal_uInt16 ) const
|
||||
|
||||
//============================================================================
|
||||
// static
|
||||
bool SfxPoolItem::readByteString(SvStream & rStream, UniString & rString)
|
||||
rtl::OUString SfxPoolItem::readByteString(SvStream& rStream)
|
||||
{
|
||||
rString = rStream.ReadUniOrByteString(rStream.GetStreamCharSet());
|
||||
return rStream.GetError() == ERRCODE_NONE;
|
||||
return rStream.ReadUniOrByteString(rStream.GetStreamCharSet());
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
// static
|
||||
void SfxPoolItem::writeByteString(SvStream & rStream,
|
||||
UniString const & rString)
|
||||
void SfxPoolItem::writeByteString(SvStream & rStream, const rtl::OUString& rString)
|
||||
{
|
||||
rStream.WriteUniOrByteString(rString, rStream.GetStreamCharSet());
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
// static
|
||||
bool SfxPoolItem::readUnicodeString(SvStream & rStream, UniString & rString,
|
||||
bool bUnicode)
|
||||
rtl::OUString SfxPoolItem::readUnicodeString(SvStream & rStream, bool bUnicode)
|
||||
{
|
||||
rString = rStream.ReadUniOrByteString(bUnicode ? RTL_TEXTENCODING_UCS2 :
|
||||
return rStream.ReadUniOrByteString(bUnicode ? RTL_TEXTENCODING_UCS2 :
|
||||
rStream.GetStreamCharSet());
|
||||
return rStream.GetError() == ERRCODE_NONE;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
// static
|
||||
void SfxPoolItem::writeUnicodeString(SvStream & rStream,
|
||||
UniString const & rString)
|
||||
void SfxPoolItem::writeUnicodeString(SvStream & rStream, const rtl::OUString& rString)
|
||||
{
|
||||
rStream.WriteUniOrByteString(rString, RTL_TEXTENCODING_UCS2);
|
||||
}
|
||||
|
@ -77,8 +77,8 @@ SfxPoolItem * SfxFontItem::Create(SvStream & rStream, sal_uInt16) const
|
||||
SfxFontItem * pItem = new SfxFontItem(Which());
|
||||
{
|
||||
VersionCompat aFontCompat(rStream, STREAM_READ);
|
||||
readByteString(rStream, pItem->m_aName);
|
||||
readByteString(rStream, pItem->m_aStyleName);
|
||||
pItem->m_aName = readByteString(rStream);
|
||||
pItem->m_aStyleName = readByteString(rStream);
|
||||
rStream >> pItem->m_aSize;
|
||||
sal_Int16 nCharSet = 0;
|
||||
rStream >> nCharSet;
|
||||
|
@ -102,7 +102,7 @@ SfxStringListItem::SfxStringListItem( sal_uInt16 which, SvStream& rStream ) :
|
||||
String aStr;
|
||||
for( i=0; i < nEntryCount; i++ )
|
||||
{
|
||||
readByteString(rStream, aStr);
|
||||
aStr = readByteString(rStream);
|
||||
pImp->aList.push_back(aStr);
|
||||
}
|
||||
}
|
||||
|
@ -41,8 +41,7 @@ TYPEINIT1_AUTOFACTORY(SfxStringItem, CntUnencodedStringItem)
|
||||
SfxStringItem::SfxStringItem(sal_uInt16 which, SvStream & rStream):
|
||||
CntUnencodedStringItem(which)
|
||||
{
|
||||
UniString aValue;
|
||||
readByteString(rStream, aValue);
|
||||
UniString aValue = readByteString(rStream);
|
||||
SetValue(aValue);
|
||||
}
|
||||
|
||||
|
@ -71,9 +71,9 @@ using namespace com::sun::star;
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
UniString
|
||||
rtl::OUString
|
||||
URIHelper::SmartRel2Abs(INetURLObject const & rTheBaseURIRef,
|
||||
UniString const & rTheRelURIRef,
|
||||
rtl::OUString const & rTheRelURIRef,
|
||||
Link const & rMaybeFileHdl,
|
||||
bool bCheckFileExists,
|
||||
bool bIgnoreFragment,
|
||||
@ -84,7 +84,7 @@ URIHelper::SmartRel2Abs(INetURLObject const & rTheBaseURIRef,
|
||||
INetURLObject::FSysStyle eStyle)
|
||||
{
|
||||
// Backwards compatibility:
|
||||
if (rTheRelURIRef.Len() != 0 && rTheRelURIRef.GetChar(0) == '#')
|
||||
if (!rTheRelURIRef.isEmpty() && rTheRelURIRef[0] == '#')
|
||||
return rTheRelURIRef;
|
||||
|
||||
INetURLObject aAbsURIRef;
|
||||
@ -508,8 +508,8 @@ sal_uInt32 scanDomain(UniString const & rStr, xub_StrLen * pPos,
|
||||
|
||||
}
|
||||
|
||||
UniString
|
||||
URIHelper::FindFirstURLInText(UniString const & rText,
|
||||
rtl::OUString
|
||||
URIHelper::FindFirstURLInText(rtl::OUString const & rText,
|
||||
xub_StrLen & rBegin,
|
||||
xub_StrLen & rEnd,
|
||||
CharClass const & rCharClass,
|
||||
@ -517,8 +517,8 @@ URIHelper::FindFirstURLInText(UniString const & rText,
|
||||
rtl_TextEncoding eCharset,
|
||||
INetURLObject::FSysStyle eStyle)
|
||||
{
|
||||
if (!(rBegin <= rEnd && rEnd <= rText.Len()))
|
||||
return UniString();
|
||||
if (!(rBegin <= rEnd && rEnd <= rText.getLength()))
|
||||
return rtl::OUString();
|
||||
|
||||
// Search for the first substring of [rBegin..rEnd[ that matches any of the
|
||||
// following productions (for which the appropriate style bit is set in
|
||||
@ -588,7 +588,7 @@ URIHelper::FindFirstURLInText(UniString const & rText,
|
||||
bool bBoundary2 = true;
|
||||
for (xub_StrLen nPos = rBegin; nPos != rEnd; nPos = nextChar(rText, nPos))
|
||||
{
|
||||
sal_Unicode c = rText.GetChar(nPos);
|
||||
sal_Unicode c = rText[nPos];
|
||||
if (bBoundary1)
|
||||
{
|
||||
if (INetMIME::isAlpha(c))
|
||||
@ -599,13 +599,13 @@ URIHelper::FindFirstURLInText(UniString const & rText,
|
||||
rEnd));
|
||||
if (eScheme == INET_PROT_FILE) // 2nd
|
||||
{
|
||||
while (rText.GetChar(i++) != ':') ;
|
||||
while (rText[i++] != ':') ;
|
||||
xub_StrLen nPrefixEnd = i;
|
||||
xub_StrLen nUriEnd = i;
|
||||
while (i != rEnd
|
||||
&& checkWChar(rCharClass, rText, &i, &nUriEnd, true,
|
||||
true)) ;
|
||||
if (i != nPrefixEnd && rText.GetChar(i) == '#')
|
||||
if (i != nPrefixEnd && rText[i] == '#')
|
||||
{
|
||||
++i;
|
||||
while (i != rEnd
|
||||
@ -629,12 +629,12 @@ URIHelper::FindFirstURLInText(UniString const & rText,
|
||||
}
|
||||
else if (eScheme != INET_PROT_NOT_VALID) // 1st
|
||||
{
|
||||
while (rText.GetChar(i++) != ':') ;
|
||||
while (rText[i++] != ':') ;
|
||||
xub_StrLen nPrefixEnd = i;
|
||||
xub_StrLen nUriEnd = i;
|
||||
while (i != rEnd
|
||||
&& checkWChar(rCharClass, rText, &i, &nUriEnd)) ;
|
||||
if (i != nPrefixEnd && rText.GetChar(i) == '#')
|
||||
if (i != nPrefixEnd && rText[i] == '#')
|
||||
{
|
||||
++i;
|
||||
while (i != rEnd
|
||||
@ -642,7 +642,7 @@ URIHelper::FindFirstURLInText(UniString const & rText,
|
||||
}
|
||||
if (nUriEnd != nPrefixEnd
|
||||
&& (isBoundary1(rCharClass, rText, nUriEnd, rEnd)
|
||||
|| rText.GetChar(nUriEnd) == '\\'))
|
||||
|| rText[nUriEnd] == '\\'))
|
||||
{
|
||||
INetURLObject aUri(UniString(rText, nPos,
|
||||
nUriEnd - nPos),
|
||||
@ -662,37 +662,37 @@ URIHelper::FindFirstURLInText(UniString const & rText,
|
||||
i = nPos;
|
||||
sal_uInt32 nLabels = scanDomain(rText, &i, rEnd);
|
||||
if (nLabels >= 3
|
||||
&& rText.GetChar(nPos + 3) == '.'
|
||||
&& (((rText.GetChar(nPos) == 'w'
|
||||
|| rText.GetChar(nPos) == 'W')
|
||||
&& (rText.GetChar(nPos + 1) == 'w'
|
||||
|| rText.GetChar(nPos + 1) == 'W')
|
||||
&& (rText.GetChar(nPos + 2) == 'w'
|
||||
|| rText.GetChar(nPos + 2) == 'W'))
|
||||
|| ((rText.GetChar(nPos) == 'f'
|
||||
|| rText.GetChar(nPos) == 'F')
|
||||
&& (rText.GetChar(nPos + 1) == 't'
|
||||
|| rText.GetChar(nPos + 1) == 'T')
|
||||
&& (rText.GetChar(nPos + 2) == 'p'
|
||||
|| rText.GetChar(nPos + 2) == 'P'))))
|
||||
&& rText[nPos + 3] == '.'
|
||||
&& (((rText[nPos] == 'w'
|
||||
|| rText[nPos] == 'W')
|
||||
&& (rText[nPos + 1] == 'w'
|
||||
|| rText[nPos + 1] == 'W')
|
||||
&& (rText[nPos + 2] == 'w'
|
||||
|| rText[nPos + 2] == 'W'))
|
||||
|| ((rText[nPos] == 'f'
|
||||
|| rText[nPos] == 'F')
|
||||
&& (rText[nPos + 1] == 't'
|
||||
|| rText[nPos + 1] == 'T')
|
||||
&& (rText[nPos + 2] == 'p'
|
||||
|| rText[nPos + 2] == 'P'))))
|
||||
// (note that rText.GetChar(nPos + 3) is guaranteed to be
|
||||
// valid)
|
||||
{
|
||||
xub_StrLen nUriEnd = i;
|
||||
if (i != rEnd && rText.GetChar(i) == '/')
|
||||
if (i != rEnd && rText[i] == '/')
|
||||
{
|
||||
nUriEnd = ++i;
|
||||
while (i != rEnd
|
||||
&& checkWChar(rCharClass, rText, &i, &nUriEnd)) ;
|
||||
}
|
||||
if (i != rEnd && rText.GetChar(i) == '#')
|
||||
if (i != rEnd && rText[i] == '#')
|
||||
{
|
||||
++i;
|
||||
while (i != rEnd
|
||||
&& checkWChar(rCharClass, rText, &i, &nUriEnd)) ;
|
||||
}
|
||||
if (isBoundary1(rCharClass, rText, nUriEnd, rEnd)
|
||||
|| rText.GetChar(nUriEnd) == '\\')
|
||||
|| rText[nUriEnd] == '\\')
|
||||
{
|
||||
INetURLObject aUri(UniString(rText, nPos,
|
||||
nUriEnd - nPos),
|
||||
@ -709,9 +709,9 @@ URIHelper::FindFirstURLInText(UniString const & rText,
|
||||
}
|
||||
|
||||
if ((eStyle & INetURLObject::FSYS_DOS) != 0 && rEnd - nPos >= 3
|
||||
&& rText.GetChar(nPos + 1) == ':'
|
||||
&& (rText.GetChar(nPos + 2) == '/'
|
||||
|| rText.GetChar(nPos + 2) == '\\')) // 7th, 8th
|
||||
&& rText[nPos + 1] == ':'
|
||||
&& (rText[nPos + 2] == '/'
|
||||
|| rText[nPos + 2] == '\\')) // 7th, 8th
|
||||
{
|
||||
i = nPos + 3;
|
||||
xub_StrLen nUriEnd = i;
|
||||
@ -736,12 +736,12 @@ URIHelper::FindFirstURLInText(UniString const & rText,
|
||||
}
|
||||
}
|
||||
else if ((eStyle & INetURLObject::FSYS_DOS) != 0 && rEnd - nPos >= 2
|
||||
&& rText.GetChar(nPos) == '\\'
|
||||
&& rText.GetChar(nPos + 1) == '\\') // 6th
|
||||
&& rText[nPos] == '\\'
|
||||
&& rText[nPos + 1] == '\\') // 6th
|
||||
{
|
||||
xub_StrLen i = nPos + 2;
|
||||
sal_uInt32 nLabels = scanDomain(rText, &i, rEnd);
|
||||
if (nLabels >= 1 && i != rEnd && rText.GetChar(i) == '\\')
|
||||
if (nLabels >= 1 && i != rEnd && rText[i] == '\\')
|
||||
{
|
||||
xub_StrLen nUriEnd = ++i;
|
||||
while (i != rEnd
|
||||
@ -771,7 +771,7 @@ URIHelper::FindFirstURLInText(UniString const & rText,
|
||||
bool bDot = false;
|
||||
for (xub_StrLen i = nPos + 1; i != rEnd; ++i)
|
||||
{
|
||||
sal_Unicode c2 = rText.GetChar(i);
|
||||
sal_Unicode c2 = rText[i];
|
||||
if (INetMIME::isAtomChar(c2))
|
||||
bDot = false;
|
||||
else if (bDot)
|
||||
@ -807,7 +807,7 @@ URIHelper::FindFirstURLInText(UniString const & rText,
|
||||
bBoundary2 = isBoundary2(rCharClass, rText, nPos, rEnd);
|
||||
}
|
||||
rBegin = rEnd;
|
||||
return UniString();
|
||||
return rtl::OUString();
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
@ -816,8 +816,8 @@ URIHelper::FindFirstURLInText(UniString const & rText,
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
UniString
|
||||
URIHelper::removePassword(UniString const & rURI,
|
||||
rtl::OUString
|
||||
URIHelper::removePassword(rtl::OUString const & rURI,
|
||||
INetURLObject::EncodeMechanism eEncodeMechanism,
|
||||
INetURLObject::DecodeMechanism eDecodeMechanism,
|
||||
rtl_TextEncoding eCharset)
|
||||
@ -825,7 +825,7 @@ URIHelper::removePassword(UniString const & rURI,
|
||||
INetURLObject aObj(rURI, eEncodeMechanism, eCharset);
|
||||
return aObj.HasError() ?
|
||||
rURI :
|
||||
String(aObj.GetURLNoPass(eDecodeMechanism, eCharset));
|
||||
aObj.GetURLNoPass(eDecodeMechanism, eCharset);
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -43,8 +43,7 @@ struct SVX_DLLPUBLIC DialogsResMgr
|
||||
|
||||
#define DIALOG_MGR() (*DialogsResMgr::GetResMgr())
|
||||
#define SVX_RES(i) ResId(i,DIALOG_MGR())
|
||||
#define SVX_RESSTR(i) UniString(ResId(i,DIALOG_MGR()))
|
||||
#define SVX_RESSSTR(i) String(ResId(i,DIALOG_MGR()))
|
||||
#define SVX_RESSTR(i) ResId::toString(ResId(i,DIALOG_MGR()))
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -5503,7 +5503,7 @@ static LRESULT ImplHandleIMEReconvertString( HWND hWnd, LPARAM lParam )
|
||||
LPRECONVERTSTRING pReconvertString = (LPRECONVERTSTRING) lParam;
|
||||
LRESULT nRet = 0;
|
||||
SalSurroundingTextRequestEvent aEvt;
|
||||
aEvt.maText = UniString();
|
||||
aEvt.maText = rtl::OUString();
|
||||
aEvt.mnStart = aEvt.mnEnd = 0;
|
||||
|
||||
UINT nImeProps = ImmGetProperty( GetKeyboardLayout( 0 ), IGP_SETCOMPSTR );
|
||||
@ -5557,7 +5557,7 @@ static LRESULT ImplHandleIMEConfirmReconvertString( HWND hWnd, LPARAM lParam )
|
||||
WinSalFrame* pFrame = GetWindowPtr( hWnd );
|
||||
LPRECONVERTSTRING pReconvertString = (LPRECONVERTSTRING) lParam;
|
||||
SalSurroundingTextRequestEvent aEvt;
|
||||
aEvt.maText = UniString();
|
||||
aEvt.maText = rtl::OUString();
|
||||
aEvt.mnStart = aEvt.mnEnd = 0;
|
||||
|
||||
pFrame->CallCallback( SALEVENT_SURROUNDINGTEXTREQUEST, (void*)&aEvt );
|
||||
|
Loading…
x
Reference in New Issue
Block a user