You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2014/03/19 11:15:07 UTC

svn commit: r1579184 [33/33] - in /openoffice/branches/alg_writerframes: ./ ext_sources/ extras/l10n/source/de/ extras/l10n/source/es/ extras/l10n/source/eu/ extras/l10n/source/hi/ extras/l10n/source/kk/ extras/l10n/source/lt/ extras/l10n/source/nb/ ex...

Modified: openoffice/branches/alg_writerframes/main/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx (original)
+++ openoffice/branches/alg_writerframes/main/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx Wed Mar 19 10:14:42 2014
@@ -120,7 +120,7 @@ public:
     virtual uno::Reference<io::XInputStream> getInputStreamForId(const rtl::OUString & rId);
 
     virtual void setIDForXNoteStream( const sal_Int32 nID );
-    virtual const sal_Int32 getIDForXNoteStream() const;
+    virtual sal_Int32 getIDForXNoteStream() const;
 
     virtual const ::rtl::OUString & getTarget() const;
 };

Modified: openoffice/branches/alg_writerframes/main/writerfilter/source/resourcemodel/resourcemodel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/writerfilter/source/resourcemodel/resourcemodel.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/writerfilter/source/resourcemodel/resourcemodel.cxx (original)
+++ openoffice/branches/alg_writerframes/main/writerfilter/source/resourcemodel/resourcemodel.cxx Wed Mar 19 10:14:42 2014
@@ -103,7 +103,8 @@ public:
     typedef boost::shared_ptr<WW8TableDataHandler> Pointer_t;
     virtual void startTable(unsigned int nRows, unsigned int nDepth,
                             TablePropsRef_t pProps);
-    virtual void endTable();
+    virtual void endTable(
+        const unsigned int nDepth );
     virtual void startRow(unsigned int nCols,
                           TablePropsRef_t pProps);
     virtual void endRow();
@@ -127,7 +128,8 @@ void WW8TableDataHandler::startTable(uns
     output.addItem(tmpStr);
 }
 
-void WW8TableDataHandler::endTable()
+void WW8TableDataHandler::endTable(
+    const unsigned int /*nDepth*/ )
 {
     output.addItem("</tabledata.table>");
 }

Modified: openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/shapeimport.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/shapeimport.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/shapeimport.hxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/shapeimport.hxx Wed Mar 19 10:14:42 2014
@@ -394,12 +394,17 @@ public:
 	void addGluePointMapping( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape,
 							  sal_Int32 nSourceId, sal_Int32 nDestinnationId );
 
+    /** find mapping for given DestinationID. This allows to extract the original draw:id imported with a draw:glue-point */
+    sal_Int32 findGluePointMapping(
+        const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape,
+        sal_Int32 nDestinnationId ) const;
+
 	/** moves all current DestinationId's for rXShape by n */
 	void moveGluePointMapping( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, const sal_Int32 n );
 
 	/** retrieves a mapping for a glue point identifier from the current xml file to the identifier created after
 		inserting the new glue point into the core. The mapping must be initialized first with addGluePointMapping() */
-	sal_Int32 getGluePointId( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, sal_Int32 nSourceId );
+	sal_Int32 getGluePointId( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, sal_Int32 nSourceId );
 
 	/** this method must be calling before the first shape is imported for the given page.
 		Calls to this method can be nested */

Modified: openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/txtparae.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/txtparae.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/txtparae.hxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/txtparae.hxx Wed Mar 19 10:14:42 2014
@@ -107,13 +107,21 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphE
 	::rtl::OUString				sOpenRubyCharStyle;
 	sal_Bool					bOpenRuby;
 
-    // --> OD 2008-05-07 #refactorlists#
     XMLTextListsHelper* mpTextListsHelper;
     ::std::vector< XMLTextListsHelper* > maTextListsHelperStack;
-    // <--
 
 	enum FrameType { FT_TEXT, FT_GRAPHIC, FT_EMBEDDED, FT_SHAPE };
 
+
+    void exportTextRangeSpan(
+            const ::com::sun::star::uno::Reference< com::sun::star::text::XTextRange > & rTextRange,
+            ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xPropSet,
+            ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > & xPropSetInfo,
+            const sal_Bool bIsUICharStyle,
+            const sal_Bool bHasAutoStyle,
+            const ::rtl::OUString& sStyle,
+            sal_Bool& rPrevCharIsSpace );
+
 protected:
 
 	const ::rtl::OUString sActualSize;

Modified: openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/xmlexp.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/xmlexp.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/xmlexp.hxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/xmlexp.hxx Wed Mar 19 10:14:42 2014
@@ -684,14 +684,16 @@ inline void SvXMLExport::SetGraphicResol
 // Helper class to export an element.
 class XMLOFF_DLLPUBLIC SvXMLElementExport
 {
-	SvXMLExport& rExport;
-	::rtl::OUString aName;
-	sal_Bool bIgnWS : 1;
-	sal_Bool bDoSomething : 1;
-
-	SAL_DLLPRIVATE void StartElement( SvXMLExport& rExp, sal_uInt16 nPrefix,
-					   const ::rtl::OUString& rName,
-					   sal_Bool bIgnWSOutside );
+    SvXMLExport& mrExport;
+    ::rtl::OUString maElementName;
+    const sal_Bool mbIgnoreWhitespaceInside :1;
+    const sal_Bool mbDoSomething :1;
+
+    SAL_DLLPRIVATE
+    void StartElement(
+        const sal_uInt16 nPrefix,
+        const ::rtl::OUString& rName,
+        const sal_Bool bIgnoreWhitespaceOutside );
 
 public:
 

Modified: openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/xmlictxt.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/xmlictxt.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/xmlictxt.hxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/inc/xmloff/xmlictxt.hxx Wed Mar 19 10:14:42 2014
@@ -94,6 +94,11 @@ public:
 	// This method is called for all characters that are contained in the
 	// current element. The default is to ignore them.
 	virtual void Characters( const ::rtl::OUString& rChars );
+
+    // #124143# allow to copy evtl. useful data from another temporary import context, e.g. used to
+    // support multiple images and to rescue evtl. GluePoints imported with one of the
+    // to be deprecated contents
+    virtual void onDemandRescueUsefulDataFromTemporary( const SvXMLImportContext& rCandidate );
 };
 
 SV_DECL_REF( SvXMLImportContext )

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/core/xmlexp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/core/xmlexp.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/core/xmlexp.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/core/xmlexp.cxx Wed Mar 19 10:14:42 2014
@@ -2627,12 +2627,10 @@ SvXMLExport::AddAttributesRDFa(
     mpImpl->mpRDFaHelper->AddRDFa(xMeta);
 }
 
-// --> OD 2008-11-26 #158694#
 sal_Bool SvXMLExport::exportTextNumberElement() const
 {
     return mpImpl->mbExportTextNumberElement;
 }
-// <--
 
 sal_Bool SvXMLExport::SetNullDateOnUnitConverter()
 {
@@ -2643,116 +2641,132 @@ sal_Bool SvXMLExport::SetNullDateOnUnitC
     return mpImpl->mbNullDateInitialized;
 }
 
+
 //=============================================================================
 
