Author: orw Date: Tue Jul 8 12:01:26 2014 New Revision: 1608738 URL: http://svn.apache.org/r1608738 Log: 125215: *.docx import: Bookmark ID has to be treated as an Integer
cherry-picked from trunk Modified: openoffice/branches/AOO410/ (props changed) openoffice/branches/AOO410/main/ (props changed) openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper.cxx openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx Propchange: openoffice/branches/AOO410/ ------------------------------------------------------------------------------ Merged /openoffice/trunk:r1608730 Propchange: openoffice/branches/AOO410/main/ ------------------------------------------------------------------------------ Merged /openoffice/trunk/main:r1608730 Modified: openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper.cxx?rev=1608738&r1=1608737&r2=1608738&view=diff ============================================================================== --- openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper.cxx (original) +++ openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper.cxx Tue Jul 8 12:01:26 2014 @@ -1413,18 +1413,21 @@ void DomainMapper::lcl_attribute(Id nNam case NS_rtf::LN_endnote: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; + case NS_rtf::LN_BOOKMARKNAME: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ // sStringValue contains the bookmark name sLocalBookmarkName = sStringValue; break; + case NS_rtf::LN_IBKL: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0.5 */ //contains the bookmark identifier - has to be added to the bookmark name imported before //if it is already available then the bookmark should be inserted - m_pImpl->AddBookmark( sLocalBookmarkName, sStringValue ); + m_pImpl->AddBookmark( sLocalBookmarkName, nIntValue ); sLocalBookmarkName = ::rtl::OUString(); break; + case NS_rtf::LN_LISTLEVEL: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; Modified: openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx?rev=1608738&r1=1608737&r2=1608738&view=diff ============================================================================== --- openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx (original) +++ openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx Tue Jul 8 12:01:26 2014 @@ -3541,10 +3541,12 @@ void DomainMapper_Impl::PopFieldContext( /*-- 11.06.2007 16:19:00--------------------------------------------------- -----------------------------------------------------------------------*/ -void DomainMapper_Impl::AddBookmark( const ::rtl::OUString& rBookmarkName, const ::rtl::OUString& rId ) +void DomainMapper_Impl::AddBookmark( + const ::rtl::OUString& rBookmarkName, + const sal_Int32 nId ) { uno::Reference< text::XTextAppend > xTextAppend = m_aTextAppendStack.top().xTextAppend; - BookmarkMap_t::iterator aBookmarkIter = m_aBookmarkMap.find( rId ); + BookmarkMap_t::iterator aBookmarkIter = m_aBookmarkMap.find( nId ); //is the bookmark name already registered? try { @@ -3575,7 +3577,7 @@ void DomainMapper_Impl::AddBookmark( con uno::Reference< text::XTextCursor > xCursor = xTextAppend->createTextCursorByRange( xTextAppend->getEnd() ); bool bIsStart = !xCursor->goLeft(1, false); uno::Reference< text::XTextRange > xCurrent = xCursor->getStart(); - m_aBookmarkMap.insert(BookmarkMap_t::value_type( rId, BookmarkInsertPosition( bIsStart, rBookmarkName, xCurrent ) )); + m_aBookmarkMap.insert(BookmarkMap_t::value_type( nId, BookmarkInsertPosition( bIsStart, rBookmarkName, xCurrent ) )); } } catch( const uno::Exception& ) Modified: openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx?rev=1608738&r1=1608737&r2=1608738&view=diff ============================================================================== --- openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx (original) +++ openoffice/branches/AOO410/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx Tue Jul 8 12:01:26 2014 @@ -289,7 +289,7 @@ class DomainMapper_Impl public: typedef TableManager< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >, PropertyMapPtr > TableManager_t; typedef TableDataHandler< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >, TablePropertyMapPtr > TableDataHandler_t; - typedef std::map < ::rtl::OUString, BookmarkInsertPosition > BookmarkMap_t; + typedef std::map < sal_Int32, BookmarkInsertPosition > BookmarkMap_t; private: SourceDocumentType m_eDocumentType; @@ -554,7 +554,9 @@ public: //the end of field is reached (0x15 appeared) - the command might still be open void PopFieldContext(); - void AddBookmark( const ::rtl::OUString& rBookmarkName, const ::rtl::OUString& rId ); + void AddBookmark( + const ::rtl::OUString& rBookmarkName, + const sal_Int32 nId ); void AddAnnotationPosition( const bool bStart,