incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1339213 [11/11] - in /incubator/ooo/branches/alg/aw080: ./ ext_sources/ extras/l10n/source/en-GB/ extras/l10n/source/pt-BR/ extras/l10n/source/zh-CN/ extras/l10n/source/zh-TW/ main/ main/apache-commons/java/codec/ main/apache-commons/java/...
Date Wed, 16 May 2012 15:07:08 GMT
Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/graphic/ndgrf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/graphic/ndgrf.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/graphic/ndgrf.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/graphic/ndgrf.cxx Wed May 16 15:07:00 2012
@@ -57,9 +57,10 @@
 #include <tools/link.hxx>
 #include <vcl/svapp.hxx>
 #include <com/sun/star/io/XSeekable.hpp>
-// --> OD 2007-03-28 #i73788#
 #include <retrieveinputstreamconsumer.hxx>
-// <--
+#include <drawinglayer/processor2d/objectinfoextractor2d.hxx>
+#include <drawinglayer/primitive2d/objectinfoprimitive2d.hxx>
+
 
 using namespace com::sun::star;
 
@@ -73,14 +74,14 @@ SwGrfNode::SwGrfNode(
         SwGrfFmtColl *pGrfColl,
         SwAttrSet* pAutoAttr ) :
     SwNoTxtNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