-void SvXMLElementExport::StartElement( SvXMLExport& rExp,
-									   sal_uInt16 nPrefixKey,
-									   const OUString& rLName,
-									   sal_Bool bIWSOutside )
-{
-    aName = rExp.GetNamespaceMap().GetQNameByKey(nPrefixKey, rLName);
-    rExp.StartElement(aName, bIWSOutside);
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport& rExp,
-										sal_uInt16 nPrefixKey,
-										const sal_Char *pLName,
-										sal_Bool bIWSOutside,
-										sal_Bool bIWSInside ) :
-	rExport( rExp ),
-	bIgnWS( bIWSInside ),
-	bDoSomething( sal_True )
-{
-	OUString sLName( OUString::createFromAscii(pLName) );
-	StartElement( rExp, nPrefixKey, sLName, bIWSOutside );
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport& rExp,
-										sal_uInt16 nPrefixKey,
-										const OUString& rLName,
-										sal_Bool bIWSOutside,
-										sal_Bool bIWSInside ) :
-	rExport( rExp ),
-	bIgnWS( bIWSInside ),
-	bDoSomething( sal_True )
-{
-	StartElement( rExp, nPrefixKey, rLName, bIWSOutside );
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport& rExp,
-										sal_uInt16 nPrefixKey,
-										enum XMLTokenEnum eLName,
-										sal_Bool bIWSOutside,
-										sal_Bool bIWSInside ) :
-	rExport( rExp ),
-	bIgnWS( bIWSInside ),
-	bDoSomething( sal_True )
-{
-	StartElement( rExp, nPrefixKey, GetXMLToken(eLName), bIWSOutside );
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport& rExp,
-										sal_Bool bDoSth,
-										sal_uInt16 nPrefixKey,
-										const sal_Char *pLName,
-										sal_Bool bIWSOutside,
-										sal_Bool bIWSInside ) :
-	rExport( rExp ),
-	bIgnWS( bIWSInside ),
-	bDoSomething( bDoSth )
-{
-	if( bDoSomething )
-	{
-		OUString sLName( OUString::createFromAscii(pLName) );
-		StartElement( rExp, nPrefixKey, sLName, bIWSOutside );
-	}
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport& rExp,
-										sal_Bool bDoSth,
-										sal_uInt16 nPrefixKey,
-										const OUString& rLName,
-										sal_Bool bIWSOutside,
-										sal_Bool bIWSInside ) :
-	rExport( rExp ),
-	bIgnWS( bIWSInside ),
-	bDoSomething( bDoSth )
-{
-	if( bDoSomething )
-		StartElement( rExp, nPrefixKey, rLName, bIWSOutside );
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport& rExp,
-										sal_Bool bDoSth,
-										sal_uInt16 nPrefixKey,
-										enum XMLTokenEnum eLName,
-										sal_Bool bIWSOutside,
-										sal_Bool bIWSInside ) :
-	rExport( rExp ),
-	bIgnWS( bIWSInside ),
-	bDoSomething( bDoSth )
-{
-	if( bDoSomething )
-		StartElement( rExport, nPrefixKey, GetXMLToken(eLName), bIWSOutside );
-}
-
-SvXMLElementExport::SvXMLElementExport( SvXMLExport& rExp,
-                                        const OUString& rQName,
-                                        sal_Bool bIWSOutside,
-                                        sal_Bool bIWSInside ) :
-    rExport( rExp ),
-    bIgnWS( bIWSInside ),
-    bDoSomething( sal_True )
+
+void SvXMLElementExport::StartElement(
+    const sal_uInt16 nPrefixKey,
+    const OUString& rLName,
+    const sal_Bool bIgnoreWhitespaceOutside )
+{
+    maElementName = mrExport.GetNamespaceMap().GetQNameByKey(nPrefixKey, rLName);
+    mrExport.StartElement(maElementName, bIgnoreWhitespaceOutside);
+}
+
+SvXMLElementExport::SvXMLElementExport(
+    SvXMLExport& rExp,
+    sal_uInt16 nPrefixKey,
+    const sal_Char *pLName,
+    sal_Bool bIWSOutside,
+    sal_Bool bIWSInside )
+    : mrExport( rExp )
+    , maElementName()
+    , mbIgnoreWhitespaceInside( bIWSInside )
+    , mbDoSomething( sal_True )
+{
+    const OUString sLName( OUString::createFromAscii( pLName ) );
+    StartElement( nPrefixKey, sLName, bIWSOutside );
+}
+
+SvXMLElementExport::SvXMLElementExport(
+    SvXMLExport& rExp,
+    sal_uInt16 nPrefixKey,
+    const OUString& rLName,
+    sal_Bool bIWSOutside,
+    sal_Bool bIWSInside )
+    : mrExport( rExp )
+    , maElementName()
+    , mbIgnoreWhitespaceInside( bIWSInside )
+    , mbDoSomething( sal_True )
+{
+    StartElement( nPrefixKey, rLName, bIWSOutside );
+}
+
+SvXMLElementExport::SvXMLElementExport(
+    SvXMLExport& rExp,
+    sal_uInt16 nPrefixKey,
+    enum XMLTokenEnum eLName,
+    sal_Bool bIWSOutside,
+    sal_Bool bIWSInside )
+    : mrExport( rExp )
+    , maElementName()
+    , mbIgnoreWhitespaceInside( bIWSInside )
+    , mbDoSomething( sal_True )
+{
+    StartElement( nPrefixKey, GetXMLToken(eLName), bIWSOutside );
+}
+
+SvXMLElementExport::SvXMLElementExport(
+    SvXMLExport& rExp,
+    sal_Bool bDoSth,
+    sal_uInt16 nPrefixKey,
+    const sal_Char *pLName,
+    sal_Bool bIWSOutside,
+    sal_Bool bIWSInside )
+    : mrExport( rExp )
+    , maElementName()
+    , mbIgnoreWhitespaceInside( bIWSInside )
+    , mbDoSomething( bDoSth )
+{
+    if ( mbDoSomething )
+    {
+        const OUString sLName( OUString::createFromAscii( pLName ) );
+        StartElement( nPrefixKey, sLName, bIWSOutside );
+    }
+}
+
+SvXMLElementExport::SvXMLElementExport(
+    SvXMLExport& rExp,
+    sal_Bool bDoSth,
+    sal_uInt16 nPrefixKey,
+    const OUString& rLName,
+    sal_Bool bIWSOutside,
+    sal_Bool bIWSInside )
+    : mrExport( rExp )
+    , maElementName()
+    , mbIgnoreWhitespaceInside( bIWSInside )
+    , mbDoSomething( bDoSth )
+{
+    if ( mbDoSomething )
+        StartElement( nPrefixKey, rLName, bIWSOutside );
+}
+
+SvXMLElementExport::SvXMLElementExport(
+    SvXMLExport& rExp,
+    sal_Bool bDoSth,
+    sal_uInt16 nPrefixKey,
+    enum XMLTokenEnum eLName,
+    sal_Bool bIWSOutside,
+    sal_Bool bIWSInside )
+    : mrExport( rExp )
+    , maElementName()
+    , mbIgnoreWhitespaceInside( bIWSInside )
+    , mbDoSomething( bDoSth )
+{
+    if ( mbDoSomething )
+        StartElement( nPrefixKey, GetXMLToken( eLName ), bIWSOutside );
+}
+
+SvXMLElementExport::SvXMLElementExport(
+    SvXMLExport& rExp,
+    const OUString& rQName,
+    sal_Bool bIWSOutside,
+    sal_Bool bIWSInside )
+    : mrExport( rExp )
+    , maElementName()
+    , mbIgnoreWhitespaceInside( bIWSInside )
+    , mbDoSomething( sal_True )
 {
-    aName = rQName;
+    maElementName = rQName;
     rExp.StartElement( rQName, bIWSOutside );
 }
 
 SvXMLElementExport::~SvXMLElementExport()
 {
-	if( bDoSomething )
-	{
-        rExport.EndElement( aName, bIgnWS );
-	}
+    if ( mbDoSomething )
+    {
+        mrExport.EndElement( maElementName, mbIgnoreWhitespaceInside );
+    }
 }
 

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/core/xmlictxt.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/core/xmlictxt.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/core/xmlictxt.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/core/xmlictxt.cxx Wed Mar 19 10:14:42 2014
@@ -77,4 +77,7 @@ void SvXMLImportContext::Characters( con
 {
 }
 
+void SvXMLImportContext::onDemandRescueUsefulDataFromTemporary( const SvXMLImportContext& )
+{
+}
 

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/core/xmlmultiimagehelper.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/core/xmlmultiimagehelper.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/core/xmlmultiimagehelper.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/core/xmlmultiimagehelper.cxx Wed Mar 19 10:14:42 2014
@@ -96,7 +96,7 @@ multiImageImportHelper::~multiImageImpor
 
 const SvXMLImportContext* multiImageImportHelper::solveMultipleImages()
 {
-    const SvXMLImportContext* pRetval = 0;
+    SvXMLImportContext* pRetval = 0;
 
     if(maImplContextVector.size())
     {
@@ -133,7 +133,16 @@ const SvXMLImportContext* multiImageImpo
             {
                 if(a != nIndexOfPreferred)
                 {
-                    removeGraphicFromImportContext(**maImplContextVector[a]);
+                    SvXMLImportContext& rCandidate = **maImplContextVector[a];
+
+                    if(pRetval)
+                    {
+                        // #124143# evtl. copy imported GluePoints before deprecating
+                        // this graphic and context
+                        pRetval->onDemandRescueUsefulDataFromTemporary(rCandidate);
+                    }
+
+                    removeGraphicFromImportContext(rCandidate);
                 }
             }
         }

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/draw/animimp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/draw/animimp.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/draw/animimp.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/draw/animimp.cxx Wed Mar 19 10:14:42 2014
@@ -615,8 +615,9 @@ void XMLAnimationsEffectContext::EndElem
 					aAny <<= (sal_Bool)sal_True;
 					xSet->setPropertyValue( mpImpl->msIsAnimation, aAny );
 
-					aAny <<= meSpeed;
-					xSet->setPropertyValue( mpImpl->msSpeed, aAny );
+                    // #42894# speed is not supported for the old group animation fallback, so no need to set it
+                    // aAny <<= meSpeed;
+                    // xSet->setPropertyValue( mpImpl->msSpeed, aAny );
 				}
 				else
 				{

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/draw/shapeimport.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/draw/shapeimport.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/draw/shapeimport.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/draw/shapeimport.cxx Wed Mar 19 10:14:42 2014
@@ -1355,6 +1355,35 @@ void XMLShapeImportHelper::addGluePointM
 		mpPageContext->maShapeGluePointsMap[xShape][nSourceId] = nDestinnationId;
 }
 
+/** find mapping for given DestinationID. This allows to extract the original draw:id imported with a draw:glue-point */
+sal_Int32 XMLShapeImportHelper::findGluePointMapping(
+    const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape,
+    sal_Int32 nDestinnationId ) const
+{
+    if( mpPageContext )
+    {
+        ShapeGluePointsMap::iterator aShapeIter( mpPageContext->maShapeGluePointsMap.find( xShape ) );
+
+        if( aShapeIter != mpPageContext->maShapeGluePointsMap.end() )
+        {
+            GluePointIdMap::iterator aShapeIdIter = (*aShapeIter).second.begin();
+            GluePointIdMap::iterator aShapeIdEnd  = (*aShapeIter).second.end();
+
+            while ( aShapeIdIter != aShapeIdEnd )
+            {
+                if ( (*aShapeIdIter).second == nDestinnationId )
+                {
+                    return (*aShapeIdIter).first;
+                }
+
+                aShapeIdIter++;
+            }
+        }
+    }
+
+    return -1;
+}
+
 /** moves all current DestinationId's by n */
 void XMLShapeImportHelper::moveGluePointMapping( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, const sal_Int32 n )
 {
@@ -1377,7 +1406,7 @@ void XMLShapeImportHelper::moveGluePoint
 
 /** retrieves a mapping for a glue point identifier from the current xml file to the identifier created after
 	inserting the new glue point into the core. The mapping must be initialized first with addGluePointMapping() */
-sal_Int32 XMLShapeImportHelper::getGluePointId( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, sal_Int32 nSourceId )
+sal_Int32 XMLShapeImportHelper::getGluePointId( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, sal_Int32 nSourceId )
 {
 	if( mpPageContext )
 	{

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/draw/xexptran.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/draw/xexptran.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/draw/xexptran.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/draw/xexptran.cxx Wed Mar 19 10:14:42 2014
@@ -32,6 +32,7 @@
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <basegfx/tuple/b3dtuple.hxx>
 #include <basegfx/matrix/b3dhommatrix.hxx>
+#include <basegfx/numeric/ftools.hxx>
 #include <tools/string.hxx>
 
 using ::rtl::OUString;
@@ -904,21 +905,21 @@ const OUString& SdXMLImExTransform3D::Ge
 			case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_X	: 
 			{
 				aNewString += OUString::createFromAscii("rotatex (");
-				Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DRotateX*)pObj)->mfRotateX);
+				Imp_PutDoubleChar(aNewString, rConv, basegfx::rad2deg( ((ImpSdXMLExpTransObj3DRotateX*)pObj)->mfRotateX) );
 				aNewString += aClosingBrace;
 				break;
 			}
 			case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Y	: 
 			{
 				aNewString += OUString::createFromAscii("rotatey (");
-				Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DRotateY*)pObj)->mfRotateY);
+				Imp_PutDoubleChar(aNewString, rConv, basegfx::rad2deg( ((ImpSdXMLExpTransObj3DRotateY*)pObj)->mfRotateY) );
 				aNewString += aClosingBrace;
 				break;
 			}
 			case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Z	: 
 			{
 				aNewString += OUString::createFromAscii("rotatez (");
-				Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DRotateZ*)pObj)->mfRotateZ);
+				Imp_PutDoubleChar(aNewString, rConv, basegfx::rad2deg( ((ImpSdXMLExpTransObj3DRotateZ*)pObj)->mfRotateZ) );
 				aNewString += aClosingBrace;
 				break;
 			}
