diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-16 21:12:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-17 09:18:18 +0100 |
commit | c975d6b751c48471d413b2e15ccb86e742e9e231 (patch) | |
tree | b33c8c23e4f379d30b421af134fe0ec99ea91e15 /tools | |
parent | Make the MobileLibreOffice project work better in a srcdir!=builddir scenario (diff) | |
download | core-c975d6b751c48471d413b2e15ccb86e742e9e231.tar.gz core-c975d6b751c48471d413b2e15ccb86e742e9e231.zip |
Related: fdo#38838 remove String::CompareToAscii
Change-Id: Ie853747ec693bce34e5be3940c236be5e5544b00
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/string/strascii.cxx | 70 | ||||
-rw-r--r-- | tools/source/string/tustring.cxx | 1 |
2 files changed, 0 insertions, 71 deletions
diff --git a/tools/source/string/strascii.cxx b/tools/source/string/strascii.cxx deleted file mode 100644 index 85cca277286f..000000000000 --- a/tools/source/string/strascii.cxx +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- 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 . - */ - -#ifdef DBG_UTIL -static sal_Bool ImplDbgCheckAsciiStr( const sal_Char* pAsciiStr, sal_Int32 nLen ) -{ - while ( nLen && *pAsciiStr ) - { - if ( ((unsigned char)*pAsciiStr) > 127 ) - return sal_False; - ++pAsciiStr, - --nLen; - } - - return sal_True; -} -#endif - -static sal_Int32 ImplStringCompareAscii( const sal_Unicode* pStr1, const sal_Char* pStr2, - xub_StrLen nCount ) -{ - sal_Int32 nRet = 0; - while ( nCount && - ((nRet = ((sal_Int32)*pStr1)-((sal_Int32)((unsigned char)*pStr2))) == 0) && - *pStr2 ) - { - ++pStr1, - ++pStr2, - --nCount; - } - - return nRet; -} - -StringCompare UniString::CompareToAscii( const sal_Char* pAsciiStr, - xub_StrLen nLen ) const -{ - DBG_CHKTHIS( UniString, DbgCheckUniString ); - DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, nLen ), - "UniString::CompareToAscii() - pAsciiStr include characters > 127" ); - - // String vergleichen - sal_Int32 nCompare = ImplStringCompareAscii( mpData->maStr, pAsciiStr, nLen ); - - // Rueckgabewert anpassen - if ( nCompare == 0 ) - return COMPARE_EQUAL; - else if ( nCompare < 0 ) - return COMPARE_LESS; - else - return COMPARE_GREATER; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx index 69af7a1f9e05..1463a3b50c0c 100644 --- a/tools/source/string/tustring.cxx +++ b/tools/source/string/tustring.cxx @@ -48,7 +48,6 @@ DBG_NAME( UniString ) #include <strimp.cxx> #include <strucvt.cxx> -#include <strascii.cxx> UniString::UniString(char c): mpData(ImplAllocData(1)) { mpData->maStr[0] = c; } |