diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-31 10:29:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-31 10:31:25 +0000 |
commit | aeeabc36fd0a4a71238c8c3df2e80ea324f9bac0 (patch) | |
tree | e329e090adf73c37d18897ddacbd6b1e07382512 /unoxml | |
parent | 40f186a73225f0fcbce828c97d6395dfffb79a90 (diff) |
loplugin:oncevar in unoxml..toolkit
Change-Id: I3b97665908be0a44d24192433bdc9c2bd9008736
Reviewed-on: https://gerrit.libreoffice.org/30431
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoxml')
-rw-r--r-- | unoxml/source/rdf/librdf_repository.cxx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index 8dedfd37f341..1cb823070b70 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -1491,12 +1491,6 @@ void SAL_CALL librdf_Repository::setStatementRDFa( throw (uno::RuntimeException, lang::IllegalArgumentException, rdf::RepositoryException, std::exception) { - static const char s_cell[] = "com.sun.star.table.Cell"; - static const char s_cellprops[] = "com.sun.star.text.CellProperties"; // for writer - static const char s_paragraph[] = "com.sun.star.text.Paragraph"; - static const char s_bookmark[] = "com.sun.star.text.Bookmark"; - static const char s_meta[] = "com.sun.star.text.InContentMetadata"; - if (!i_xSubject.is()) { throw lang::IllegalArgumentException( "librdf_Repository::setStatementRDFa: Subject is null", *this, 0); @@ -1520,14 +1514,14 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, const uno::Reference<lang::XServiceInfo> xService(i_xObject, uno::UNO_QUERY_THROW); uno::Reference<text::XTextRange> xTextRange; - if (xService->supportsService(s_cell) || - xService->supportsService(s_cellprops) || - xService->supportsService(s_paragraph)) + if (xService->supportsService("com.sun.star.table.Cell") || + xService->supportsService("com.sun.star.text.CellProperties") || // for writer + xService->supportsService("com.sun.star.text.Paragraph")) { xTextRange.set(i_xObject, uno::UNO_QUERY_THROW); } - else if (xService->supportsService(s_bookmark) || - xService->supportsService(s_meta)) + else if (xService->supportsService("com.sun.star.text.Bookmark") || + xService->supportsService("com.sun.star.text.InContentMetadata")) { const uno::Reference<text::XTextContent> xTextContent(i_xObject, uno::UNO_QUERY_THROW); |