-    aGrfObj(),
+    maGrfObj(),
     mpReplacementGraphic(0),
     // --> OD 2007-01-23 #i73788#
     mbLinkedInputStreamReady( false ),
     mbIsStreamReadOnly( sal_False )
     // <--
 {
-	aGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
+	maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
 	bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel = bLoadLowResGrf =
 		bFrameInPaint = bScaleImageMap = sal_False;
 
@@ -92,17 +93,17 @@ SwGrfNode::SwGrfNode( const SwNodeIndex 
 				  		const GraphicObject& rGrfObj,
                       SwGrfFmtColl *pGrfColl, SwAttrSet* pAutoAttr ) :
     SwNoTxtNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
-	aGrfObj(rGrfObj),
+	maGrfObj(rGrfObj),
     mpReplacementGraphic(0),
     // --> OD 2007-01-23 #i73788#
     mbLinkedInputStreamReady( false ),
     mbIsStreamReadOnly( sal_False )
     // <--
 {
-	aGrfObj = rGrfObj;
-	aGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
+	maGrfObj = rGrfObj;
+	maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
 	if( rGrfObj.HasUserData() && rGrfObj.IsSwappedOut() )
-		aGrfObj.SetSwapState();
+		maGrfObj.SetSwapState();
 	bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel= bLoadLowResGrf =
 		bFrameInPaint = bScaleImageMap = sal_False;
 	bGrafikArrived = sal_True;
@@ -117,17 +118,17 @@ SwGrfNode::SwGrfNode( const SwNodeIndex 
                       SwGrfFmtColl *pGrfColl,
                       SwAttrSet* pAutoAttr ) :
     SwNoTxtNode( rWhere, ND_GRFNODE, pGrfColl, pAutoAttr ),
-    aGrfObj(),
+    maGrfObj(),
     mpReplacementGraphic(0),
     // --> OD 2007-01-23 #i73788#
     mbLinkedInputStreamReady( false ),
     mbIsStreamReadOnly( sal_False )
     // <--
 {
-	aGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
+	maGrfObj.SetSwapStreamHdl( LINK( this, SwGrfNode, SwapGraphic ) );
 
 	Graphic aGrf; aGrf.SetDefaultType();
-	aGrfObj.SetGraphic( aGrf, rGrfName );
+	maGrfObj.SetGraphic( aGrf, rGrfName );
 
 	bInSwapIn = bChgTwipSize = bChgTwipSizeFromPixel = bLoadLowResGrf =
 		bFrameInPaint = bScaleImageMap = sal_False;
@@ -196,15 +197,17 @@ sal_Bool SwGrfNode::ReRead(
 
 		if( pGraphic )
 		{
-			aGrfObj.SetGraphic( *pGraphic, rGrfName );
+			maGrfObj.SetGraphic( *pGraphic, rGrfName );
+            onGraphicChanged();
 			bReadGrf = sal_True;
 		}
 		else if( pGrfObj )
 		{
-			aGrfObj = *pGrfObj;
+			maGrfObj = *pGrfObj;
 			if( pGrfObj->HasUserData() && pGrfObj->IsSwappedOut() )
-				aGrfObj.SetSwapState();
-			aGrfObj.SetLink( rGrfName );
+				maGrfObj.SetSwapState();
+			maGrfObj.SetLink( rGrfName );
+            onGraphicChanged();
 			bReadGrf = sal_True;
 		}
 		else
@@ -213,7 +216,7 @@ sal_Bool SwGrfNode::ReRead(
 			// die korrekte Ersatz-Darstellung erscheint, wenn die
 			// der neue Link nicht geladen werden konnte.
 			Graphic aGrf; aGrf.SetDefaultType();
-			aGrfObj.SetGraphic( aGrf, rGrfName );
+			maGrfObj.SetGraphic( aGrf, rGrfName );
 
 			if( refLink.Is() )
 			{
@@ -232,6 +235,7 @@ sal_Bool SwGrfNode::ReRead(
                     ((SwBaseLink*)&refLink)->SwapIn();
                 }
 			}
+            onGraphicChanged();
 			bSetTwipSize = sal_False;
 		}
 	}
@@ -241,7 +245,8 @@ sal_Bool SwGrfNode::ReRead(
 		if( HasStreamName() )
 			DelStreamName();
 
-		aGrfObj.SetGraphic( *pGraphic );
+		maGrfObj.SetGraphic( *pGraphic );
+        onGraphicChanged();
 		bReadGrf = sal_True;
 	}
 	else if( pGrfObj && !rGrfName.Len() )
@@ -250,14 +255,15 @@ sal_Bool SwGrfNode::ReRead(
 		if( HasStreamName() )
 			DelStreamName();
 
-		aGrfObj = *pGrfObj;
+		maGrfObj = *pGrfObj;
+        onGraphicChanged();
 		if( pGrfObj->HasUserData() && pGrfObj->IsSwappedOut() )
-			aGrfObj.SetSwapState();
+			maGrfObj.SetSwapState();
 		bReadGrf = sal_True;
 	}
 		// Import einer Grafik:
 		// Ist die Grafik bereits geladen?
-	else if( !bNewGrf && GRAPHIC_NONE != aGrfObj.GetType() )
+	else if( !bNewGrf && GRAPHIC_NONE != maGrfObj.GetType() )
 		return sal_True;
 
 	else
@@ -272,15 +278,17 @@ sal_Bool SwGrfNode::ReRead(
 		{
 			if( pGraphic )
 			{
-				aGrfObj.SetGraphic( *pGraphic, rGrfName );
+				maGrfObj.SetGraphic( *pGraphic, rGrfName );
+                onGraphicChanged();
 				bReadGrf = sal_True;
 				// Verbindung herstellen ohne ein Update; Grafik haben wir!
 				((SwBaseLink*)&refLink)->Connect();
 			}
 			else if( pGrfObj )
 			{
-				aGrfObj = *pGrfObj;
-				aGrfObj.SetLink( rGrfName );
+				maGrfObj = *pGrfObj;
+				maGrfObj.SetLink( rGrfName );
+                onGraphicChanged();
 				bReadGrf = sal_True;
 				// Verbindung herstellen ohne ein Update; Grafik haben wir!
 				((SwBaseLink*)&refLink)->Connect();
@@ -291,7 +299,8 @@ sal_Bool SwGrfNode::ReRead(
 				// die korrekte Ersatz-Darstellung erscheint, wenn die
 				// der neue Kink nicht geladen werden konnte.
 				Graphic aGrf; aGrf.SetDefaultType();
-				aGrfObj.SetGraphic( aGrf, rGrfName );
+				maGrfObj.SetGraphic( aGrf, rGrfName );
+                onGraphicChanged();
                 // --> OD 2006-11-03 #i59688#
                 // do not load linked graphic, if it isn't a new linked graphic.
 //                //TODO refLink->setInputStream(getInputStream());
@@ -308,7 +317,7 @@ sal_Bool SwGrfNode::ReRead(
 	// Bug 39281: Size nicht sofort loeschen - Events auf ImageMaps
 	//			  sollten nicht beim Austauschen nicht ins "leere greifen"
 	if( bSetTwipSize )
-		SetTwipSize( ::GetGraphicSizeTwip( aGrfObj.GetGraphic(), 0 ) );
+		SetTwipSize( ::GetGraphicSizeTwip( maGrfObj.GetGraphic(), 0 ) );
 
 	// erzeuge noch einen Update auf die Frames
 	if( bReadGrf && bNewGrf )
@@ -358,6 +367,67 @@ SwGrfNode::~SwGrfNode()
 		DelFrms();
 }
 
+/// allow reaction on change of content of GraphicObject
+void SwGrfNode::onGraphicChanged()
+{
+    // try to access SwFlyFrmFmt; since title/desc/name are set there, there is no
+    // use to continue if it is not yet set. If not yet set, call onGraphicChanged()
+    // when it is set.
+    SwFlyFrmFmt* pFlyFmt = dynamic_cast< SwFlyFrmFmt* >(GetFlyFmt());
+
+    if(pFlyFmt)
+    {
+        String aName;
+        String aTitle;
+        String aDesc;
+        const SvgDataPtr& rSvgDataPtr = GetGrf().getSvgData();
+
+        if(rSvgDataPtr.get())
+        {
+            const drawinglayer::primitive2d::Primitive2DSequence aSequence(rSvgDataPtr->getPrimitive2DSequence());
+
+            if(aSequence.hasElements())
+            {
+                drawinglayer::geometry::ViewInformation2D aViewInformation2D;
+                drawinglayer::processor2d::ObjectInfoPrimitiveExtractor2D aProcessor(aViewInformation2D);
+
+                aProcessor.process(aSequence);
+
+                const drawinglayer::primitive2d::ObjectInfoPrimitive2D* pResult = aProcessor.getResult();
+
+                if(pResult)
+                {
+                    aName = pResult->getName();
+			        aTitle = pResult->getTitle();
+			        aDesc = pResult->getDesc();
+                }
+            }
+        }
+
+        // do not use this currently; it seems that this name has to be unique in
+        // the writer model and is already set to some default
+        //if(aName.Len() && pFlyFmt)
+        //{
+        //    pFlyFmt->SetName(aName);
+        //}
+
+        if(aTitle.Len())
+        {
+    	    SetTitle(aTitle);
+        }
+
+        if(aDesc.Len())
+        {
+    	    SetDescription(aDesc);
+        }
+    }
+}
+
+void SwGrfNode::SetGraphic(const Graphic& rGraphic, const String& rLink) 
+{ 
+    maGrfObj.SetGraphic(rGraphic, rLink); 
+    onGraphicChanged();
+}
 
 const GraphicObject* SwGrfNode::GetReplacementGrfObj() const
 {
@@ -420,15 +490,16 @@ Size SwGrfNode::GetTwipSize() const
 sal_Bool SwGrfNode::ImportGraphic( SvStream& rStrm )
 {
 	Graphic aGraphic;
-    const String aURL(aGrfObj.GetUserData());
+    const String aURL(maGrfObj.GetUserData());
 	
     if(!GraphicFilter::GetGraphicFilter()->ImportGraphic(aGraphic, aURL, rStrm))
 	{
         delete mpReplacementGraphic;
         mpReplacementGraphic = 0;
 		
-        aGrfObj.SetGraphic( aGraphic );
-		aGrfObj.SetUserData( aURL );
+        maGrfObj.SetGraphic( aGraphic );
+		maGrfObj.SetUserData( aURL );
+        onGraphicChanged();
 		return sal_True;
 	}
 
@@ -443,7 +514,7 @@ sal_Bool SwGrfNode::ImportGraphic( SvStr
 short SwGrfNode::SwapIn( sal_Bool bWaitForData )
 {
 	if( bInSwapIn )					// nicht rekuriv!!
-		return !aGrfObj.IsSwappedOut();
+		return !maGrfObj.IsSwappedOut();
 
 	short nRet = 0;
 	bInSwapIn = sal_True;
@@ -451,25 +522,26 @@ short SwGrfNode::SwapIn( sal_Bool bWaitF
 
 	if( pLink )
 	{
-		if( GRAPHIC_NONE == aGrfObj.GetType() ||
-			GRAPHIC_DEFAULT == aGrfObj.GetType() )
+		if( GRAPHIC_NONE == maGrfObj.GetType() ||
+			GRAPHIC_DEFAULT == maGrfObj.GetType() )
 		{
 			// noch nicht geladener Link
             //TODO pLink->setInputStream(getInputStream());
 			if( pLink->SwapIn( bWaitForData ) )
 				nRet = -1;
-			else if( GRAPHIC_DEFAULT == aGrfObj.GetType() )
+			else if( GRAPHIC_DEFAULT == maGrfObj.GetType() )
 			{
 				// keine default Bitmap mehr, also neu Painten!
                 delete mpReplacementGraphic;
                 mpReplacementGraphic = 0;
 
-				aGrfObj.SetGraphic( Graphic() );
+				maGrfObj.SetGraphic( Graphic() );
+                onGraphicChanged();
 				SwMsgPoolItem aMsgHint( RES_GRAPHIC_PIECE_ARRIVED );
 				ModifyNotification( &aMsgHint, &aMsgHint );
 			}
 		}
-		else if( aGrfObj.IsSwappedOut() ) {
+		else if( maGrfObj.IsSwappedOut() ) {
 			// nachzuladender Link
             //TODO pLink->setInputStream(getInputStream());
             nRet = pLink->SwapIn( bWaitForData ) ? 1 : 0;
@@ -477,11 +549,11 @@ short SwGrfNode::SwapIn( sal_Bool bWaitF
 		else
 			nRet = 1;
 	}
-	else if( aGrfObj.IsSwappedOut() )
+	else if( maGrfObj.IsSwappedOut() )
 	{
 		// Die Grafik ist im Storage oder im TempFile drin
 		if( !HasStreamName() )
-			nRet = (short)aGrfObj.SwapIn();
+			nRet = (short)maGrfObj.SwapIn();
 		else
 		{
 
@@ -526,7 +598,7 @@ short SwGrfNode::SwapIn( sal_Bool bWaitF
 	if( nRet )
 	{
 		if( !nGrfSize.Width() && !nGrfSize.Height() )
-			SetTwipSize( ::GetGraphicSizeTwip( aGrfObj.GetGraphic(), 0 ) );
+			SetTwipSize( ::GetGraphicSizeTwip( maGrfObj.GetGraphic(), 0 ) );
 	}
 	bInSwapIn = sal_False;
 	return nRet;
@@ -535,9 +607,9 @@ short SwGrfNode::SwapIn( sal_Bool bWaitF
 
 short SwGrfNode::SwapOut()
 {
-	if( aGrfObj.GetType() != GRAPHIC_DEFAULT &&
-		aGrfObj.GetType() != GRAPHIC_NONE &&
-		!aGrfObj.IsSwappedOut() && !bInSwapIn )
+	if( maGrfObj.GetType() != GRAPHIC_DEFAULT &&
+		maGrfObj.GetType() != GRAPHIC_NONE &&
+		!maGrfObj.IsSwappedOut() && !bInSwapIn )
 	{
 		if( !refLink.Is() )
 		{
@@ -546,11 +618,11 @@ short SwGrfNode::SwapOut()
 			// sie frisch eingefuegt war, d.h. wenn es noch keinen
 			// Streamnamen im Storage gibt.
 			if( !HasStreamName() )
-				if( !aGrfObj.SwapOut() )
+				if( !maGrfObj.SwapOut() )
 					return 0;
 		}
 		// Geschriebene Grafiken oder Links werden jetzt weggeschmissen
-		return (short) aGrfObj.SwapOut( NULL );
+		return (short) maGrfObj.SwapOut( NULL );
 	}
 	return 1;
 }
@@ -661,7 +733,7 @@ void SwGrfNode::InsertLink( const String
 								(!bSync && rFltName.Len() ? &rFltName : 0) );
 		}
 	}
-	aGrfObj.SetLink( rGrfName );
+	maGrfObj.SetLink( rGrfName );
 }
 
 
@@ -680,7 +752,7 @@ void SwGrfNode::ReleaseLink()
 		}
         getIDocumentLinksAdministration()->GetLinkManager().Remove( refLink );
 		refLink.Clear();
-		aGrfObj.SetLink();
+		maGrfObj.SetLink();
 	}
 }
 
@@ -787,7 +859,7 @@ void SwGrfNode::DelStreamName()
             }
 		}
 
-		aGrfObj.SetUserData();
+		maGrfObj.SetUserData();
 	}
 }
 
@@ -882,7 +954,7 @@ void SwGrfNode::_GetStreamStorageNames( 
 	rStorName.Erase();
 	rStrmName.Erase();
 
-	String aUserData( aGrfObj.GetUserData() );
+	String aUserData( maGrfObj.GetUserData() );
 	if( !aUserData.Len() )
         return;
 
@@ -936,7 +1008,7 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc*
             SvStream* pStrm = _GetStreamForEmbedGrf( refPics, aStrmName );
             if ( pStrm )
             {
-                const String aURL(aGrfObj.GetUserData());
+                const String aURL(maGrfObj.GetUserData());
                 GraphicFilter::GetGraphicFilter()->ImportGraphic(aTmpGrf, aURL, *pStrm);
                 delete pStrm;
             }
@@ -952,9 +1024,9 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc*
 	}
 	else
 	{
-		if( aGrfObj.IsSwappedOut() )
+		if( maGrfObj.IsSwappedOut() )
             const_cast<SwGrfNode*>(this)->SwapIn();
-		aTmpGrf = aGrfObj.GetGraphic();
+		aTmpGrf = maGrfObj.GetGraphic();
 	}
 
     const sfx2::LinkManager& rMgr = getIDocumentLinksAdministration()->GetLinkManager();
@@ -1069,7 +1141,7 @@ void DelAllGrfCacheEntries( SwDoc* pDoc 
 				dynamic_cast< SwBaseLink* >(pLnk) && 0 != ( pGrfNd =
 				((SwBaseLink*)pLnk)->GetCntntNode()->GetGrfNode()) )
 			{
-				pGrfNd->GetGrfObj().ReleaseFromCache();
+				pGrfNd->ReleaseGraphicFromCache();
 			}
 		}
 	}
@@ -1133,7 +1205,7 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( 
 
 sal_Bool SwGrfNode::IsTransparent() const
 {
-	sal_Bool bRet = aGrfObj.IsTransparent();
+	sal_Bool bRet = maGrfObj.IsTransparent();
 	if( !bRet )	// ask the attribut
 		bRet = 0 != GetSwAttrSet().GetTransparencyGrf().GetValue();
 

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/layout/frmtool.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/layout/frmtool.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/layout/frmtool.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/layout/frmtool.cxx Wed May 16 15:07:00 2012
@@ -878,7 +878,7 @@ SwCntntNotify::~SwCntntNotify()
         }
     }
 
-    sal_Bool bFirst = (aFrm.*fnRect->fnGetWidth)() == 0;
+    const bool bFirst = (aFrm.*fnRect->fnGetWidth)() == 0;
 
 	if ( pCnt->IsNoTxtFrm() )
 	{
@@ -954,57 +954,49 @@ SwCntntNotify::~SwCntntNotify()
 
 		SwDoc *pDoc = pCnt->GetNode()->GetDoc();
 		if ( pDoc->GetSpzFrmFmts()->Count() &&
-			 !pDoc->IsLoaded() && !pDoc->IsNewDoc() )
+			 pDoc->DoesContainAtPageObjWithContentAnchor() && !pDoc->IsNewDoc() )
 		{
-			//Der Frm wurde wahrscheinlich zum ersten mal formatiert.
-			//Wenn ein Filter Flys oder Zeichenobjekte einliest und diese
-			//Seitengebunden sind, hat er ein Problem, weil er i.d.R. die
-			//Seitennummer nicht kennt. Er weiss lediglich welches der Inhalt
-			//(CntntNode) an dieser Stelle ist.
-			//Die Filter stellen dazu das Ankerattribut der Objekte so ein, dass
-			//sie vom Typ zwar Seitengebunden sind, aber der Index des Ankers
-			//auf diesen CntntNode zeigt.
-			//Hier werden diese vorlauefigen Verbindungen aufgeloest.
-
-			const SwPageFrm *pPage = 0;
-			SwNodeIndex   *pIdx  = 0;
-			SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts();
-
-			for ( sal_uInt16 i = 0; i < pTbl->Count(); ++i )
-			{
-				if ( !pPage )
-					pPage = pCnt->FindPageFrm();
-				SwFrmFmt *pFmt = (*pTbl)[i];
-				const SwFmtAnchor &rAnch = pFmt->GetAnchor();
-
-                if ((FLY_AT_PAGE != rAnch.GetAnchorId()) &&
-                    (FLY_AT_PARA != rAnch.GetAnchorId()))
+            // If certain import filters for foreign file format import 
+            // AT_PAGE anchored objects, the corresponding page number is 
+            // typically not known. In this case the content position is
+            // stored at which the anchored object is found in the 
+            // imported document.
+            // When this content is formatted it is the time at which 
+            // the page is known. Thus, this data can be corrected now.
+
+            const SwPageFrm* pPage = 0;
+            SwNodeIndex *pIdx  = 0;
+            SwSpzFrmFmts *pTbl = pDoc->GetSpzFrmFmts();
+            for ( sal_uInt16 i = 0; i < pTbl->Count(); ++i )
+            {
+                SwFrmFmt *pFmt = (*pTbl)[i];
+                const SwFmtAnchor &rAnch = pFmt->GetAnchor();
+                if ( FLY_AT_PAGE != rAnch.GetAnchorId() ||
+                     rAnch.GetCntntAnchor() == 0 )
                 {
-					continue;	//#60878# nicht etwa zeichengebundene.
+                    continue;
                 }
 
-				sal_Bool bCheckPos = sal_False;
-				if ( rAnch.GetCntntAnchor() )
-				{
-					if ( !pIdx )
-					{
-						pIdx = new SwNodeIndex( *pCnt->GetNode() );
-					}
-					if ( rAnch.GetCntntAnchor()->nNode == *pIdx )
-					{
-                        bCheckPos = sal_True;
-                        if (FLY_AT_PAGE == rAnch.GetAnchorId())
-                        {
-                            ASSERT( false, "<SwCntntNotify::~SwCntntNotify()> - to page anchored object with content position. Please inform OD." );
-							SwFmtAnchor aAnch( rAnch );
-							aAnch.SetAnchor( 0 );
-							aAnch.SetPageNum( pPage->GetPhyPageNum() );
-                            pFmt->SetFmtAttr( aAnch );
-							if ( RES_DRAWFRMFMT != pFmt->Which() )
-								pFmt->MakeFrms();
-						}
-					}
-				}
+                if ( !pIdx )
+                {
+                    pIdx = new SwNodeIndex( *pCnt->GetNode() );
+                }
+                if ( rAnch.GetCntntAnchor()->nNode == *pIdx )
+                {
+                    ASSERT( false, "<SwCntntNotify::~SwCntntNotify()> - to page anchored object with content position. Please inform OD." );
+                    if ( !pPage )
+                    {
+                        pPage = pCnt->FindPageFrm();
+                    }
+                    SwFmtAnchor aAnch( rAnch );
+                    aAnch.SetAnchor( 0 );
+                    aAnch.SetPageNum( pPage->GetPhyPageNum() );
+                    pFmt->SetFmtAttr( aAnch );
+                    if ( RES_DRAWFRMFMT != pFmt->Which() )
+                    {
+                        pFmt->MakeFrms();
+                    }
+                }
             }
             delete pIdx;
         }

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/filter/basflt/shellio.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/filter/basflt/shellio.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/filter/basflt/shellio.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/filter/basflt/shellio.cxx Wed May 16 15:07:00 2012
@@ -290,10 +290,7 @@ sal_uLong SwReader::Read( const Reader& 
                                 }
 								else if( pCrsr )
                                 {
-									// seitengebundene Flys eingefuegt, dann schalte
-									// die Optimierungs-Flags vom SwDoc ab. Sonst
-									// werden die Flys nicht an der Position erzeugt.
-									pDoc->SetLoaded( sal_False );
+									pDoc->SetContainsAtPageObjWithContentAnchor( true );
                                 }
 							}
 							else
@@ -352,6 +349,7 @@ sal_uLong SwReader::Read( const Reader& 
     pDoc->UpdateNumRule();
     pDoc->ChkCondColls();
 	pDoc->SetAllUniqueFlyNames();
+    pDoc->SetLoaded( true );
 
     pDoc->GetIDocumentUndoRedo().DoUndo(bDocUndo);
     if (!bReadPageDescs)

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/filter/rtf/rtffly.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/filter/rtf/rtffly.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/filter/rtf/rtffly.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/filter/rtf/rtffly.cxx Wed May 16 15:07:00 2012
@@ -1276,6 +1276,8 @@ void SwRTFParser::InsPicture( const Stri
 			if( pFlySave->nEndNd == rIdx )
 				pFlySave->nEndNd = rIdx.GetIndex() - 1;
 		}
+
+        pGrfNd->onGraphicChanged();
 	}
 	else
 	{

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/filter/ww8/ww8graf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/filter/ww8/ww8graf.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/filter/ww8/ww8graf.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/filter/ww8/ww8graf.cxx Wed May 16 15:07:00 2012
@@ -1952,28 +1952,19 @@ void SwWW8ImplReader::MatchSdrItemsIntoF
             break;
             case XFILL_BITMAP:
                 {
-                    const Graphic aGraphic(
-                        static_cast< XFillBitmapItem const & >(
-                            rOldSet.Get(XATTR_FILLBITMAP)).
-                        GetBitmapValue().GetBitmap());
-                    bool bTile = WW8ITEMVALUE(rOldSet, XATTR_FILLBMP_TILE,
-                        SfxBoolItem) ? true: false;
-                    GraphicObject aGrfObj(aGraphic);
+                    GraphicObject aGrfObj(static_cast< XFillBitmapItem const & >(rOldSet.Get(XATTR_FILLBITMAP)).GetGraphicObject());
+                    const bool bTile(WW8ITEMVALUE(rOldSet, XATTR_FILLBMP_TILE, SfxBoolItem) ? true: false);
 
-                    aBrushItem.SetGraphicObject(aGrfObj);
-
-                    if (bBrushItemOk) //has trans
+                    if(bBrushItemOk) //has trans
                     {
-                        GraphicObject *pGraphicObject =
-                            const_cast<GraphicObject *>
-                            (aBrushItem.GetGraphicObject());
-                        GraphicAttr aAttr(pGraphicObject->GetAttr());
+                        GraphicAttr aAttr(aGrfObj.GetAttr());
+                        
                         aAttr.SetTransparency(nTrans);
-                        pGraphicObject->SetAttr(aAttr);
+                        aGrfObj.SetAttr(aAttr);
                     }
 
+                    aBrushItem.SetGraphicObject(aGrfObj);
                     aBrushItem.SetGraphicPos(bTile ? GPOS_TILED : GPOS_AREA);
-
                     bBrushItemOk = true;
                 }
             break;

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx Wed May 16 15:07:00 2012
@@ -5622,10 +5622,15 @@ void QuickHelpData::Stop( SwWrtShell& rS
     ClearCntnt();
 }
 
-
-
 void QuickHelpData::FillStrArr( SwWrtShell& rSh, const String& rWord )
 {
+    // #i22961# get the letter-case context
+    const CharClass& rCharClass = GetAppCharClass();
+    const String aLWord = rCharClass.toLower( rWord, 0, rWord.Len() );
+    const bool bIsUpper = (rWord == rCharClass.toUpper( rWord, 0, rWord.Len() ) );
+    const bool bIsLower = (rWord == aLWord);
+
+    // add all matching month/day names from the calendar
     salhelper::SingletonRef<SwCalendarWrapper>* pCalendar = s_getCalendarWrapper();
     (*pCalendar)->LoadDefaultCalendar( rSh.GetCurLang() );
 
@@ -5636,49 +5641,40 @@ void QuickHelpData::FillStrArr( SwWrtShe
         {
             for( long nPos = 0, nEnd = aNames.getLength(); nPos < nEnd; ++nPos )
             {
-                String sStr( aNames[ nPos ].FullName );
-                if( rWord.Len() + 1 < sStr.Len() &&
-
-//!!! UNICODE: fehlendes interface
-//                  pIntl->CompareEqual( rWord, sStr.Copy( 0, rWord.Len() ),
-//                              INTN_COMPARE_IGNORECASE ) )
-                    COMPARE_EQUAL == rWord.CompareIgnoreCaseToAscii(
-                                        sStr, rWord.Len() ))
-                {
-                    String* pNew = new String( sStr );
-                    if( !aArr.Insert( pNew ) )
-                        delete pNew;
-                }
+                const String& rS = aNames[ nPos ].FullName;
+                if( rS.Len() <= rWord.Len() + 1 )
+                    continue;
+                const String aLName = rCharClass.toLower( rS, 0, rWord.Len() );
+                if( aLName != aLWord )
+                    continue;
+                // #i22961# provide case-sensitive autocompletion suggestions
+                String* pNew = new String( (bIsUpper==bIsLower) ? rS : (bIsUpper ? rCharClass.toUpper(rS,0,rS.Len()) : rCharClass.toLower(rS,0,rS.Len())) );
+                if( !aArr.Insert( pNew ) )
+                    delete pNew;
             }
             if( !n )                    // get data for the second loop
                 aNames = (*pCalendar)->getDays();
         }
     }
 
-    // and than add all words from the AutoCompleteWord-List
+    // and then add all words from the AutoCompleteWord-List
     const SwAutoCompleteWord& rACLst = rSh.GetAutoCompleteWords();
     sal_uInt16 nStt, nEnd;
     if( rACLst.GetRange( rWord, nStt, nEnd ) )
     {
-        while( nStt < nEnd )
+        for(; nStt < nEnd; ++nStt )
         {
             const String& rS = rACLst[ nStt ];
-            //JP 16.06.99: Bug 66927 - only if the count of chars
-            //              from the suggest greater as the
-            //              actual word
-            if( rS.Len() > rWord.Len() )
-            {
-                String* pNew = new String( rS );
-                if( !aArr.Insert( pNew ) )
-                    delete pNew;
-            }
-            ++nStt;
+            if( rS.Len() <= rWord.Len() )
+                continue;
+            // #i22961# provide case-sensitive autocompletion suggestions
+            String* pNew = new String( (bIsUpper==bIsLower) ? rS : (bIsUpper ? rCharClass.toUpper(rS,0,rS.Len()) : rCharClass.toLower(rS,0,rS.Len())) );
+            if( !aArr.Insert( pNew ) )
+                delete pNew;
         }
     }
 }
-/* -----------------06.11.2002 12:01-----------------
- *
- * --------------------------------------------------*/
+
 void SwEditWin::ShowAutoTextCorrectQuickHelp(
         const String& rWord, SvxAutoCorrCfg* pACfg, SvxAutoCorrect* pACorr,
         sal_Bool bFromIME )

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/ui/frmdlg/frmpage.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/ui/frmdlg/frmpage.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/ui/frmdlg/frmpage.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/ui/frmdlg/frmpage.cxx Wed May 16 15:07:00 2012
@@ -2693,7 +2693,8 @@ BmpWindow::BmpWindow( Window* pPar, sal_
 	bGraphic(sal_False),
 	bLeftAlign(sal_False)
 {
-    SetBackground();
+    // #119307# use background, the graphic might have transparency
+    SetBackground(Wallpaper(Color(COL_WHITE)));
 }
 
 void BmpWindow::Paint( const Rectangle& )
@@ -2730,6 +2731,9 @@ void BmpWindow::Paint( const Rectangle& 
         aPntSz.Width()  *= -1;
     }
 
+    // #119307# clear window background, the graphic might have transparency
+    Erase();
+
     if ( bGraphic )
         aGraphic.Draw( this, aPntPos, aPntSz );
     else

Modified: incubator/ooo/branches/alg/aw080/main/swext/mediawiki/build.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/swext/mediawiki/build.xml?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/swext/mediawiki/build.xml (original)
+++ incubator/ooo/branches/alg/aw080/main/swext/mediawiki/build.xml Wed May 16 15:07:00 2012
@@ -95,7 +95,7 @@
         <jar basedir="${classes}" compress="true" jarfile="${dist}/${target}.jar">
             <manifest>
 		<!-- FIXME: Set Class-Path correctly for the system case !-->
-                <attribute name="Class-Path" value="commons-codec-1.3.jar commons-lang-2.3.jar commons-httpclient-3.1.jar commons-logging-1.1.1.jar"/>
+                <attribute name="Class-Path" value="commons-codec-1.6.jar commons-lang-2.4.jar commons-httpclient-3.1.jar commons-logging-1.1.1.jar"/>
                 <attribute name="RegistrationClassName" value="com.sun.star.wiki.WikiEditorImpl"/>
             </manifest>
         </jar>

Modified: incubator/ooo/branches/alg/aw080/main/swext/mediawiki/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/swext/mediawiki/makefile.mk?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/swext/mediawiki/makefile.mk (original)
+++ incubator/ooo/branches/alg/aw080/main/swext/mediawiki/makefile.mk Wed May 16 15:07:00 2012
@@ -29,8 +29,8 @@ TARGET=mediawiki
 .INCLUDE : ant.mk
 
 .IF "$(SYSTEM_APACHE_COMMONS)" != "YES"
-COMMONS_CODEC_JAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/commons-codec-1.3.jar 
-COMMONS_LANG_JAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/commons-lang-2.3.jar
+COMMONS_CODEC_JAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/commons-codec-1.6.jar
+COMMONS_LANG_JAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/commons-lang-2.4.jar
 COMMONS_HTTPCLIENT_JAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/commons-httpclient-3.1.jar
 COMMONS_LOGGING_JAR=$(SOLARVER)$/$(INPATH)$/bin$(UPDMINOREXT)$/commons-logging-1.1.1.jar
 .ELSE

Modified: incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/base.desktop
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/base.desktop?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/base.desktop (original)
+++ incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/base.desktop Wed May 16 15:07:00 2012
@@ -30,3 +30,4 @@ Name=%PRODUCTNAME Base
 GenericName=Database Development
 Comment=Manage databases, create queries and reports to track and manage your information by using Base.
 InitialPreference=5
+StartupNotify=true

Modified: incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/calc.desktop
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/calc.desktop?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/calc.desktop (original)
+++ incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/calc.desktop Wed May 16 15:07:00 2012
@@ -30,3 +30,4 @@ Name=%PRODUCTNAME Calc
 GenericName=Spreadsheet
 Comment=Perform calculation, analyze information and manage lists in spreadsheets by using Calc.
 InitialPreference=5
+StartupNotify=true

Modified: incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/draw.desktop
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/draw.desktop?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/draw.desktop (original)
+++ incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/draw.desktop Wed May 16 15:07:00 2012
@@ -30,3 +30,4 @@ Name=%PRODUCTNAME Draw
 GenericName=Drawing Program
 Comment=Create and edit drawings, flow charts, and logos by using Draw.
 InitialPreference=5
+StartupNotify=true

Modified: incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/impress.desktop
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/impress.desktop?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/impress.desktop (original)
+++ incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/impress.desktop Wed May 16 15:07:00 2012
@@ -30,3 +30,4 @@ Name=%PRODUCTNAME Impress
 GenericName=Presentation
 Comment=Create and edit presentations for slideshows, meeting and Web pages by using Impress.
 InitialPreference=5
+StartupNotify=true

Modified: incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/math.desktop
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/math.desktop?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/math.desktop (original)
+++ incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/math.desktop Wed May 16 15:07:00 2012
@@ -30,3 +30,4 @@ Name=%PRODUCTNAME Math
 GenericName=Formula Editor
 Comment=Create and edit scientific formulas and equations by using Math.
 InitialPreference=5
+StartupNotify=true

Modified: incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/printeradmin.desktop
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/printeradmin.desktop?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/printeradmin.desktop (original)
+++ incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/printeradmin.desktop Wed May 16 15:07:00 2012
@@ -26,3 +26,4 @@ Type=Application
 Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;
 Exec=openoffice-printeradmin
 Name=%PRODUCTNAME Printer Administration
+StartupNotify=true

Modified: incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/startcenter.desktop
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/startcenter.desktop?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/startcenter.desktop (original)
+++ incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/startcenter.desktop Wed May 16 15:07:00 2012
@@ -29,3 +29,4 @@ MimeType=application/vnd.openofficeorg.e
 Name=%PRODUCTNAME 
 GenericName=Office 
 Comment=The office productivity suite compatible to the open and standardized ODF document format.
+StartupNotify=true

Modified: incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/writer.desktop
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/writer.desktop?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/writer.desktop (original)
+++ incubator/ooo/branches/alg/aw080/main/sysui/desktop/menus/writer.desktop Wed May 16 15:07:00 2012
@@ -30,3 +30,4 @@ Name=%PRODUCTNAME Writer
 GenericName=Word Processor
 Comment=Create and edit text and graphics in letters, reports, documents and Web pages by using Writer.
 InitialPreference=5
+StartupNotify=true

Modified: incubator/ooo/branches/alg/aw080/main/sysui/desktop/share/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sysui/desktop/share/makefile.mk?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sysui/desktop/share/makefile.mk (original)
+++ incubator/ooo/branches/alg/aw080/main/sysui/desktop/share/makefile.mk Wed May 16 15:07:00 2012
@@ -150,9 +150,6 @@ $(LAUNCHERFLAGFILE) : $(LAUNCHERDEPN) 
 	@$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "Name" $(ULFDIR)$/launcher_name.ulf
 	@$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "Comment" $(ULFDIR)$/launcher_comment.ulf
 	@$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "GenericName" $(ULFDIR)$/launcher_genericname.ulf
-.IF "$(WITH_LIBSN)"=="YES"
-	@noop x$(foreach,i,$(LAUNCHERLIST) $(shell @echo "StartupNotify=true" >> $(@:db).$(INPATH).$(@:f)/$i.desktop))x
-.ENDIF
 	@$(MV) -f $(@:db).$(INPATH).$(@:f)/* $(@:d)
 	@rmdir $(@:db).$(INPATH).$(@:f)
 	@touch $@

Modified: incubator/ooo/branches/alg/aw080/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/aqua/source/dtrans/DataFlavorMapping.cxx Wed May 16 15:07:00 2012
@@ -519,6 +519,16 @@ DataFlavorMapper::DataFlavorMapper()
 	throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM("AquaClipboard: Cannot create com.sun.star.datatransfer.MimeContentTypeFactory")), NULL);
 }
 
+DataFlavorMapper::~DataFlavorMapper()
+{
+    // release potential NSStrings
+    for( OfficeOnlyTypes::iterator it = maOfficeOnlyTypes.begin(); it != maOfficeOnlyTypes.end(); ++it )
+    {
+        [it->second release];
+        it->second = nil;
+    }    
+}
+
 DataFlavor DataFlavorMapper::systemToOpenOfficeFlavor(NSString* systemDataFlavor) const
 {
   DataFlavor oOOFlavor;
@@ -534,22 +544,41 @@ DataFlavor DataFlavorMapper::systemToOpe
 		}
 	} // for
 
-  return oOOFlavor;
+	// look if this might be an internal type; if it comes in here it must have
+	// been through openOfficeToSystemFlavor before, so it should then be in the map
+	rtl::OUString aTryFlavor( NSStringToOUString( systemDataFlavor ) );
+	if( maOfficeOnlyTypes.find( aTryFlavor ) != maOfficeOnlyTypes.end() )
+	{
+	    oOOFlavor.MimeType = aTryFlavor;
+	    oOOFlavor.HumanPresentableName = rtl::OUString();
+	    oOOFlavor.DataType = CPPUTYPE_SEQINT8;
+	}
+	
+	return oOOFlavor;
 }
 
 NSString* DataFlavorMapper::openOfficeToSystemFlavor(const DataFlavor& oOOFlavor) const
 {
-  NSString* sysFlavor = NULL;
-
-  for (size_t i = 0; i < SIZE_FLAVOR_MAP; i++)
+    NSString* sysFlavor = NULL;
+    
+	for( size_t i = 0; i < SIZE_FLAVOR_MAP; ++i )
 	{
-	  if (oOOFlavor.MimeType.compareToAscii(flavorMap[i].OOoFlavor, strlen(flavorMap[i].OOoFlavor)) == 0)
+	    if (oOOFlavor.MimeType.compareToAscii(flavorMap[i].OOoFlavor, strlen(flavorMap[i].OOoFlavor)) == 0)
 		{
-		  sysFlavor = flavorMap[i].SystemFlavor;
+		    sysFlavor = flavorMap[i].SystemFlavor;
 		}
 	}
-
-  return sysFlavor;
+	
+	if( ! sysFlavor )
+	{
+		OfficeOnlyTypes::const_iterator it = maOfficeOnlyTypes.find( oOOFlavor.MimeType );
+		if( it == maOfficeOnlyTypes.end() )
+			sysFlavor = maOfficeOnlyTypes[ oOOFlavor.MimeType ] = OUStringToNSString( oOOFlavor.MimeType );
+		else
+			sysFlavor = it->second;
+	}
+	
+	return sysFlavor;
 }
 
 NSString* DataFlavorMapper::openOfficeImageToSystemFlavor(NSPasteboard* pPasteboard) const
@@ -686,6 +715,7 @@ NSArray* DataFlavorMapper::flavorSequenc
           
           if (str != NULL)
           {
+              [str retain];
               [array addObject: str];
           }
       }

Modified: incubator/ooo/branches/alg/aw080/main/vcl/aqua/source/dtrans/DataFlavorMapping.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/aqua/source/dtrans/DataFlavorMapping.hxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/aqua/source/dtrans/DataFlavorMapping.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/aqua/source/dtrans/DataFlavorMapping.hxx Wed May 16 15:07:00 2012
@@ -33,6 +33,7 @@
 #import <Cocoa/Cocoa.h>
 #include <postmac.h>
 
+#include <hash_map>
 #include <memory>
 #include <boost/shared_ptr.hpp>
 
@@ -69,6 +70,7 @@ public:
 	 cannot be created.
    */
   DataFlavorMapper();
+  ~DataFlavorMapper();
 
 
   /* Map a system data flavor to an OpenOffice data flavor. 
@@ -132,6 +134,8 @@ private:
 
 private:
   ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XMimeContentTypeFactory> mrXMimeCntFactory;
+  typedef std::hash_map< rtl::OUString, NSString*, rtl::OUStringHash > OfficeOnlyTypes;
+  mutable OfficeOnlyTypes maOfficeOnlyTypes;
 };
 
 typedef boost::shared_ptr<DataFlavorMapper> DataFlavorMapperPtr_t;

Modified: incubator/ooo/branches/alg/aw080/main/vcl/inc/vcl/settings.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/inc/vcl/settings.hxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/inc/vcl/settings.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/inc/vcl/settings.hxx Wed May 16 15:07:00 2012
@@ -486,9 +486,8 @@ private:
 #define STYLE_SYMBOLS_DEFAULT		((sal_uLong)1)
 #define STYLE_SYMBOLS_HICONTRAST	((sal_uLong)2)
 #define STYLE_SYMBOLS_INDUSTRIAL	((sal_uLong)3)
-#define STYLE_SYMBOLS_TANGO		((sal_uLong)4)
-#define STYLE_SYMBOLS_CLASSIC		((sal_uLong)5)
-#define STYLE_SYMBOLS_THEMES_MAX	((sal_uLong)6)
+#define STYLE_SYMBOLS_CLASSIC		((sal_uLong)4)
+#define STYLE_SYMBOLS_THEMES_MAX	((sal_uLong)5)
 #define STYLE_CURSOR_NOBLINKTIME    ((sal_uLong)0xFFFFFFFF)
 
 class VCL_DLLPUBLIC StyleSettings

Modified: incubator/ooo/branches/alg/aw080/main/vcl/inc/vcl/svgdata.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/inc/vcl/svgdata.hxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/inc/vcl/svgdata.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/inc/vcl/svgdata.hxx Wed May 16 15:07:00 2012
@@ -36,6 +36,15 @@ typedef ::com::sun::star::uno::Reference
 typedef ::com::sun::star::uno::Sequence< Primitive2DReference > Primitive2DSequence;
 
 //////////////////////////////////////////////////////////////////////////////
+// helper to convert any Primitive2DSequence to a good quality BitmapEx,
+// using default parameters and graphic::XPrimitive2DRenderer
+
+BitmapEx VCL_DLLPUBLIC convertPrimitive2DSequenceToBitmapEx(
+    const Primitive2DSequence& rSequence,
+    const basegfx::B2DRange& rTargetRange,
+    const sal_uInt32 nMaximumQuadraticPixels = 500000);
+
+//////////////////////////////////////////////////////////////////////////////
 
 class VCL_DLLPUBLIC SvgData : private boost::noncopyable
 {

Modified: incubator/ooo/branches/alg/aw080/main/vcl/source/app/settings.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/source/app/settings.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/source/app/settings.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/source/app/settings.cxx Wed May 16 15:07:00 2012
@@ -778,9 +778,7 @@ sal_uLong StyleSettings::GetCurrentSymbo
 
 sal_uLong StyleSettings::GetAutoSymbolsStyle() const
 {
-    const ::rtl::OUString&      rDesktopEnvironment = Application::GetDesktopEnvironment();
     sal_uLong                       nRet = STYLE_SYMBOLS_DEFAULT;
-    bool                        bCont = true;
 
     try
     {
@@ -788,20 +786,11 @@ sal_uLong StyleSettings::GetAutoSymbolsS
         sal_Int32 nValue( 0 );
 
         aAny >>= nValue;
-
-        if( 0 == nValue )
-            bCont = false;
     }
     catch ( ::com::sun::star::uno::Exception& )
     {
     }
 
-    if( bCont )
-    {
-        if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "gnome" ) )
-            nRet = STYLE_SYMBOLS_TANGO;
-    }
-
     // falback to any existing style
     if ( ! CheckSymbolStyle (nRet) )
     {

Modified: incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/impgraph.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/impgraph.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/impgraph.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/impgraph.cxx Wed May 16 15:07:00 2012
@@ -28,12 +28,9 @@
 #include <tools/urlobj.hxx>
 #include <tools/debug.hxx>
 #include <tools/stream.hxx>
-
 #include <ucbhelper/content.hxx>
-
 #include <unotools/ucbstreamhelper.hxx>
 #include <unotools/tempfile.hxx>
-
 #include <vcl/outdev.hxx>
 #include <vcl/virdev.hxx>
 #include <vcl/gfxlink.hxx>
@@ -41,9 +38,7 @@
 #include <vcl/salbtype.hxx>
 #include <vcl/graph.hxx>
 #include <vcl/metaact.hxx>
-
 #include <impgraph.hxx>
-
 #include <com/sun/star/ucb/CommandAbortedException.hpp>
 
 // -----------

Modified: incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/impimagetree.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/impimagetree.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/impimagetree.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/impimagetree.cxx Wed May 16 15:07:00 2012
@@ -330,9 +330,9 @@ bool ImplImageTree::find(
                 throw;
             } catch (css::uno::Exception & e) {
                 OSL_TRACE(
-                    "ImplImageTree::find exception \"%s\"",
-                    rtl::OUStringToOString(
-                        e.Message, RTL_TEXTENCODING_UTF8).getStr());
+                    "ImplImageTree::find exception \"%s\" for \"%s\"",
+                    rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8).getStr(),
+                    rtl::OUStringToOString( i->first, RTL_TEXTENCODING_UTF8).getStr());
                 i = m_zips.erase(i);
                 continue;
             }

Modified: incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/outdev3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/outdev3.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/outdev3.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/outdev3.cxx Wed May 16 15:07:00 2012
@@ -5906,7 +5906,10 @@ ImplLayoutArgs OutputDevice::ImplPrepare
             ||  ((*pStr >= 0x1100) && (*pStr < 0x1200))   // hangul jamo
             ||  ((*pStr >= 0x1700) && (*pStr < 0x1900))   // many CTL scripts
             ||  ((*pStr >= 0xFB1D) && (*pStr < 0xFE00))   // middle east presentation
-            ||  ((*pStr >= 0xFE70) && (*pStr < 0xFEFF)) ) // arabic presentation B
+            ||  ((*pStr >= 0xFE70) && (*pStr < 0xFEFF))   // arabic presentation B
+            ||  ((*pStr >= 0xFE00) && (*pStr < 0xFE10))   // variation selectors in BMP
+            ||  ((pStr + 1 < pEnd) && (pStr[0] == 0xDB40) && (0xDD00 <= pStr[1]) && (pStr[1] < 0xDEF0)) // variation selector supplement
+			)
                 break;
         if( pStr >= pEnd )
             nLayoutFlags |= SAL_LAYOUT_COMPLEX_DISABLED;

Modified: incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/outdev6.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/outdev6.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/outdev6.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/outdev6.cxx Wed May 16 15:07:00 2012
@@ -634,7 +634,10 @@ void OutputDevice::DrawTransparent( cons
 	const Color aBlack( COL_BLACK );
 
 	if( mpMetaFile )
+    {
+         // missing here is to map the data using the DeviceTransformation
 		mpMetaFile->AddAction( new MetaFloatTransparentAction( rMtf, rPos, rSize, rTransparenceGradient ) );
+    }
 
 	if( ( rTransparenceGradient.GetStartColor() == aBlack && rTransparenceGradient.GetEndColor() == aBlack ) ||
 		( mnDrawMode & ( DRAWMODE_NOTRANSPARENCY ) ) )

Modified: incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/outmap.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/outmap.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/outmap.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/outmap.cxx Wed May 16 15:07:00 2012
@@ -1658,10 +1658,17 @@ Region OutputDevice::PixelToLogic( const
 		return rDeviceRegion;
 
 	Region			aRegion;
-	PolyPolygon*	pPolyPoly = rDeviceRegion.ImplGetImplRegion()->mpPolyPoly;
+	basegfx::B2DPolyPolygon* pB2DPolyPoly = rDeviceRegion.ImplGetImplRegion()->mpB2DPolyPoly;
+	PolyPolygon* pPolyPoly = pB2DPolyPoly ? 0 : rDeviceRegion.ImplGetImplRegion()->mpPolyPoly;
 
-	if ( pPolyPoly )
+    if ( pB2DPolyPoly ) // conversion with B2DPolyPolygon lost polygon-based ClipRegion
+    {
+		aRegion = Region( PixelToLogic( *pB2DPolyPoly ) );
+    }
+	else if ( pPolyPoly )
+    {
 		aRegion = Region( PixelToLogic( *pPolyPoly ) );
+    }
 	else
 	{
 		long				nX;

Modified: incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/pngread.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/pngread.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/pngread.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/pngread.cxx Wed May 16 15:07:00 2012
@@ -197,6 +197,8 @@ PNGReaderImpl::PNGReaderImpl( SvStream& 
 	mpScanPrior 	( NULL ),
 	mpTransTab		( NULL ),
 	mpColorTable	( (sal_uInt8*) mpDefaultColorTable ),
+	mnColorType( 0xFF ),
+	mbPalette( false ),
 	mbzCodecInUse	( sal_False ),
     mbStatus( sal_True),
     mbIDAT( sal_False ),
@@ -366,6 +368,10 @@ BitmapEx PNGReaderImpl::GetBitmapEx( con
     // reset to the first chunk
     maChunkIter = maChunkSeq.begin();
 
+    // read the first chunk which must be the IHDR chunk
+    ReadNextChunk();
+    mbStatus = (mnChunkType == PNGCHUNK_IHDR) && ImplReadHeader( rPreviewSizeHint );
+
     // parse the chunks
     while( mbStatus && !mbIDAT && ReadNextChunk() )
     {
@@ -373,7 +379,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( con
 		{
 			case PNGCHUNK_IHDR :
 			{
-				mbStatus = ImplReadHeader( rPreviewSizeHint );
+				mbStatus = false; // only one IHDR possible
 			}
 			break;
 

Modified: incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/sallayout.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/sallayout.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/sallayout.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/sallayout.cxx Wed May 16 15:07:00 2012
@@ -403,6 +403,11 @@ inline bool IsControlChar( sal_UCS4 cCha
     // byte order markers and invalid unicode
     if( (cChar == 0xFEFF) || (cChar == 0xFFFE) || (cChar == 0xFFFF) )
         return true;
+	// variation selectors
+	if( (0xFE00 <= cChar) && (cChar <= 0xFE0F) )
+		return true;
+	if( (0xE0100 <= cChar) && (cChar <= 0xE01EF) )
+		return true;
     return false;
 }
 

Modified: incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/svgdata.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/svgdata.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/svgdata.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/source/gdi/svgdata.cxx Wed May 16 15:07:00 2012
@@ -39,11 +39,14 @@ using namespace ::com::sun::star;
 
 //////////////////////////////////////////////////////////////////////////////
 
-void SvgData::ensureReplacement()
+BitmapEx VCL_DLLPUBLIC convertPrimitive2DSequenceToBitmapEx(
+    const Primitive2DSequence& rSequence,
+    const basegfx::B2DRange& rTargetRange,
+    const sal_uInt32 nMaximumQuadraticPixels)
 {
-    ensureSequenceAndRange();
+    BitmapEx aRetval;
 
-    if(maReplacement.IsEmpty() && maSequence.hasElements())
+    if(rSequence.hasElements())
     {
         // create replacement graphic from maSequence
         // create XPrimitive2DRenderer
@@ -57,25 +60,24 @@ void SvgData::ensureReplacement()
             if(xPrimitive2DRenderer.is())
             {
                 uno::Sequence< beans::PropertyValue > aViewParameters;
-                const basegfx::B2DRange& rRange(getRange());
                 geometry::RealRectangle2D aRealRect;
 
-                aRealRect.X1 = rRange.getMinX();
-                aRealRect.Y1 = rRange.getMinY();
-                aRealRect.X2 = rRange.getMaxX();
-                aRealRect.Y2 = rRange.getMaxY();
+                aRealRect.X1 = rTargetRange.getMinX();
+                aRealRect.Y1 = rTargetRange.getMinY();
+                aRealRect.X2 = rTargetRange.getMaxX();
+                aRealRect.Y2 = rTargetRange.getMaxY();
 
                 // get system DPI
                 const Size aDPI(Application::GetDefaultDevice()->LogicToPixel(Size(1, 1), MAP_INCH));
 
                 const uno::Reference< rendering::XBitmap > xBitmap(
                     xPrimitive2DRenderer->rasterize( 
-                        maSequence,
+                        rSequence,
                         aViewParameters, 
                         aDPI.getWidth(), 
                         aDPI.getHeight(), 
                         aRealRect, 
-                        500000));
+                        nMaximumQuadraticPixels));
 
                 if(xBitmap.is())
                 {
@@ -83,7 +85,7 @@ void SvgData::ensureReplacement()
 
                     if(xIntBmp.is())
                     {
-                        maReplacement = vcl::unotools::bitmapExFromXBitmap(xIntBmp);
+                        aRetval = vcl::unotools::bitmapExFromXBitmap(xIntBmp);
                     }
                 }
             }
@@ -93,6 +95,20 @@ void SvgData::ensureReplacement()
             OSL_ENSURE(sal_False, "Got no graphic::XPrimitive2DRenderer (!)" );
         }
     }
+
+    return aRetval;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+void SvgData::ensureReplacement()
+{
+    ensureSequenceAndRange();
+
+    if(maReplacement.IsEmpty() && maSequence.hasElements())
+    {
+        maReplacement = convertPrimitive2DSequenceToBitmapEx(maSequence, getRange());
+    }
 }
 
 //////////////////////////////////////////////////////////////////////////////

Modified: incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/app/randrwrapper.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/app/randrwrapper.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/app/randrwrapper.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/app/randrwrapper.cxx Wed May 16 15:07:00 2012
@@ -152,14 +152,13 @@ RandRWrapper::RandRWrapper( Display* pDi
     initFromModule();
     if( ! m_bValid )
     {
-        rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrandr.so.2" ) );
         // load and resolve dependencies immediately
         // rationale: there are older distributions where libXrandr.so.2 is not linked
         // with libXext.so, resulting in a missing symbol and terminating the office
         // obviously they expected libXext to be linked in global symbolspace (that is
         // linked by the application), which is not the case with us (because we want
         // to be able to run in headless mode even without an installed X11 library)
-        m_pRandRLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT | SAL_LOADMODULE_NOW );
+        m_pRandRLib = osl_loadAsciiModule( "libXrandr.so.2", SAL_LOADMODULE_DEFAULT | SAL_LOADMODULE_NOW );
         initFromModule();
     }
     if( m_bValid )

Modified: incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/desktopdetect/desktopdetector.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/desktopdetect/desktopdetector.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/desktopdetect/desktopdetector.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/desktopdetect/desktopdetector.cxx Wed May 16 15:07:00 2012
@@ -235,8 +235,7 @@ static bool is_cde_desktop( Display* pDi
     void* pLibrary = NULL;
 
     Atom nDtAtom = XInternAtom( pDisplay, "_DT_WM_READY", True );
-    OUString aPathName( RTL_CONSTASCII_USTRINGPARAM( "file:///usr/dt/lib/libDtSvc.so" ) );
-    if( nDtAtom && ( pLibrary = osl_loadModule( aPathName.pData, SAL_LOADMODULE_DEFAULT ) ) )
+    if( nDtAtom && ( pLibrary = osl_loadAsciiModule( "file:///usr/dt/lib/libDtSvc.so", SAL_LOADMODULE_DEFAULT ) ) )
     {
         osl_unloadModule( (oslModule)pLibrary );
         return true;

Modified: incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/fontmanager/fontconfig.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/fontmanager/fontconfig.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/fontmanager/fontconfig.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/fontmanager/fontconfig.cxx Wed May 16 15:07:00 2012
@@ -274,13 +274,9 @@ FontCfgWrapper::FontCfgWrapper()
           m_pOutlineSet( NULL ),
           m_nFcVersion( 0 )
 {
-    OUString aLib( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so.1" ) );
-    m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY );
+    m_pLib = osl_loadAsciiModule( "libfontconfig.so.1", SAL_LOADMODULE_LAZY );
     if( !m_pLib )
-    {
-        aLib = OUString( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so" ) );
-        m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY );
-    }
+        m_pLib = osl_loadAsciiModule( "libfontconfig.so", SAL_LOADMODULE_LAZY );
 
     if( ! m_pLib )
     {

Modified: incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/gdi/salgdi3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/gdi/salgdi3.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/gdi/salgdi3.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/gdi/salgdi3.cxx Wed May 16 15:07:00 2012
@@ -346,8 +346,7 @@ CairoWrapper::CairoWrapper()
     if( !XQueryExtension( GetX11SalData()->GetDisplay()->GetDisplay(), "RENDER", &nDummy, &nDummy, &nDummy ) )
         return;
 
-    OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libcairo.so.2" ));
-    mpCairoLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT );
+    mpCairoLib = osl_loadAsciiModule( "libcairo.so.2", SAL_LOADMODULE_DEFAULT );
     if( !mpCairoLib )
         return;
 

Modified: incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/gdi/salprnpsp.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/gdi/salprnpsp.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/gdi/salprnpsp.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/gdi/salprnpsp.cxx Wed May 16 15:07:00 2012
@@ -101,8 +101,7 @@ static void getPaLib()
 {
 	if( ! driverLib )
 	{
-        OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( _XSALSET_LIBNAME ) );
-        driverLib	= osl_loadModuleRelative( (oslGenericFunction)getPaLib, aLibName.pData, SAL_LOADMODULE_DEFAULT );
+        driverLib	= osl_loadAsciiModuleRelative( (oslGenericFunction)getPaLib, _XSALSET_LIBNAME, SAL_LOADMODULE_DEFAULT );
         if ( !driverLib )
         {
             return;

Modified: incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/gdi/xrender_peer.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/gdi/xrender_peer.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/gdi/xrender_peer.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/gdi/xrender_peer.cxx Wed May 16 15:07:00 2012
@@ -79,13 +79,12 @@ void XRenderPeer::InitRenderLib()
     // we don't know if we are running on a system with xrender library
     // we don't want to install system libraries ourselves
     // => load them dynamically when they are there
-    const OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrender.so.1" ));
-    mpRenderLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT );
+    static const char aLibName[] = "libXrender.so.1";
+    mpRenderLib = osl_loadAsciiModule( aLibName, SAL_LOADMODULE_DEFAULT );
     if( !mpRenderLib ) {
 #ifdef DEBUG
         fprintf( stderr, "Display can do XRender, but no %s installed.\n"
-            "Please install for improved display performance\n", OUStringToOString( aLibName.getStr(), 
-                                                                                    osl_getThreadTextEncoding() ).getStr() );
+            "Please install for improved display performance\n", aLibName );
 #endif
         return;
     }

Modified: incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/printer/cupsmgr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/printer/cupsmgr.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/printer/cupsmgr.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/unx/generic/printer/cupsmgr.cxx Wed May 16 15:07:00 2012
@@ -155,13 +155,9 @@ CUPSWrapper::CUPSWrapper() 
           m_bPPDThreadRunning( false )
 {
 #ifdef ENABLE_CUPS
-    OUString aLib( RTL_CONSTASCII_USTRINGPARAM( CUPS_LIB_NAME ) );
-    m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY );
+    m_pLib = osl_loadAsciiModule( CUPS_LIB_NAME, SAL_LOADMODULE_LAZY );
     if( ! m_pLib )
-    {
-        aLib = OUString( RTL_CONSTASCII_USTRINGPARAM( SAL_MODULENAME( "cups" ) ) );
-        m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY );
-    }
+        m_pLib = osl_loadAsciiModule( "cups", SAL_LOADMODULE_LAZY );
 #endif
 
     if( ! m_pLib )
@@ -1136,13 +1132,11 @@ const char* CUPSManager::authenticateUse
     const char* pRet = NULL;
 
 #ifdef ENABLE_CUPS
-    OUString aLib = OUString::createFromAscii( _XSALSET_LIBNAME );
-    oslModule pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY );
+    oslModule pLib = osl_loadAsciiModule( _XSALSET_LIBNAME, SAL_LOADMODULE_LAZY );
     if( pLib )
     {
-        OUString aSym( RTL_CONSTASCII_USTRINGPARAM( "Sal_authenticateQuery" ) );
         bool (*getpw)( const OString& rServer, OString& rUser, OString& rPw) =
-            (bool(*)(const OString&,OString&,OString&))osl_getFunctionSymbol( pLib, aSym.pData );
+            (bool(*)(const OString&,OString&,OString&))osl_getAsciiFunctionSymbol( pLib, "Sal_authenticateQuery" );
         if( getpw )
         {
             osl::MutexGuard aGuard( m_aCUPSMutex );
@@ -1161,7 +1155,7 @@ const char* CUPSManager::authenticateUse
         osl_unloadModule( pLib );
     }
 #if OSL_DEBUG_LEVEL > 1
-    else fprintf( stderr, "loading of module %s failed\n", OUStringToOString( aLib, osl_getThreadTextEncoding() ).getStr() );
+    else fprintf( stderr, "loading of module %s failed\n", _XSALSET_LIBNAME );
 #endif
 #endif // ENABLE_CUPS
 

Modified: incubator/ooo/branches/alg/aw080/main/vcl/win/source/gdi/salnativewidgets-luna.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/win/source/gdi/salnativewidgets-luna.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/win/source/gdi/salnativewidgets-luna.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/win/source/gdi/salnativewidgets-luna.cxx Wed May 16 15:07:00 2012
@@ -90,8 +90,7 @@ static VisualStylesAPI vsAPI;
 
 VisualStylesAPI::VisualStylesAPI()
 {
-    OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM( "uxtheme.dll" ) );
-    mhModule = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT );
+    mhModule = osl_loadAsciiModule( "uxtheme.dll", SAL_LOADMODULE_DEFAULT );
 
     if ( mhModule )
     {

Modified: incubator/ooo/branches/alg/aw080/main/vcl/win/source/gdi/salprn.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/win/source/gdi/salprn.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/win/source/gdi/salprn.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/win/source/gdi/salprn.cxx Wed May 16 15:07:00 2012
@@ -451,14 +451,10 @@ XubString WinSalInstance::GetDefaultPrin
         // check for W2k and XP
         if( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT && aSalShlData.maVersionInfo.dwMajorVersion >= 5 )
         {
-            OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM( "winspool.drv" ) );
-            oslModule pLib = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT );
+            oslModule pLib = osl_loadAsciiModule( "winspool.drv", SAL_LOADMODULE_DEFAULT );
             oslGenericFunction pFunc = NULL;
             if( pLib )
-            {
-                OUString queryFuncName( RTL_CONSTASCII_USTRINGPARAM( "GetDefaultPrinterW" ) );
-                pFunc = osl_getFunctionSymbol( pLib, queryFuncName.pData );
-            }
+                pFunc = osl_getAsciiFunctionSymbol( pLib, "GetDefaultPrinterW" );
 
             pGetDefaultPrinter = (sal_Bool(WINAPI*)(LPWSTR,LPDWORD)) pFunc;
         }

Modified: incubator/ooo/branches/alg/aw080/main/vcl/win/source/gdi/winlayout.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/win/source/gdi/winlayout.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/win/source/gdi/winlayout.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/win/source/gdi/winlayout.cxx Wed May 16 15:07:00 2012
@@ -85,8 +85,8 @@ using namespace rtl;
 class ImplWinFontEntry : public ImplFontEntry
 {
 public:
-                            ImplWinFontEntry( ImplFontSelectData& );
-                            ~ImplWinFontEntry();
+    explicit                ImplWinFontEntry( ImplFontSelectData& );
+    virtual                 ~ImplWinFontEntry();
 
 private:
     // TODO: also add HFONT??? Watch out for issues with too many active fonts...
@@ -1132,8 +1132,7 @@ static bool bManualCellAlign = true;
 
 static bool InitUSP()
 {
-    OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM( "usp10" ) );
-    aUspModule = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT );
+    aUspModule = osl_loadAsciiModule( "usp10", SAL_LOADMODULE_DEFAULT );
     if( !aUspModule )
         return (bUspEnabled = false);
 
@@ -1307,6 +1306,7 @@ bool UniscribeLayout::LayoutText( ImplLa
     SCRIPT_CONTROL aScriptControl = {nLangId,false,false,false,false,false,false,false,false,0};
     aScriptControl.fNeutralOverride = aScriptState.fOverrideDirection;
     aScriptControl.fContextDigits   = (0 != (rArgs.mnFlags & SAL_LAYOUT_SUBSTITUTE_DIGITS));
+    aScriptControl.fMergeNeutralItems = true;
     // determine relevant substring and work only on it
     // when Bidi status is unknown we need to look at the whole string though
     mnSubStringMin = 0;
@@ -1543,11 +1543,10 @@ bool UniscribeLayout::LayoutText( ImplLa
                         {
                             if( mpLogClusters[ c ] == i )
                             {
-                                // --> HDU/FME 2005-10-25 #i55716# skip WORDJOINER
+                                // #i55716# skip WORDJOINER
                                 if( rArgs.mpStr[ c ] == 0x2060 )
                                     mpOutGlyphs[ i + rVisualItem.mnMinGlyphPos ] = 1;
                                 else
-                                // <--
                                     rArgs.NeedFallback( c, false );
                            }
                         }
@@ -1559,11 +1558,10 @@ bool UniscribeLayout::LayoutText( ImplLa
                         {
                             if( mpLogClusters[ c ] == i )
                             {
-                                // --> HDU/FME 2005-10-25 #i55716# skip WORDJOINER
+                                // #i55716# skip WORDJOINER
                                 if( rArgs.mpStr[ c ] == 0x2060 )
                                     mpOutGlyphs[ i + rVisualItem.mnMinGlyphPos ] = 1;
                                 else
-                                // <--
                                     rArgs.NeedFallback( c, true );
                             }
                         }

Modified: incubator/ooo/branches/alg/aw080/main/vcl/win/source/window/salframe.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/vcl/win/source/window/salframe.cxx?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/vcl/win/source/window/salframe.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/vcl/win/source/window/salframe.cxx Wed May 16 15:07:00 2012
@@ -364,8 +364,7 @@ SalFrame* ImplSalCreateFrame( WinSalInst
         // check for W2k and XP
         if ( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT && aSalShlData.maVersionInfo.dwMajorVersion >= 5 )
         {
-            OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM( "user32" ) );
-            oslModule pLib = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT );
+            oslModule pLib = osl_loadAsciiModule( "user32", SAL_LOADMODULE_DEFAULT );
             oslGenericFunction pFunc = NULL;
             if( pLib )
                 pFunc = osl_getAsciiFunctionSymbol( pLib, "SetLayeredWindowAttributes" );
@@ -2123,8 +2122,7 @@ void WinSalFrame::StartPresentation( sal
 
                 if ( !aOS.nErrCode )
                 {
-                    OUString aLibraryName( OUString::createFromAscii( aOS.szPathName ) );
-                    oslModule mhSageInst = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT );
+                    oslModule mhSageInst = osl_loadAsciiModule( aOS.szPathName, SAL_LOADMODULE_DEFAULT );
                     pSalData->mpSageEnableProc = (SysAgt_Enable_PROC)osl_getAsciiFunctionSymbol( mhSageInst, "System_Agent_Enable" );
                 }
                 else
@@ -2859,8 +2857,7 @@ static BOOL ImplDwmIsCompositionEnabled(
     SalData* pSalData = GetSalData();
     if( ! pSalData->mpDwmIsCompositionEnabled )
     {
-        rtl::OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM( "Dwmapi.dll" ) );
-        pSalData->maDwmLib = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT );
+        pSalData->maDwmLib = osl_loadAsciiModule( "Dwmapi.dll", SAL_LOADMODULE_DEFAULT );
         if( pSalData->maDwmLib )
             pSalData->mpDwmIsCompositionEnabled = (DwmIsCompositionEnabled_ptr)osl_getAsciiFunctionSymbol( pSalData->maDwmLib, "DwmIsCompositionEnabled" );
         if( ! pSalData->mpDwmIsCompositionEnabled ) // something failed

Modified: incubator/ooo/branches/alg/aw080/main/xmlhelp/source/com/sun/star/help/HelpIndexer.java
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/xmlhelp/source/com/sun/star/help/HelpIndexer.java?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/xmlhelp/source/com/sun/star/help/HelpIndexer.java (original)
+++ incubator/ooo/branches/alg/aw080/main/xmlhelp/source/com/sun/star/help/HelpIndexer.java Wed May 16 15:07:00 2012
@@ -36,14 +36,6 @@ import java.io.IOException;
 import java.util.Date;
 import java.util.zip.ZipOutputStream;
 
-/**
-   When this tool is used with long path names on Windows, that is paths which start
-   with \\?\, then the caller must make sure that the path is unique. This is achieved
-   by removing '.' and '..' from the path. Paths which are created by
-   osl_getSystemPathFromFileURL fulfill this requirement. This is necessary because
-   lucene is patched to not use File.getCanonicalPath. See long_path.patch in the lucene
-   module.
- */
 public class HelpIndexer extends WeakBase
     implements XServiceInfo, XInvocation
 {

Modified: incubator/ooo/branches/alg/aw080/main/xmlhelp/source/com/sun/star/help/HelpSearch.java
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/xmlhelp/source/com/sun/star/help/HelpSearch.java?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/xmlhelp/source/com/sun/star/help/HelpSearch.java (original)
+++ incubator/ooo/branches/alg/aw080/main/xmlhelp/source/com/sun/star/help/HelpSearch.java Wed May 16 15:07:00 2012
@@ -40,16 +40,21 @@ import org.apache.lucene.analysis.cjk.CJ
 import org.apache.lucene.document.Document;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.Term;
-import org.apache.lucene.search.Hits;
+import org.apache.lucene.search.TopDocs;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.Searcher;
+import org.apache.lucene.search.ScoreDoc;
 import org.apache.lucene.search.TermQuery;
 import org.apache.lucene.search.WildcardQuery;
+import org.apache.lucene.util.Version;
+import org.apache.lucene.store.NIOFSDirectory;
 
 import com.sun.star.script.XInvocation;
 import com.sun.star.beans.XIntrospectionAccess;
 
+import java.io.File;
+
 /** This class capsulates the class, that implements the minimal component and a
  * factory for creating the service (<CODE>__getComponentFactory</CODE>).
  */
@@ -249,9 +254,10 @@ public class HelpSearch
 		private static String[] queryImpl( String aLanguageStr, String aIndexStr, String aQueryStr, 
 			boolean bCaptionOnly, Object[] aScoreOutArray ) throws Exception
 		{
-			IndexReader reader = IndexReader.open( aIndexStr );
+			File aIndexFile = new File( aIndexStr );
+			IndexReader reader = IndexReader.open( NIOFSDirectory.open( aIndexFile ), true );
 			Searcher searcher = new IndexSearcher( reader );
-            Analyzer analyzer = aLanguageStr.equals("ja") ? (Analyzer)new CJKAnalyzer() : (Analyzer)new StandardAnalyzer();
+			Analyzer analyzer = aLanguageStr.equals("ja") ? (Analyzer)new CJKAnalyzer(Version.LUCENE_29) : (Analyzer)new StandardAnalyzer(Version.LUCENE_29);
 
 			String aField;
 			if( bCaptionOnly )
@@ -266,18 +272,18 @@ public class HelpSearch
 				aQuery = new TermQuery( new Term( aField, aQueryStr ) );
 
 			// Perform search
-			Hits aHits = searcher.search( aQuery );
-			int nHitCount = aHits.length();
+			TopDocs aHits = searcher.search( aQuery, 100 );
+			int nHitCount = aHits.totalHits;
 
 			String aDocs[] = new String[nHitCount];	
 			float aScores[] = null;
 			aScores = new float[nHitCount];
 			for( int iHit = 0 ; iHit < nHitCount ; iHit++ )
 			{
-				Document aDoc = aHits.doc( iHit );
-				String aPath = aDoc.get( "path" );
+				ScoreDoc aDoc = aHits.scoreDocs[iHit];
+				String aPath = searcher.doc(aDoc.doc).get( "path" );
 				aDocs[iHit] = ( aPath != null ) ? aPath : "";
-				aScores[iHit] = aHits.score( iHit );
+				aScores[iHit] = aDoc.score;
 			}
 			aScoreOutArray[0] = aScores;
 

Modified: incubator/ooo/branches/alg/aw080/main/xmlhelp/source/com/sun/star/help/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/xmlhelp/source/com/sun/star/help/makefile.mk?rev=1339213&r1=1339212&r2=1339213&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/xmlhelp/source/com/sun/star/help/makefile.mk (original)
+++ incubator/ooo/branches/alg/aw080/main/xmlhelp/source/com/sun/star/help/makefile.mk Wed May 16 15:07:00 2012
@@ -47,8 +47,8 @@ JARFILES  = ridl.jar jurt.jar unoil.jar 
 EXTRAJARFILES = $(LUCENE_CORE_JAR) $(LUCENE_ANALYZERS_JAR)
 JARCLASSPATH = $(EXTRAJARFILES)
 .ELSE
-JARFILES += lucene-core-2.3.jar lucene-analyzers-2.3.jar
-JARCLASSPATH = lucene-core-2.3.jar lucene-analyzers-2.3.jar
+JARFILES += lucene-core-2.9.4-dev.jar lucene-analyzers-2.9.4-dev.jar
+JARCLASSPATH = lucene-core-2.9.4-dev.jar lucene-analyzers-2.9.4-dev.jar
 .ENDIF
   
 JARTARGET	   	   = LuceneHelpWrapper.jar



Mime
View raw message