ooo-build r15014 - in branches/opensuse-11-1: . patches/dev300



Author: thorstenb
Date: Wed Jan  7 10:30:36 2009
New Revision: 15014
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15014&view=rev

Log:
    * patches/dev300/apply:
    * patches/dev300/cws-impress-161.diff: fix wordwrap problem with
    2.x documents, make connector shapes recalc after spell
    check. Backport from 3.0.1



Added:
   branches/opensuse-11-1/patches/dev300/cws-impress-161.diff
Modified:
   branches/opensuse-11-1/ChangeLog
   branches/opensuse-11-1/patches/dev300/apply

Modified: branches/opensuse-11-1/patches/dev300/apply
==============================================================================
--- branches/opensuse-11-1/patches/dev300/apply	(original)
+++ branches/opensuse-11-1/patches/dev300/apply	Wed Jan  7 10:30:36 2009
@@ -2736,6 +2736,9 @@
 # fix problem with calling private and protected members in layout code
 sfx2-privateprotectedpublic.diff
 
+# fix wordwrap problem with 2.x documents
+cws-impress-161.diff, i#93996, thorsten
+
 [ CairoFonts ]
 psprint.defconfig_changes.diff, n#436441, flr
 

Added: branches/opensuse-11-1/patches/dev300/cws-impress-161.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-11-1/patches/dev300/cws-impress-161.diff	Wed Jan  7 10:30:36 2009
@@ -0,0 +1,302 @@
+Index: inc/xmloff/WordWrapPropertyHdl.hxx
+===================================================================
+RCS file: inc/xmloff/WordWrapPropertyHdl.hxx
+diff -N inc/xmloff/WordWrapPropertyHdl.hxx
+--- /dev/null	1 Jan 1970 00:00:00 -0000
++++ xmloff/inc/xmloff/WordWrapPropertyHdl.hxx	22 Sep 2008 15:03:52 -0000	1.1.2.1
+@@ -0,0 +1,56 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: WordWrapPropertyHdl.hxx,v $
++ * $Revision: 1.1.2.1 $
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU Lesser General Public License version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org.  If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++
++#ifndef _XMLOFF_WORDWRAPPROPERTYHANDLER_HXX
++#define _XMLOFF_WORDWRAPPROPERTYHANDLER_HXX
++
++#include <xmloff/xmlprhdl.hxx>
++#include <xmloff/xmltoken.hxx>
++#include <com/sun/star/uno/Type.h>
++#include <xmloff/xmlement.hxx>
++
++/**
++    PropertyHandler for a named xml bool type:
++*/
++class SvXMLImport;
++class XMLWordWrapPropertyHdl : public XMLPropertyHandler
++{
++private:
++	SvXMLImport* mpImport;
++
++public:
++	XMLWordWrapPropertyHdl( SvXMLImport* pImport );
++	virtual ~XMLWordWrapPropertyHdl();
++
++	virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
++	virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
++};
++
++#endif		// _XMLOFF_NAMEDBOOLPROPERTYHANDLER_HXX
+Index: source/draw/sdpropls.cxx
+===================================================================
+RCS file: /cvs/xml/xmloff/source/draw/sdpropls.cxx,v
+retrieving revision 1.102
+retrieving revision 1.102.64.1
+diff -u -p -r1.102 -r1.102.64.1
+--- xmloff/source/draw/sdpropls.cxx	7 Jul 2008 09:54:37 -0000	1.102
++++ xmloff/source/draw/sdpropls.cxx	22 Sep 2008 15:08:15 -0000	1.102.64.1
+@@ -48,6 +48,7 @@
+ #include <com/sun/star/text/WritingMode.hpp>
+ #include <xmloff/EnumPropertyHdl.hxx>
+ #include <xmloff/NamedBoolPropertyHdl.hxx>
++#include <xmloff/WordWrapPropertyHdl.hxx>
+ #include "numithdl.hxx"
+ #include "XMLBitmapRepeatOffsetPropertyHandler.hxx"
+ #include "XMLFillBitmapSizePropertyHandler.hxx"
+@@ -1131,7 +1132,7 @@ const XMLPropertyHandler* XMLSdPropHdlFa
+ 				pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken(XML_FORWARD), GetXMLToken(XML_REVERSE) );
+ 				break;
+ 			case XML_TYPE_WRAP_OPTION:
+-				pHdl = new XMLNamedBoolPropertyHdl( GetXMLToken( XML_WRAP ), GetXMLToken( XML_NO_WRAP ) );
++				pHdl = new XMLWordWrapPropertyHdl( mpImport );
+ 				break;
+ 
+ 			case XML_SD_TYPE_MOVE_PROTECT:
+Index: source/style/WordWrapPropertyHdl.cxx
+===================================================================
+RCS file: source/style/WordWrapPropertyHdl.cxx
+diff -N source/style/WordWrapPropertyHdl.cxx
+--- /dev/null	1 Jan 1970 00:00:00 -0000
++++ xmloff/source/style/WordWrapPropertyHdl.cxx	22 Sep 2008 15:04:16 -0000	1.1.2.1
+@@ -0,0 +1,106 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: WordWrapPropertyHdl.cxx,v $
++ * $Revision: 1.1.2.1 $
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU Lesser General Public License version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org.  If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++
++// MARKER(update_precomp.py): autogen include statement, do not remove
++#include "precompiled_xmloff.hxx"
++#include <xmloff/xmlimp.hxx>
++#include <xmloff/WordWrapPropertyHdl.hxx>
++#include "xmlkywd.hxx"
++#include <xmloff/xmltoken.hxx>
++#include <xmloff/xmluconv.hxx>
++#include <comphelper/extract.hxx>
++#include <rtl/ustring.hxx>
++#include <rtl/ustrbuf.hxx>
++#include <com/sun/star/uno/Any.hxx>
++
++using ::rtl::OUString;
++using ::rtl::OUStringBuffer;
++
++using namespace ::com::sun::star::uno;
++
++///////////////////////////////////////////////////////////////////////////////
++//
++// class XMLWordWrapPropertyHdl
++//
++
++XMLWordWrapPropertyHdl::XMLWordWrapPropertyHdl( SvXMLImport* pImport )
++: mpImport( pImport )
++{
++}
++
++XMLWordWrapPropertyHdl::~XMLWordWrapPropertyHdl()
++{
++	// Nothing to do
++}
++
++sal_Bool XMLWordWrapPropertyHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const
++{
++	sal_Bool bValue = sal_False, bRetValue = sal_False;
++	if( rStrImpValue == GetXMLToken( xmloff::token::XML_WRAP ) )
++	{
++		bValue = sal_True;
++		bRetValue = sal_True;
++	}
++	if( rStrImpValue == GetXMLToken( xmloff::token::XML_NO_WRAP ) )
++	{
++		bValue = sal_False;
++		bRetValue = sal_True;
++	}
++	if ( bRetValue && mpImport )
++	{
++		sal_Int32 nUPD, nBuildId;
++		if( mpImport->getBuildIds( nUPD, nBuildId ) )
++		{
++		    if( nUPD == 300 )
++		    {
++			    if( ( nBuildId > 0 ) && (nBuildId < 9316 ) )
++					bValue = bValue ? sal_False : sal_True;		// treat OOo 3.0 beta1 as OOo 2.x
++		    }
++            else if( ( nUPD == 680 ) || ( nUPD >= 640 && nUPD <= 645 ) )
++				bValue = bValue ? sal_False : sal_True;
++		}
++		rValue <<= bValue;
++	}
++	return bRetValue;
++}
++
++sal_Bool XMLWordWrapPropertyHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const
++{
++	if( ::cppu::any2bool( rValue ) )
++	{
++		rStrExpValue = GetXMLToken( xmloff::token::XML_WRAP );
++	}
++	else
++	{
++		rStrExpValue = GetXMLToken( xmloff::token::XML_NO_WRAP );
++	}
++	return sal_True;
++}
++
+Index: source/style/makefile.mk
+===================================================================
+RCS file: /cvs/xml/xmloff/source/style/makefile.mk,v
+retrieving revision 1.32
+retrieving revision 1.32.120.1
+diff -u -p -r1.32 -r1.32.120.1
+--- xmloff/source/style/makefile.mk	10 Apr 2008 22:41:04 -0000	1.32
++++ xmloff/source/style/makefile.mk	22 Sep 2008 15:08:16 -0000	1.32.120.1
+@@ -121,7 +121,8 @@ CXXFILES = \
+ 		PageMasterImportContext.cxx		\
+ 		PagePropertySetContext.cxx		\
+ 		PageHeaderFooterContext.cxx		\
+-		StyleMap.cxx		\
++		StyleMap.cxx					\
++		WordWrapPropertyHdl.cxx			\
+ 		XMLBitmapRepeatOffsetPropertyHandler.cxx \
+ 		XMLFillBitmapSizePropertyHandler.cxx \
+ 		XMLBitmapLogicalSizePropertyHandler.cxx \
+@@ -209,6 +210,7 @@ SLOFILES =	\
+ 		$(SLO)$/PagePropertySetContext.obj		\
+ 		$(SLO)$/PageHeaderFooterContext.obj		\
+ 		$(SLO)$/StyleMap.obj					\
++		$(SLO)$/WordWrapPropertyHdl.obj			\
+ 		$(SLO)$/XMLBitmapRepeatOffsetPropertyHandler.obj \
+ 		$(SLO)$/XMLFillBitmapSizePropertyHandler.obj	\
+ 		$(SLO)$/XMLBitmapLogicalSizePropertyHandler.obj	\
+Index: source/core/drawdoc4.cxx
+===================================================================
+RCS file: /cvs/graphics/sd/source/core/drawdoc4.cxx,v
+retrieving revision 1.58
+retrieving revision 1.58.56.2
+diff -u -p -r1.58 -r1.58.56.2
+--- sd/source/core/drawdoc4.cxx	7 Jul 2008 13:31:53 -0000	1.58
++++ sd/source/core/drawdoc4.cxx	29 Oct 2008 10:31:32 -0000	1.58.56.2
+@@ -1012,11 +1012,19 @@ void SdDrawDocument::SpellObject(SdrText
+ 			if (mbHasOnlineSpellErrors)
+ 			{
+ 				sd::ModifyGuard aGuard( this );
+-
+-				// Text aus Outliner holen
++				SdrModel* pModel = pObj->GetModel();
++				sal_Bool bLock = sal_False;
++				if ( pModel )
++				{
++					bLock = pModel->isLocked();
++					pModel->setLock( sal_True );
++				}
++				// taking text from the outliner
+ 				((SdrTextObj*) pObj)->SetOutlinerParaObject( pOutl->CreateParaObject() );
+ 
+ 				pObj->BroadcastObjectChange();
++				if ( pModel )
++					pModel->setLock( bLock );
+ 			}
+ 		}
+ 
+Index: source/filter/xml/sdtransform.cxx
+===================================================================
+RCS file: /cvs/graphics/sd/source/filter/xml/sdtransform.cxx,v
+retrieving revision 1.3.2.1
+retrieving revision 1.3.2.1.12.2
+diff -u -p -r1.3.2.1 -r1.3.2.1.12.2
+--- sd/source/filter/xml/sdtransform.cxx	15 Aug 2008 13:03:34 -0000	1.3.2.1
++++ sd/source/filter/xml/sdtransform.cxx	22 Sep 2008 16:45:35 -0000	1.3.2.1.12.2
+@@ -199,7 +199,6 @@ void SdTransformOOo2xDocument::transform
+ 
+ void SdTransformOOo2xDocument::transformTextShape( SdrTextObj& rTextShape )
+ {
+-	const SfxItemSet& rSet = rTextShape.GetMergedItemSet();
+ /*
+ 	if( (rSet.GetItemState( EE_PARA_LRSPACE ) == SFX_ITEM_SET) && (rSet.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_SET) )
+ 	{
+@@ -209,12 +208,6 @@ void SdTransformOOo2xDocument::transform
+ 		rTextShape.SetMergedItem( aItem );
+ 	}
+ */
+-    if( rSet.GetItemState( SDRATTR_TEXT_WORDWRAP ) == SFX_ITEM_SET )
+-    {
+-		SdrTextWordWrapItem aItem( *static_cast<const SdrTextWordWrapItem*>(rSet.GetItem( SDRATTR_TEXT_WORDWRAP )) );
+-		aItem.SetValue( !aItem.GetValue() );
+-		rTextShape.SetMergedItem( aItem );
+-    }
+ 
+ 	if(!rTextShape.IsEmptyPresObj())
+ 	{
+@@ -337,15 +330,6 @@ bool SdTransformOOo2xDocument::transform
+ 		    bRet = true;
+         }
+ 	}
+-
+-    if( rSet.GetItemState( SDRATTR_TEXT_WORDWRAP ) == SFX_ITEM_SET )
+-    {
+-		SdrTextWordWrapItem aItem( *static_cast<const SdrTextWordWrapItem*>(rSet.GetItem( SDRATTR_TEXT_WORDWRAP )) );
+-		aItem.SetValue( !aItem.GetValue() );
+-		rSet.Put( aItem );
+-        bRet = true;
+-    }
+-
+ 	return bRet;
+ }
+ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]