diff options
-rw-r--r-- | embeddedobj/source/commonembedding/specialobject.cxx | 4 | ||||
-rw-r--r-- | i18npool/source/breakiterator/breakiterator_unicode.cxx | 3 | ||||
-rw-r--r-- | i18npool/source/textconversion/textconversionImpl.cxx | 4 | ||||
-rw-r--r-- | i18npool/source/textconversion/textconversion_ko.cxx | 4 | ||||
-rw-r--r-- | jvmfwk/inc/libxmlutil.hxx | 7 | ||||
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/util.hxx | 3 | ||||
-rw-r--r-- | jvmfwk/source/elements.cxx | 36 | ||||
-rw-r--r-- | jvmfwk/source/fwkbase.cxx | 18 | ||||
-rw-r--r-- | jvmfwk/source/libxmlutil.cxx | 4 | ||||
-rw-r--r-- | l10ntools/source/helpmerge.cxx | 2 |
10 files changed, 30 insertions, 55 deletions
diff --git a/embeddedobj/source/commonembedding/specialobject.cxx b/embeddedobj/source/commonembedding/specialobject.cxx index 7b4a27ead172..a1e55d87debe 100644 --- a/embeddedobj/source/commonembedding/specialobject.cxx +++ b/embeddedobj/source/commonembedding/specialobject.cxx @@ -54,9 +54,7 @@ OSpecialEmbeddedObject::OSpecialEmbeddedObject( const uno::Reference< uno::XComp uno::Any SAL_CALL OSpecialEmbeddedObject::queryInterface( const uno::Type& rType ) { - uno::Any aReturn; - - aReturn = ::cppu::queryInterface( rType, + uno::Any aReturn = ::cppu::queryInterface( rType, static_cast< embed::XEmbeddedObject* >( this ), static_cast< embed::XInplaceObject* >( this ), static_cast< embed::XVisualObject* >( this ), diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx index 1a6818bdae30..25b6c2e8b450 100644 --- a/i18npool/source/breakiterator/breakiterator_unicode.cxx +++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx @@ -516,8 +516,7 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLineBreak( if (hOptions.hyphenIndex - wBoundary.startPos < nStartPosWordEnd) nStartPosWordEnd = hOptions.hyphenIndex - wBoundary.startPos; #define SPACE 0x0020 while (boundary_with_punctuation > wBoundary.endPos && Text[--boundary_with_punctuation] == SPACE); - uno::Reference< linguistic2::XHyphenatedWord > aHyphenatedWord; - aHyphenatedWord = hOptions.rHyphenator->hyphenate(Text.copy(wBoundary.startPos, + uno::Reference< linguistic2::XHyphenatedWord > aHyphenatedWord = hOptions.rHyphenator->hyphenate(Text.copy(wBoundary.startPos, wBoundary.endPos - wBoundary.startPos), rLocale, static_cast<sal_Int16>(hOptions.hyphenIndex - wBoundary.startPos - ((hOptions.hyphenIndex == wBoundary.endPos)? nStartPosWordEnd : 0)), hOptions.aHyphenationOptions); if (aHyphenatedWord.is()) { diff --git a/i18npool/source/textconversion/textconversionImpl.cxx b/i18npool/source/textconversion/textconversionImpl.cxx index fa9af75ff839..ecd1ee699b9f 100644 --- a/i18npool/source/textconversion/textconversionImpl.cxx +++ b/i18npool/source/textconversion/textconversionImpl.cxx @@ -80,9 +80,7 @@ TextConversionImpl::getLocaleSpecificTextConversion(const Locale& rLocale) aLocale = rLocale; OUString aPrefix("com.sun.star.i18n.TextConversion_"); - Reference < XInterface > xI; - - xI = m_xContext->getServiceManager()->createInstanceWithContext( + Reference < XInterface > xI = m_xContext->getServiceManager()->createInstanceWithContext( aPrefix + LocaleDataImpl::getFirstLocaleServiceName( aLocale), m_xContext); if (!xI.is()) { diff --git a/i18npool/source/textconversion/textconversion_ko.cxx b/i18npool/source/textconversion/textconversion_ko.cxx index 4e6ef770f613..6552135d1b91 100644 --- a/i18npool/source/textconversion/textconversion_ko.cxx +++ b/i18npool/source/textconversion/textconversion_ko.cxx @@ -44,9 +44,7 @@ namespace i18npool { TextConversion_ko::TextConversion_ko( const Reference < XComponentContext >& xContext ) : TextConversionService("com.sun.star.i18n.TextConversion_ko") { - Reference < XInterface > xI; - - xI = xContext->getServiceManager()->createInstanceWithContext( + Reference < XInterface > xI = xContext->getServiceManager()->createInstanceWithContext( "com.sun.star.i18n.ConversionDictionary_ko", xContext); if ( xI.is() ) diff --git a/jvmfwk/inc/libxmlutil.hxx b/jvmfwk/inc/libxmlutil.hxx index 078d285ac78f..1730a59e99a9 100644 --- a/jvmfwk/inc/libxmlutil.hxx +++ b/jvmfwk/inc/libxmlutil.hxx @@ -32,6 +32,7 @@ class CXPathObjectPtr CXPathObjectPtr(const CXPathObjectPtr&) = delete; public: CXPathObjectPtr(); + CXPathObjectPtr(xmlXPathObject*); ~CXPathObjectPtr(); /** Takes ownership of xmlXPathObject */ @@ -49,7 +50,7 @@ class CXPathContextPtr CXPathContextPtr & operator = (const CXPathContextPtr&) = delete; public: CXPathContextPtr(); - explicit CXPathContextPtr(xmlXPathContextPtr aContext); + CXPathContextPtr(xmlXPathContextPtr aContext); CXPathContextPtr & operator = (xmlXPathContextPtr pObj); ~CXPathContextPtr(); operator xmlXPathContext* () const { return _object;} @@ -65,7 +66,7 @@ class CXmlDocPtr public: CXmlDocPtr & operator = (const CXmlDocPtr&); CXmlDocPtr(); - explicit CXmlDocPtr(xmlDoc* aDoc); + CXmlDocPtr(xmlDoc* aDoc); /** Takes ownership of xmlDoc */ CXmlDocPtr & operator = (xmlDoc* pObj); @@ -82,7 +83,7 @@ class CXmlCharPtr CXmlCharPtr & operator = (const CXmlCharPtr&) = delete; public: CXmlCharPtr(); - explicit CXmlCharPtr(xmlChar* aDoc); + CXmlCharPtr(xmlChar* aDoc); explicit CXmlCharPtr(const OUString &); ~CXmlCharPtr(); CXmlCharPtr & operator = (xmlChar* pObj); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx index 02ee2a4f62ba..56e487b45b76 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx @@ -83,8 +83,7 @@ struct SameOrSubDirJREMap { if (s1 == s2.first) return true; - OUString sSub; - sSub = s2.first + "/"; + OUString sSub = s2.first + "/"; if (s1.match(sSub)) return true; return false; diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index 4a9477c41db1..64373f31c8b0 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -66,8 +66,7 @@ static OString getElement(OString const & docPath, JFW_E_ERROR, "[Java framework] Error in function getElement (elements.cxx)"); - CXPathObjectPtr pathObj; - pathObj = xmlXPathEvalExpression(pathExpression, context); + CXPathObjectPtr pathObj = xmlXPathEvalExpression(pathExpression, context); OString sValue; if (xmlXPathNodeSetIsEmpty(pathObj->nodesetval)) { @@ -288,8 +287,7 @@ void NodeJava::load() { if (xmlStrcmp(pOpt->name, reinterpret_cast<xmlChar const *>("param")) == 0) { - CXmlCharPtr sOpt; - sOpt = xmlNodeListGetString( + CXmlCharPtr sOpt = xmlNodeListGetString( docUser, pOpt->children, 1); m_vmParameters->push_back(sOpt); } @@ -314,8 +312,7 @@ void NodeJava::load() { if (xmlStrcmp(pLoc->name, reinterpret_cast<xmlChar const *>("location")) == 0) { - CXmlCharPtr sLoc; - sLoc = xmlNodeListGetString( + CXmlCharPtr sLoc = xmlNodeListGetString( docUser, pLoc->children, 1); m_JRELocations->push_back(sLoc); } @@ -704,8 +701,7 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo) if (pJavaInfo->children == nullptr) return; //Get the xsi:nil attribute; - CXmlCharPtr sNil; - sNil = xmlGetNsProp( + CXmlCharPtr sNil = xmlGetNsProp( pJavaInfo, reinterpret_cast<xmlChar const *>("nil"), reinterpret_cast<xmlChar const *>(NS_SCHEMA_INSTANCE)); if ( ! sNil) throw FrameworkException(JFW_E_ERROR, sExcMsg); @@ -720,8 +716,7 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo) return; //Get javaInfo@manuallySelected attribute - CXmlCharPtr sAutoSelect; - sAutoSelect = xmlGetProp( + CXmlCharPtr sAutoSelect = xmlGetProp( pJavaInfo, reinterpret_cast<xmlChar const *>("autoSelect")); if ( ! sAutoSelect) throw FrameworkException(JFW_E_ERROR, sExcMsg); @@ -739,8 +734,7 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo) { if (xmlStrcmp(cur->name, reinterpret_cast<xmlChar const *>("vendor")) == 0) { - CXmlCharPtr xmlVendor; - xmlVendor = xmlNodeListGetString( + CXmlCharPtr xmlVendor = xmlNodeListGetString( pDoc, cur->children, 1); if (! xmlVendor) return; @@ -748,30 +742,26 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo) } else if (xmlStrcmp(cur->name, reinterpret_cast<xmlChar const *>("location")) == 0) { - CXmlCharPtr xmlLocation; - xmlLocation = xmlNodeListGetString( + CXmlCharPtr xmlLocation = xmlNodeListGetString( pDoc, cur->children, 1); sLocation = xmlLocation; } else if (xmlStrcmp(cur->name, reinterpret_cast<xmlChar const *>("version")) == 0) { - CXmlCharPtr xmlVersion; - xmlVersion = xmlNodeListGetString( + CXmlCharPtr xmlVersion = xmlNodeListGetString( pDoc, cur->children, 1); sVersion = xmlVersion; } else if (xmlStrcmp(cur->name, reinterpret_cast<xmlChar const *>("features"))== 0) { - CXmlCharPtr xmlFeatures; - xmlFeatures = xmlNodeListGetString( + CXmlCharPtr xmlFeatures = xmlNodeListGetString( pDoc, cur->children, 1); OUString sFeatures = xmlFeatures; nFeatures = sFeatures.toInt64(16); } else if (xmlStrcmp(cur->name, reinterpret_cast<xmlChar const *>("requirements")) == 0) { - CXmlCharPtr xmlRequire; - xmlRequire = xmlNodeListGetString( + CXmlCharPtr xmlRequire = xmlNodeListGetString( pDoc, cur->children, 1); OUString sRequire = xmlRequire; nRequirements = sRequire.toInt64(16); @@ -788,8 +778,7 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo) } else if (xmlStrcmp(cur->name, reinterpret_cast<xmlChar const *>("vendorData")) == 0) { - CXmlCharPtr xmlData; - xmlData = xmlNodeListGetString( + CXmlCharPtr xmlData = xmlNodeListGetString( pDoc, cur->children, 1); xmlChar* _data = static_cast<xmlChar*>(xmlData); if (_data) @@ -804,8 +793,7 @@ void CNodeJavaInfo::loadFromNode(xmlDoc * pDoc, xmlNode * pJavaInfo) if (sVendor.isEmpty()) m_bEmptyNode = true; //Get the javainfo attributes - CXmlCharPtr sVendorUpdate; - sVendorUpdate = xmlGetProp(pJavaInfo, + CXmlCharPtr sVendorUpdate = xmlGetProp(pJavaInfo, reinterpret_cast<xmlChar const *>("vendorUpdate")); if ( ! sVendorUpdate) throw FrameworkException(JFW_E_ERROR, sExcMsg); diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx index 1ea13e8f0c42..0aed9857c966 100644 --- a/jvmfwk/source/fwkbase.cxx +++ b/jvmfwk/source/fwkbase.cxx @@ -138,8 +138,7 @@ boost::optional<VersionInfo> VendorSettings::getVersionInformation(const OUStrin "/jf:javaSelection/jf:vendorInfos/jf:vendor[@name=\"") + osVendor + OString("\"]/jf:minVersion"); - CXPathObjectPtr xPathObjectMin; - xPathObjectMin = + CXPathObjectPtr xPathObjectMin = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()), m_xmlPathContextVendorSettings); if (xmlXPathNodeSetIsEmpty(xPathObjectMin->nodesetval)) @@ -148,8 +147,7 @@ boost::optional<VersionInfo> VendorSettings::getVersionInformation(const OUStrin } else { - CXmlCharPtr sVersion; - sVersion = xmlNodeListGetString( + CXmlCharPtr sVersion = xmlNodeListGetString( m_xmlDocVendorSettings, xPathObjectMin->nodesetval->nodeTab[0]->xmlChildrenNode, 1); OString osVersion(sVersion); @@ -160,8 +158,7 @@ boost::optional<VersionInfo> VendorSettings::getVersionInformation(const OUStrin //Get maxVersion sExpression = OString("/jf:javaSelection/jf:vendorInfos/jf:vendor[@name=\"") + osVendor + OString("\"]/jf:maxVersion"); - CXPathObjectPtr xPathObjectMax; - xPathObjectMax = xmlXPathEvalExpression( + CXPathObjectPtr xPathObjectMax = xmlXPathEvalExpression( reinterpret_cast<xmlChar const *>(sExpression.getStr()), m_xmlPathContextVendorSettings); if (xmlXPathNodeSetIsEmpty(xPathObjectMax->nodesetval)) @@ -170,8 +167,7 @@ boost::optional<VersionInfo> VendorSettings::getVersionInformation(const OUStrin } else { - CXmlCharPtr sVersion; - sVersion = xmlNodeListGetString( + CXmlCharPtr sVersion = xmlNodeListGetString( m_xmlDocVendorSettings, xPathObjectMax->nodesetval->nodeTab[0]->xmlChildrenNode, 1); OString osVersion(sVersion); @@ -182,8 +178,7 @@ boost::optional<VersionInfo> VendorSettings::getVersionInformation(const OUStrin //Get excludeVersions sExpression = OString("/jf:javaSelection/jf:vendorInfos/jf:vendor[@name=\"") + osVendor + OString("\"]/jf:excludeVersions/jf:version"); - CXPathObjectPtr xPathObjectVersions; - xPathObjectVersions = + CXPathObjectPtr xPathObjectVersions = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()), m_xmlPathContextVendorSettings); if (!xmlXPathNodeSetIsEmpty(xPathObjectVersions->nodesetval)) @@ -195,8 +190,7 @@ boost::optional<VersionInfo> VendorSettings::getVersionInformation(const OUStrin { if (xmlStrcmp(cur->name, reinterpret_cast<xmlChar const *>("version")) == 0) { - CXmlCharPtr sVersion; - sVersion = xmlNodeListGetString( + CXmlCharPtr sVersion = xmlNodeListGetString( m_xmlDocVendorSettings, cur->xmlChildrenNode, 1); OString osVersion(sVersion); OUString usVersion = OStringToOUString( diff --git a/jvmfwk/source/libxmlutil.cxx b/jvmfwk/source/libxmlutil.cxx index 5f1ec5784eb5..2619e43331c4 100644 --- a/jvmfwk/source/libxmlutil.cxx +++ b/jvmfwk/source/libxmlutil.cxx @@ -25,7 +25,9 @@ namespace jfw CXPathObjectPtr::CXPathObjectPtr():_object(nullptr) { } - +CXPathObjectPtr::CXPathObjectPtr(xmlXPathObject* pObj):_object(pObj) +{ +} CXPathObjectPtr::~CXPathObjectPtr() { xmlXPathFreeObject(_object); diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx index 058e79ae656e..ee442e91475b 100644 --- a/l10ntools/source/helpmerge.cxx +++ b/l10ntools/source/helpmerge.cxx @@ -194,8 +194,6 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa XMLElement* pXMLElement = nullptr; MergeEntrys *pEntrys = nullptr; - pEntrys = nullptr; - if( !sCur.equalsIgnoreAsciiCase("en-US") ){ pXMLElement = (*aLangHM)[ "en-US" ]; if( pXMLElement == nullptr ) |