openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@apache.org
Subject svn commit: r1484083 [13/17] - in /openoffice/branches/ia2: ./ ext_libraries/apr/prj/ ext_libraries/coinmp/prj/ ext_libraries/ratscan/prj/ ext_libraries/serf/prj/ main/ main/avmedia/source/quicktime/ main/bridges/prj/ main/bridges/source/cpp_uno/cxx_ma...
Date Sat, 18 May 2013 10:12:56 GMT
Modified: openoffice/branches/ia2/main/svx/source/gallery2/galexpl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/gallery2/galexpl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/gallery2/galexpl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/gallery2/galexpl.cxx Sat May 18 10:12:43 2013
@@ -42,71 +42,9 @@ static SfxListener aLockListener;
 // - GalleryExplorer -
 // -------------------
 
-Gallery* GalleryExplorer::ImplGetGallery()
-{
-	static Gallery* pGallery = NULL;
-
-    ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
-
-	if( !pGallery )
-		pGallery = Gallery::GetGalleryInstance();
-
-	return pGallery;
-}
-
-// ------------------------------------------------------------------------
-
-GalleryExplorer* GalleryExplorer::GetGallery()
-{
-	static GalleryExplorer* pThis = NULL;
-
-    ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
-
-	// only create a dummy object which can be accessed
-	if( !pThis )
-		pThis = new GalleryExplorer;
-
-	return pThis;
-}
-
-// ------------------------------------------------------------------------
-
-INetURLObject GalleryExplorer::GetURL() const
-{
-	return GALLERYBROWSER()->GetURL();
-}
-
-String GalleryExplorer::GetFilterName() const
-{
-	return GALLERYBROWSER()->GetFilterName();
-}
-
-// ------------------------------------------------------------------------
-
-Graphic GalleryExplorer::GetGraphic() const
-{
-	return GALLERYBROWSER()->GetGraphic();
-}
-
-// ------------------------------------------------------------------------
-
-sal_Bool GalleryExplorer::GetVCDrawModel( FmFormModel& rModel ) const
-{
-	return GALLERYBROWSER()->GetVCDrawModel( rModel );
-}
-
-// ------------------------------------------------------------------------
-
-sal_Bool GalleryExplorer::IsLinkage() const
-{
-	return GALLERYBROWSER()->IsLinkage();
-}
-
-// ------------------------------------------------------------------------
-
 sal_Bool GalleryExplorer::FillThemeList( List& rThemeList )
 {
-	Gallery* pGal = ImplGetGallery();
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
 
 	if( pGal )
 	{
@@ -126,7 +64,7 @@ sal_Bool GalleryExplorer::FillThemeList(
 
 sal_Bool GalleryExplorer::FillObjList( const String& rThemeName, List& rObjList )
 {
-	Gallery* pGal = ImplGetGallery();
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
 
 	if( pGal )
 	{
@@ -149,7 +87,7 @@ sal_Bool GalleryExplorer::FillObjList( c
 
 sal_Bool GalleryExplorer::FillObjList( sal_uIntPtr nThemeId, List& rObjList )
 {
-	Gallery* pGal = ImplGetGallery();
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
 	return( pGal ? FillObjList( pGal->GetThemeName( nThemeId ), rObjList ) : sal_False );
 }
 
@@ -157,7 +95,7 @@ sal_Bool GalleryExplorer::FillObjList( s
 
 sal_Bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vector< rtl::OUString >& rList )
 {
-	Gallery* pGal = ImplGetGallery();
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
 	if( pGal )
 	{
         SfxListener     aListener;
@@ -185,21 +123,7 @@ sal_Bool GalleryExplorer::FillObjListTit
 
 sal_Bool GalleryExplorer::InsertURL( const String& rThemeName, const String& rURL )
 {
-	return InsertURL( rThemeName, rURL, SGA_FORMAT_ALL );
-}
-
-// ------------------------------------------------------------------------
-
-sal_Bool GalleryExplorer::InsertURL( sal_uIntPtr nThemeId, const String& rURL )
-{
-	return InsertURL( nThemeId, rURL, SGA_FORMAT_ALL );
-}
-
-// ------------------------------------------------------------------------
-
-sal_Bool GalleryExplorer::InsertURL( const String& rThemeName, const String& rURL, const sal_uIntPtr )
-{
-	Gallery*	pGal = ImplGetGallery();
+	Gallery*	pGal = ::Gallery::GetGalleryInstance();
 	sal_Bool		bRet = sal_False;
 
 	if( pGal )
@@ -221,17 +145,17 @@ sal_Bool GalleryExplorer::InsertURL( con
 
 // ------------------------------------------------------------------------
 
-sal_Bool GalleryExplorer::InsertURL( sal_uIntPtr nThemeId, const String& rURL, const sal_uIntPtr nSgaFormat )
+sal_Bool GalleryExplorer::InsertURL( sal_uIntPtr nThemeId, const String& rURL )
 {
-	Gallery* pGal = ImplGetGallery();
-	return( pGal ? InsertURL( pGal->GetThemeName( nThemeId ), rURL, nSgaFormat ) : sal_False );
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
+	return( pGal ? InsertURL( pGal->GetThemeName( nThemeId ), rURL ) : sal_False );
 }
 
 // ------------------------------------------------------------------------
 
 sal_uIntPtr GalleryExplorer::GetObjCount( const String& rThemeName )
 {
-	Gallery*	pGal = ImplGetGallery();
+	Gallery*	pGal = ::Gallery::GetGalleryInstance();
 	sal_uIntPtr		nRet = 0;
 
 	if( pGal )
@@ -253,7 +177,7 @@ sal_uIntPtr GalleryExplorer::GetObjCount
 
 sal_uIntPtr GalleryExplorer::GetObjCount( sal_uIntPtr nThemeId )
 {
-	Gallery* pGal = ImplGetGallery();
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
 	return( pGal ? GetObjCount( pGal->GetThemeName( nThemeId ) ) : sal_False );
 }
 
@@ -263,7 +187,7 @@ sal_Bool GalleryExplorer::GetGraphicObj(
 									 Graphic* pGraphic, BitmapEx* pThumb,
 									 sal_Bool bProgress )
 {
-	Gallery*	pGal = ImplGetGallery();
+	Gallery*	pGal = ::Gallery::GetGalleryInstance();
 	sal_Bool		bRet = sal_False;
 
 	if( pGal )
@@ -292,7 +216,7 @@ sal_Bool GalleryExplorer::GetGraphicObj(
 									 Graphic* pGraphic, BitmapEx* pThumb,
 									 sal_Bool bProgress )
 {
-	Gallery* pGal = ImplGetGallery();
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
 	return( pGal ? GetGraphicObj( pGal->GetThemeName( nThemeId ), nPos, pGraphic, pThumb, bProgress ) : sal_False );
 }
 
@@ -300,7 +224,7 @@ sal_Bool GalleryExplorer::GetGraphicObj(
 
 sal_Bool GalleryExplorer::InsertGraphicObj( const String& rThemeName, const Graphic& rGraphic )
 {
-	Gallery*	pGal = ImplGetGallery();
+	Gallery*	pGal = ::Gallery::GetGalleryInstance();
 	sal_Bool		bRet = sal_False;
 
 	if( pGal )
@@ -322,7 +246,7 @@ sal_Bool GalleryExplorer::InsertGraphicO
 
 sal_Bool GalleryExplorer::InsertGraphicObj( sal_uIntPtr nThemeId, const Graphic& rGraphic )
 {
-	Gallery* pGal = ImplGetGallery();
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
 	return( pGal ? InsertGraphicObj( pGal->GetThemeName( nThemeId ), rGraphic ) : sal_False );
 }
 
@@ -330,7 +254,7 @@ sal_Bool GalleryExplorer::InsertGraphicO
 
 sal_uIntPtr GalleryExplorer::GetSdrObjCount( const String& rThemeName )
 {
-	Gallery*	pGal = ImplGetGallery();
+	Gallery*	pGal = ::Gallery::GetGalleryInstance();
 	sal_uIntPtr		nRet = 0;
 
 	if( pGal )
@@ -355,7 +279,7 @@ sal_uIntPtr GalleryExplorer::GetSdrObjCo
 
 sal_uIntPtr GalleryExplorer::GetSdrObjCount( sal_uIntPtr nThemeId  )
 {
-	Gallery* pGal = ImplGetGallery();
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
 	return( pGal ? GetSdrObjCount( pGal->GetThemeName( nThemeId ) ) : sal_False );
 }
 
@@ -364,7 +288,7 @@ sal_uIntPtr GalleryExplorer::GetSdrObjCo
 sal_Bool GalleryExplorer::GetSdrObj( const String& rThemeName, sal_uIntPtr nSdrModelPos,
 								 SdrModel* pModel, BitmapEx* pThumb )
 {
-	Gallery*	pGal = ImplGetGallery();
+	Gallery*	pGal = ::Gallery::GetGalleryInstance();
 	sal_Bool		bRet = sal_False;
 
 	if( pGal )
@@ -401,7 +325,7 @@ sal_Bool GalleryExplorer::GetSdrObj( con
 sal_Bool GalleryExplorer::GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModelPos,
 								 SdrModel* pModel, BitmapEx* pThumb )
 {
-	Gallery* pGal = ImplGetGallery();
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
 	return( pGal ? GetSdrObj( pGal->GetThemeName( nThemeId ), nSdrModelPos, pModel, pThumb ) : sal_False );
 }
 
@@ -409,7 +333,7 @@ sal_Bool GalleryExplorer::GetSdrObj( sal
 
 sal_Bool GalleryExplorer::InsertSdrObj( const String& rThemeName, FmFormModel& rModel )
 {
-	Gallery*	pGal = ImplGetGallery();
+	Gallery*	pGal = ::Gallery::GetGalleryInstance();
 	sal_Bool		bRet = sal_False;
 
 	if( pGal )
@@ -431,7 +355,7 @@ sal_Bool GalleryExplorer::InsertSdrObj( 
 
 sal_Bool GalleryExplorer::InsertSdrObj( sal_uIntPtr nThemeId, FmFormModel& rModel )
 {
-	Gallery* pGal = ImplGetGallery();
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
 	return( pGal ? InsertSdrObj( pGal->GetThemeName( nThemeId ), rModel ) : sal_False );
 }
 
@@ -439,7 +363,7 @@ sal_Bool GalleryExplorer::InsertSdrObj( 
 
 sal_Bool GalleryExplorer::BeginLocking( const String& rThemeName )
 {
-	Gallery*	pGal = ImplGetGallery();
+	Gallery*	pGal = ::Gallery::GetGalleryInstance();
 	sal_Bool		bRet = sal_False;
 
 	if( pGal )
@@ -460,7 +384,7 @@ sal_Bool GalleryExplorer::BeginLocking( 
 
 sal_Bool GalleryExplorer::BeginLocking( sal_uIntPtr nThemeId )
 {
-	Gallery* pGal = ImplGetGallery();
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
 	return( pGal ? BeginLocking( pGal->GetThemeName( nThemeId ) ) : sal_False );
 }
 
@@ -468,7 +392,7 @@ sal_Bool GalleryExplorer::BeginLocking( 
 
 sal_Bool GalleryExplorer::EndLocking( const String& rThemeName )
 {
-	Gallery*	pGal = ImplGetGallery();
+	Gallery*	pGal = ::Gallery::GetGalleryInstance();
 	sal_Bool		bRet = sal_False;
 
 	if( pGal )
@@ -499,7 +423,7 @@ sal_Bool GalleryExplorer::EndLocking( co
 
 sal_Bool GalleryExplorer::EndLocking( sal_uIntPtr nThemeId )
 {
-	Gallery* pGal = ImplGetGallery();
+	Gallery* pGal = ::Gallery::GetGalleryInstance();
 	return( pGal ? EndLocking( pGal->GetThemeName( nThemeId ) ) : sal_False );
 }
 

Modified: openoffice/branches/ia2/main/svx/source/gallery2/galobj.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/gallery2/galobj.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/gallery2/galobj.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/gallery2/galobj.cxx Sat May 18 10:12:43 2013
@@ -52,12 +52,54 @@ using namespace ::com::sun::star;
 // - SgaObject -
 // -------------
 
-SgaObject::SgaObject() :
-		bIsValid    ( sal_False ),
-		bIsThumbBmp	( sal_True )
+SgaObject::SgaObject() 
+:   bIsValid    ( sal_False ),
+    bIsThumbBmp	( sal_True )
 {
 }
 
+BitmapEx SgaObject::createPreviewBitmapEx(const Size& rSizePixel) const
+{
+    BitmapEx aRetval;
+
+    if(rSizePixel.Width() && rSizePixel.Height())
+    {
+        if(SGA_OBJ_SOUND == GetObjKind())
+        {
+            aRetval = GAL_RESID(RID_SVXBMP_GALLERY_MEDIA);
+        }
+        else if(IsThumbBitmap())
+        {
+            aRetval = GetThumbBmp();
+        }
+        else
+        {
+            const Graphic aGraphic(GetThumbMtf());
+
+            aRetval = aGraphic.GetBitmapEx();
+        }
+
+        if(!aRetval.IsEmpty())
+        {
+            const Size aCurrentSizePixel(aRetval.GetSizePixel());
+            const double fScaleX((double)rSizePixel.Width() / (double)aCurrentSizePixel.Width());
+            const double fScaleY((double)rSizePixel.Height() / (double)aCurrentSizePixel.Height());
+            const double fScale(std::min(fScaleX, fScaleY));
+
+            // only scale when need to decrease, no need to make bigger as original. Also
+            // prevent scaling close to 1.0 which is not needed for pixel graphics
+            if(fScale < 1.0 && fabs(1.0 - fScale) > 0.005) 
+            {
+                static sal_uInt32 nScaleFlag = BMP_SCALE_FASTESTINTERPOLATE;
+
+                aRetval.Scale(fScale, fScale, nScaleFlag);
+            }
+        }
+    }
+
+    return aRetval;
+}
+
 // ------------------------------------------------------------------------
 
 sal_Bool SgaObject::CreateThumb( const Graphic& rGraphic )

Modified: openoffice/branches/ia2/main/svx/source/gallery2/galtheme.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/gallery2/galtheme.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/gallery2/galtheme.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/gallery2/galtheme.cxx Sat May 18 10:12:43 2013
@@ -471,6 +471,44 @@ SgaObject* GalleryTheme::AcquireObject( 
 
 // ------------------------------------------------------------------------
 
+void GalleryTheme::GetPreviewBitmapExAndStrings(sal_uIntPtr nPos, BitmapEx& rBitmapEx, Size& rSize, String& rTitle, String& rPath) const
+{
+    const GalleryObject* pGalleryObject = aObjectList.GetObject(nPos);
+
+    if(pGalleryObject)
+    {
+        rBitmapEx = pGalleryObject->maPreviewBitmapEx;
+        rSize = pGalleryObject->maPreparedSize;
+        rTitle = pGalleryObject->maTitle;
+        rPath = pGalleryObject->maPath;
+    }
+    else
+    {
+        OSL_ENSURE(false, "OOps, no GalleryObject at this index (!)");
+    }
+}
+
+// ------------------------------------------------------------------------
+
+void GalleryTheme::SetPreviewBitmapExAndStrings(sal_uIntPtr nPos, const BitmapEx& rBitmapEx, const Size& rSize, const String& rTitle, const String& rPath)
+{
+    GalleryObject* pGalleryObject = aObjectList.GetObject(nPos);
+
+    if(pGalleryObject)
+    {
+        pGalleryObject->maPreviewBitmapEx = rBitmapEx;
+        pGalleryObject->maPreparedSize = rSize;
+        pGalleryObject->maTitle = rTitle;
+        pGalleryObject->maPath = rPath;
+    }
+    else
+    {
+        OSL_ENSURE(false, "OOps, no GalleryObject at this index (!)");
+    }
+}
+
+// ------------------------------------------------------------------------
+
 void GalleryTheme::ReleaseObject( SgaObject* pObject )
 {
 	delete pObject;
@@ -544,7 +582,7 @@ void GalleryTheme::Actualize( const Link
 
 		// LoeschFlag zuruecksetzen
 		for ( i = 0; i < nCount; i++ )
-			aObjectList.GetObject( i )->bDummy = sal_False;
+			aObjectList.GetObject( i )->mbDelete = false;
 
 		for( i = 0; ( i < nCount ) && !bAbortActualize; i++ )
 		{
@@ -567,7 +605,7 @@ void GalleryTheme::Actualize( const Link
 				{
 					SgaObjectSound aObjSound( aURL );
 					if( !InsertObject( aObjSound ) )
-						pEntry->bDummy = sal_True;
+						pEntry->mbDelete = true;
 				}
 				else
 				{
@@ -585,12 +623,12 @@ void GalleryTheme::Actualize( const Link
 							pNewObj = (SgaObject*) new SgaObjectBmp( aGraphic, aURL, aFormat );
 
 						if( !InsertObject( *pNewObj ) )
-							pEntry->bDummy = sal_True;
+							pEntry->mbDelete = true;
 
 						delete pNewObj;
 					}
 					else
-						pEntry->bDummy = sal_True; // Loesch-Flag setzen
+						pEntry->mbDelete = true; // Loesch-Flag setzen
 				}
 			}
 			else
@@ -607,7 +645,7 @@ void GalleryTheme::Actualize( const Link
 						SgaObjectSvDraw aNewObj( *pIStm, pEntry->aURL );
 
                         if( !InsertObject( aNewObj ) )
-							pEntry->bDummy = sal_True;
+							pEntry->mbDelete = true;
 
 						pIStm->SetBufferSize( 0L );
 					}
@@ -619,7 +657,7 @@ void GalleryTheme::Actualize( const Link
 		pEntry = aObjectList.First();
 		while( pEntry )
 		{
-			if( pEntry->bDummy )
+			if( pEntry->mbDelete )
 			{
 				Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) );
 				delete aObjectList.Remove( pEntry );

Modified: openoffice/branches/ia2/main/svx/source/items/drawitem.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/items/drawitem.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/items/drawitem.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/items/drawitem.cxx Sat May 18 10:12:43 2013
@@ -55,9 +55,9 @@ SvxColorTableItem::SvxColorTableItem()
 
 // -----------------------------------------------------------------------
 
-SvxColorTableItem::SvxColorTableItem( XColorList* pTable, sal_uInt16 nW ) :
+SvxColorTableItem::SvxColorTableItem( XColorListSharedPtr aTable, sal_uInt16 nW ) :
 	SfxPoolItem( nW ),
-	pColorTable( pTable )
+	maColorTable( aTable )
 {
 }
 
@@ -65,7 +65,7 @@ SvxColorTableItem::SvxColorTableItem( XC
 
 SvxColorTableItem::SvxColorTableItem( const SvxColorTableItem& rItem ) :
 	SfxPoolItem( rItem ),
-	pColorTable( rItem.pColorTable )
+	maColorTable( rItem.maColorTable )
 {
 }
 
@@ -88,7 +88,7 @@ SfxItemPresentation SvxColorTableItem::G
 int SvxColorTableItem::operator==( const SfxPoolItem& rItem ) const
 {
 	DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
-	return ( ( SvxColorTableItem& ) rItem).pColorTable == pColorTable;
+	return static_cast< const SvxColorTableItem& >(rItem).maColorTable == maColorTable;
 }
 
 // -----------------------------------------------------------------------
@@ -105,7 +105,7 @@ sal_Bool SvxColorTableItem::QueryValue( 
     // This is only a quick helper to have UI support for these list items. Don't use
     // this method to query for a valid UNO representation.
     // Please ask CD if you want to change this.
-    sal_Int64 aValue = sal_Int64( (sal_uLong)pColorTable );
+    sal_Int64 aValue = sal_Int64((sal_uLong)&maColorTable);
     rVal = uno::makeAny( aValue );
     return sal_True;
 }
@@ -120,7 +120,8 @@ sal_Bool SvxColorTableItem::PutValue( co
     sal_Int64 aValue = 0;
     if ( rVal >>= aValue )
     {
-        pColorTable = (XColorList*)(sal_uLong)aValue;
+        if(aValue)
+            maColorTable = *((XColorListSharedPtr*)(sal_uLong)aValue);
         return sal_True;
     }
 
@@ -139,9 +140,9 @@ SvxGradientListItem::SvxGradientListItem
 
 // -----------------------------------------------------------------------
 
-SvxGradientListItem::SvxGradientListItem( XGradientList* pList, sal_uInt16 nW ) :
+SvxGradientListItem::SvxGradientListItem( XGradientListSharedPtr aList, sal_uInt16 nW ) :
 	SfxPoolItem( nW ),
-	pGradientList( pList )
+	maGradientList( aList )
 {
 }
 
@@ -149,7 +150,7 @@ SvxGradientListItem::SvxGradientListItem
 
 SvxGradientListItem::SvxGradientListItem( const SvxGradientListItem& rItem ) :
 	SfxPoolItem( rItem ),
-	pGradientList( rItem.pGradientList )
+	maGradientList( rItem.maGradientList )
 {
 }
 
@@ -172,7 +173,7 @@ SfxItemPresentation SvxGradientListItem:
 int SvxGradientListItem::operator==( const SfxPoolItem& rItem ) const
 {
 	DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
-	return ( ( SvxGradientListItem& ) rItem).pGradientList == pGradientList;
+	return static_cast< const SvxGradientListItem& >(rItem).maGradientList == maGradientList;
 }
 
 // -----------------------------------------------------------------------
@@ -189,7 +190,7 @@ sal_Bool SvxGradientListItem::QueryValue
     // This is only a quick helper to have UI support for these list items. Don't use
     // this method to query for a valid UNO representation.
     // Please ask CD if you want to change this.
-    sal_Int64 aValue = sal_Int64( (sal_uLong)pGradientList );
+    sal_Int64 aValue = sal_Int64((sal_uLong)&maGradientList);
     rVal = uno::makeAny( aValue );
     return sal_True;
 }
@@ -204,7 +205,8 @@ sal_Bool SvxGradientListItem::PutValue( 
     sal_Int64 aValue = 0;
     if ( rVal >>= aValue )
     {
-        pGradientList = (XGradientList *)(sal_uLong)aValue;
+        if(aValue)
+            maGradientList = *((XGradientListSharedPtr*)(sal_uLong)aValue);
         return sal_True;
     }
 
@@ -223,9 +225,9 @@ SvxHatchListItem::SvxHatchListItem()
 
 // -----------------------------------------------------------------------
 
-SvxHatchListItem::SvxHatchListItem( XHatchList* pList, sal_uInt16 nW ) :
+SvxHatchListItem::SvxHatchListItem( XHatchListSharedPtr aList, sal_uInt16 nW ) :
 	SfxPoolItem( nW ),
-	pHatchList( pList )
+	maHatchList( aList )
 {
 }
 
@@ -233,7 +235,7 @@ SvxHatchListItem::SvxHatchListItem( XHat
 
 SvxHatchListItem::SvxHatchListItem( const SvxHatchListItem& rItem ) :
 	SfxPoolItem( rItem ),
-	pHatchList( rItem.pHatchList )
+	maHatchList( rItem.maHatchList )
 {
 }
 
@@ -256,7 +258,7 @@ SfxItemPresentation SvxHatchListItem::Ge
 int SvxHatchListItem::operator==( const SfxPoolItem& rItem ) const
 {
 	DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
-	return ( ( SvxHatchListItem& ) rItem).pHatchList == pHatchList;
+	return static_cast< const SvxHatchListItem& >(rItem).maHatchList == maHatchList;
 }
 
 // -----------------------------------------------------------------------
@@ -273,7 +275,7 @@ sal_Bool SvxHatchListItem::QueryValue( c
     // This is only a quick helper to have UI support for these list items. Don't use
     // this method to query for a valid UNO representation.
     // Please ask CD if you want to change this.
-    sal_Int64 aValue = sal_Int64( (sal_uLong)pHatchList );
+    sal_Int64 aValue = sal_Int64((sal_uLong)&maHatchList );
     rVal = uno::makeAny( aValue );
     return sal_True;
 }
@@ -288,7 +290,8 @@ sal_Bool SvxHatchListItem::PutValue( con
     sal_Int64 aValue = 0;
     if ( rVal >>= aValue )
     {
-        pHatchList = (XHatchList *)(sal_uLong)aValue;
+        if(aValue)
+            maHatchList = *((XHatchListSharedPtr*)(sal_uLong)aValue);
         return sal_True;
     }
 
@@ -307,9 +310,9 @@ SvxBitmapListItem::SvxBitmapListItem()
 
 // -----------------------------------------------------------------------
 
-SvxBitmapListItem::SvxBitmapListItem( XBitmapList* pList, sal_uInt16 nW ) :
+SvxBitmapListItem::SvxBitmapListItem( XBitmapListSharedPtr aList, sal_uInt16 nW ) :
 	SfxPoolItem( nW ),
-	pBitmapList( pList )
+	maBitmapList( aList )
 {
 }
 
@@ -317,7 +320,7 @@ SvxBitmapListItem::SvxBitmapListItem( XB
 
 SvxBitmapListItem::SvxBitmapListItem( const SvxBitmapListItem& rItem ) :
 	SfxPoolItem( rItem ),
-	pBitmapList( rItem.pBitmapList )
+	maBitmapList( rItem.maBitmapList )
 {
 }
 
@@ -340,7 +343,7 @@ SfxItemPresentation SvxBitmapListItem::G
 int SvxBitmapListItem::operator==( const SfxPoolItem& rItem ) const
 {
 	DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
-	return ( ( SvxBitmapListItem& ) rItem).pBitmapList == pBitmapList;
+	return static_cast< const SvxBitmapListItem& >(rItem).maBitmapList == maBitmapList;
 }
 
 // -----------------------------------------------------------------------
@@ -357,7 +360,7 @@ sal_Bool SvxBitmapListItem::QueryValue( 
     // This is only a quick helper to have UI support for these list items. Don't use
     // this method to query for a valid UNO representation.
     // Please ask CD if you want to change this.
-    sal_Int64 aValue = sal_Int64( (sal_uLong)pBitmapList );
+    sal_Int64 aValue = sal_Int64((sal_uLong)&maBitmapList );
     rVal = uno::makeAny( aValue );
     return sal_True;
 }
@@ -372,7 +375,8 @@ sal_Bool SvxBitmapListItem::PutValue( co
     sal_Int64 aValue = 0;
     if ( rVal >>= aValue )
     {
-        pBitmapList = (XBitmapList *)(sal_uLong)aValue;
+        if(aValue)
+            maBitmapList = *((XBitmapListSharedPtr*)(sal_uLong)aValue);
         return sal_True;
     }
 
@@ -387,15 +391,15 @@ sal_Bool SvxBitmapListItem::PutValue( co
 //==================================================================
 
 SvxDashListItem::SvxDashListItem() :
-    pDashList( 0 )
+    maDashList()
 {
 }
 
 // -----------------------------------------------------------------------
 
-SvxDashListItem::SvxDashListItem( XDashList* pList, sal_uInt16 nW ) :
+SvxDashListItem::SvxDashListItem( XDashListSharedPtr aList, sal_uInt16 nW ) :
 	SfxPoolItem( nW ),
-	pDashList( pList )
+	maDashList( aList )
 {
 }
 
@@ -403,7 +407,7 @@ SvxDashListItem::SvxDashListItem( XDashL
 
 SvxDashListItem::SvxDashListItem( const SvxDashListItem& rItem ) :
 	SfxPoolItem( rItem ),
-	pDashList( rItem.pDashList )
+	maDashList( rItem.maDashList )
 {
 }
 
@@ -426,7 +430,7 @@ SfxItemPresentation SvxDashListItem::Get
 int SvxDashListItem::operator==( const SfxPoolItem& rItem ) const
 {
 	DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
-	return ( ( SvxDashListItem& ) rItem).pDashList == pDashList;
+	return static_cast< const SvxDashListItem& >(rItem).maDashList == maDashList;
 }
 
 // -----------------------------------------------------------------------
@@ -442,7 +446,7 @@ sal_Bool SvxDashListItem::QueryValue( co
 {
     // This is only a quick helper to have UI support for these list items. Don't use
     // this method to query for a valid UNO representation.
-    sal_Int64 aValue = sal_Int64( (sal_uLong)pDashList );
+    sal_Int64 aValue = sal_Int64((sal_uLong)&maDashList );
     rVal = uno::makeAny( aValue );
     return sal_True;
 }
@@ -456,20 +460,14 @@ sal_Bool SvxDashListItem::PutValue( cons
     sal_Int64 aValue = 0;
     if ( rVal >>= aValue )
     {
-        pDashList = (XDashList *)(sal_uLong)aValue;
+        if(aValue)
+            maDashList = *((XDashListSharedPtr*)(sal_uLong)aValue);
         return sal_True;
     }
 
     return sal_False;
 }
 
-// -----------------------------------------------------------------------
-
-void SvxDashListItem::SetDashList( XDashList* pList )
-{
-    pDashList = pList;
-}
-
 //==================================================================
 //
 //	SvxLineEndListItem
@@ -482,9 +480,9 @@ SvxLineEndListItem::SvxLineEndListItem()
 
 // -----------------------------------------------------------------------
 
-SvxLineEndListItem::SvxLineEndListItem( XLineEndList* pList, sal_uInt16 nW ) :
+SvxLineEndListItem::SvxLineEndListItem( XLineEndListSharedPtr aList, sal_uInt16 nW ) :
 	SfxPoolItem( nW ),
-	pLineEndList( pList )
+	maLineEndList( aList )
 {
 }
 
@@ -492,7 +490,7 @@ SvxLineEndListItem::SvxLineEndListItem( 
 
 SvxLineEndListItem::SvxLineEndListItem( const SvxLineEndListItem& rItem ) :
 	SfxPoolItem( rItem ),
-	pLineEndList( rItem.pLineEndList )
+	maLineEndList( rItem.maLineEndList )
 {
 }
 
@@ -515,7 +513,7 @@ SfxItemPresentation SvxLineEndListItem::
 int SvxLineEndListItem::operator==( const SfxPoolItem& rItem ) const
 {
 	DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
-	return ( ( SvxLineEndListItem& ) rItem).pLineEndList == pLineEndList;
+	return static_cast< const SvxLineEndListItem& >(rItem).maLineEndList == maLineEndList;
 }
 
 // -----------------------------------------------------------------------
@@ -531,7 +529,7 @@ sal_Bool SvxLineEndListItem::QueryValue(
 {
     // This is only a quick helper to have UI support for these list items. Don't use
     // this method to query for a valid UNO representation.
-    sal_Int64 aValue = sal_Int64( (sal_uLong)pLineEndList );
+    sal_Int64 aValue = sal_Int64( (sal_uLong)&maLineEndList );
     rVal = uno::makeAny( aValue );
     return sal_True;
 }
@@ -545,9 +543,12 @@ sal_Bool SvxLineEndListItem::PutValue( c
     sal_Int64 aValue = 0;
     if ( rVal >>= aValue )
     {
-        pLineEndList = (XLineEndList *)(sal_uLong)aValue;
+        if(aValue)
+            maLineEndList = *((XLineEndListSharedPtr*)(sal_uLong)aValue);
         return sal_True;
     }
 
     return sal_False;
 }
+
+// eof

Modified: openoffice/branches/ia2/main/svx/source/sdr/contact/objectcontactofpageview.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sdr/contact/objectcontactofpageview.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sdr/contact/objectcontactofpageview.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sdr/contact/objectcontactofpageview.cxx Sat May 18 10:12:43 2013
@@ -178,7 +178,6 @@ namespace sdr
 			const double fCurrentTime(getPrimitiveAnimator().GetTime());
 			OutputDevice& rTargetOutDev = GetPageWindow().GetPaintWindow().GetTargetOutputDevice();
             basegfx::B2DRange aViewRange;
-            basegfx::B2DHomMatrix aViewTransformation;
 
 			// create ViewRange
             if(isOutputToRecordingMetaFile())
@@ -228,16 +227,12 @@ namespace sdr
 
 				// transform to world coordinates
                 aViewRange.transform(rTargetOutDev.GetInverseViewTransformation());
-
-                // for metafile, leave ViewTransformation empty, but for pixel renderer
-                // get it from OutputDevice
-                aViewTransformation = rTargetOutDev.GetViewTransformation();
 			}
 
 			// update local ViewInformation2D
 			const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D(
 				basegfx::B2DHomMatrix(), 
-				aViewTransformation, 
+				rTargetOutDev.GetViewTransformation(), 
 				aViewRange, 
 				GetXDrawPageForSdrPage(GetSdrPage()),
 				fCurrentTime, 

Modified: openoffice/branches/ia2/main/svx/source/sidebar/EmptyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/EmptyPanel.src?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/EmptyPanel.src (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/EmptyPanel.src Sat May 18 10:12:43 2013
@@ -25,9 +25,9 @@
 Control RID_SIDEBAR_EMPTY_PANEL
 {
     FixedText FT_MESSAGE
-	{
+    {
         Pos = MAP_APPFONT(2,2);
         Size = MAP_APPFONT(100,24);
-		Text [en-US] = "Properties for the task that you are performing are not available in the sidebar at this time.";
-	};
+        Text [en-US] = "Properties for the task that you are performing are not available for the current selection";
+    };
 };

Modified: openoffice/branches/ia2/main/svx/source/sidebar/PanelFactory.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/PanelFactory.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/PanelFactory.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/PanelFactory.cxx Sat May 18 10:12:43 2013
@@ -27,6 +27,7 @@
 #include "graphic/GraphicPropertyPanel.hxx"
 #include "line/LinePropertyPanel.hxx"
 #include "possize/PosSizePropertyPanel.hxx"
+#include "insert/InsertPropertyPanel.hxx"
 #include "GalleryControl.hxx"
 #include "debug/ColorPanel.hxx"
 #include "debug/ContextPanel.hxx"
@@ -117,6 +118,9 @@ Reference<ui::XUIElement> SAL_CALL Panel
     Reference<ui::XSidebar> xSidebar (aArguments.getOrDefault("Sidebar", Reference<ui::XSidebar>()));
     const sal_uInt64 nBindingsValue (aArguments.getOrDefault("SfxBindings", sal_uInt64(0)));
     SfxBindings* pBindings = reinterpret_cast<SfxBindings*>(nBindingsValue);
+    ::sfx2::sidebar::EnumContext aContext (
+        aArguments.getOrDefault("ApplicationName", OUString()),
+        aArguments.getOrDefault("ContextName", OUString()));
 
     ::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow);
     if ( ! xParentWindow.is() || pParentWindow==NULL)
@@ -138,7 +142,7 @@ Reference<ui::XUIElement> SAL_CALL Panel
 #define DoesResourceEndWith(s) rsResourceURL.endsWithAsciiL(s,strlen(s))
     if (DoesResourceEndWith("/TextPropertyPanel"))
     {
-        pControl = TextPropertyPanel::Create(pParentWindow, xFrame, pBindings, xSidebar);
+        pControl = TextPropertyPanel::Create(pParentWindow, xFrame, pBindings, aContext);
     }
     else if (DoesResourceEndWith("/ParaPropertyPanel"))
     {
@@ -160,6 +164,10 @@ Reference<ui::XUIElement> SAL_CALL Panel
     {
         pControl = PosSizePropertyPanel::Create(pParentWindow, xFrame, pBindings, xSidebar);
     }
+    else if (DoesResourceEndWith("/InsertPropertyPanel"))
+    {
+        pControl = new InsertPropertyPanel(pParentWindow, xFrame);
+    }
     else if (DoesResourceEndWith("/GalleryPanel"))
     {
         pControl = new GalleryControl(pBindings, pParentWindow);

Modified: openoffice/branches/ia2/main/svx/source/sidebar/SelectionAnalyzer.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/SelectionAnalyzer.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/SelectionAnalyzer.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/SelectionAnalyzer.cxx Sat May 18 10:12:43 2013
@@ -122,9 +122,17 @@ EnumContext::Context SelectionAnalyzer::
         case 1:
         {
             SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-            if ( pObj->ISA(SdrTextObj) && ((SdrTextObj*)pObj)->IsInEditMode() )
+            if (pObj->ISA(SdrTextObj) && ((SdrTextObj*)pObj)->IsInEditMode())
             {
-                eContext = EnumContext::Context_DrawText;
+                if (pObj->GetObjIdentifier() == OBJ_TABLE)
+                {
+                    // Let a table object take precedence over text
+                    // edit mode.  The panels for text editing are
+                    // present for table context as well, anyway.
+                    eContext = EnumContext::Context_Table;
+                }
+                else
+                    eContext = EnumContext::Context_DrawText;
             }
             else
             {
@@ -446,6 +454,10 @@ bool SelectionAnalyzer::IsShapeType (con
 		case OBJ_POLY:
 		case OBJ_FREELINE:
 		case OBJ_FREEFILL:
+
+        // #122145# adding OBJ_OLE2 since these also allow line/fill style and may
+        // be multiselected/grouped with normal draw objects, e.g. math OLE objects
+        case OBJ_OLE2:
 			return true;
 
 		default:

Modified: openoffice/branches/ia2/main/svx/source/sidebar/area/AreaPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/area/AreaPropertyPanel.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/area/AreaPropertyPanel.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/area/AreaPropertyPanel.cxx Sat May 18 10:12:43 2013
@@ -22,7 +22,7 @@
 #include "svx/sidebar/PopupContainer.hxx"
 #include "AreaTransparencyGradientControl.hxx"
 
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <sfx2/sidebar/Theme.hxx>
 #include <sfx2/sidebar/ControlFactory.hxx>
 #include <AreaPropertyPanel.hxx>

Modified: openoffice/branches/ia2/main/svx/source/sidebar/area/AreaPropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/area/AreaPropertyPanel.src?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/area/AreaPropertyPanel.src (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/area/AreaPropertyPanel.src Sat May 18 10:12:43 2013
@@ -20,7 +20,7 @@
  *************************************************************/
 
 #include "AreaPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <svx/dialogs.hrc>
 #include "helpid.hrc"
 

Modified: openoffice/branches/ia2/main/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx Sat May 18 10:12:43 2013
@@ -26,7 +26,7 @@
 #include <svx/dialogs.hrc>
 #include <svx/dialmgr.hxx>
 #include <svx/xflftrit.hxx>
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
 

Modified: openoffice/branches/ia2/main/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx Sat May 18 10:12:43 2013
@@ -19,7 +19,7 @@
  * 
  *************************************************************/
 
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <sfx2/sidebar/Theme.hxx>
 #include <sfx2/sidebar/ControlFactory.hxx>
 #include <GraphicPropertyPanel.hxx>
@@ -31,6 +31,7 @@
 #include <svl/intitem.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
+#include "svx/dialogs.hrc"
 
 using namespace css;
 using namespace cssu;
@@ -72,18 +73,10 @@ GraphicPropertyPanel::GraphicPropertyPan
     maBlueControl(SID_ATTR_GRAF_BLUE, *pBindings, *this),
     maGammaControl(SID_ATTR_GRAF_GAMMA, *pBindings, *this),
     maModeControl(SID_ATTR_GRAF_MODE, *pBindings, *this),
-    maImgNormal(SVX_RES(IMG_NORMAL)),
-    maImgBW(SVX_RES(IMG_BW)),
-    maImgGray(SVX_RES(IMG_GRAY)),
-    maImgWater(SVX_RES(IMG_WATER)),
     maImgRed(this, SVX_RES(IMG_RED)),
     maImgGreen(this, SVX_RES(IMG_GREEN)),
     maImgBlue(this, SVX_RES(IMG_BLUE)),
     maImgGamma(this, SVX_RES(IMG_GAMMA)),
-    msNormal(SVX_RES(STR_NORMAL)),
-    msBW(SVX_RES(STR_BW)),
-    msGray(SVX_RES(STR_GRAY)),
-    msWater(SVX_RES(STR_WATER)),
     mxFrame(rxFrame),
     mpBindings(pBindings)
 {
@@ -107,38 +100,58 @@ void GraphicPropertyPanel::Initialize()
     mpFtTrans->SetBackground(Wallpaper());
 
     mpMtrBrightness->SetModifyHdl( LINK( this, GraphicPropertyPanel, ModifyBrightnessHdl ) );
-    mpMtrBrightness->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Brightness")));	//wj acc
+    mpMtrBrightness->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Brightness")));
     mpMtrContrast->SetModifyHdl( LINK( this, GraphicPropertyPanel, ModifyContrastHdl ) );
-    mpMtrContrast->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Contrast")));	//wj acc
+    mpMtrContrast->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Contrast")));
     mpMtrTrans->SetModifyHdl( LINK( this, GraphicPropertyPanel, ModifyTransHdl ) );
-    mpMtrTrans->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Transparency")));	//wj acc
+    mpMtrTrans->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Transparency")));
 
-    mpLBColorMode->InsertEntry( msNormal, maImgNormal );
-    mpLBColorMode->InsertEntry( msGray, maImgGray );
-    mpLBColorMode->InsertEntry( msBW, maImgBW );
-    mpLBColorMode->InsertEntry( msWater, maImgWater );
+    mpLBColorMode->InsertEntry(String(SVX_RES(RID_SVXSTR_GRAFMODE_STANDARD)));
+    mpLBColorMode->InsertEntry(String(SVX_RES(RID_SVXSTR_GRAFMODE_GREYS)));
+    mpLBColorMode->InsertEntry(String(SVX_RES(RID_SVXSTR_GRAFMODE_MONO)));
+    mpLBColorMode->InsertEntry(String(SVX_RES(RID_SVXSTR_GRAFMODE_WATERMARK)));
     mpLBColorMode->SetSelectHdl( LINK( this, GraphicPropertyPanel, ClickColorModeHdl ));
-    mpLBColorMode->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Color mode")));	//wj acc
+    mpLBColorMode->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Color mode")));
 
     mpMtrRed->SetModifyHdl( LINK( this, GraphicPropertyPanel, RedHdl ) );
     mpMtrGreen->SetModifyHdl( LINK( this, GraphicPropertyPanel, GreenHdl ) );
     mpMtrBlue->SetModifyHdl( LINK( this, GraphicPropertyPanel, BlueHdl ) );
     mpMtrGamma->SetModifyHdl( LINK( this, GraphicPropertyPanel, GammaHdl ) );
-    mpMtrRed->SetAccessibleName(mpMtrRed->GetQuickHelpText());	//wj acc
-    mpMtrGreen->SetAccessibleName(mpMtrGreen->GetQuickHelpText());	//wj acc
-    mpMtrBlue->SetAccessibleName(mpMtrBlue->GetQuickHelpText());		//wj acc
-    mpMtrGamma->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Gamma value")));	//wj acc
+    mpMtrRed->SetAccessibleName(mpMtrRed->GetQuickHelpText());
+    mpMtrGreen->SetAccessibleName(mpMtrGreen->GetQuickHelpText());
+    mpMtrBlue->SetAccessibleName(mpMtrBlue->GetQuickHelpText());
+    mpMtrGamma->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Gamma value")));
 
     mpMtrRed->SetAccessibleRelationLabeledBy(mpMtrRed.get());
     mpMtrGreen->SetAccessibleRelationLabeledBy(mpMtrGreen.get());
     mpMtrBlue->SetAccessibleRelationLabeledBy(mpMtrBlue.get());
     mpMtrGamma->SetAccessibleRelationLabeledBy(mpMtrGamma.get());
-    mpMtrBrightness->SetAccessibleRelationLabeledBy(mpFtBrightness.get());	//7874
-    mpMtrContrast->SetAccessibleRelationLabeledBy(mpFtContrast.get());	//7874
-    mpMtrTrans->SetAccessibleRelationLabeledBy(mpFtTrans.get());	//7874
-    mpLBColorMode->SetAccessibleRelationLabeledBy(mpFtColorMode.get());	//7874
+    mpMtrBrightness->SetAccessibleRelationLabeledBy(mpFtBrightness.get());
+    mpMtrContrast->SetAccessibleRelationLabeledBy(mpFtContrast.get());
+    mpMtrTrans->SetAccessibleRelationLabeledBy(mpFtTrans.get());
+    mpLBColorMode->SetAccessibleRelationLabeledBy(mpFtColorMode.get());
+
+    // Fix left position of some controls that may be wrong due to
+    // rounding errors.
+    const sal_Int32 nRight0 (mpLBColorMode->GetPosPixel().X() + mpLBColorMode->GetSizePixel().Width());
+    const sal_Int32 nRight1 (mpMtrTrans->GetPosPixel().X() + mpMtrTrans->GetSizePixel().Width());
+    mpMtrRed->SetPosPixel(Point(
+            nRight0 - mpMtrRed->GetSizePixel().Width(),
+            mpMtrRed->GetPosPixel().Y()));
+    mpMtrBlue->SetPosPixel(Point(
+            nRight0 - mpMtrBlue->GetSizePixel().Width(),
+            mpMtrBlue->GetPosPixel().Y()));
+    mpMtrGreen->SetPosPixel(Point(
+            nRight1 - mpMtrGreen->GetSizePixel().Width(),
+            mpMtrGreen->GetPosPixel().Y()));
+    mpMtrGamma->SetPosPixel(Point(
+            nRight1 - mpMtrGamma->GetSizePixel().Width(),
+            mpMtrGamma->GetPosPixel().Y()));
 }
 
+
+
+
 //////////////////////////////////////////////////////////////////////////////
 
 IMPL_LINK( GraphicPropertyPanel, ModifyBrightnessHdl, void *, EMPTYARG )

Modified: openoffice/branches/ia2/main/svx/source/sidebar/graphic/GraphicPropertyPanel.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/graphic/GraphicPropertyPanel.hrc?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/graphic/GraphicPropertyPanel.hrc (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/graphic/GraphicPropertyPanel.hrc Sat May 18 10:12:43 2013
@@ -30,14 +30,6 @@
 #define LB_COLOR_MODE		11
 #define MBOX_WIDTH			50
 
-#define IMG_NORMAL			13
-#define IMG_BW				14
-#define IMG_GRAY			15
-#define IMG_WATER			16
-#define STR_NORMAL			17
-#define STR_BW				18
-#define STR_GRAY			19
-#define STR_WATER			20
 #define MF_RED				21
 #define MF_GREEN			22
 #define MF_BLUE				23
@@ -47,36 +39,3 @@
 #define IMG_BLUE			27
 #define IMG_GAMMA           28
 
-//===========================location================================
-
-#define FT_BRIGHTNESS_X			SECTIONPAGE_MARGIN_HORIZONTAL
-#define FT_BRIGHTNESS_Y			SECTIONPAGE_MARGIN_VERTICAL_TOP
-#define MTR_BRIGHTNESS_X		FT_BRIGHTNESS_X
-#define MTR_BRIGHTNESS_Y		FT_BRIGHTNESS_Y + TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL
-#define FT_CONTRAST_X			FT_BRIGHTNESS_X + MBOX_WIDTH + CONTROL_SPACING_HORIZONTAL
-#define FT_CONTRAST_Y			FT_BRIGHTNESS_Y
-#define MTR_CONTRAST_X			FT_CONTRAST_X
-#define MTR_CONTRAST_Y			MTR_BRIGHTNESS_Y
-
-#define FT_COLOR_MODE_X			FT_BRIGHTNESS_X
-#define FT_COLOR_MODE_Y			MTR_BRIGHTNESS_Y + MBOX_HEIGHT + CONTROL_SPACING_VERTICAL
-#define LBX_COLOR_MODE_X		FT_COLOR_MODE_X
-#define LBX_COLOR_MODE_Y		FT_COLOR_MODE_Y + TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL
-
-#define FT_TRANSPARENT_X		FT_CONTRAST_X
-#define FT_TRANSPARENT_Y		MTR_CONTRAST_Y + MBOX_HEIGHT + CONTROL_SPACING_VERTICAL
-#define MTR_TRANS_X				FT_TRANSPARENT_X
-#define MTR_TRANS_Y				FT_TRANSPARENT_Y + TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL
-
-#define MF_RED_X				SECTIONPAGE_MARGIN_HORIZONTAL
-#define MF_RED_Y				MTR_TRANS_Y + MBOX_HEIGHT + CONTROL_SPACING_VERTICAL
-#define MF_GREEN_X				MF_RED_X + MBOX_WIDTH + CONTROL_SPACING_HORIZONTAL
-#define MF_GREEN_Y				MF_RED_Y
-#define MF_BLUE_X				MF_RED_X
-#define MF_BLUE_Y				MF_RED_Y + MBOX_HEIGHT + CONTROL_SPACING_VERTICAL
-#define MF_GAMMA_X				MF_GREEN_X
-#define MF_GAMMA_Y				MF_BLUE_Y
-
-#define PAGE_HEIGHT				MF_GAMMA_Y + MBOX_HEIGHT + SECTIONPAGE_MARGIN_VERTICAL_BOT      
-
-// eof

Modified: openoffice/branches/ia2/main/svx/source/sidebar/graphic/GraphicPropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/graphic/GraphicPropertyPanel.src?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/graphic/GraphicPropertyPanel.src (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/graphic/GraphicPropertyPanel.src Sat May 18 10:12:43 2013
@@ -20,10 +20,26 @@
  *************************************************************/
 
 #include "GraphicPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <svx/dialogs.hrc>
 #include "helpid.hrc"
 
+#define X0		SECTIONPAGE_MARGIN_HORIZONTAL
+#define X1		X0 + 10
+#define X2		X0 + MBOX_WIDTH + CONTROL_SPACING_HORIZONTAL
+#define X3		X2 + 10
+
+#define Y0		SECTIONPAGE_MARGIN_VERTICAL_TOP
+#define Y1		Y0 + TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL
+#define Y2		Y1 + MBOX_HEIGHT + CONTROL_SPACING_VERTICAL
+#define Y3		Y2 + TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL
+#define Y4		Y3 + MBOX_HEIGHT + CONTROL_SPACING_VERTICAL
+#define Y5		Y4 + MBOX_HEIGHT + CONTROL_SPACING_VERTICAL
+
+#define PAGE_HEIGHT	 Y5 + MBOX_HEIGHT + SECTIONPAGE_MARGIN_VERTICAL_BOT      
+
+
+
 Control RID_SIDEBAR_GRAPHIC_PANEL
 {
 	OutputSize = TRUE;
@@ -36,14 +52,14 @@ Control RID_SIDEBAR_GRAPHIC_PANEL
 	
 	FixedText FT_BRIGHTNESS
 	{
-		Pos = MAP_APPFONT ( FT_BRIGHTNESS_X, FT_BRIGHTNESS_Y );
+		Pos = MAP_APPFONT (X0, Y0);
         Size = MAP_APPFONT ( MBOX_WIDTH , TEXT_HEIGHT ) ;
 		Text [ en-US ] = "~Brightness:";
 	};
 	MetricField MTR_BRIGHTNESS
 	{
 		Border = TRUE ;
-		Pos = MAP_APPFONT ( MTR_BRIGHTNESS_X, MTR_BRIGHTNESS_Y );
+		Pos = MAP_APPFONT (X0, Y1);
         Size = MAP_APPFONT ( MBOX_WIDTH , MBOX_HEIGHT ) ;
         HelpID = HID_PROPERTY_PANEL_GRAPHIC_MTR_BRIGHT;
         QuickHelpText [ en-US ] = "Specify the luminance of the graphic.";
@@ -59,14 +75,14 @@ Control RID_SIDEBAR_GRAPHIC_PANEL
 	};
 	FixedText FT_CONTRAST
 	{
-		Pos = MAP_APPFONT ( FT_CONTRAST_X, FT_CONTRAST_Y );
+		Pos = MAP_APPFONT (X2, Y0);
         Size = MAP_APPFONT ( MBOX_WIDTH, TEXT_HEIGHT ) ;
 		Text [ en-US ] = "~Contrast:";
 	};
 	MetricField MTR_CONTRAST
 	{
 		Border = TRUE ;
-		Pos = MAP_APPFONT ( MTR_CONTRAST_X, MTR_CONTRAST_Y );
+		Pos = MAP_APPFONT (X2, Y1);
         Size = MAP_APPFONT ( MBOX_WIDTH , MBOX_HEIGHT ) ;
         HelpID = HID_PROPERTY_PANEL_GRAPHIC_MTR_CONTRAST;
         QuickHelpText [ en-US ] = "Specify the degree of difference between the lightest and darkest parts of the graphic.";
@@ -82,14 +98,14 @@ Control RID_SIDEBAR_GRAPHIC_PANEL
 	};
 	FixedText FT_COLOR_MODE
 	{
-		Pos = MAP_APPFONT ( FT_COLOR_MODE_X, FT_COLOR_MODE_Y );
+		Pos = MAP_APPFONT (X0, Y2);
         Size = MAP_APPFONT ( MBOX_WIDTH, TEXT_HEIGHT ) ;
 		Text [ en-US ] = "Color ~mode:";
 	};
 	ListBox LB_COLOR_MODE
 	{
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( LBX_COLOR_MODE_X , LBX_COLOR_MODE_Y ) ;
+        Pos = MAP_APPFONT (X0 , Y3) ;
         Size = MAP_APPFONT ( MBOX_WIDTH , 100 ) ;
         HelpID = HID_PROPERTY_PANEL_GRAPHIC_LB_COLORMODE;
         QuickHelpText [ en-US ] = "Select the color mode of the graphic.";
@@ -98,14 +114,14 @@ Control RID_SIDEBAR_GRAPHIC_PANEL
 	};
 	FixedText FT_TRANSPARENT
 	{
-		Pos = MAP_APPFONT ( FT_TRANSPARENT_X, FT_TRANSPARENT_Y );
+		Pos = MAP_APPFONT (X2, Y2);
         Size = MAP_APPFONT ( MBOX_WIDTH , TEXT_HEIGHT ) ;
 		Text [ en-US ] = "~Transparency:";
 	};
 	MetricField MTR_TRANSPARENT
 	{
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( MTR_TRANS_X, MTR_TRANS_Y ) ;
+        Pos = MAP_APPFONT (X2, Y3) ;
         Size = MAP_APPFONT ( MBOX_WIDTH ,MBOX_HEIGHT ) ;
         HelpID = HID_PROPERTY_PANEL_GRAPHIC_MTR_TRANSP;
         QuickHelpText [ en-US ] = "Specify the percentage of transparency; 0% is fully opaque and 100% is fully transparent.";
@@ -121,7 +137,7 @@ Control RID_SIDEBAR_GRAPHIC_PANEL
 	MetricField MF_RED
 	{
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( MF_RED_X + 10, MF_RED_Y ) ;
+        Pos = MAP_APPFONT (X1, Y4) ;
         Size = MAP_APPFONT ( MBOX_WIDTH - 10,MBOX_HEIGHT ) ;
         HelpID = HID_PROPERTY_PANEL_GRAPHIC_MTR_RED;
         QuickHelpText [ en-US ] = "Red";
@@ -138,7 +154,7 @@ Control RID_SIDEBAR_GRAPHIC_PANEL
 	MetricField MF_GREEN
 	{
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( MF_GREEN_X + 10, MF_GREEN_Y ) ;
+        Pos = MAP_APPFONT (X3, Y4) ;
         Size = MAP_APPFONT ( MBOX_WIDTH - 10 ,MBOX_HEIGHT ) ;
         HelpID = HID_PROPERTY_PANEL_GRAPHIC_MTR_GREEN;
         QuickHelpText [ en-US ] = "Green";
@@ -155,7 +171,7 @@ Control RID_SIDEBAR_GRAPHIC_PANEL
 	MetricField MF_BLUE
 	{
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( MF_BLUE_X + 10, MF_BLUE_Y ) ;
+        Pos = MAP_APPFONT (X1, Y5) ;
         Size = MAP_APPFONT ( MBOX_WIDTH - 10 ,MBOX_HEIGHT ) ;
         HelpID = HID_PROPERTY_PANEL_GRAPHIC_MTR_BLUE;
         QuickHelpText [ en-US ] = "Blue";
@@ -172,7 +188,7 @@ Control RID_SIDEBAR_GRAPHIC_PANEL
 	MetricField MF_GAMMA
 	{
 		Border = TRUE ;
-        Pos = MAP_APPFONT ( MF_GAMMA_X + 10, MF_GAMMA_Y ) ;
+        Pos = MAP_APPFONT (X3, Y5) ;
         Size = MAP_APPFONT ( MBOX_WIDTH - 10 ,MBOX_HEIGHT ) ;
         HelpID = HID_PROPERTY_PANEL_GRAPHIC_MTR_GAMMA;
         QuickHelpText [ en-US ] = "Specify the gamma value that affects the brightness of the midtone values.";
@@ -184,25 +200,9 @@ Control RID_SIDEBAR_GRAPHIC_PANEL
 		DecimalDigits = 2;
 		SpinSize = 10;
 	};
-	Image IMG_NORMAL  
-    {
-	    ImageBitmap = Bitmap{File = "symphony/ColorModeNormal_16x16.png";};
-	}; 
-	Image IMG_BW
-    {
-	    ImageBitmap = Bitmap{File = "symphony/ColorModeBlackWhite_16x16.png";};
-	};
-	Image IMG_GRAY
-    {
-	    ImageBitmap = Bitmap{File = "symphony/ColorModeGrey_16x16.png";};
-	};
-	Image IMG_WATER
-    {
-	    ImageBitmap = Bitmap{File = "symphony/ColorModeWaterMark_16x16.png";};
-	};
 	FixedImage IMG_RED
     {
-        Pos = MAP_APPFONT( MF_RED_X, MF_RED_Y );
+        Pos = MAP_APPFONT(X0, Y4);
         Size = MAP_APPFONT( 10, 12 );
         Fixed = Image
         {
@@ -211,7 +211,7 @@ Control RID_SIDEBAR_GRAPHIC_PANEL
     };
     FixedImage IMG_GREEN
     {
-        Pos = MAP_APPFONT( MF_GREEN_X, MF_GREEN_Y );
+        Pos = MAP_APPFONT(X2, Y4);
         Size = MAP_APPFONT( 10, 12 );
         Fixed = Image
         {
@@ -220,7 +220,7 @@ Control RID_SIDEBAR_GRAPHIC_PANEL
     };
 	FixedImage IMG_BLUE
     {
-        Pos = MAP_APPFONT( MF_BLUE_X, MF_BLUE_Y );
+        Pos = MAP_APPFONT(X0, Y5);
         Size = MAP_APPFONT( 10, 12 );
         Fixed = Image
         {
@@ -229,29 +229,13 @@ Control RID_SIDEBAR_GRAPHIC_PANEL
     };
 	FixedImage IMG_GAMMA
     {
-        Pos = MAP_APPFONT( MF_GAMMA_X, MF_GAMMA_Y );
+        Pos = MAP_APPFONT(X2, Y5);
         Size = MAP_APPFONT( 10, 12 );
         Fixed = Image
         {
             ImageBitmap = Bitmap { File = "symphony/AdjustColorGamma_16x16.png"; };
 		};
     };
-	String STR_NORMAL
-	{
-		Text [ en-US ] = "Normal";
-	};
-	String STR_BW
-	{
-		Text [ en-US ] = "Black/White";
-	};
-	String STR_GRAY
-	{
-		Text [ en-US ] = "Grayscale";
-	};
-	String STR_WATER
-	{
-		Text [ en-US ] = "Watermark";
-	};
 };
 
 // eof

Modified: openoffice/branches/ia2/main/svx/source/sidebar/line/LinePropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/line/LinePropertyPanel.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/line/LinePropertyPanel.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/line/LinePropertyPanel.cxx Sat May 18 10:12:43 2013
@@ -19,7 +19,7 @@
  * 
  *************************************************************/
 
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <sfx2/sidebar/Theme.hxx>
 #include <sfx2/sidebar/ControlFactory.hxx>
 #include <LinePropertyPanel.hxx>
@@ -87,9 +87,9 @@ namespace {
         return bFound ? n : -1;
     }
 
-    void FillLineEndListBox(ListBox& rListBoxStart, ListBox& rListBoxEnd, const XLineEndList& rList)
+    void FillLineEndListBox(ListBox& rListBoxStart, ListBox& rListBoxEnd, const XLineEndListSharedPtr aList)
     {
-        const sal_uInt32 nCount(rList.Count());
+        const sal_uInt32 nCount(aList.get() ? aList->Count() : 0);
         const String sNone(SVX_RES(RID_SVXSTR_NONE));
 
         rListBoxStart.SetUpdateMode(false);
@@ -104,8 +104,8 @@ namespace {
 
         for(sal_uInt32 i(0); i < nCount; i++)
         {
-            XLineEndEntry* pEntry = rList.GetLineEnd(i);
-            const Bitmap aBitmap = const_cast< XLineEndList& >(rList).GetUiBitmap(i);
+            XLineEndEntry* pEntry = aList->GetLineEnd(i);
+            const Bitmap aBitmap = aList->GetUiBitmap(i);
 
             if(!aBitmap.IsEmpty())
             {
@@ -137,23 +137,23 @@ namespace {
         rListBoxEnd.SetUpdateMode(true);
     }
 
-    void FillLineStyleListBox(ListBox& rListBox, const XDashList& rList)
+    void FillLineStyleListBox(ListBox& rListBox, const XDashListSharedPtr aList)
     {
-        const sal_uInt32 nCount(rList.Count());
+        const sal_uInt32 nCount(aList.get() ? aList->Count() : 0);
         rListBox.SetUpdateMode(false);
 
         rListBox.Clear();
 
         // entry for 'none'
-        rListBox.InsertEntry(rList.GetStringForUiNoLine());
+        rListBox.InsertEntry(aList->GetStringForUiNoLine());
 
         // entry for solid line
-        rListBox.InsertEntry(rList.GetStringForUiSolidLine(), rList.GetBitmapForUISolidLine());
+        rListBox.InsertEntry(aList->GetStringForUiSolidLine(), aList->GetBitmapForUISolidLine());
 
         for(sal_uInt32 i(0); i < nCount; i++)
         {
-            XDashEntry* pEntry = rList.GetDash(i);
-            const Bitmap aBitmap = const_cast< XDashList& >(rList).GetUiBitmap(i);
+            XDashEntry* pEntry = aList->GetDash(i);
+            const Bitmap aBitmap = aList->GetUiBitmap(i);
 
             if(!aBitmap.IsEmpty())
             {
@@ -218,8 +218,8 @@ LinePropertyPanel::LinePropertyPanel(
     mnTrans(0),
     meMapUnit(SFX_MAPUNIT_MM),
     mnWidthCoreValue(0),
-    mpLineEndList(0),
-    mpLineStyleList(0),
+    maLineEndList(),
+    maLineStyleList(),
     mpStartItem(0),
     mpEndItem(0),
     maColorPopup(this, ::boost::bind(&LinePropertyPanel::CreateColorPopupControl, this, _1)),
@@ -778,11 +778,11 @@ IMPL_LINK(LinePropertyPanel, ChangeLineS
 
             GetBindings()->GetDispatcher()->Execute(SID_ATTR_LINE_STYLE, SFX_CALLMODE_RECORD, &aItem, 0L);
         }
-        else if(mpLineStyleList && mpLineStyleList->Count() > (long)(nPos - 2))
+        else if(maLineStyleList.get() && maLineStyleList->Count() > (long)(nPos - 2))
         {
             // XLINE_DASH
             const XLineStyleItem aItemA(XLINE_DASH);
-            const XDashEntry* pDashEntry = mpLineStyleList->GetDash(nPos - 2);
+            const XDashEntry* pDashEntry = maLineStyleList->GetDash(nPos - 2);
             OSL_ENSURE(pDashEntry, "OOps, got empty XDash from XDashList (!)");
             const XLineDashItem aItemB(
                 pDashEntry ? pDashEntry->GetName() : String(),
@@ -806,8 +806,8 @@ IMPL_LINK(LinePropertyPanel, ChangeStart
         XLineStartItem* pItem = NULL;
         if( nPos == 0 )
             pItem = new XLineStartItem();
-        else if( mpLineEndList && mpLineEndList->Count() > (long) ( nPos - 1 ) )
-            pItem = new XLineStartItem( mpLBStart->GetSelectEntry(),mpLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() );
+        else if( maLineEndList.get() && maLineEndList->Count() > (long) ( nPos - 1 ) )
+            pItem = new XLineStartItem( mpLBStart->GetSelectEntry(),maLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() );
         GetBindings()->GetDispatcher()->Execute(SID_ATTR_LINEEND_STYLE, SFX_CALLMODE_RECORD, pItem,  0L);
         delete pItem;
     }
@@ -825,8 +825,8 @@ IMPL_LINK(LinePropertyPanel, ChangeEndHd
         XLineEndItem* pItem = NULL;
         if( nPos == 0 )
             pItem = new XLineEndItem();
-        else if( mpLineEndList && mpLineEndList->Count() > (long) ( nPos - 1 ) )
-            pItem = new XLineEndItem( mpLBEnd->GetSelectEntry(), mpLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() );
+        else if( maLineEndList.get() && maLineEndList->Count() > (long) ( nPos - 1 ) )
+            pItem = new XLineEndItem( mpLBEnd->GetSelectEntry(), maLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() );
         GetBindings()->GetDispatcher()->Execute(SID_ATTR_LINEEND_STYLE, SFX_CALLMODE_RECORD, pItem,  0L);
         delete pItem;
     }
@@ -1045,11 +1045,11 @@ void  LinePropertyPanel::FillLineEndList
     {
         mpLBStart->Enable();
         SvxLineEndListItem aItem( *(const SvxLineEndListItem*)(pSh->GetItem( SID_LINEEND_LIST ) ) );		
-        mpLineEndList = aItem.GetLineEndList();
+        maLineEndList = aItem.GetLineEndList();
 
-        if(mpLineEndList)
+        if(maLineEndList.get())
         {
-            FillLineEndListBox(*mpLBStart, *mpLBEnd, *mpLineEndList);
+            FillLineEndListBox(*mpLBStart, *mpLBEnd, maLineEndList);
         }
 
         mpLBStart->SelectEntryPos(0);
@@ -1071,11 +1071,11 @@ void  LinePropertyPanel::FillLineStyleLi
     {
         mpLBStyle->Enable();
         SvxDashListItem aItem( *(const SvxDashListItem*)(pSh->GetItem( SID_DASH_LIST ) ) );		
-        mpLineStyleList = aItem.GetDashList();
+        maLineStyleList = aItem.GetDashList();
 
-        if(mpLineStyleList)
+        if(maLineStyleList.get())
         {
-            FillLineStyleListBox(*mpLBStyle, *mpLineStyleList);
+            FillLineStyleListBox(*mpLBStyle, maLineStyleList);
         }
 
         mpLBStyle->SelectEntryPos(0);
@@ -1108,12 +1108,12 @@ void LinePropertyPanel::SelectLineStyle(
             bSelected = true;
             break;
         default:
-            if(mpDashItem && mpLineStyleList)
+            if(mpDashItem && maLineStyleList.get())
             {
                 const XDash& rDash = mpDashItem->GetDashValue();
-                for(sal_Int32 a(0);!bSelected &&  a < mpLineStyleList->Count(); a++)
+                for(sal_Int32 a(0);!bSelected &&  a < maLineStyleList->Count(); a++)
                 {
-                    XDashEntry* pEntry = mpLineStyleList->GetDash(a);
+                    XDashEntry* pEntry = maLineStyleList->GetDash(a);
                     const XDash& rEntry = pEntry->GetDash();
                     if(rDash == rEntry)
                     {
@@ -1141,12 +1141,12 @@ void LinePropertyPanel::SelectEndStyle(b
             return;
         }
 
-        if(mpStartItem && mpLineEndList)
+        if(mpStartItem && maLineEndList.get())
         {
             const basegfx::B2DPolyPolygon& rItemPolygon = mpStartItem->GetLineStartValue();
-            for(sal_Int32 a(0);!bSelected &&  a < mpLineEndList->Count(); a++)
+            for(sal_Int32 a(0);!bSelected &&  a < maLineEndList->Count(); a++)
             {
-                XLineEndEntry* pEntry = mpLineEndList->GetLineEnd(a);
+                XLineEndEntry* pEntry = maLineEndList->GetLineEnd(a);
                 const basegfx::B2DPolyPolygon& rEntryPolygon = pEntry->GetLineEnd();
                 if(rItemPolygon == rEntryPolygon)
                 {
@@ -1169,12 +1169,12 @@ void LinePropertyPanel::SelectEndStyle(b
             return;
         }
 
-        if(mpEndItem && mpLineEndList)
+        if(mpEndItem && maLineEndList.get())
         {
             const basegfx::B2DPolyPolygon& rItemPolygon = mpEndItem->GetLineEndValue();
-            for(sal_Int32 a(0);!bSelected &&  a < mpLineEndList->Count(); a++)
+            for(sal_Int32 a(0);!bSelected &&  a < maLineEndList->Count(); a++)
             {
-                XLineEndEntry* pEntry = mpLineEndList->GetLineEnd(a);
+                XLineEndEntry* pEntry = maLineEndList->GetLineEnd(a);
                 const basegfx::B2DPolyPolygon& rEntryPolygon = pEntry->GetLineEnd();
                 if(rItemPolygon == rEntryPolygon)
                 {

Modified: openoffice/branches/ia2/main/svx/source/sidebar/line/LinePropertyPanel.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/line/LinePropertyPanel.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/line/LinePropertyPanel.hxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/line/LinePropertyPanel.hxx Sat May 18 10:12:43 2013
@@ -33,7 +33,6 @@
 #include <svx/sidebar/ColorPopup.hxx>
 #include "LineWidthPopup.hxx"
 
-
 namespace svx { class ToolboxButtonColorUpdater; }
 class SvxLineColorPage;
 class SvxLineStylePage;
@@ -48,6 +47,9 @@ class ListBox;
 class ToolBox;
 class FloatingWindow;
 
+typedef ::boost::shared_ptr< XLineEndList > XLineEndListSharedPtr;
+typedef ::boost::shared_ptr< XDashList > XDashListSharedPtr;
+
 namespace {
     #define SIDEBAR_LINE_WIDTH_GLOBAL_VALUE String("PopupPanel_LineWidth", 20, RTL_TEXTENCODING_ASCII_US)
 } //end of anonymous namespace
@@ -130,8 +132,8 @@ private:
     sal_uInt16                                              mnTrans;
     SfxMapUnit                                              meMapUnit;
     sal_Int32                                               mnWidthCoreValue;
-    XLineEndList*                                           mpLineEndList;
-    XDashList*                                              mpLineStyleList;
+    XLineEndListSharedPtr                                   maLineEndList;
+    XDashListSharedPtr                                      maLineStyleList;
     ::boost::scoped_ptr< XLineStartItem >                   mpStartItem;
     ::boost::scoped_ptr< XLineEndItem >                     mpEndItem;
 

Modified: openoffice/branches/ia2/main/svx/source/sidebar/line/LinePropertyPanel.src
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/line/LinePropertyPanel.src?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/line/LinePropertyPanel.src (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/line/LinePropertyPanel.src Sat May 18 10:12:43 2013
@@ -20,7 +20,7 @@
  *************************************************************/
 
 #include "LinePropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <svx/dialogs.hrc>
 #include "helpid.hrc"
 

Modified: openoffice/branches/ia2/main/svx/source/sidebar/line/LineWidthControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/line/LineWidthControl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/line/LineWidthControl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/line/LineWidthControl.cxx Sat May 18 10:12:43 2013
@@ -25,7 +25,7 @@
 
 #include <svx/dialogs.hrc>
 #include <svx/dialmgr.hxx>
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <comphelper/processfactory.hxx>
 #include <vcl/svapp.hxx>
 #include <unotools/viewoptions.hxx>

Modified: openoffice/branches/ia2/main/svx/source/sidebar/nbdtmg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/nbdtmg.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/nbdtmg.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/nbdtmg.cxx Sat May 18 10:12:43 2013
@@ -386,7 +386,6 @@ sal_uInt16 BulletsTypeMgr::GetNBOIndexFo
 
 	SvxNumberFormat aFmt(aNum.GetLevel(nActLv));
 	sal_Unicode cChar = aFmt.GetBulletChar();
-	const Font* pFont = aFmt.GetBulletFont();
 	//sal_uInt16 nLength = 0;
 	/*if( Application::GetSettings().GetLayoutRTL() )
 	{
@@ -479,7 +478,7 @@ sal_Bool BulletsTypeMgr::RelplaceNumRule
 	return sal_True;
 }
 
-sal_Bool BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel,sal_Bool isDefault,sal_Bool isResetSize)
+sal_Bool BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel,sal_Bool /* isDefault */,sal_Bool isResetSize)
 {
 	//if ( mLevel == (sal_uInt16)0xFFFF )
 	//	return sal_False;
@@ -530,7 +529,7 @@ sal_Bool BulletsTypeMgr::ApplyNumRule(Sv
 	return sal_True;
 }
 
-String BulletsTypeMgr::GetDescription(sal_uInt16 nIndex,sal_Bool isDefault)
+String BulletsTypeMgr::GetDescription(sal_uInt16 nIndex,sal_Bool /* isDefault */)
 {
 	String sRet;
 	//sal_uInt16 nLength = 0;
@@ -658,7 +657,7 @@ void GraphyicBulletsTypeMgr::Init()
 		aGrfDataLst.Insert( pEntry, LIST_APPEND );
 	}
 }
-sal_uInt16 GraphyicBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex)
+sal_uInt16 GraphyicBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 /* nFromIndex */)
 {	
 	if ( mLevel == (sal_uInt16)0xFFFF || mLevel == 0)
 		return (sal_uInt16)0xFFFF;
@@ -676,7 +675,6 @@ sal_uInt16 GraphyicBulletsTypeMgr::GetNB
 
 	if ( pGrf )
 	{
-		const String* pGrfName = pBrsh->GetGraphicLink();
 		Graphic aGraphic;
 		for(sal_uInt16 i=0;i<aGrfDataLst.Count();i++)
 		{
@@ -743,7 +741,7 @@ sal_Bool GraphyicBulletsTypeMgr::Relplac
 	return sal_True;
 }
 
-sal_Bool GraphyicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel,sal_Bool isDefault,sal_Bool isResetSize)
+sal_Bool GraphyicBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel,sal_Bool /* isDefault */,sal_Bool /* isResetSize */)
 {
 	//if ( mLevel == (sal_uInt16)0xFFFF )
 	//	return sal_False;
@@ -788,7 +786,7 @@ sal_Bool GraphyicBulletsTypeMgr::ApplyNu
 		
 	return sal_True;
 }
-String GraphyicBulletsTypeMgr::GetDescription(sal_uInt16 nIndex,sal_Bool isDefault)
+String GraphyicBulletsTypeMgr::GetDescription(sal_uInt16 nIndex,sal_Bool /* isDefault */)
 {
 	String sRet;
 	sal_uInt16 nLength = 0;
@@ -1054,8 +1052,6 @@ sal_uInt16 MixBulletsTypeMgr::GetNBOInde
 
 		if ( pGrf )
 		{
-			const String* pGrfName = pBrsh->GetGraphicLink();
-			//String* pGrfName = (String*)(pBrsh->GetGraphicLink());
 			for(sal_uInt16 i = nFromIndex; i < DEFAULT_BULLET_TYPES; i++)
 			{
 				if ( pActualBullets[i]->eType == eNBType::GRAPHICBULLETS )
@@ -1537,8 +1533,6 @@ sal_uInt16 NumberingTypeMgr::GetNBOIndex
 		return (sal_uInt16)0xFFFF;
 
 	SvxNumberFormat aFmt(aNum.GetLevel(nActLv));
-	sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix()).getStr()[0];
-	sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix()).getStr()[0];
 	String sPreFix = aFmt.GetPrefix();
 	String sSuffix = aFmt.GetSuffix();
 	String sEmpty;
@@ -1786,7 +1780,7 @@ void OutlineTypeMgr::Init()
 	}
 }
 
-sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLevel,sal_uInt16 nFromIndex)
+sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /* mLevel */,sal_uInt16 nFromIndex)
 {	
 	sal_uInt16 nLength = sizeof(pOutlineSettingsArrs)/sizeof(OutlineSettings_Impl*);
 	for(sal_uInt16 iDex = nFromIndex; iDex < nLength; iDex++)
@@ -1798,12 +1792,8 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexFo
 		{
 			NumSettings_ImplPtr _pSet = pItemArr->pNumSettingsArr->GetObject(iLevel);
 			sal_Int16 eNType = _pSet->nNumberType;
-		    	const sal_Unicode cLocalPrefix = _pSet->sPrefix.getLength() ? _pSet->sPrefix.getStr()[0] : 0;       
-	       	const sal_Unicode cLocalSuffix = _pSet->sSuffix.getLength() ? _pSet->sSuffix.getStr()[0] : 0;
 			
 		    	SvxNumberFormat aFmt(aNum.GetLevel(iLevel));
-			sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix()).getStr()[0];
-			sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix()).getStr()[0];
 			String sPreFix = aFmt.GetPrefix();
 			String sSuffix = aFmt.GetSuffix();
 			String sEmpty;
@@ -1811,7 +1801,6 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexFo
 		     	if( eNumType == SVX_NUM_CHAR_SPECIAL)
 			{
 				sal_Unicode cChar = aFmt.GetBulletChar();
-				const Font* pFont = aFmt.GetBulletFont();
 				sal_Unicode ccChar = _pSet->sBulletChar.getStr()[0];
 				rtl::OUString sFont = _pSet->sBulletFont;
 				if ( !((cChar == ccChar) && //pFont && sFont.compareTo(pFont->GetName()) && 
@@ -1881,8 +1870,6 @@ sal_Bool OutlineTypeMgr::RelplaceNumRule
 	for (sal_uInt16 iLevel=0;iLevel < nCount;iLevel++)
 	{		 
 		SvxNumberFormat aFmt(aNum.GetLevel(iLevel));
-		sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix()).getStr()[0];
-		sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix()).getStr()[0];
 		sal_Int16 eNumType = aFmt.GetNumberingType();
 		
 		NumSettings_ImplPtr _pSet = pItemArr->pNumSettingsArr->GetObject(iLevel);
@@ -1939,7 +1926,7 @@ sal_Bool OutlineTypeMgr::RelplaceNumRule
 	return sal_True;		
 }
 
-sal_Bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 mLevel,sal_Bool isDefault,sal_Bool isResetSize)
+sal_Bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uInt16 /* mLevel */,sal_Bool isDefault,sal_Bool isResetSize)
 {
 	//if ( mLevel == (sal_uInt16)0xFFFF )
 	//	return sal_False;
@@ -1958,7 +1945,6 @@ sal_Bool OutlineTypeMgr::ApplyNumRule(Sv
 	
 	NumSettings_ImplPtr pLevelSettings = 0;
 	String sBulletCharFmtName = GetBulCharFmtName();
-	sal_uInt16 nMask = 1;
 	for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++)
 	{
 		if(pNumSettingsArr->Count() > i)

Modified: openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx Sat May 18 10:12:43 2013
@@ -22,7 +22,7 @@
 #include "precompiled_svx.hxx"
 #include "ParaBulletsControl.hxx"
 #include "ParaPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <svx/dialogs.hrc>
 #include <svx/dialmgr.hxx>
 #include <unotools/viewoptions.hxx>

Modified: openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx Sat May 18 10:12:43 2013
@@ -22,7 +22,7 @@
 #include "precompiled_svx.hxx"
 #include "ParaLineSpacingControl.hxx"
 #include "ParaPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <svx/dialogs.hrc>
 #include <svx/dialmgr.hxx>
 #include <unotools/viewoptions.hxx>
@@ -67,7 +67,6 @@ maSpacing1       (SVX_RES(IMG_SPACING1))
 maSpacing115     (SVX_RES(IMG_SPACING115)),
 maSpacing15      (SVX_RES(IMG_SPACING15)),
 maSpacing2       (SVX_RES(IMG_SPACING2)),
-maLPCustom       (SVX_RES(IMG_SPACINGLCUSTOM)),
 maSelSpacing1    (SVX_RES(IMG_SEL_SPACING1)),
 maSelSpacing115  (SVX_RES(IMG_SEL_SPACING115)),
 maSelSpacing15   (SVX_RES(IMG_SEL_SPACING15)),
@@ -105,76 +104,64 @@ ParaLineSpacingControl::~ParaLineSpacing
 
 void ParaLineSpacingControl::initial()
 {
-	//maLineSpacing.SetStyle( maLineSpacing.GetStyle()| WB_3DLOOK |  WB_NO_DIRECTSELECT  );
-	//maLineSpacing.SetControlBackground(GetSettings().GetStyleSettings().GetMenuColor());
-	//maLineSpacing.SetColor(GetSettings().GetStyleSettings().GetMenuColor());
-	//maLineSpacing.SetMinFont();
-
-	maLineSpacing.SetControlBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
-	GetSettings().GetStyleSettings().GetMenuColor():
-	sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
-	maLineSpacing.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
-	GetSettings().GetStyleSettings().GetMenuColor():
-	sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
-	maLineSpacing.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
-	GetSettings().GetStyleSettings().GetMenuColor():
-	sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
-	//maFTSpacing.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
-	//GetSettings().GetStyleSettings().GetMenuColor():
-	//sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
-	//maFTBy.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
-	//GetSettings().GetStyleSettings().GetMenuColor():
-	//sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
-
-	mpImg = new Image[4];
-	mpImg[0] = maSpacing1;
-	mpImg[1] = maSpacing115;
-	mpImg[2] = maSpacing15;
-	mpImg[3] = maSpacing2;
-
-	mpImgSel = new Image[4];
-	mpImgSel[0] = maSelSpacing1;
-	mpImgSel[1] = maSelSpacing115;
-	mpImgSel[2] = maSelSpacing15;
-	mpImgSel[3] = maSelSpacing2;
-
-	mpStr = new XubString[4];
-	mpStr[0] = XubString(SVX_RES(STR_SPACING1));
-	mpStr[1] = XubString(SVX_RES(STR_SPACING115));
-	mpStr[2] = XubString(SVX_RES(STR_SPACING15));
-	mpStr[3] = XubString(SVX_RES(STR_SPACING2));
-
-	mpStrTip = new XubString[4];
-	mpStrTip[0] = XubString(SVX_RES(STR_LS_SINGLE));
-	mpStrTip[1] = XubString(SVX_RES(STR_LS_115));
-	mpStrTip[2] = XubString(SVX_RES(STR_LS_15));
-	mpStrTip[3] = XubString(SVX_RES(STR_LS_DOUBLE));
-	for (int i=0;i<4;i++)
-		maLineSpacing.AddItem(mpImg[i], &mpImgSel[i],mpStr[i],&mpStrTip[i]);
-
-	maLineSpacing.AddItem( maImgCus, 0, maStrCus, 0 );
-
-	SetAllNoSel();
-	Link aLink = LINK(this, ParaLineSpacingControl,VSSelHdl );
-	maLineSpacing.SetSelectHdl(aLink);
-	maLineSpacing.StartSelection();
-	maLineSpacing.Show();
+    maLineSpacing.SetStyle( maLineSpacing.GetStyle()| WB_3DLOOK |  WB_NO_DIRECTSELECT  );
 
-	aLink = LINK( this, ParaLineSpacingControl, LineSPDistHdl_Impl );
-	aLineDist.SetSelectHdl(aLink);
-	aLineDist.SelectEntryPos( LLINESPACE_1 ) ;
-	aLink = LINK( this, ParaLineSpacingControl, LineSPDistAtHdl_Impl );
-	aLineDistAtPercentBox.SetModifyHdl( aLink );
-	aLineDistAtMetricBox.SetModifyHdl( aLink );
-}
-void ParaLineSpacingControl::ToGetFocus(bool bType)
-{
-	if(!bType)
-		aLineDist.GrabFocus();
-	else
-		maLineSpacing.GrabFocus();	//wj
+    maLineSpacing.SetControlBackground( 
+        GetSettings().GetStyleSettings().GetHighContrastMode()
+        ? GetSettings().GetStyleSettings().GetMenuColor()
+        : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+    maLineSpacing.SetColor(
+        GetSettings().GetStyleSettings().GetHighContrastMode()
+        ? GetSettings().GetStyleSettings().GetMenuColor()
+        : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+    maLineSpacing.SetBackground(
+        GetSettings().GetStyleSettings().GetHighContrastMode()
+        ? GetSettings().GetStyleSettings().GetMenuColor()
+        : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+
+    mpImg = new Image[4];
+    mpImg[0] = maSpacing1;
+    mpImg[1] = maSpacing115;
+    mpImg[2] = maSpacing15;
+    mpImg[3] = maSpacing2;
+
+    mpImgSel = new Image[4];
+    mpImgSel[0] = maSelSpacing1;
+    mpImgSel[1] = maSelSpacing115;
+    mpImgSel[2] = maSelSpacing15;
+    mpImgSel[3] = maSelSpacing2;
+
+    mpStr = new XubString[4];
+    mpStr[0] = XubString(SVX_RES(STR_SPACING1));
+    mpStr[1] = XubString(SVX_RES(STR_SPACING115));
+    mpStr[2] = XubString(SVX_RES(STR_SPACING15));
+    mpStr[3] = XubString(SVX_RES(STR_SPACING2));
+
+    mpStrTip = new XubString[4];
+    mpStrTip[0] = XubString(SVX_RES(STR_LS_SINGLE));
+    mpStrTip[1] = XubString(SVX_RES(STR_LS_115));
+    mpStrTip[2] = XubString(SVX_RES(STR_LS_15));
+    mpStrTip[3] = XubString(SVX_RES(STR_LS_DOUBLE));
+    for (int i=0;i<4;i++)
+        maLineSpacing.AddItem(mpImg[i], &mpImgSel[i],mpStr[i],&mpStrTip[i]);
+
+    maLineSpacing.AddItem( maImgCus, 0, maStrCus, 0 );
+
+    SetAllNoSel();
+    Link aLink = LINK(this, ParaLineSpacingControl,VSSelHdl );
+    maLineSpacing.SetSelectHdl(aLink);
+    maLineSpacing.StartSelection();
+    maLineSpacing.Show();
+
+    aLink = LINK( this, ParaLineSpacingControl, LineSPDistHdl_Impl );
+    aLineDist.SetSelectHdl(aLink);
+    aLineDist.SelectEntryPos( LLINESPACE_1 ) ;
+    aLink = LINK( this, ParaLineSpacingControl, LineSPDistAtHdl_Impl );
+    aLineDistAtPercentBox.SetModifyHdl( aLink );
+    aLineDistAtMetricBox.SetModifyHdl( aLink );
 }
 
+
 void ParaLineSpacingControl::PopupModeEndCallback()
 {
 	if( mbUseLineSPCustom )
@@ -405,6 +392,8 @@ void ParaLineSpacingControl::Rearrange(S
 						mbUseLineSPCustom = USE_CUSTOM;
 					}
 					break;
+				default:
+					break;
 				}
 			}
 			break;
@@ -460,6 +449,8 @@ void ParaLineSpacingControl::Rearrange(S
 				mbUseLineSPCustom = USE_CUSTOM;
 			}
 			break;
+		default:
+			break;
 		}
 	}
 	else if( eState == SFX_ITEM_DISABLED )
@@ -484,61 +475,38 @@ void ParaLineSpacingControl::Rearrange(S
 
 	aLineDist.SaveValue();
 
-	/*sal_uInt16 nID = pBox->GetCurItemId();
-	pBox->SetItemDown(nID, sal_True);
-
-	Size aFloatSz = GetOutputSizePixel();
-
-	GetLineSPFloatWin()->SetSizePixel( aFloatSz );
-
-	Point aPos=maLineSPTbx->GetPosPixel();
-	aPos.setX(aPos.getX());
-	aPos = OutputToScreenPixel( aPos );
-	Size aSize = maLineSPTbx->GetSizePixel();
-	Rectangle aRect( aPos, aSize );
-
-	GetLineSPFloatWin()->StartPopupMode( aRect, FLOATWIN_POPUPMODE_DOWN | FLOATWIN_POPUPMODE_NOFOCUSCLOSE);
-	GetLineSPFloatWin()->SetPopupModeFlags(GetLineSPFloatWin()->GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
-
-	pLineSPPage->ToGetFocus(bValueSetFocus);
-	*/
-	sal_uInt16 uCount = aLineDist.GetEntryCount();
-	if( uCount == LLINESPACE_FIX + 1 )
-	{
-		switch (currentContext.GetCombinedContext())
-		{
-			case CombinedEnumContext(Application_Impress, Context_Table):
-        		case CombinedEnumContext(Application_Draw, Context_Table):
-			case CombinedEnumContext(Application_Writer, Context_DrawText):
-			case CombinedEnumContext(Application_Calc, Context_DrawText):
-			case CombinedEnumContext(Application_Draw, Context_DrawText):
-        		case CombinedEnumContext(Application_Impress, Context_DrawText):
-			case CombinedEnumContext(Application_Writer, Context_Annotation):
-			case CombinedEnumContext(Application_Draw, Context_Draw):
-		        case CombinedEnumContext(Application_Draw, Context_TextObject):
-		        case CombinedEnumContext(Application_Draw, Context_Graphic):
-		        case CombinedEnumContext(Application_Impress, Context_Draw):
-		        case CombinedEnumContext(Application_Impress, Context_TextObject):
-		        case CombinedEnumContext(Application_Impress, Context_Graphic):
-			{
-				aLineDist.RemoveEntry(LLINESPACE_FIX);
-			}
-		}
-	}
-	else if( uCount == LLINESPACE_FIX)
-	{
-		switch (currentContext.GetCombinedContext())
-		{
-			case CombinedEnumContext(Application_Writer, Context_Default):
-			case CombinedEnumContext(Application_Writer, Context_Text):
-			case CombinedEnumContext(Application_Writer, Context_Table):
-			{
-				aLineDist.InsertEntry(String::CreateFromAscii("Fixed"), LLINESPACE_FIX);
-			}
-		}
-	}
-	maLineSpacing.Format();
-	maLineSpacing.StartSelection();
+    const sal_uInt16 uCount = aLineDist.GetEntryCount();
+    if( uCount == LLINESPACE_FIX + 1 )
+    {
+        switch (currentContext.GetCombinedContext_DI())
+        {
+        case CombinedEnumContext(Application_DrawImpress, Context_Table):
+        case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
+        case CombinedEnumContext(Application_DrawImpress, Context_Draw):
+        case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
+        case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
+        case CombinedEnumContext(Application_Calc, Context_DrawText):
+        case CombinedEnumContext(Application_WriterVariants, Context_DrawText):
+        case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
+            {
+                aLineDist.RemoveEntry(LLINESPACE_FIX);
+            }
+        }
+    }
+    else if( uCount == LLINESPACE_FIX)
+    {
+        switch (currentContext.GetCombinedContext_DI())
+        {
+            case CombinedEnumContext(Application_WriterVariants, Context_Default):
+            case CombinedEnumContext(Application_WriterVariants, Context_Text):
+            case CombinedEnumContext(Application_WriterVariants, Context_Table):
+            {
+                aLineDist.InsertEntry(String::CreateFromAscii("Fixed"), LLINESPACE_FIX);
+            }
+        }
+    }
+    maLineSpacing.Format();
+    maLineSpacing.StartSelection();
 }
 
 void ParaLineSpacingControl::SetAllNoSel()

Modified: openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx Sat May 18 10:12:43 2013
@@ -43,7 +43,6 @@ class ParaLineSpacingControl:public svx:
 public:
 	ParaLineSpacingControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel);
 	~ParaLineSpacingControl();
-	void ToGetFocus(bool bType);
 	void Rearrange(SfxItemState currSPState,FieldUnit currMetricUnit,SvxLineSpacingItem* currSPItem,const ::sfx2::sidebar::EnumContext currentContext);
 	//virtual void Paint(const Rectangle& rect);
 	
@@ -84,7 +83,6 @@ private:	
 	Image  maSpacing115;
 	Image  maSpacing15;
 	Image  maSpacing2;
-	Image  maLPCustom;
 
 	Image  maSelSpacing1;
 	Image  maSelSpacing115;

Modified: openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx?rev=1484083&r1=1484082&r2=1484083&view=diff
==============================================================================
--- openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx (original)
+++ openoffice/branches/ia2/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx Sat May 18 10:12:43 2013
@@ -22,7 +22,7 @@
 #include "precompiled_svx.hxx"
 #include "ParaNumberingControl.hxx"
 #include "ParaPropertyPanel.hrc"
-#include <sfx2/sidebar/propertypanel.hrc>
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
 #include <svx/dialogs.hrc>
 #include <svx/dialmgr.hxx>
 #include <unotools/viewoptions.hxx>



Mime
View raw message