You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2013/12/02 15:27:06 UTC
svn commit: r1547030 - in
/openoffice/branches/ooxml-osba/main/writerfilter/source/dmapper:
DomainMapper_Impl.cxx DomainMapper_Impl.hxx
Author: orw
Date: Mon Dec 2 14:27:06 2013
New Revision: 1547030
URL: http://svn.apache.org/r1547030
Log:
97631: *.docx import: import annotation's author and creation date
Modified:
openoffice/branches/ooxml-osba/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx
openoffice/branches/ooxml-osba/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx
Modified: openoffice/branches/ooxml-osba/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ooxml-osba/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx?rev=1547030&r1=1547029&r2=1547030&view=diff
==============================================================================
--- openoffice/branches/ooxml-osba/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx (original)
+++ openoffice/branches/ooxml-osba/main/writerfilter/source/dmapper/DomainMapper_Impl.cxx Mon Dec 2 14:27:06 2013
@@ -3768,9 +3768,18 @@ sal_Int32 DomainMapper_Impl::GetCurrentR
void DomainMapper_Impl::SetCurrentRedlineAuthor( rtl::OUString sAuthor )
{
- RedlineParamsPtr pCurrent( GetTopRedline( ) );
- if ( pCurrent.get( ) )
- pCurrent->m_sAuthor = sAuthor;
+ if (m_xAnnotationField.is())
+ {
+ m_xAnnotationField->setPropertyValue(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Author")),
+ uno::makeAny(sAuthor) );
+ }
+ else
+ {
+ RedlineParamsPtr pCurrent( GetTopRedline( ) );
+ if ( pCurrent.get( ) )
+ pCurrent->m_sAuthor = sAuthor;
+ }
}
void DomainMapper_Impl::SetCurrentRedlineInitials( rtl::OUString sInitials )
@@ -3785,9 +3794,18 @@ void DomainMapper_Impl::SetCurrentRedlin
void DomainMapper_Impl::SetCurrentRedlineDate( rtl::OUString sDate )
{
- RedlineParamsPtr pCurrent( GetTopRedline( ) );
- if ( pCurrent.get( ) )
- pCurrent->m_sDate = sDate;
+ if (m_xAnnotationField.is())
+ {
+ m_xAnnotationField->setPropertyValue(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DateTimeValue")),
+ uno::makeAny( ConversionHelper::convertDateTime( sDate ) ) );
+ }
+ else
+ {
+ RedlineParamsPtr pCurrent( GetTopRedline( ) );
+ if ( pCurrent.get( ) )
+ pCurrent->m_sDate = sDate;
+ }
}
void DomainMapper_Impl::SetCurrentRedlineId( sal_Int32 sId )
Modified: openoffice/branches/ooxml-osba/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ooxml-osba/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx?rev=1547030&r1=1547029&r2=1547030&view=diff
==============================================================================
--- openoffice/branches/ooxml-osba/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx (original)
+++ openoffice/branches/ooxml-osba/main/writerfilter/source/dmapper/DomainMapper_Impl.hxx Mon Dec 2 14:27:06 2013
@@ -173,8 +173,10 @@ struct TextAppendContext
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextAppend > xTextAppend;
ParagraphPropertiesPtr pLastParagraphProperties;
- TextAppendContext( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextAppend >& xAppend ) :
- xTextAppend( xAppend ){}
+ TextAppendContext( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextAppend >& xAppend )
+ : xTextAppend( xAppend )
+ {
+ }
};
typedef boost::shared_ptr<FieldContext> FieldContextPtr;
@@ -211,11 +213,16 @@ class FIB
struct DeletableTabStop : public ::com::sun::star::style::TabStop
{
bool bDeleted;
- DeletableTabStop() :
- bDeleted( false ){}
- DeletableTabStop( const ::com::sun::star::style::TabStop& rTabStop ) :
- TabStop( rTabStop ),
- bDeleted( false ){}
+
+ DeletableTabStop()
+ : TabStop()
+ , bDeleted( false )
+ {}
+
+ DeletableTabStop( const ::com::sun::star::style::TabStop& rTabStop )
+ : TabStop( rTabStop )
+ , bDeleted( false )
+ {}
};
/*-- 12.06.2007 07:15:31---------------------------------------------------
/// helper to remember bookmark start position
@@ -225,10 +232,14 @@ struct BookmarkInsertPosition
bool m_bIsStartOfText;
::rtl::OUString m_sBookmarkName;
::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > m_xTextRange;
- BookmarkInsertPosition(bool bIsStartOfText, const ::rtl::OUString& rName, ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xTextRange):
- m_bIsStartOfText( bIsStartOfText ),
- m_sBookmarkName( rName ),
- m_xTextRange( xTextRange )
+
+ BookmarkInsertPosition(
+ bool bIsStartOfText,
+ const ::rtl::OUString& rName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xTextRange )
+ : m_bIsStartOfText( bIsStartOfText )
+ , m_sBookmarkName( rName )
+ , m_xTextRange( xTextRange )
{}
};
@@ -352,8 +363,8 @@ private:
bool m_bIsInComments;
//annotation import
- uno::Reference< beans::XPropertySet > m_xAnnotationField;
- AnnotationPosition m_aAnnotationPosition;
+ uno::Reference< beans::XPropertySet > m_xAnnotationField;
+ AnnotationPosition m_aAnnotationPosition;
void GetCurrentLocale(::com::sun::star::lang::Locale& rLocale);
void SetNumberFormat( const ::rtl::OUString& rCommand,