Kaydet (Commit) 89a8d75c authored tarafından Marcel Metz's avatar Marcel Metz Kaydeden (comit) Luboš Luňák

Remove unused tools function.

this patch removes the unused (according to OpenGrok) GetIsoFallback
function from the tools module.
üst a90d4d5f
......@@ -35,7 +35,6 @@
#include <tools/fsys.hxx>
#include <tools/rc.h>
#include <tools/isofallback.hxx>
#include <rtl/strbuf.hxx>
#include <sal/macros.h>
......
......@@ -95,7 +95,6 @@ $(eval $(call gb_Library_add_exception_objects,tl,\
tools/source/misc/extendapplicationenvironment \
tools/source/misc/getprocessworkingdir \
tools/source/misc/solarmutex \
tools/source/rc/isofallback \
tools/source/rc/rc \
tools/source/rc/resary \
tools/source/rc/resmgr \
......
......@@ -53,7 +53,6 @@ $(eval $(call gb_Package_add_file,tools_inc,inc/tools/inetdef.hxx,tools/inetdef.
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/inetmime.hxx,tools/inetmime.hxx))
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/inetmsg.hxx,tools/inetmsg.hxx))
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/inetstrm.hxx,tools/inetstrm.hxx))
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/isofallback.hxx,tools/isofallback.hxx))
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/line.hxx,tools/line.hxx))
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/link.hxx,tools/link.hxx))
$(eval $(call gb_Package_add_file,tools_inc,inc/tools/list.hxx,tools/list.hxx))
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _ISOFALLBACK_HXX
#define _ISOFALLBACK_HXX
#include <rtl/string.hxx>
#include "tools/toolsdllapi.h"
// Return true if valid fallback found
TOOLS_DLLPUBLIC bool GetIsoFallback(rtl::OString& rLanguage);
#endif //_ISOFALLBACK_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include <tools/isofallback.hxx>
// -----------------------------------------------------------------------
// Return true if valid fallback found
bool GetIsoFallback(rtl::OString& rLanguage)
{
rLanguage = rLanguage.trim();
if (!rLanguage.isEmpty())
{
sal_Int32 nSepPos = rLanguage.indexOf('-');
if (nSepPos == -1)
{
if (rLanguage.equalsL(RTL_CONSTASCII_STRINGPARAM("en")))
{
// en -> ""
rLanguage = rtl::OString();
return false;
}
else
{
// de -> en-US ;
rLanguage = rtl::OString(RTL_CONSTASCII_STRINGPARAM("en-US"));
return true;
}
}
else if( !(nSepPos == 1 && (rLanguage.toChar() == 'x' || rLanguage.toChar() == 'X')) )
{
// de-CH -> de ;
// try erase from -
sal_Int32 nIndex = 0;
rLanguage = rLanguage.getToken(0, '-', nIndex);
return true;
}
}
// "" -> ""; x-no-translate -> ""
rLanguage = rtl::OString();
return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -51,8 +51,6 @@
#include <i18npool/mslangid.hxx>
#include <tools/simplerm.hxx>
#include <tools/isofallback.hxx>
#include <functional>
#include <algorithm>
#include <boost/unordered_map.hpp>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment