appdde.cxx (d119d52d) appdde.cxx (24c56ab9)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 40 unchanged lines hidden (view full) ---

49#include <sfx2/sfxsids.hrc>
50#include "helper.hxx"
51#include <sfx2/docfile.hxx>
52
53//========================================================================
54
55String SfxDdeServiceName_Impl( const String& sIn )
56{
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 40 unchanged lines hidden (view full) ---

49#include <sfx2/sfxsids.hrc>
50#include "helper.hxx"
51#include <sfx2/docfile.hxx>
52
53//========================================================================
54
55String SfxDdeServiceName_Impl( const String& sIn )
56{
57 ByteString sTemp = U2S( sIn );
57 ByteString sTemp( sIn, RTL_TEXTENCODING_UTF8 );
58 ByteString sReturn;
59
60 for ( sal_uInt16 n = sTemp.Len(); n; --n )
61 if ( sTemp.Copy( n-1, 1 ).IsAlphaNumericAscii() )
62 sReturn += sTemp.GetChar(n-1);
63
58 ByteString sReturn;
59
60 for ( sal_uInt16 n = sTemp.Len(); n; --n )
61 if ( sTemp.Copy( n-1, 1 ).IsAlphaNumericAscii() )
62 sReturn += sTemp.GetChar(n-1);
63
64 return S2U( sReturn );
64 return String( sReturn, RTL_TEXTENCODING_UTF8 );
65}
66
67
68class ImplDdeService : public DdeService
69{
70public:
71 ImplDdeService( const String& rNm )
72 : DdeService( rNm )

--- 81 unchanged lines hidden (view full) ---

154 if ( aData.GetChar(n) == 0x0022 ) // " = 22h
155 for ( ; aData.GetChar(++n) != 0x0022 ; )
156 /* empty loop */ ;
157 else if ( aData.GetChar(n) == 0x0020 ) // SPACE = 20h
158 aData.SetChar(n, '\n');
159 }
160 aData.EraseAllChars( 0x0022 );
161 ApplicationAddress aAddr;
65}
66
67
68class ImplDdeService : public DdeService
69{
70public:
71 ImplDdeService( const String& rNm )
72 : DdeService( rNm )

--- 81 unchanged lines hidden (view full) ---

154 if ( aData.GetChar(n) == 0x0022 ) // " = 22h
155 for ( ; aData.GetChar(++n) != 0x0022 ; )
156 /* empty loop */ ;
157 else if ( aData.GetChar(n) == 0x0020 ) // SPACE = 20h
158 aData.SetChar(n, '\n');
159 }
160 aData.EraseAllChars( 0x0022 );
161 ApplicationAddress aAddr;
162 rAppEvent = ApplicationEvent( String(), aAddr, U2S(rEvent), aData );
162 rAppEvent = ApplicationEvent( String(), aAddr, ByteString( rEvent, RTL_TEXTENCODING_UTF8), aData );
163 return sal_True;
164 }
165 }
166
167 return sal_False;
168}
169
170//-------------------------------------------------------------------------

--- 535 unchanged lines hidden ---
163 return sal_True;
164 }
165 }
166
167 return sal_False;
168}
169
170//-------------------------------------------------------------------------

--- 535 unchanged lines hidden ---