/* -*- 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 .
*/
/* #i100057# filter formatting marks out of strings before passing them to the transliteration. The real solution would have been an additional TransliterationModule to ignore these marks during transliteration; however changing the code in i18npool that actually implements this could produce unwanted side effects.
Of course this copying around is not really good, but looking at i18npool, one more time will not hurt.
*/
OUString vcl::I18nHelper::filterFormattingChars( const OUString& rStr )
{
sal_Int32 nLength = rStr.getLength();
OUStringBuffer aBuf( nLength ); const sal_Unicode* pStr = rStr.getStr(); while( nLength-- )
{ if( ! is_formatting_mark( *pStr ) )
aBuf.append( *pStr );
pStr++;
} return aBuf.makeStringAndClear();
}
if ( mbTransliterateIgnoreCase )
{ // Change mbTransliterateIgnoreCase and destroy the wrapper, next call to // ImplGetTransliterationWrapper() will create a wrapper with the correct bIgnoreCase const_cast<vcl::I18nHelper*>(this)->mbTransliterateIgnoreCase = false; const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper.reset();
}
if ( !mbTransliterateIgnoreCase )
{ // Change mbTransliterateIgnoreCase and destroy the wrapper, next call to // ImplGetTransliterationWrapper() will create a wrapper with the correct bIgnoreCase const_cast<vcl::I18nHelper*>(this)->mbTransliterateIgnoreCase = true; const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper.reset();
}
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.