@@ -1062,7 +1063,7 @@ void SdXMLImExTransform3D::SetString(con
 					Imp_SkipSpacesAndOpeningBraces(aStr, nPos, nLen);
 					fValue = Imp_GetDoubleChar(aStr, nPos, nLen, rConv, fValue);
 					if(fValue != 0.0)
-						maList.push_back(new ImpSdXMLExpTransObj3DRotateX(fValue));
+						maList.push_back(new ImpSdXMLExpTransObj3DRotateX(basegfx::deg2rad(fValue)));
 
 					Imp_SkipSpacesAndClosingBraces(aStr, nPos, nLen);
 				}
@@ -1074,7 +1075,7 @@ void SdXMLImExTransform3D::SetString(con
 					Imp_SkipSpacesAndOpeningBraces(aStr, nPos, nLen);
 					fValue = Imp_GetDoubleChar(aStr, nPos, nLen, rConv, fValue);
 					if(fValue != 0.0)
-						maList.push_back(new ImpSdXMLExpTransObj3DRotateY(fValue));
+						maList.push_back(new ImpSdXMLExpTransObj3DRotateY(basegfx::deg2rad(fValue)));
 
 					Imp_SkipSpacesAndClosingBraces(aStr, nPos, nLen);
 				}
@@ -1086,7 +1087,7 @@ void SdXMLImExTransform3D::SetString(con
 					Imp_SkipSpacesAndOpeningBraces(aStr, nPos, nLen);
 					fValue = Imp_GetDoubleChar(aStr, nPos, nLen, rConv, fValue);
 					if(fValue != 0.0)
-						maList.push_back(new ImpSdXMLExpTransObj3DRotateZ(fValue));
+						maList.push_back(new ImpSdXMLExpTransObj3DRotateZ(basegfx::deg2rad(fValue)));
 
 					Imp_SkipSpacesAndClosingBraces(aStr, nPos, nLen);
 				}

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/draw/ximpshap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/draw/ximpshap.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/draw/ximpshap.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/draw/ximpshap.cxx Wed Mar 19 10:14:42 2014
@@ -926,6 +926,73 @@ sal_Bool SdXMLShapeContext::isPresentati
 	return sal_False;
 }
 
