/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
// Windows NT 3.51 VER_PLATFORM_WIN32_NT 3 51 // Windows NT 4.0 VER_PLATFORM_WIN32_NT 4 0 // Windows 2000 VER_PLATFORM_WIN32_NT 5 0 // Windows XP VER_PLATFORM_WIN32_NT 5 1 // Windows Vista VER_PLATFORM_WIN32_NT 6 0 // Windows 7 VER_PLATFORM_WIN32_NT 6 1 // Windows 95 VER_PLATFORM_WIN32_WINDOWS 4 0 // Windows 98 VER_PLATFORM_WIN32_WINDOWS 4 10 // Windows ME VER_PLATFORM_WIN32_WINDOWS 4 90
if ( OldChar == *pCurrent )
{ if ( OldChar == *pNext )
{ // two OldChars in line will // be replaced by one // e.g. ~~ -> ~
aBuffer.insert( i, *pCurrent );
// skip the next one
pCurrent++;
pNext++;
} else
{ // one OldChar will be replace // by NexChar
aBuffer.insert( i, NewChar );
}
} elseif ( *pCurrent == NewChar )
{ // a NewChar will be replaced by // two NewChars // e.g. & -> &&
aBuffer.insert( i++, *pCurrent );
aBuffer.insert( i, *pCurrent );
} else
{
aBuffer.insert( i, *pCurrent );
}
pCurrent++;
pNext++;
i++;
}
}
// converts a soffice label to a windows label // the following rules for character replacements // will be done: // '~' -> '&' // '~~' -> '~' // '&' -> '&&'
// in the worst case the new string is // doubled in length, maybe some waste // of memory but how long is a label // normally(?)
OUStringBuffer aBuffer( nStrLen * 2 );
// converts a windows label to a soffice label // the following rules for character replacements // will be done: // '&' -> '~' // '&&' -> '&' // '~' -> '~~'
// in the worst case the new string is // doubled in length, maybe some waste // of memory but how long is a label // normally(?)
OUStringBuffer aBuffer( nStrLen * 2 );
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.