diff options
Diffstat (limited to 'idlc/source')
-rw-r--r-- | idlc/source/astdeclaration.cxx | 3 | ||||
-rw-r--r-- | idlc/source/idlc.cxx | 16 |
2 files changed, 13 insertions, 6 deletions
diff --git a/idlc/source/astdeclaration.cxx b/idlc/source/astdeclaration.cxx index 7a1bf314b3ed..ef0996323153 100644 --- a/idlc/source/astdeclaration.cxx +++ b/idlc/source/astdeclaration.cxx @@ -76,8 +76,7 @@ AstDeclaration::AstDeclaration(NodeType type, const OString& name, AstScope* pSc m_bImported = sal_True; } - if ( idlc()->isDocValid() ) - m_documentation = OStringToOUString(idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8); + m_documentation = idlc()->processDocumentation(); m_bPublished = idlc()->isPublished(); } diff --git a/idlc/source/idlc.cxx b/idlc/source/idlc.cxx index a064e7b1d4a3..895a54554ff6 100644 --- a/idlc/source/idlc.cxx +++ b/idlc/source/idlc.cxx @@ -274,11 +274,19 @@ void Idlc::reset() m_includes.clear(); } -sal_Bool Idlc::isDocValid() +OUString Idlc::processDocumentation() { - if ( m_bGenerateDoc ) - return m_bIsDocValid; - return sal_False;; + OUString doc; + if (m_bIsDocValid) { + OString raw(getDocumentation()); + if (m_bGenerateDoc) { + doc = OStringToOUString(raw, RTL_TEXTENCODING_UTF8); + } else if (raw.indexOf("@deprecated") != -1) { + //TODO: this check is somewhat crude + doc = "@deprecated"; + } + } + return doc; } static void lcl_writeString(::osl::File & rFile, ::osl::FileBase::RC & o_rRC, |