/* -*- 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 * * for a copy of the LGPLv3 License. * ************************************************************************/ #include #include #include #include #include #include using ::rtl::OUString; using ::rtl::OUStringBuffer; using namespace ::com::sun::star; using namespace ::xmloff::token; // this is a copy of defines in svx/inc/escpitem.hxx #define DFLT_ESC_PROP 58 #define DFLT_ESC_AUTO_SUPER 101 #define DFLT_ESC_AUTO_SUB -101 /////////////////////////////////////////////////////////////////////////////// // // class XMLEscapementPropHdl // XMLCharLanguageHdl::~XMLCharLanguageHdl() { // nothing to do } bool XMLCharLanguageHdl::equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const { sal_Bool bRet = sal_False; lang::Locale aLocale1, aLocale2; if( ( r1 >>= aLocale1 ) && ( r2 >>= aLocale2 ) ) bRet = ( aLocale1.Language == aLocale2.Language ); return bRet; } sal_Bool XMLCharLanguageHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& ) const { lang::Locale aLocale; rValue >>= aLocale; if( !IsXMLToken(rStrImpValue, XML_NONE) ) aLocale.Language = rStrImpValue; rValue <<= aLocale; return sal_True; } sal_Bool XMLCharLanguageHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& ) const { lang::Locale aLocale; if(!(rValue >>= aLocale)) return sal_False; rStrExpValue = aLocale.Language; if( rStrExpValue.isEmpty() ) rStrExpValue = GetXMLToken( XML_NONE ); return sal_True; } /////////////////////////////////////////////////////////////////////////////// // // class XMLEscapementHeightPropHdl // XMLCharCountryHdl::~XMLCharCountryHdl() { // nothing to do } bool XMLCharCountryHdl::equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const { sal_Bool bRet = sal_False; lang::Locale aLocale1, aLocale2; if( ( r1 >>= aLocale1 ) && ( r2 >>= aLocale2 ) ) bRet = ( aLocale1.Country == aLocale2.Country ); return bRet; } sal_Bool XMLCharCountryHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& ) const { lang::Locale aLocale; rValue >>= aLocale; if( !IsXMLToken( rStrImpValue, XML_NONE ) ) aLocale.Country = rStrImpValue; rValue <<= aLocale; return sal_True; } sal_Bool XMLCharCountryHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValue, const SvXMLUnitConverter& ) const { lang::Locale aLocale; if(!(rValue >>= aLocale)) return sal_False; rStrExpValue = aLocale.Country; if( rStrExpValue.isEmpty() ) rStrExpValue = GetXMLToken( XML_NONE ); return sal_True; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /option> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/stoc/test
AgeCommit message (Expand)Author
2018-11-04replace double-checked locking patterns with thread safe local staticsMike Kaganski
2018-08-02Add missing sal/log.hxx headersGabor Kelemen
2018-06-18tdf#108523 Remove @author annotationsAbhyudaya Sharma
2018-04-17tdf#100726 - Improve readability of OUString concatanationsGökhan Gurbetoğlu
2018-04-09use more DBG_UNHANDLED_EXCEPTIONNoel Grandin
2018-01-25Fix typosAndrea Gelmini
2017-10-04add << operator for css::uno::ExceptionNoel Grandin
2017-08-28Translate German comments/debug strings (leftovers in dirs starmath to sysui)Johnny_M
2017-08-17remove UL/L suffixes from integer constants on the RHS of expressionsNoel Grandin
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke
2017-05-07revert OSL_ASSERT changesChris Sherlock
2017-05-07tdf#43157: convert stoc tests from OSL_ASSERT to assertChris Sherlock
2017-05-04Replace all OUString("") with OUString()Arnaud Versini
2017-01-30German comments - last bits of stoc/ translated.Michael Meeks
2016-12-15no point in having both SAL_WARN and OSL_FAIL for the same thingNoel Grandin
2016-12-11OSL_TRACE -> SAL in sfx2..svxNoel Grandin
2016-11-18includes should be at the top of the fileNoel Grandin
2016-11-18remove some double callsNoel Grandin
2016-10-01Fix typosAndrea Gelmini
2016-04-12tdf#91794 removed OSL_DEBUG_LEVEL > 1 conditionalsRohan Kumar
2016-02-16use consistent #define checks for the Windows platformNoel Grandin
2016-02-09Remove excess newlinesChris Sherlock
2016-01-10Fix typosAndrea Gelmini
2015-11-05use uno::Reference::set method instead of assignmentNoel Grandin
2015-11-01no need to use OUString constructor in call to createInstanceNoel Grandin
2015-10-30UNO: no need to use OUString constructor when calling createInstanceNoel Grandin
2015-09-07stoc: tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
2015-08-04svx,starmath: inline some use-once typedefsNoel Grandin
2015-07-15cppcheck: noExplicitConstructorCaolán McNamara
2015-06-15cppcheck:redundantAssignmentNoel Grandin
2015-04-29redundant castCaolán McNamara
2015-04-22Various #include <sal/log.hxx> fixupsStephan Bergmann
2015-04-15remove unnecessary use of void in function declarationsNoel Grandin
2015-04-09convert REG_ constants to scoped enumNoel Grandin
2015-04-01Add support for cppu::UnoType<void>Stephan Bergmann
2015-04-01Replace remaining getCppuType et al with cppu::UnoTypeStephan Bergmann
2015-02-23remove unnecessary parenthesis in return statementsNoel Grandin
2015-02-08Typos + simple german translationsJulien Nabet
2014-11-25java: remove some comment noiseNoel Grandin
2014-11-12java: convert fields to local variables where possibleNoel Grandin
2014-10-31Removed duplicated includesAndrea Gelmini
2014-10-29remove unnecessary 'using namespace rtl' declarationsNoel Grandin
2014-10-07java: remove useless overriding methodsNoel Grandin