+void SdXMLShapeContext::onDemandRescueUsefulDataFromTemporary( const SvXMLImportContext& rCandidate )
+{
+    const SdXMLShapeContext* pCandidate = dynamic_cast< const SdXMLShapeContext* >(&rCandidate);
+
+    if(!mxGluePoints.is() && pCandidate)
+    {
+        // try to rescue GluePoints from rCandidate to local if we not yet have GluePoints by copying them
+        uno::Reference< drawing::XGluePointsSupplier > xSourceSupplier( pCandidate->getShape(), uno::UNO_QUERY );
+        if( !xSourceSupplier.is() )
+            return;
+
+        uno::Reference< container::XIdentifierAccess > xSourceGluePoints( xSourceSupplier->getGluePoints(), uno::UNO_QUERY );
+        if( !xSourceGluePoints.is() )
+            return;
+
+        uno::Sequence< sal_Int32 > aSourceIdSequence( xSourceGluePoints->getIdentifiers() );
+        const sal_Int32 nSourceCount(aSourceIdSequence.getLength());
+        UniReference< XMLShapeImportHelper > xSourceShapeImportHelper(const_cast< SdXMLShapeContext* >(pCandidate)->GetImport().GetShapeImport());
+
+        if(nSourceCount)
+        {
+            // rCandidate has GluePoints; prepare the GluePoint container for the local shape
+            uno::Reference< drawing::XGluePointsSupplier > xSupplier( mxShape, uno::UNO_QUERY );
+            if( !xSupplier.is() )
+                return;
+
+            mxGluePoints = uno::Reference< container::XIdentifierContainer >::query( xSupplier->getGluePoints() );
+
+            if( !mxGluePoints.is() )
+                return;
+
+            drawing::GluePoint2 aSourceGluePoint;
+
+            for( sal_Int32 nSourceIndex(0); nSourceIndex < nSourceCount; nSourceIndex++ )
+            {
+                const sal_Int32 nSourceIdentifier = aSourceIdSequence[nSourceIndex];
+
+                // loop over GluePoints which are UserDefined (avoid the auto mapped ones)
+                if((xSourceGluePoints->getByIdentifier( nSourceIdentifier ) >>= aSourceGluePoint) 
+                    && aSourceGluePoint.IsUserDefined)
+                {
+                    // get original mappingID back, this is the draw:id imported with a draw:glue-point
+                    const sal_Int32 nDestinnationId = xSourceShapeImportHelper->findGluePointMapping( 
+                        pCandidate->getShape(), 
+                        nSourceIdentifier );
+
+                    if(-1 != nSourceIdentifier)
+                    {
+                        // if we got that we are able to add a copy of that GluePoint to the local
+                        // context and xShape since we have all information that the source shape
+                        // and context had at import time
+                        try
+                        {
+                            const sal_Int32 nInternalId = mxGluePoints->insert( uno::makeAny( aSourceGluePoint ) );
+                            GetImport().GetShapeImport()->addGluePointMapping( mxShape, nDestinnationId, nInternalId );
+                        }
+                        catch( uno::Exception& )
+                        {
+                            DBG_ERROR( "exception during setting of glue points!");
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
+
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/draw/ximpshap.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/draw/ximpshap.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/draw/ximpshap.hxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/draw/ximpshap.hxx Wed Mar 19 10:14:42 2014
@@ -120,6 +120,10 @@ public:
 
     /// access to ShapeId for evtl. late adding
     const rtl::OUString& getShapeId() const { return maShapeId; }
+
+    // allow to copy evtl. useful data from another temporary import context, e.g. used to
+    // support multiple images
+    virtual void onDemandRescueUsefulDataFromTemporary( const SvXMLImportContext& rCandidate );
 };
 
 //////////////////////////////////////////////////////////////////////////////

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/text/txtfldi.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/text/txtfldi.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/text/txtfldi.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/text/txtfldi.cxx Wed Mar 19 10:14:42 2014
@@ -3776,8 +3776,8 @@ void XMLAnnotationImportContext::EndElem
                 // let's create a text range covering the start and the current position.
                 uno::Reference< text::XText > xText = GetImportHelper().GetText();
                 uno::Reference< text::XTextCursor > xCursor =
-                    xText->createTextCursorByRange( xPrevField->getAnchor() );
-                xCursor->gotoRange( GetImportHelper().GetCursorAsRange(), true );
+                    xText->createTextCursorByRange( GetImportHelper().GetCursorAsRange() );
+                xCursor->gotoRange( xPrevField->getAnchor(), true );
                 uno::Reference< text::XTextRange > xTextRange( xCursor, uno::UNO_QUERY );
 
                 xText->insertTextContent( xTextRange, xPrevField, !xCursor->isCollapsed() );

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/text/txtimp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/text/txtimp.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/text/txtimp.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/text/txtimp.cxx Wed Mar 19 10:14:42 2014
@@ -2061,7 +2061,7 @@ void XMLTextImportHelper::SetOutlineStyl
     static ::rtl::OUString s_HeadingStyleName(
         RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName"));
 
-    if ((m_pImpl->m_pOutlineStylesCandidates != NULL || bSetEmptyLevels) &&
+    if (( bool(m_pImpl->m_pOutlineStylesCandidates) || bSetEmptyLevels) &&
          m_pImpl->m_xChapterNumbering.is() &&
          !IsInsertMode())
     {
@@ -2125,7 +2125,8 @@ void XMLTextImportHelper::SetOutlineStyl
                         {
                             if (!lcl_HasListStyle(
                                     m_pImpl->m_pOutlineStylesCandidates[i][j],
-                                    m_pImpl->m_xParaStyles, GetXMLImport(),
+                                    m_pImpl->m_xParaStyles,
+                                    GetXMLImport(),
                                     s_NumberingStyleName,
                                     sOutlineStyleName))
                             {

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/text/txtparae.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/text/txtparae.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/text/txtparae.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/text/txtparae.cxx Wed Mar 19 10:14:42 2014
@@ -3147,202 +3147,84 @@ void XMLTextParagraphExport::setTextEmbe
 }
 
 sal_Bool XMLTextParagraphExport::addHyperlinkAttributes(
-		const Reference < XPropertySet > & rPropSet,
-		const Reference < XPropertyState > & rPropState,
-		const Reference < XPropertySetInfo > & rPropSetInfo )
+    const Reference< XPropertySet > & rPropSet,
+    const Reference< XPropertyState > & rPropState,
+    const Reference< XPropertySetInfo > & rPropSetInfo )
 {
-	sal_Bool bExport = sal_False;
-	OUString sHRef, sName, sTargetFrame, sUStyleName, sVStyleName;
-	sal_Bool bServerMap = sal_False;
+    sal_Bool bExport = sal_False;
+    OUString sHRef, sName, sTargetFrame, sUStyleName, sVStyleName;
+    sal_Bool bServerMap = sal_False;
 
-/*    bool bHyperLinkURL = false;
-    bool bHyperLinkName = false;
-    bool bHyperLinkTarget = false;
-    bool bServer = false;
-    bool bUnvisitedCharStyleName = false;
-    bool bVisitedCharStyleName = false;
-
-    const Reference< XMultiPropertySet > xMultiPropertySet( rPropSet, UNO_QUERY );
-    if ( xMultiPropertySet.is() )
-    {
-    sal_uInt32 nCount = 0;
-    Sequence< OUString > aPropertyNames( 6 );
-  	OUString* pArray = aPropertyNames.getArray();
-
-    if ( rPropSetInfo->hasPropertyByName( sServerMap ) )
+    if ( rPropSetInfo->hasPropertyByName( sHyperLinkURL )
+         && ( !rPropState.is()
+              || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sHyperLinkURL ) ) )
     {
-        bServer = true;
-        pArray[ nCount++ ] = sServerMap;
+        rPropSet->getPropertyValue( sHyperLinkURL ) >>= sHRef;
+        if ( !sHRef.isEmpty() )
+            bExport = sal_True;
     }
-    if ( rPropSetInfo->hasPropertyByName( sHyperLinkName ) )
+    if ( sHRef.isEmpty() )
     {
-        bHyperLinkName = true;
-        pArray[ nCount++ ] = sHyperLinkName;
+        // hyperlink without an URL does not make sense
+        OSL_ENSURE( false, "hyperlink without an URL --> no export to ODF" );
+        return sal_False;
     }
-    if ( rPropSetInfo->hasPropertyByName( sHyperLinkTarget ) )
+
+
+    if ( rPropSetInfo->hasPropertyByName( sHyperLinkName )
+         && ( !rPropState.is()
+              || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sHyperLinkName ) ) )
     {
-        bHyperLinkTarget = true;
-        pArray[ nCount++ ] = sHyperLinkTarget;
+        rPropSet->getPropertyValue( sHyperLinkName ) >>= sName;
+        if ( !sName.isEmpty() )
+            bExport = sal_True;
     }
-    if ( rPropSetInfo->hasPropertyByName( sHyperLinkURL ) )
+
+    if ( rPropSetInfo->hasPropertyByName( sHyperLinkTarget )
+         && ( !rPropState.is()
+              || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sHyperLinkTarget ) ) )
     {
-        bHyperLinkURL = true;
-        pArray[ nCount++ ] = sHyperLinkURL;
+        rPropSet->getPropertyValue( sHyperLinkTarget ) >>= sTargetFrame;
+        if ( !sTargetFrame.isEmpty() )
+            bExport = sal_True;
     }
-    if ( rPropSetInfo->hasPropertyByName( sUnvisitedCharStyleName ) )
+
+    if ( rPropSetInfo->hasPropertyByName( sServerMap )
+         && ( !rPropState.is()
+              || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sServerMap ) ) )
     {
-        bUnvisitedCharStyleName = true;
-        pArray[ nCount++ ] = sUnvisitedCharStyleName;
+        bServerMap = *(sal_Bool *) rPropSet->getPropertyValue( sServerMap ).getValue();
+        if ( bServerMap )
+            bExport = sal_True;
     }
-    if ( rPropSetInfo->hasPropertyByName( sVisitedCharStyleName ) )
+
+    if ( rPropSetInfo->hasPropertyByName( sUnvisitedCharStyleName )
+         && ( !rPropState.is()
+              || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sUnvisitedCharStyleName ) ) )
     {
-        bVisitedCharStyleName = true;
-        pArray[ nCount++ ] = sVisitedCharStyleName;
+        rPropSet->getPropertyValue( sUnvisitedCharStyleName ) >>= sUStyleName;
+        if ( !sUStyleName.isEmpty() )
+            bExport = sal_True;
     }
 
-    aPropertyNames.realloc( nCount );
-
-    if ( nCount )
+    if ( rPropSetInfo->hasPropertyByName( sVisitedCharStyleName )
+         && ( !rPropState.is()
+              || PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sVisitedCharStyleName ) ) )
     {
-        Sequence< PropertyState > aPropertyStates( nCount );
-      	PropertyState* pStateArray = aPropertyStates.getArray();
-
-        if ( rPropState.is() )
-            aPropertyStates = rPropState->getPropertyStates( aPropertyNames );
-
-        Sequence< Any > aPropertyValues ( xMultiPropertySet->getPropertyValues( aPropertyNames ) );
-        Any* pValueArray = aPropertyValues.getArray();
-
-        sal_uInt32 nIdx = 0;
-
-        if ( bServer )
-        {
-            if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] )
-            {
-                bServerMap = *(sal_Bool *)pValueArray[ nIdx ].getValue();
-        		if( bServerMap  )
-			        bExport = sal_True;
-            }
-            ++nIdx;
-        }
-        if ( bHyperLinkName )
-        {
-            if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] )
-            {
-                pValueArray[ nIdx ] >>= sName;
-        		if( sName.getLength() > 0 )
-			        bExport = sal_True;
-            }
-            ++nIdx;
-        }
-        if ( bHyperLinkTarget )
-        {
-            if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] )
-            {
-                pValueArray[ nIdx ] >>= sTargetFrame;
-        		if( sTargetFrame.getLength() )
-			        bExport = sal_True;
-            }
-            ++nIdx;
-        }
-        if ( bHyperLinkURL )
-        {
-            if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] )
-            {
-                pValueArray[ nIdx ] >>= sHRef;
-        		if( sHRef.getLength() > 0 )
-		        	bExport = sal_True;
-            }
-            ++nIdx;
-        }
-        if ( bUnvisitedCharStyleName )
-        {
-            if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] )
-            {
-                pValueArray[ nIdx ] >>= sUStyleName;
-        		if( sUStyleName.getLength() )
-			        bExport = sal_True;
-            }
-            ++nIdx;
-        }
-        if ( bVisitedCharStyleName )
-        {
-            if ( !rPropState.is() || PropertyState_DIRECT_VALUE == pStateArray[ nIdx ] )
-            {
-                pValueArray[ nIdx ] >>= sVStyleName;
-        		if( sVStyleName.getLength() )
-			        bExport = sal_True;
-            }
-            ++nIdx;
-        }
-    }
+        rPropSet->getPropertyValue( sVisitedCharStyleName ) >>= sVStyleName;
+        if ( !sVStyleName.isEmpty() )
+            bExport = sal_True;
     }
-    else
-    {*/
-	if( rPropSetInfo->hasPropertyByName( sHyperLinkURL ) &&
-		( !rPropState.is() || PropertyState_DIRECT_VALUE ==
-					rPropState->getPropertyState( sHyperLinkURL ) ) )
-	{
-		rPropSet->getPropertyValue( sHyperLinkURL ) >>= sHRef;
-
-		if( sHRef.getLength() > 0 )
-			bExport = sal_True;
-	}
-
-	if( rPropSetInfo->hasPropertyByName( sHyperLinkName ) &&
-		( !rPropState.is() || PropertyState_DIRECT_VALUE ==
-					rPropState->getPropertyState( sHyperLinkName ) ) )
-	{
-		rPropSet->getPropertyValue( sHyperLinkName ) >>= sName;
-		if( sName.getLength() > 0 )
-			bExport = sal_True;
-	}
-
-	if( rPropSetInfo->hasPropertyByName( sHyperLinkTarget ) &&
-		( !rPropState.is() || PropertyState_DIRECT_VALUE ==
-					rPropState->getPropertyState( sHyperLinkTarget ) ) )
-	{
-		rPropSet->getPropertyValue( sHyperLinkTarget ) >>= sTargetFrame;
-		if( sTargetFrame.getLength() )
-			bExport = sal_True;
-	}
-
-	if( rPropSetInfo->hasPropertyByName( sServerMap ) &&
-		( !rPropState.is() || PropertyState_DIRECT_VALUE ==
-					rPropState->getPropertyState( sServerMap ) ) )
-	{
-		bServerMap = *(sal_Bool *)rPropSet->getPropertyValue( sServerMap ).getValue();
-		if( bServerMap  )
-			bExport = sal_True;
-	}
-
-	if( rPropSetInfo->hasPropertyByName( sUnvisitedCharStyleName ) &&
-		( !rPropState.is() || PropertyState_DIRECT_VALUE ==
-			rPropState->getPropertyState( sUnvisitedCharStyleName ) ) )
-	{
-		rPropSet->getPropertyValue( sUnvisitedCharStyleName ) >>= sUStyleName;
-		if( sUStyleName.getLength() )
-			bExport = sal_True;
-	}
-
-	if( rPropSetInfo->hasPropertyByName( sVisitedCharStyleName ) &&
-		( !rPropState.is() || PropertyState_DIRECT_VALUE ==
-			rPropState->getPropertyState( sVisitedCharStyleName ) ) )
-	{
-		rPropSet->getPropertyValue( sVisitedCharStyleName ) >>= sVStyleName;
-		if( sVStyleName.getLength() )
-			bExport = sal_True;
-	}
 
-	if( bExport )
+    if ( bExport )
 	{
 		GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
 		GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference( sHRef ) );
 
-		if( sName.getLength() > 0 )
+		if( !sName.isEmpty() )
 			GetExport().AddAttribute( XML_NAMESPACE_OFFICE, XML_NAME, sName );
 
-		if( sTargetFrame.getLength() )
+		if( !sTargetFrame.isEmpty() )
 		{
 			GetExport().AddAttribute( XML_NAMESPACE_OFFICE,
 									  XML_TARGET_FRAME_NAME, sTargetFrame );
@@ -3356,11 +3238,11 @@ sal_Bool XMLTextParagraphExport::addHype
 			GetExport().AddAttribute( XML_NAMESPACE_OFFICE,
                                       XML_SERVER_MAP, XML_TRUE );
 
-		if( sUStyleName.getLength() )
+		if( !sUStyleName.isEmpty() )
 			GetExport().AddAttribute( XML_NAMESPACE_TEXT,
 			  XML_STYLE_NAME, GetExport().EncodeStyleName( sUStyleName ) );
 
-		if( sVStyleName.getLength() )
+		if( !sVStyleName.isEmpty() )
 			GetExport().AddAttribute( XML_NAMESPACE_TEXT,
 			  XML_VISITED_STYLE_NAME, GetExport().EncodeStyleName( sVStyleName ) );
 	}
@@ -3368,66 +3250,79 @@ sal_Bool XMLTextParagraphExport::addHype
 	return bExport;
 }
 
+void XMLTextParagraphExport::exportTextRangeSpan(
+    const com::sun::star::uno::Reference< com::sun::star::text::XTextRange > & rTextRange,
+    Reference< XPropertySet > & xPropSet,
+    Reference < XPropertySetInfo > & xPropSetInfo,
+    const sal_Bool bIsUICharStyle,
+    const sal_Bool bHasAutoStyle,
+    const OUString& sStyle,
+    sal_Bool& rPrevCharIsSpace )
+{
+    XMLTextCharStyleNamesElementExport aCharStylesExport(
+            GetExport(),
+            bIsUICharStyle && aCharStyleNamesPropInfoCache.hasProperty( xPropSet, xPropSetInfo ),
+            bHasAutoStyle,
+            xPropSet,
+            sCharStyleNames );
+
+    if ( !sStyle.isEmpty() )
+    {
+        GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME, GetExport().EncodeStyleName( sStyle ) );
+    }
+    {
+        SvXMLElementExport aElement( GetExport(), !sStyle.isEmpty(), XML_NAMESPACE_TEXT, XML_SPAN, sal_False, sal_False );
+        const OUString aText( rTextRange->getString() );
+        exportText( aText, rPrevCharIsSpace );
+    }
+}
+
 void XMLTextParagraphExport::exportTextRange(
-		const Reference < XTextRange > & rTextRange,
-		sal_Bool bAutoStyles,
-		sal_Bool& rPrevCharIsSpace )
+        const Reference< XTextRange > & rTextRange,
+        sal_Bool bAutoStyles,
+        sal_Bool& rPrevCharIsSpace )
 {
-	Reference < XPropertySet > xPropSet( rTextRange, UNO_QUERY );
-	if( bAutoStyles )
-	{
-		Add( XML_STYLE_FAMILY_TEXT_TEXT, xPropSet );
-	}
-	else
-	{
-		sal_Bool bHyperlink = sal_False;
+    Reference< XPropertySet > xPropSet( rTextRange, UNO_QUERY );
+    if ( bAutoStyles )
+    {
+        Add( XML_STYLE_FAMILY_TEXT_TEXT, xPropSet );
+    }
+    else
+    {
+        sal_Bool bHyperlink = sal_False;
         sal_Bool bIsUICharStyle = sal_False;
         sal_Bool bHasAutoStyle = sal_False;
-
-        OUString sStyle(FindTextStyleAndHyperlink( xPropSet, bHyperlink,
-			   										 bIsUICharStyle, bHasAutoStyle ));
+        const OUString sStyle(
+            FindTextStyleAndHyperlink( xPropSet, bHyperlink, bIsUICharStyle, bHasAutoStyle ) );
 
         Reference < XPropertySetInfo > xPropSetInfo;
-		if( bHyperlink )
-		{
-			Reference< XPropertyState > xPropState( xPropSet, UNO_QUERY );
-			xPropSetInfo.set(xPropSet->getPropertySetInfo());
-			bHyperlink = addHyperlinkAttributes( xPropSet, xPropState, xPropSetInfo );
-		}
-		SvXMLElementExport aElem( GetExport(), bHyperlink, XML_NAMESPACE_TEXT,
-								  XML_A, sal_False, sal_False );
-		if( bHyperlink )
-		{
-			// export events (if supported)
-			OUString sHyperLinkEvents(RTL_CONSTASCII_USTRINGPARAM(
-				"HyperLinkEvents"));
-			if (xPropSetInfo->hasPropertyByName(sHyperLinkEvents))
-			{
-                Reference<XNameReplace> xName(xPropSet->getPropertyValue(sHyperLinkEvents), uno::UNO_QUERY);
-				GetExport().GetEventExport().Export(xName, sal_False);
-			}
-		}
+        sal_Bool bHyperlinkAttrsAdded = sal_False;
+        if ( bHyperlink )
+        {
+            Reference< XPropertyState > xPropState( xPropSet, UNO_QUERY );
+            xPropSetInfo.set( xPropSet->getPropertySetInfo() );
+            bHyperlinkAttrsAdded = addHyperlinkAttributes( xPropSet, xPropState, xPropSetInfo );
+        }
 
-		{
-			XMLTextCharStyleNamesElementExport aCharStylesExport(
-				GetExport(), bIsUICharStyle &&
-							 aCharStyleNamesPropInfoCache.hasProperty(
-                                                    xPropSet, xPropSetInfo ), bHasAutoStyle,
-				xPropSet, sCharStyleNames );
-
-			OUString aText(rTextRange->getString());
-			if( sStyle.getLength() )
-				GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
-						  GetExport().EncodeStyleName( sStyle ) );
-			{
-				// in a block to make sure it is destroyed before the text:a element
-				SvXMLElementExport aElement( GetExport(), sStyle.getLength() > 0,
-										  XML_NAMESPACE_TEXT, XML_SPAN, sal_False,
-										  sal_False );
-				exportText( aText, rPrevCharIsSpace );
-			}
-		}
-	}
+        if ( bHyperlink && bHyperlinkAttrsAdded )
+        {
+            SvXMLElementExport aElem( GetExport(), sal_True, XML_NAMESPACE_TEXT, XML_A, sal_False, sal_False );
+
+            // export events (if supported)
+            static const OUString sHyperLinkEvents( RTL_CONSTASCII_USTRINGPARAM( "HyperLinkEvents" ) );
+            if ( xPropSetInfo->hasPropertyByName( sHyperLinkEvents ) )
+            {
+                Reference< XNameReplace > xName( xPropSet->getPropertyValue( sHyperLinkEvents ), uno::UNO_QUERY );
+                GetExport().GetEventExport().Export( xName, sal_False );
+            }
+
+            exportTextRangeSpan( rTextRange, xPropSet, xPropSetInfo, bIsUICharStyle, bHasAutoStyle, sStyle, rPrevCharIsSpace );
+        }
+        else
+        {
+            exportTextRangeSpan( rTextRange, xPropSet, xPropSetInfo, bIsUICharStyle, bHasAutoStyle, sStyle, rPrevCharIsSpace );
+        }
+    }
 }
 
 void XMLTextParagraphExport::exportText( const OUString& rText,

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/text/txtparai.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/text/txtparai.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/text/txtparai.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/text/txtparai.cxx Wed Mar 19 10:14:42 2014
@@ -338,10 +338,10 @@ public:
 
 class XMLImpHyperlinkContext_Impl : public SvXMLImportContext
 {
-	XMLHints_Impl&	rHints;
-	XMLHyperlinkHint_Impl	*pHint;
+	XMLHints_Impl&	mrHints;
+	XMLHyperlinkHint_Impl	*mpHint;
 
-	sal_Bool&		rIgnoreLeadingSpace;
+	sal_Bool&		mrbIgnoreLeadingSpace;
 
 public:
 
@@ -367,71 +367,77 @@ public:
 TYPEINIT1( XMLImpHyperlinkContext_Impl, SvXMLImportContext );
 
 XMLImpHyperlinkContext_Impl::XMLImpHyperlinkContext_Impl(
-		SvXMLImport& rImport,
-		sal_uInt16 nPrfx,
-		const OUString& rLName,
-		const Reference< xml::sax::XAttributeList > & xAttrList,
-		XMLHints_Impl& rHnts,
-		sal_Bool& rIgnLeadSpace ) :
-	SvXMLImportContext( rImport, nPrfx, rLName ),
-	rHints( rHnts ),
-	pHint( new XMLHyperlinkHint_Impl(
-			  GetImport().GetTextImport()->GetCursorAsRange()->getStart() ) ),
-	rIgnoreLeadingSpace( rIgnLeadSpace )
+    SvXMLImport& rImport,
+    sal_uInt16 nPrfx,
+    const OUString& rLName,
+    const Reference< xml::sax::XAttributeList > & xAttrList,
+    XMLHints_Impl& rHnts,
+    sal_Bool& rIgnLeadSpace )
+    : SvXMLImportContext( rImport, nPrfx, rLName )
+    , mrHints( rHnts )
+    , mpHint( new XMLHyperlinkHint_Impl( GetImport().GetTextImport()->GetCursorAsRange()->getStart() ) )
+    , mrbIgnoreLeadingSpace( rIgnLeadSpace )
 {
-	OUString sShow;
-	const SvXMLTokenMap& rTokenMap =
-		GetImport().GetTextImport()->GetTextHyperlinkAttrTokenMap();
+    OUString sShow;
+    const SvXMLTokenMap& rTokenMap = GetImport().GetTextImport()->GetTextHyperlinkAttrTokenMap();
 
-	sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
-	for( sal_Int16 i=0; i < nAttrCount; i++ )
-	{
-		const OUString& rAttrName = xAttrList->getNameByIndex( i );
-		const OUString& rValue = xAttrList->getValueByIndex( i );
+    sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+    for ( sal_Int16 i = 0; i < nAttrCount; i++ )
+    {
+        const OUString& rAttrName = xAttrList->getNameByIndex( i );
+        const OUString& rValue = xAttrList->getValueByIndex( i );
 
-		OUString aLocalName;
-		sal_uInt16 nPrefix =
-			GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName,
-															&aLocalName );
-		switch( rTokenMap.Get( nPrefix, aLocalName ) )
-		{
-		case XML_TOK_TEXT_HYPERLINK_HREF:
-			pHint->SetHRef( GetImport().GetAbsoluteReference( rValue ) );
-			break;
-		case XML_TOK_TEXT_HYPERLINK_NAME:
-			pHint->SetName( rValue );
-			break;
-		case XML_TOK_TEXT_HYPERLINK_TARGET_FRAME:
-			pHint->SetTargetFrameName( rValue );
-			break;
-		case XML_TOK_TEXT_HYPERLINK_SHOW:
-			sShow = rValue;
-			break;
-		case XML_TOK_TEXT_HYPERLINK_STYLE_NAME:
-			pHint->SetStyleName( rValue );
-			break;
-		case XML_TOK_TEXT_HYPERLINK_VIS_STYLE_NAME:
-			pHint->SetVisitedStyleName( rValue );
-			break;
-		}
-	}
+        OUString aLocalName;
+        const sal_uInt16 nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( rAttrName, &aLocalName );
+        switch (rTokenMap.Get( nPrefix, aLocalName ))
+        {
+        case XML_TOK_TEXT_HYPERLINK_HREF:
+            mpHint->SetHRef( GetImport().GetAbsoluteReference( rValue ) );
+            break;
+        case XML_TOK_TEXT_HYPERLINK_NAME:
+            mpHint->SetName( rValue );
+            break;
+        case XML_TOK_TEXT_HYPERLINK_TARGET_FRAME:
+            mpHint->SetTargetFrameName( rValue );
+            break;
+        case XML_TOK_TEXT_HYPERLINK_SHOW:
+            sShow = rValue;
+            break;
+        case XML_TOK_TEXT_HYPERLINK_STYLE_NAME:
+            mpHint->SetStyleName( rValue );
+            break;
+        case XML_TOK_TEXT_HYPERLINK_VIS_STYLE_NAME:
+            mpHint->SetVisitedStyleName( rValue );
+            break;
+        }
+    }
 
-	if( sShow.getLength() && !pHint->GetTargetFrameName().getLength() )
+	if( sShow.getLength() && !mpHint->GetTargetFrameName().getLength() )
 	{
 		if( IsXMLToken( sShow, XML_NEW ) )
-			pHint->SetTargetFrameName(
+			mpHint->SetTargetFrameName(
 					OUString( RTL_CONSTASCII_USTRINGPARAM("_blank" ) ) );
 		else if( IsXMLToken( sShow, XML_REPLACE ) )
-			pHint->SetTargetFrameName(
+			mpHint->SetTargetFrameName(
 					OUString( RTL_CONSTASCII_USTRINGPARAM("_self" ) ) );
 	}
-	rHints.Insert( pHint, rHints.Count() );
+
+    if ( mpHint->GetHRef().isEmpty() )
+    {
+        // hyperlink without an URL is not imported.
+        delete mpHint;
+        mpHint = NULL;
+    }
+    else
+    {
+        mrHints.Insert( mpHint, mrHints.Count() );
+    }
 }
 
 XMLImpHyperlinkContext_Impl::~XMLImpHyperlinkContext_Impl()
 {
-	if( pHint )
-		pHint->SetEnd( GetImport().GetTextImport()
+	if( mpHint != NULL )
+		mpHint->SetEnd( GetImport().GetTextImport()
 							->GetCursorAsRange()->getStart() );
 }
 
@@ -444,7 +450,7 @@ SvXMLImportContext *XMLImpHyperlinkConte
 	{
 		XMLEventsImportContext* pCtxt = new XMLEventsImportContext(
 			GetImport(), nPrefix, rLocalName);
-		pHint->SetEventsContext(pCtxt);
+		mpHint->SetEventsContext(pCtxt);
 		return pCtxt;
 	}
 	else
@@ -455,13 +461,13 @@ SvXMLImportContext *XMLImpHyperlinkConte
 
 		return XMLImpSpanContext_Impl::CreateChildContext(
 			GetImport(), nPrefix, rLocalName, xAttrList,
-			nToken, rHints, rIgnoreLeadingSpace );
+			nToken, mrHints, mrbIgnoreLeadingSpace );
 	}
 }
 
 void XMLImpHyperlinkContext_Impl::Characters( const OUString& rChars )
 {
-	GetImport().GetTextImport()->InsertString( rChars, rIgnoreLeadingSpace );
+	GetImport().GetTextImport()->InsertString( rChars, mrbIgnoreLeadingSpace );
 }
 
 // ---------------------------------------------------------------------
@@ -1651,36 +1657,34 @@ SvXMLImportContext *XMLImpSpanContext_Im
 											   0x0020, sal_True );
 		break;
 
-	case XML_TOK_TEXT_HYPERLINK:
-	{
-		// test for HyperLinkURL property. If present, insert link as
-		// text property (StarWriter), else try to insert as text
-		// field (StarCalc, StarDraw, ...)
-		Reference<beans::XPropertySet> xPropSet(
-			rImport.GetTextImport()->GetCursor(),
-			UNO_QUERY );
-
-		const OUString sHyperLinkURL(
-			RTL_CONSTASCII_USTRINGPARAM("HyperLinkURL"));
-
-		if (xPropSet->getPropertySetInfo()->hasPropertyByName(sHyperLinkURL))
-		{
-			pContext = new XMLImpHyperlinkContext_Impl( rImport, nPrefix,
-														rLocalName, xAttrList,
-														rHints,
-														rIgnoreLeadingSpace );
-		}
-		else
-		{
-			pContext = new XMLUrlFieldImportContext( rImport,
-											  *rImport.GetTextImport().get(),
-													 nPrefix, rLocalName);
-			//whitespace handling like other fields
-			rIgnoreLeadingSpace = sal_False;
+    case XML_TOK_TEXT_HYPERLINK:
+    {
+        // test for HyperLinkURL property. If present, insert link as
+        // text property (StarWriter), else try to insert as text
+        // field (StarCalc, StarDraw, ...)
+        Reference< beans::XPropertySet > xPropSet( rImport.GetTextImport()->GetCursor(), UNO_QUERY );
 
-		}
-		break;
-	}
+        static const OUString sHyperLinkURL( RTL_CONSTASCII_USTRINGPARAM( "HyperLinkURL" ) );
+
+        if ( xPropSet->getPropertySetInfo()->hasPropertyByName( sHyperLinkURL ) )
+        {
+            pContext = new XMLImpHyperlinkContext_Impl(
+                    rImport,
+                    nPrefix,
+                    rLocalName,
+                    xAttrList,
+                    rHints,
+                    rIgnoreLeadingSpace );
+        }
+        else
+        {
+            pContext = new XMLUrlFieldImportContext( rImport, *rImport.GetTextImport().get(), nPrefix, rLocalName );
+            //whitespace handling like other fields
+            rIgnoreLeadingSpace = sal_False;
+
+        }
+        break;
+    }
 
 	case XML_TOK_TEXT_RUBY:
 		pContext = new XMLImpRubyContext_Impl( rImport, nPrefix,

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/transform/EventOASISTContext.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/transform/EventOASISTContext.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/transform/EventOASISTContext.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/transform/EventOASISTContext.cxx Wed Mar 19 10:14:42 2014
@@ -63,7 +63,7 @@ XMLTransformerOASISEventMap_Impl::XMLTra
 	if( pInit )
 	{
 		XMLTransformerOASISEventMap_Impl::key_type aKey;
-		XMLTransformerOASISEventMap_Impl::data_type aData;
+		XMLTransformerOASISEventMap_Impl::mapped_type aData;
 		while( pInit->m_pOASISName )
 		{
 			aKey.m_nPrefix = pInit->m_nOASISPrefix;

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/transform/EventOOoTContext.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/transform/EventOOoTContext.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/transform/EventOOoTContext.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/transform/EventOOoTContext.cxx Wed Mar 19 10:14:42 2014
@@ -62,7 +62,7 @@ public:
 void XMLTransformerOOoEventMap_Impl::AddMap( XMLTransformerEventMapEntry *pInit )
 {
 	XMLTransformerOOoEventMap_Impl::key_type aKey;
-	XMLTransformerOOoEventMap_Impl::data_type aData;
+	XMLTransformerOOoEventMap_Impl::mapped_type aData;
 	while( pInit->m_pOOoName )
 	{
 		aKey = OUString::createFromAscii(pInit->m_pOOoName);

Modified: openoffice/branches/alg_writerframes/main/xmloff/source/transform/TransformerActions.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/xmloff/source/transform/TransformerActions.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/xmloff/source/transform/TransformerActions.cxx (original)
+++ openoffice/branches/alg_writerframes/main/xmloff/source/transform/TransformerActions.cxx Wed Mar 19 10:14:42 2014
@@ -37,7 +37,7 @@ XMLTransformerActions::XMLTransformerAct
 	if( pInit )
 	{
 		XMLTransformerActions::key_type aKey;
-		XMLTransformerActions::data_type aData;
+		XMLTransformerActions::mapped_type aData;
 		while( pInit->m_nActionType != XML_TACTION_EOT )
 		{
 			aKey.m_nPrefix = pInit->m_nPrefix;
@@ -66,7 +66,7 @@ void XMLTransformerActions::Add( XMLTran
 	if( pInit )
 	{
 		XMLTransformerActions::key_type aKey;
-		XMLTransformerActions::data_type aData;
+		XMLTransformerActions::mapped_type aData;
 		while( pInit->m_nActionType != XML_TACTION_EOT )
 		{
 			aKey.m_nPrefix = pInit->m_nPrefix;

Propchange: openoffice/branches/alg_writerframes/test/
------------------------------------------------------------------------------
  Merged /openoffice/trunk/test:r1556289-1578966

Modified: openoffice/branches/alg_writerframes/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java (original)
+++ openoffice/branches/alg_writerframes/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java Wed Mar 19 10:14:42 2014
@@ -97,8 +97,6 @@ public class ShapeTypes {
 		typeKeys("<down><down>");
 		typeKeys("<enter>");
 		sdNavigator.focus();
-		sdNavigator.select(0);
-		typeKeys("<enter>");
 		allShapes=sdNavigator.getAllItemsText();
 		assertEquals(4, allShapes.length);
 	}
@@ -132,8 +130,6 @@ public class ShapeTypes {
 		typeKeys("<down><down>");
 		typeKeys("<enter>");
 		sdNavigator.focus();
-		sdNavigator.select(0);
-		typeKeys("<enter>");
 		allShapes=sdNavigator.getAllItemsText();
 		assertEquals(4, allShapes.length);
 	}

Modified: openoffice/branches/alg_writerframes/test/testgui/source/fvt/gui/sd/table/TableFontEffectsProperty.java
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/test/testgui/source/fvt/gui/sd/table/TableFontEffectsProperty.java?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/test/testgui/source/fvt/gui/sd/table/TableFontEffectsProperty.java (original)
+++ openoffice/branches/alg_writerframes/test/testgui/source/fvt/gui/sd/table/TableFontEffectsProperty.java Wed Mar 19 10:14:42 2014
@@ -70,7 +70,8 @@ public class TableFontEffectsProperty {
 		app.dispatch(".uno:TableDialog", 3);
 		effectsPage.select();
 		// select Font color
-		effectsPageColor.select(1);
+		final int nBlackIndex = 12; // according to standard.soc as of #i121520#
+		effectsPageColor.select( nBlackIndex);
 		assertEquals("EffectsPage_Color isn't black", effectsPageColor.getSelText(), "Black");
 
 		// select Relief

Modified: openoffice/branches/alg_writerframes/test/testgui/source/fvt/gui/sw/table/TableGeneral.java
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/test/testgui/source/fvt/gui/sw/table/TableGeneral.java?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/test/testgui/source/fvt/gui/sw/table/TableGeneral.java (original)
+++ openoffice/branches/alg_writerframes/test/testgui/source/fvt/gui/sw/table/TableGeneral.java Wed Mar 19 10:14:42 2014
@@ -156,7 +156,8 @@ public class TableGeneral {
 		// set line style
 		swTableBorderLineStyle.select(8);
 		// set line color
-		swTableBorderLineColor.select(5);
+		final int nMagentaIndex = 16; // for AOO's colorpicker as of #i118828#
+		swTableBorderLineColor.select( nMagentaIndex);
 		// set spacing to content
 		swTableSTCLeft.focus();
 		typeKeys("<ctrl a>");
@@ -169,20 +170,20 @@ public class TableGeneral {
 		typeKeys("<ctrl a>");
 		typeKeys("<delete>");
 		typeKeys("2");
-		swTableShadowColor.select(5);
+		swTableShadowColor.select( nMagentaIndex);
 		swTableBorder.ok();
 		// verify the setting property of table
 		writer.focus();
 		app.dispatch(".uno:TableDialog");
 		swTableBorder.select();
 		assertEquals("2.60 pt", swTableBorderLineStyle.getItemText(8));
-		assertEquals("Magenta", swTableBorderLineColor.getItemText(5));
-		assertEquals("0.50\"", swTableSTCLeft.getText());
-		assertEquals("0.50\"", swTableSTCRight.getText());
-		assertEquals("0.50\"", swTableSTCTop.getText());
-		assertEquals("0.50\"", swTableSTCBottom.getText());
-		assertEquals("1.97\"", swTableShadowSize.getText());
-		assertEquals("Magenta", swTableShadowColor.getItemText(5));
+		assertEquals("Magenta", swTableBorderLineColor.getItemText( nMagentaIndex));
+		assertEquals("0.50 \"", swTableSTCLeft.getText());
+		assertEquals("0.50 \"", swTableSTCRight.getText());
+		assertEquals("0.50 \"", swTableSTCTop.getText());
+		assertEquals("0.50 \"", swTableSTCBottom.getText());
+		assertEquals("1.97 \"", swTableShadowSize.getText());
+		assertEquals("Magenta", swTableShadowColor.getItemText( nMagentaIndex));
 		assertTrue("SWTableSTC_SYNC", swTableSTCSYNC.isChecked());
 		swTableBorder.close();
 
@@ -218,10 +219,10 @@ public class TableGeneral {
 		// verify the setting value of spacing to content for table
 		app.dispatch(".uno:TableDialog");
 		swTableBorder.select();
-		assertEquals("0.50\"", swTableSTCLeft.getText());
-		assertEquals("0.80\"", swTableSTCRight.getText());
-		assertEquals("1.00\"", swTableSTCTop.getText());
-		assertEquals("1.97\"", swTableSTCBottom.getText());
+		assertEquals("0.50 \"", swTableSTCLeft.getText());
+		assertEquals("0.80 \"", swTableSTCRight.getText());
+		assertEquals("1.00 \"", swTableSTCTop.getText());
+		assertEquals("1.97 \"", swTableSTCBottom.getText());
 		assertFalse("SWTableSTC_SYNC", swTableSTCSYNC.isChecked());
 		swTableBorder.close();
 	}
@@ -273,7 +274,7 @@ public class TableGeneral {
 		writer.openContextMenu();
 		swTableRowHeightMenu.select();
 		assertTrue(swTableSetRowHeightDialog.exists());
-		assertEquals("0.50\"", swTableSetRowHeight.getText());
+		assertEquals("0.50 \"", swTableSetRowHeight.getText());
 		swTableSetRowHeightDialog.close();
 	}
 
@@ -377,7 +378,7 @@ public class TableGeneral {
 		writer.focus();
 		writer.openContextMenu();
 		swTableColumnWidthMenu.select();
-		assertEquals("2.00\"", swTableSetColumnWidth.getText());
+		assertEquals("2.00 \"", swTableSetColumnWidth.getText());
 
 	}
 

Modified: openoffice/branches/alg_writerframes/test/testuno/source/fvt/uno/sd/bullet/GraphicBulletFromFile.java
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/test/testuno/source/fvt/uno/sd/bullet/GraphicBulletFromFile.java?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/test/testuno/source/fvt/uno/sd/bullet/GraphicBulletFromFile.java (original)
+++ openoffice/branches/alg_writerframes/test/testuno/source/fvt/uno/sd/bullet/GraphicBulletFromFile.java Wed Mar 19 10:14:42 2014
@@ -1,156 +1,167 @@
-/**************************************************************
- * 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- * 
- *************************************************************/
-/*
- * Select a external picture from a file as graphic bullet
- * */
-package fvt.uno.sd.bullet;
-import static org.junit.Assert.*;
-import static org.openoffice.test.common.Testspace.prepareData;
-import static testlib.uno.PageUtil.getDrawPageByIndex;
-import static testlib.uno.ShapeUtil.addPortion;
-import static testlib.uno.ShapeUtil.getPortion;
-import static testlib.uno.GraphicUtil.getUniqueIDOfGraphicFile;
-
-import java.io.File;
-
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.openoffice.test.uno.UnoApp;
-import org.openoffice.test.common.FileUtil;
-import org.openoffice.test.common.Testspace;
-
-import testlib.uno.SDUtil;
-
-import com.sun.star.awt.Size;
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.container.XIndexReplace;
-import com.sun.star.drawing.XDrawPage;
-import com.sun.star.drawing.XShape;
-import com.sun.star.lang.XComponent;
-import com.sun.star.style.NumberingType;
-import com.sun.star.uno.UnoRuntime;
-
-public class GraphicBulletFromFile {
-
-	private static final UnoApp app = new UnoApp();
-
-	private XComponent m_xSDComponent = null;
-	private String m_filePath = null;
-	private XPropertySet m_xtextProps = null;	
-	private String m_GraphicPath = null;
-
-	@Before
-	public void setUpDocument() throws Exception {
-		m_filePath = Testspace.getPath("temp/GraphicBulletFromFile.odp");
-		String abslotePath = prepareData("uno/sd/36.gif");	
-		m_GraphicPath = FileUtil.getUrl(new File(abslotePath));	
-//		m_GraphicPath = "file:///F:/work/36.gif";
-		if (FileUtil.fileExists(m_filePath)) {//load
-			m_xtextProps = load();	  
-		} else {//new
-			m_xSDComponent = (XComponent) UnoRuntime.queryInterface(
-					XComponent.class, app.newDocument("simpress"));
-			Object firstPage = getDrawPageByIndex(m_xSDComponent, 0);			
-			Object firstTextBox = SDUtil.getShapeOfPageByIndex(firstPage, 0);
-			XShape xfirstTextBox = (XShape)UnoRuntime.queryInterface(XShape.class, firstTextBox);
-			m_xtextProps = addPortion(xfirstTextBox, "test Graphic Bullet From a File", false);
-		}
-	}
-	
-	private XPropertySet load() throws Exception{
-		m_xSDComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, 
-				app.loadDocument(m_filePath));
-		Object firstPage = getDrawPageByIndex(m_xSDComponent, 0);
-		XDrawPage firstpage = getDrawPageByIndex(m_xSDComponent, 0);
-		Object firstTextBox = SDUtil.getShapeOfPageByIndex(firstPage, 0);
-		XShape xfirstTextBox = (XShape)UnoRuntime.queryInterface(XShape.class, firstTextBox);		
-		return getPortion(xfirstTextBox, 0);
-	}
-
-	@After
-	public void tearDownDocument() {
-		app.closeDocument(m_xSDComponent);
-
-	}
-
-	@BeforeClass
-	public static void setUpConnection() throws Exception {
-		app.start();
-	}
-
-	@AfterClass
-	public static void tearDownConnection() throws InterruptedException,
-			Exception {
-		app.close();
-		//remove the temp file
-		FileUtil.deleteFile(Testspace.getPath("temp"));
-	}
-
-	@Test
-	public void testGraphicBulletFromFile() throws Exception {				
-				
-		Object numberingrules = m_xtextProps.getPropertyValue("NumberingRules");
-		
-		XIndexReplace xReplace = (XIndexReplace) UnoRuntime.queryInterface(
-	             XIndexReplace.class, numberingrules); 		
-		
-		PropertyValue[] props = new PropertyValue[3];
-		props[0] = new PropertyValue();
-	    props[0].Name = "NumberingType";
-	    props[0].Value = new Short(NumberingType.BITMAP );
-	    
-	    props[1] = new PropertyValue();
-	    props[1].Name = "GraphicURL";
-	    props[1].Value = "vnd.sun.star.GraphicObject:"+getUniqueIDOfGraphicFile(app, m_GraphicPath);
-	    
-	    props[2] = new PropertyValue();
-	    props[2].Name = "GraphicSize";	    
-	    props[2].Value = new Size(1000,1000);
-	    
-	    xReplace.replaceByIndex(0, props);
-	    
-	    m_xtextProps.setPropertyValue("NumberingRules", numberingrules);
-		  //set numbering level to 0			
-		m_xtextProps.setPropertyValue("NumberingLevel", new Short((short)0));
-
-		    	    
-		app.saveDocument(m_xSDComponent, m_filePath);
-//			app.closeDocument(m_xSDComponent);
-		m_xSDComponent.dispose();
-			//reopen
-		m_xtextProps = load();
-					    
-		Object numberingrules2 = m_xtextProps.getPropertyValue("NumberingRules");
-						
-		XIndexReplace xReplace2 = (XIndexReplace) UnoRuntime.queryInterface(
-		            XIndexReplace.class, numberingrules2);
-			
-		PropertyValue[] proValues2 = (PropertyValue[])xReplace2.getByIndex(0);  
-		assertEquals("NumberingType should be BITMAP", NumberingType.BITMAP, proValues2[0].Value);
-		String uniqueID = getUniqueIDOfGraphicFile(app, m_GraphicPath);
-		assertEquals("Graphic should be the one with uniqueID"+uniqueID, "vnd.sun.star.GraphicObject:"+uniqueID, proValues2[6].Value);
-
-	}
-}
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+/*
+ * Select a external picture from a file as graphic bullet
+ * */
+package fvt.uno.sd.bullet;
+import static org.junit.Assert.*;
+import static org.openoffice.test.common.Testspace.prepareData;
+import static testlib.uno.PageUtil.getDrawPageByIndex;
+import static testlib.uno.ShapeUtil.addPortion;
+import static testlib.uno.ShapeUtil.getPortion;
+import static testlib.uno.GraphicUtil.getUniqueIDOfGraphicFile;
+
+import java.io.File;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.uno.UnoApp;
+import org.openoffice.test.common.FileUtil;
+import org.openoffice.test.common.Testspace;
+
+import testlib.uno.SDUtil;
+
+import com.sun.star.awt.Size;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.container.XIndexReplace;
+import com.sun.star.drawing.XDrawPage;
+import com.sun.star.drawing.XShape;
+import com.sun.star.lang.XComponent;
+import com.sun.star.style.NumberingType;
+import com.sun.star.uno.UnoRuntime;
+
+public class GraphicBulletFromFile {
+
+	private static final UnoApp app = new UnoApp();
+
+	private XComponent m_xSDComponent = null;
+	private String m_filePath = null;
+	private XPropertySet m_xtextProps = null;	
+	private String m_GraphicPath = null;
+
+	@Before
+	public void setUpDocument() throws Exception {
+		m_filePath = Testspace.getPath("temp/GraphicBulletFromFile.odp");
+		String abslotePath = prepareData("uno/sd/36.gif");	
+		m_GraphicPath = FileUtil.getUrl(new File(abslotePath));	
+//		m_GraphicPath = "file:///F:/work/36.gif";
+		if (FileUtil.fileExists(m_filePath)) {//load
+			m_xtextProps = load();	  
+		} else {//new
+			m_xSDComponent = (XComponent) UnoRuntime.queryInterface(
+					XComponent.class, app.newDocument("simpress"));
+			Object firstPage = getDrawPageByIndex(m_xSDComponent, 0);			
+			Object firstTextBox = SDUtil.getShapeOfPageByIndex(firstPage, 0);
+			XShape xfirstTextBox = (XShape)UnoRuntime.queryInterface(XShape.class, firstTextBox);
+			m_xtextProps = addPortion(xfirstTextBox, "test Graphic Bullet From a File", false);
+		}
+	}
+	
+	private XPropertySet load() throws Exception{
+		m_xSDComponent = (XComponent) UnoRuntime.queryInterface(XComponent.class, 
+				app.loadDocument(m_filePath));
+		Object firstPage = getDrawPageByIndex(m_xSDComponent, 0);
+		XDrawPage firstpage = getDrawPageByIndex(m_xSDComponent, 0);
+		Object firstTextBox = SDUtil.getShapeOfPageByIndex(firstPage, 0);
+		XShape xfirstTextBox = (XShape)UnoRuntime.queryInterface(XShape.class, firstTextBox);		
+		return getPortion(xfirstTextBox, 0);
+	}
+
+	@After
+	public void tearDownDocument() {
+		app.closeDocument(m_xSDComponent);
+
+	}
+
+	@BeforeClass
+	public static void setUpConnection() throws Exception {
+		app.start();
+	}
+
+	@AfterClass
+	public static void tearDownConnection() throws InterruptedException,
+			Exception {
+		app.close();
+		//remove the temp file
+		FileUtil.deleteFile(Testspace.getPath("temp"));
+	}
+
+	@Test
+	public void testGraphicBulletFromFile() throws Exception {				
+				
+		Object numberingrules = m_xtextProps.getPropertyValue("NumberingRules");
+		
+		XIndexReplace xReplace = (XIndexReplace) UnoRuntime.queryInterface(
+	             XIndexReplace.class, numberingrules); 		
+		
+		PropertyValue[] props = new PropertyValue[3];
+		props[0] = new PropertyValue();
+	    props[0].Name = "NumberingType";
+	    props[0].Value = new Short(NumberingType.BITMAP );
+	    
+	    props[1] = new PropertyValue();
+	    props[1].Name = "GraphicURL";
+	    props[1].Value = "vnd.sun.star.GraphicObject:"+getUniqueIDOfGraphicFile(app, m_GraphicPath);
+	    
+	    props[2] = new PropertyValue();
+	    props[2].Name = "GraphicSize";	    
+	    props[2].Value = new Size(1000,1000);
+	    
+	    xReplace.replaceByIndex(0, props);
+	    
+	    m_xtextProps.setPropertyValue("NumberingRules", numberingrules);
+		  //set numbering level to 0			
+		m_xtextProps.setPropertyValue("NumberingLevel", new Short((short)0));
+
+		    	    
+		app.saveDocument(m_xSDComponent, m_filePath);
+//			app.closeDocument(m_xSDComponent);
+		m_xSDComponent.dispose();
+			//reopen
+		m_xtextProps = load();
+					    
+		Object numberingrules2 = m_xtextProps.getPropertyValue("NumberingRules");
+						
+		XIndexReplace xReplace2 = (XIndexReplace) UnoRuntime.queryInterface(
+		            XIndexReplace.class, numberingrules2);
+			
+		PropertyValue[] proValues2 = (PropertyValue[])xReplace2.getByIndex(0);
+		int nNumTypeItemIndex = -1;
+		int nGraphObjItemIndex = -1;
+		for( int i = 0; i < proValues2.length; ++i) { 
+				final String aPropName = proValues2[i].Name;
+				if( aPropName.equals( "GraphicURL"))
+						nGraphObjItemIndex = i;
+				else if( aPropName.equals( "NumberingType"))
+						nNumTypeItemIndex = i;
+		}
+		assertEquals("NumberingType should be BITMAP",
+				NumberingType.BITMAP, proValues2[ nNumTypeItemIndex].Value);
+		String uniqueID = getUniqueIDOfGraphicFile(app, m_GraphicPath);
+		assertEquals("Graphic should be the one with uniqueID"+uniqueID,
+				"vnd.sun.star.GraphicObject:"+uniqueID, proValues2[ nGraphObjItemIndex].Value);
+	}
+}
+