1*d119d52dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*d119d52dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d119d52dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d119d52dSAndrew Rist * distributed with this work for additional information 6*d119d52dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d119d52dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d119d52dSAndrew Rist * "License"); you may not use this file except in compliance 9*d119d52dSAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*d119d52dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*d119d52dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d119d52dSAndrew Rist * software distributed under the License is distributed on an 15*d119d52dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d119d52dSAndrew Rist * KIND, either express or implied. See the License for the 17*d119d52dSAndrew Rist * specific language governing permissions and limitations 18*d119d52dSAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*d119d52dSAndrew Rist *************************************************************/ 21*d119d52dSAndrew Rist 22*d119d52dSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_sfx2.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir #ifndef GCC 28cdf0e10cSrcweir #endif 29cdf0e10cSrcweir 30cdf0e10cSrcweir #include "sfxtypes.hxx" 31cdf0e10cSrcweir 32cdf0e10cSrcweir //-------------------------------------------------------------------- 33cdf0e10cSrcweir 34cdf0e10cSrcweir #if defined(DBG_UTIL) && ( defined(WNT) || defined(OS2) ) 35cdf0e10cSrcweir unsigned SfxStack::nLevel = 0; 36cdf0e10cSrcweir #endif 37cdf0e10cSrcweir 38cdf0e10cSrcweir //-------------------------------------------------------------------- 39cdf0e10cSrcweir 40cdf0e10cSrcweir String SearchAndReplace( const String &rSource, 41cdf0e10cSrcweir const String &rToReplace, 42cdf0e10cSrcweir const String &rReplacement ) 43cdf0e10cSrcweir { 44cdf0e10cSrcweir String aTarget( rSource ); 45cdf0e10cSrcweir sal_uInt16 nPos = rSource.Search( rToReplace ); 46cdf0e10cSrcweir if ( nPos != STRING_NOTFOUND ) 47cdf0e10cSrcweir { 48cdf0e10cSrcweir aTarget.Erase( nPos, rToReplace.Len() ); 49cdf0e10cSrcweir return aTarget.Insert( rReplacement, nPos ); 50cdf0e10cSrcweir } 51cdf0e10cSrcweir return rSource; 52cdf0e10cSrcweir } 53cdf0e10cSrcweir 54cdf0e10cSrcweir //-------------------------------------------------------------------- 55cdf0e10cSrcweir 56cdf0e10cSrcweir String SfxStringEncode( const String &rSource, const char * ) 57cdf0e10cSrcweir { 58cdf0e10cSrcweir String aRet; 59cdf0e10cSrcweir String aCoded(rSource); 60cdf0e10cSrcweir return aRet; 61cdf0e10cSrcweir } 62cdf0e10cSrcweir 63cdf0e10cSrcweir //-------------------------------------------------------------------- 64cdf0e10cSrcweir 65cdf0e10cSrcweir String SfxStringDecode( const String &, const char * ) 66cdf0e10cSrcweir { 67cdf0e10cSrcweir String aRet; 68cdf0e10cSrcweir return aRet; 69cdf0e10cSrcweir } 70cdf0e10cSrcweir 71cdf0e10cSrcweir 72