ooo-build r15534 - trunk/patches/dev300
- From: cbosdo svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15534 - trunk/patches/dev300
- Date: Fri, 13 Mar 2009 11:04:31 +0000 (UTC)
Author: cbosdo
Date: Fri Mar 13 11:04:31 2009
New Revision: 15534
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15534&view=rev
Log:
Fixed patch: missing files
Modified:
trunk/patches/dev300/writerfilter-docx-import-page-borders.diff
Modified: trunk/patches/dev300/writerfilter-docx-import-page-borders.diff
==============================================================================
--- trunk/patches/dev300/writerfilter-docx-import-page-borders.diff (original)
+++ trunk/patches/dev300/writerfilter-docx-import-page-borders.diff Fri Mar 13 11:04:31 2009
@@ -40,6 +40,197 @@
default:
{
#if OSL_DEBUG_LEVEL > 0
+diff --git writerfilter/source/dmapper/PageBordersHandler.cxx writerfilter/source/dmapper/PageBordersHandler.cxx
+new file mode 100644
+index 0000000..5280697
+--- /dev/null
++++ writerfilter/source/dmapper/PageBordersHandler.cxx
+@@ -0,0 +1,121 @@
++#include "PageBordersHandler.hxx"
++
++#include <ooxml/resourceids.hxx>
++
++namespace writerfilter {
++namespace dmapper {
++
++_PgBorder::_PgBorder( ) :
++ m_nDistance( 0 ),
++ m_ePos( BORDER_RIGHT )
++{
++}
++
++_PgBorder::~_PgBorder( )
++{
++}
++
++PageBordersHandler::PageBordersHandler( ) :
++ m_nDisplay( 0 ),
++ m_nOffset( 0 )
++{
++}
++
++PageBordersHandler::~PageBordersHandler( )
++{
++}
++
++void PageBordersHandler::attribute( Id eName, Value& rVal )
++{
++ int nIntValue = rVal.getInt( );
++ switch ( eName )
++ {
++ case NS_ooxml::LN_CT_PageBorders_display:
++ {
++ switch ( nIntValue )
++ {
++ default:
++ case NS_ooxml::LN_Value_wordprocessingml_ST_PageBorderDisplay_allPages:
++ m_nDisplay = 0;
++ break;
++ case NS_ooxml::LN_Value_wordprocessingml_ST_PageBorderDisplay_firstPage:
++ m_nDisplay = 1;
++ break;
++ case NS_ooxml::LN_Value_wordprocessingml_ST_PageBorderDisplay_notFirstPage:
++ m_nDisplay = 2;
++ break;
++ }
++ }
++ break;
++ case NS_ooxml::LN_CT_PageBorders_offsetFrom:
++ {
++ switch ( nIntValue )
++ {
++ default:
++ case NS_ooxml::LN_Value_wordprocessingml_ST_PageBorderOffset_page:
++ m_nOffset = 1;
++ break;
++ case NS_ooxml::LN_Value_wordprocessingml_ST_PageBorderOffset_text:
++ m_nOffset = 0;
++ break;
++ }
++ }
++ break;
++ default:;
++ }
++}
++
++void PageBordersHandler::sprm( Sprm& rSprm )
++{
++ switch ( rSprm.getId( ) )
++ {
++ case NS_ooxml::LN_CT_PageBorders_top:
++ case NS_ooxml::LN_CT_PageBorders_left:
++ case NS_ooxml::LN_CT_PageBorders_bottom:
++ case NS_ooxml::LN_CT_PageBorders_right:
++ {
++ writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
++ if( pProperties.get())
++ {
++ BorderHandlerPtr pBorderHandler( new BorderHandler( true ) );
++ pProperties->resolve(*pBorderHandler);
++ BorderPosition ePos = BorderPosition( 0 );
++ switch( rSprm.getId( ) )
++ {
++ case NS_ooxml::LN_CT_PageBorders_top:
++ ePos = BORDER_TOP;
++ break;
++ case NS_ooxml::LN_CT_PageBorders_left:
++ ePos = BORDER_LEFT;
++ break;
++ case NS_ooxml::LN_CT_PageBorders_bottom:
++ ePos = BORDER_BOTTOM;
++ break;
++ case NS_ooxml::LN_CT_PageBorders_right:
++ ePos = BORDER_RIGHT;
++ break;
++ default:;
++ }
++
++ _PgBorder aPgBorder;
++ aPgBorder.m_rLine = pBorderHandler->getBorderLine( );
++ aPgBorder.m_nDistance = pBorderHandler->getLineDistance( );
++ aPgBorder.m_ePos = ePos;
++ m_aBorders.push_back( aPgBorder );
++ }
++ }
++ break;
++ default:;
++ }
++}
++
++void PageBordersHandler::SetBorders( SectionPropertyMap* pSectContext )
++{
++ for ( int i = 0, length = m_aBorders.size( ); i < length; i++ )
++ {
++ _PgBorder aBorder = m_aBorders[i];
++ pSectContext->SetBorder( aBorder.m_ePos, aBorder.m_nDistance, aBorder.m_rLine );
++ }
++}
++
++} }
+diff --git writerfilter/source/dmapper/PageBordersHandler.hxx writerfilter/source/dmapper/PageBordersHandler.hxx
+new file mode 100644
+index 0000000..5f501d2
+--- /dev/null
++++ writerfilter/source/dmapper/PageBordersHandler.hxx
+@@ -0,0 +1,58 @@
++#ifndef INCLUDED_PAGEBORDERSHANDLER_HXX
++#define INCLUDED_PAGEBORDERSHANDLER_HXX
++
++#include "BorderHandler.hxx"
++#include "PropertyMap.hxx"
++
++#include <WriterFilterDllApi.hxx>
++#include <resourcemodel/WW8ResourceModel.hxx>
++#include <boost/shared_ptr.hpp>
++
++#include <com/sun/star/table/BorderLine.hpp>
++
++#include <vector>
++
++using namespace std;
++
++namespace writerfilter {
++namespace dmapper {
++
++class _PgBorder
++{
++public:
++ com::sun::star::table::BorderLine m_rLine;
++ sal_Int32 m_nDistance;
++ BorderPosition m_ePos;
++
++ _PgBorder( );
++ ~_PgBorder( );
++};
++
++class WRITERFILTER_DLLPRIVATE PageBordersHandler : public Properties
++{
++private:
++
++ // See implementation of SectionPropertyMap::ApplyBorderToPageStyles
++ sal_Int32 m_nDisplay;
++ sal_Int32 m_nOffset;
++ vector<_PgBorder> m_aBorders;
++
++public:
++ PageBordersHandler( );
++ ~PageBordersHandler( );
++
++ // Properties
++ virtual void attribute( Id eName, Value& rVal );
++ virtual void sprm( Sprm& rSprm );
++
++ inline sal_Int32 GetDisplayOffset( )
++ {
++ return ( m_nOffset << 5 ) + m_nDisplay;
++ };
++ void SetBorders( SectionPropertyMap* pSectContext );
++};
++typedef boost::shared_ptr< PageBordersHandler > PageBordersHandlerPtr;
++
++} }
++
++#endif
diff --git writerfilter/source/dmapper/PropertyMap.cxx writerfilter/source/dmapper/PropertyMap.cxx
index af17583..bef5c9b 100644
--- writerfilter/source/dmapper/PropertyMap.cxx
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]