Commits

kz  committed 4c46f3a

CWS-TOOLING: integrate CWS impress177
2009-10-07 13:02:12 +0200 sj r276751 : #i104579# fixed horz and vert adjustment for master styles (excluding notes master)
2009-10-06 18:09:14 +0200 sj r276724 : #i104579# fixed horz and vert adjustment for master styles
2009-10-05 15:02:38 +0200 sj r276679 : #i104685# fixed text color problem
2009-10-02 14:01:22 +0200 aw r276641 : #i105508# added own flag for ClipOnBounds to SdrBlockTextPrimitive2D and the helper createTextPrimitive; adapted usages; corrected VerticalText stuff; corrected ClipOnBounds for CustomShapes
2009-09-30 11:55:44 +0200 cl r276550 : CWS-TOOLING: rebase CWS impress177 to trunk@276429 (milestone: DEV300:m60)
2009-09-28 17:57:37 +0200 cl r276498 : #i94900# after a paste special make sure the stylesheets for outline shapes are correct
2009-09-24 17:36:29 +0200 af r276425 : #i103464# Restore device more reliably.
2009-09-24 12:29:31 +0200 sj r276417 : #i104685# fixed text color propblem
2009-09-22 16:48:06 +0200 sj r276360 : #i104682# fixed table border line thickness
2009-09-22 16:46:29 +0200 sj r276359 : #i104682# fixed table border line thickness
2009-09-22 10:29:30 +0200 sj r276346 : #104579# fixed horz and vert adjustment for master styles
2009-09-21 14:18:29 +0200 af r276330 : #i100905# Fixed crash when region is split into bands.
2009-09-15 15:44:30 +0200 cl r276181 : #i103179# always hide presentation shapes from master page if rendered as slide background
2009-09-15 10:44:52 +0200 cl r276155 : #i104579# return correct IsEmptyPresObj state
2009-09-14 16:51:41 +0200 cl r276132 : #i96538# restored OOo 3.0 numbering behaviour

  • Participants
  • Parent commits b823ae1

Comments (0)

Files changed (27)

File canvas/source/directx/dx_9rm.cxx

 			bool createDevice();
             bool verifyDevice( const UINT nAdapter );
 			UINT getAdapterFromWindow();
-
+            
             /** This object represents the DirectX state machine.  In order
                 to serialize access to DirectX's global state, a global
                 mutex is required.
 		// DXRenderModule::DXRenderModule
 		//////////////////////////////////////////////////////////////////////////////////
 
-		DXRenderModule::DXRenderModule( const ::Window& rWindow ) :
+        DXRenderModule::DXRenderModule( const ::Window& rWindow ) :
 	        mhWnd(0),
 			mpDevice(),
 			mpDirect3D9(),
 			{
 				if(hr != D3DERR_DEVICELOST)
 					return false;
-				hr = mpDevice->Reset(&mad3dpp);
-				if(SUCCEEDED(hr))
-					return true;
-				if(hr == D3DERR_DEVICELOST)
-					return true;
+
+                // interestingly enough, sometimes the Reset() below
+                // *still* causes DeviceLost errors. So, cycle until
+                // DX was kind enough to really reset the device...
+                do
+                {
+                    mpVertexBuffer.reset();
+                    hr = mpDevice->Reset(&mad3dpp);
+                    if(SUCCEEDED(hr))
+                    {
+                        IDirect3DVertexBuffer9 *pVB(NULL);
+                        DWORD aFVF(D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1);
+                        if( FAILED(mpDevice->CreateVertexBuffer(sizeof(dxvertex)*maNumVertices,
+                                                                D3DUSAGE_DYNAMIC|D3DUSAGE_WRITEONLY,
+                                                                aFVF,
+                                                                D3DPOOL_DEFAULT,
+                                                                &pVB,
+                                                                NULL)) )
+                        {
+                            throw lang::NoSupportException(
+                                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+                                                     "Could not create DirectX device - out of memory!")),NULL);
+                        }
+                        mpVertexBuffer=COMReference<IDirect3DVertexBuffer9>(pVB);
+
+                        // retry after the restore
+                        if(SUCCEEDED(mpSwapChain->Present(&aRect,&aRect,NULL,NULL,0)))
+                            return true;
+                    }
+
+                    TimeValue aTimeout;
+                    aTimeout.Seconds=1;
+                    aTimeout.Nanosec=0;
+                    osl_waitThread(&aTimeout);
+                }
+                while(hr == D3DERR_DEVICELOST);
+
 				return false;
 			}
 

File canvas/source/directx/dx_surfacegraphics.cxx

 #include "dx_surfacegraphics.hxx"
 #include "dx_impltools.hxx"
 
+using namespace ::com::sun::star;
+
 namespace dxcanvas
 {
     namespace
 	            tools::setupGraphics( *pGraphics );
 				pRet.reset(pGraphics,
                            GraphicsDeleter(rSurface, aHDC));
+                return pRet;
 			}
             else
                 rSurface->ReleaseDC( aHDC );
 		}
 
-        return pRet;
+        throw uno::RuntimeException();
     }
 }

File oox/source/drawingml/table/tablecell.cxx

     {
         Color aColor = rLineProperties.maLineFill.getBestSolidColor();
         aBorderLine.Color = aColor.getColor( rFilterBase );
-        aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) );
-        aBorderLine.InnerLineWidth = 0;
+        aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
+        aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
         aBorderLine.LineDistance = 0;
     }
 

File sd/source/core/sdpage.cxx

 						}
 					}
 				}
+			} // check for placeholders on master
+			else if( pCheckPage->IsMasterPage() && ( pVisualizedPage != pCheckPage ) ) 
+			{
+			    // presentation objects on master slide are always invisible if slide is shown.
+                return false;
 			}
 		}
 	}

File sd/source/filter/ppt/pptin.cxx

 				if ( aPresentationText.Len() )
 					pPage->SetObjText( (SdrTextObj*)pText, pOutl, ePresKind, aPresentationText );
 
-				SfxStyleSheet* pSheet2( pPage->GetStyleSheetForPresObj( ePresKind ) );
-				if ( pSheet2 )
+				if ( pPage->GetPageKind() != PK_NOTES )
 				{
-					SfxItemSet& rItemSet = pSheet2->GetItemSet();
-					rItemSet.Put( (SdrTextLeftDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LEFTDIST ) );
-					rItemSet.Put( (SdrTextRightDistItem&)pText->GetMergedItem( SDRATTR_TEXT_RIGHTDIST ) );
-					rItemSet.Put( (SdrTextUpperDistItem&)pText->GetMergedItem( SDRATTR_TEXT_UPPERDIST ) );
-					rItemSet.Put( (SdrTextLowerDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LOWERDIST ) );
+					SfxStyleSheet* pSheet2( pPage->GetStyleSheetForPresObj( ePresKind ) );
+					if ( pSheet2 )
+					{
+						SfxItemSet& rItemSet = pSheet2->GetItemSet();
+						rItemSet.Put( (SdrTextLeftDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LEFTDIST ) );
+						rItemSet.Put( (SdrTextRightDistItem&)pText->GetMergedItem( SDRATTR_TEXT_RIGHTDIST ) );
+						rItemSet.Put( (SdrTextUpperDistItem&)pText->GetMergedItem( SDRATTR_TEXT_UPPERDIST ) );
+						rItemSet.Put( (SdrTextLowerDistItem&)pText->GetMergedItem( SDRATTR_TEXT_LOWERDIST ) );
+						rItemSet.Put( (SdrTextVertAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_VERTADJUST ) );
+						rItemSet.Put( (SdrTextHorzAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_HORZADJUST ) );
+					}
+					pText->NbcSetStyleSheet( pSheet2, FALSE );
 				}
-				pText->NbcSetStyleSheet( pSheet2, TRUE );
 
 				SfxItemSet aTempAttr( mpDoc->GetPool() );
 				SdrTextMinFrameHeightItem aMinHeight( pText->GetLogicRect().GetSize().Height() );

File svx/inc/svx/msdffimp.hxx

 	MSFilterTracer*		mpTracer;
 	sal_Bool			mbTracing;
 
+	Color MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const;
 	Color MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContextProperty = DFF_Prop_lineColor ) const;
 	virtual BOOL SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const;
 	FASTBOOL SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd = NULL, ULONG nSkipCount = 0 ) const;

File svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx

 			const attribute::SdrTextAttribute& rText,
 			const attribute::SdrLineAttribute* pStroke,
 			bool bCellText,
-            bool bWordWrap);
+            bool bWordWrap,
+			bool bClipOnBounds);
 
         Primitive2DSequence createEmbeddedShadowPrimitive(
             const Primitive2DSequence& rContent, 

File svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx

 			unsigned								mbUnlimitedPage : 1;	// force layout with no text break
 			unsigned								mbCellText : 1;			// this is a cell text as block text
             unsigned                                mbWordWrap : 1;         // for CustomShapes text layout
+			unsigned								mbClipOnBounds : 1;		// for CustomShapes text layout
 
 		protected:
 			// local decomposition.
                 bool bFixedCellHeight,
                 bool bUnlimitedPage,
 				bool bCellText,
-                bool bWordWrap);
+                bool bWordWrap,
+				bool bClipOnBounds);
 
 			// get data
 			const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; }
 			bool getUnlimitedPage() const { return mbUnlimitedPage; }
 			bool getCellText() const { return mbCellText; }
 			bool getWordWrap() const { return mbWordWrap; }
+			bool getClipOnBounds() const { return mbClipOnBounds; }
 
 			// compare operator
 			virtual bool operator==(const BasePrimitive2D& rPrimitive) const;

File svx/source/msfilter/msdffimp.cxx

 	return TRUE;
 }
 
+// sj: the documentation is not complete, especially in ppt the normal rgb for text
+// color is written as 0xfeRRGGBB, this can't be explained by the documentation, nearly
+// every bit in the upper code is set -> so there seems to be a special handling for 
+// ppt text colors, i decided not to fix this in MSO_CLR_ToColor because of possible
+// side effects, instead MSO_TEXT_CLR_ToColor is called for PPT text colors, to map 
+// the color code to something that behaves like the other standard color codes used by 
+// fill and line color
+Color SvxMSDffManager::MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const
+{
+	// Fuer Textfarben: Header ist 0xfeRRGGBB
+	if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 )
+		nColorCode &= 0x00ffffff;
+	else
+	{
+		// for colorscheme colors the color index are the lower three bits of the upper byte
+		if ( ( nColorCode & 0xf8000000 ) == 0 ) // this must be a colorscheme index
+		{
+			nColorCode >>= 24;
+			nColorCode |= 0x8000000;
+		}
+	}
+	return MSO_CLR_ToColor( nColorCode );
+}
 
 Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContentProperty ) const
 {
 	Color aColor( mnDefaultColor );
 
 	// Fuer Textfarben: Header ist 0xfeRRGGBB
-	if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 )
-		nColorCode &= 0x00ffffff;
+	if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 )	// sj: it needs to be checked if 0xfe is used in 
+		nColorCode &= 0x00ffffff;						// other cases than ppt text -> if not this code can be removed
 
 	sal_uInt8 nUpper = (sal_uInt8)( nColorCode >> 24 );
     

File svx/source/outliner/outliner.cxx

     return 0;
 }
 
+static bool isSameNumbering( const SvxNumberFormat& rN1, const SvxNumberFormat& rN2 )
+{
+    if( rN1.GetNumberingType() != rN2.GetNumberingType() )
+        return false;
+        
+    if( rN1.GetNumStr(1) != rN2.GetNumStr(1) )
+        return false;
+        
+    if( (rN1.GetPrefix() != rN2.GetPrefix()) || (rN1.GetSuffix() != rN2.GetSuffix()) )
+        return false;
+        
+    return true;
+}
+
 sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt )
 {
     sal_uInt16 nNumber = pParaFmt->GetStart() - 1;
         pPara = pParaList->GetParagraph( nPara );
         const sal_Int16 nDepth = pPara->GetDepth();
 
-        // ignore paragraphs that are below our paragraph
-        if( nDepth > nParaDepth )
+        // ignore paragraphs that are below our paragraph or have no numbering
+        if( (nDepth > nParaDepth) || (nDepth == -1) )
             continue;
 
         // stop on paragraphs that are above our paragraph
             break;
 
         const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
-        if( pFmt == 0 || (*pFmt != *pParaFmt) )
-            break; // change in number format, stop here
+        
+        if( pFmt == 0 )
+            continue; // ignore paragraphs without bullets
+            
+        // check if numbering is the same
+        if( !isSameNumbering( *pFmt, *pParaFmt ) )
+            break;
 
         const SfxBoolItem& rBulletState = (const SfxBoolItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE );
 

File svx/source/outliner/outlvw.cxx

         pOwner->bPasting = TRUE;
         pEditView->PasteSpecial();
 
+		if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+		{
+        	const USHORT nParaCount = pOwner->pEditEngine->GetParagraphCount();
+
+		    for( USHORT nPara = 0; nPara < nParaCount; nPara++ )
+			    pOwner->ImplSetLevelDependendStyleSheet( nPara );
+	    }
+
         pEditView->SetEditEngineUpdateMode( TRUE );
 		pOwner->UndoActionEnd( OLUNDO_INSERT );
 		pEditView->ShowCursor( TRUE, TRUE );

File svx/source/sdr/contact/viewcontactofgraphic.cxx

                         false,
                         false,
                         false,
-                        false);
+                        false,
+						false);
 
                     // decompose immediately with neutral ViewInformation. This will
                     // layout the text to more simple TextPrimitives from drawinglayer

File svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx

                         *getSdrLFSTAttribute().getText(), 
                         getSdrLFSTAttribute().getLine(), 
                         false, 
-                        false));
+                        false,
+						false));
 			}
 
 			// add shadow

File svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx

 			// add text
 			if(getSdrLSTAttribute().getText())
 			{
-				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false));
+				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false, false));
 			}
 
 			// add shadow

File svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx

 					getTextBox(),
 					*getSdrSTAttribute().getText(),
 					0,
-					isForceTextClipToTextRange(), // #SJ# use CellText mode; text upper-left
-					getWordWrap()));
+					false,
+					getWordWrap(),
+					isForceTextClipToTextRange()));
 			}
 
 			// add shadow

File svx/source/sdr/primitive2d/sdrdecompositiontools.cxx

 			const attribute::SdrTextAttribute& rText,
 			const attribute::SdrLineAttribute* pStroke,
 			bool bCellText,
-            bool bWordWrap)
+            bool bWordWrap,
+			bool bClipOnBounds)
 		{
 			basegfx::B2DHomMatrix aAnchorTransform(rObjectTransform);
 			SdrTextPrimitive2D* pNew = 0;
                         rText.isFixedCellHeight(),
                         rText.isScroll(), 
                         bCellText, 
-                        bWordWrap);
+                        bWordWrap,
+						bClipOnBounds);
 				}
 			}
 

File svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx

 			// add text
 			if(getSdrLFSTAttribute().getText())
 			{
-				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
 			}
 
 			// add shadow
 			// add text
 			if(getSdrLFSTAttribute().getText())
 			{
-				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
 			}
 
 			// add shadow

File svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx

 			// add text
 			if(getSdrLFSTAttribute().getText())
 			{
-				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
 			}
 
 			// add shadow

File svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx

                     pTextAttribute->isScroll(), 
                     false, 
                     false,
-                    false);
+                    false,
+					false);
 				aTextRange = pBlockText->getB2DRange(aViewInformation);
 			}
 

File svx/source/sdr/primitive2d/sdrole2primitive2d.cxx

 			// always supported by the old paints, too
 			if(getSdrLFSTAttribute().getText())
 			{
-				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
 			}
 
 			// add shadow

File svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx

 			// add text
 			if(getSdrLFSTAttribute().getText())
 			{
-				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
 			}
 
 			// add shadow

File svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx

             // add text
 			if(getSdrLFSTAttribute().getText())
 			{
-				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+				appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
 			}
 
 			// add shadow

File svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx

             bool bFixedCellHeight,
 			bool bUnlimitedPage,
 			bool bCellText,
-            bool bWordWrap)
+            bool bWordWrap,
+			bool bClipOnBounds)
 		:	SdrTextPrimitive2D(pSdrText, rOutlinerParaObject),
 			maTextRangeTransform(rTextRangeTransform),
             maSdrTextHorzAdjust(aSdrTextHorzAdjust),
             mbFixedCellHeight(bFixedCellHeight),
             mbUnlimitedPage(bUnlimitedPage),
 			mbCellText(bCellText),
-            mbWordWrap(bWordWrap)
+            mbWordWrap(bWordWrap),
+			mbClipOnBounds(bClipOnBounds)
 		{
 		}
 
                     && isFixedCellHeight() == rCompare.isFixedCellHeight()
 					&& getUnlimitedPage() == rCompare.getUnlimitedPage()
 					&& getCellText() == rCompare.getCellText()
-                    && getWordWrap() == rCompare.getWordWrap());
+                    && getWordWrap() == rCompare.getWordWrap()
+					&& getClipOnBounds() == rCompare.getClipOnBounds());
 			}
 
 			return false;
                 isFixedCellHeight(),
                 getUnlimitedPage(), 
                 getCellText(), 
-                getWordWrap());
+                getWordWrap(),
+				getClipOnBounds());
 		}
 
 		// provide unique ID

File svx/source/svdraw/svdfppt.cxx

 		aFont.SetFamily( pAtom->eFamily );
 		aFont.SetPitch( pAtom->ePitch );
     }
-	Color aCol( rManager.MSO_CLR_ToColor( nBulletColor ) );
+	Color aCol( rManager.MSO_TEXT_CLR_ToColor( nBulletColor ) );
 	aFont.SetColor( aCol );
 
     sal_uInt16 nBuChar = (sal_uInt16)nBulletChar;
 	{
 		if ( GetAttrib( PPT_CharAttr_FontColor, nVal, nDestinationInstance ) )	// Textfarbe (4Byte-Arg)
 		{
-			Color aCol( rManager.MSO_CLR_ToColor( nVal ) );
+			Color aCol( rManager.MSO_TEXT_CLR_ToColor( nVal ) );
 			rSet.Put( SvxColorItem( aCol, EE_CHAR_COLOR ) );
 			if ( nDestinationInstance == 0xffffffff )
 				mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet = aCol;
 		}
 		else if ( nVal & 0x0f000000 )	// this is not a hard attribute, but maybe the page has a different colerscheme,
 		{								// so that in this case we must use a hard color attribute
-			Color	aCol( rManager.MSO_CLR_ToColor( nVal ) );
+			Color	aCol( rManager.MSO_TEXT_CLR_ToColor( nVal ) );
 			Color&	aColorInSheet = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet;
 			if ( aColorInSheet != aCol )
 				rSet.Put( SvxColorItem( aCol, EE_CHAR_COLOR ) );
 								nColor = rParaLevel.mnBulletColor;
 							else
 								nColor = rCharLevel.mnFontColor;
-							aNumberFormat2.SetBulletColor( rManager.MSO_CLR_ToColor( nColor ) );
+							aNumberFormat2.SetBulletColor( rManager.MSO_TEXT_CLR_ToColor( nColor ) );
 							pRule->SetLevel( i, aNumberFormat2 );
 						}
 					}
 				{
 					Color aLineColor( ((XLineColorItem&)pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() );
 					aBorderLine.Color = aLineColor.GetColor();
-					aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() );
-					aBorderLine.InnerLineWidth = 0;
+					aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 );
+					aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 );
 					aBorderLine.LineDistance = 0;
 				}
 				break;

File svx/source/svdraw/svdotextdecomposition.cxx

 	const bool bVerticalWritintg(rSdrBlockTextPrimitive.getOutlinerParaObject().IsVertical());
 	const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight));
 
+	// check if block text is used (only one of them can be true)
+	const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg);
+	const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg);
+
+    // set minimal paper size hor/ver if needed
+	if(bHorizontalIsBlock)
+	{
+		rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
+	}
+	else if(bVerticalIsBlock)
+	{
+		rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight));
+	}
+
 	if(bIsCell)
 	{
 		// cell text is formated neither like a text object nor like a object
 		// text, so use a special setup here
-		rOutliner.SetMinAutoPaperSize(aNullSize);
 		rOutliner.SetMaxAutoPaperSize(aAnchorTextSize);
 		rOutliner.SetPaperSize(aAnchorTextSize);
-		rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
-		rOutliner.SetUpdateMode(TRUE);
+		rOutliner.SetUpdateMode(true);
 		rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
-		rOutliner.SetUpdateMode(TRUE);
 		rOutliner.SetControlWord(nOriginalControlWord);
 	}
 	else
 	{
-        // check if block text is used (only one of them can be true)
-        const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg);
-        const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg);
 
         if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) && !rSdrBlockTextPrimitive.getUnlimitedPage())
 		{
             rOutliner.SetMaxAutoPaperSize(aMaxAutoPaperSize);
 		}
 
-        // set minimal paper size hor/ver if needed
-		if(bHorizontalIsBlock)
-		{
-			rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
-		}
-		else if(bVerticalIsBlock)
-		{
-			rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight));
-		}
-
 		rOutliner.SetPaperSize(aNullSize);
 		rOutliner.SetUpdateMode(true);
 		rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
 	// as the master shape we are working on. For vertical, use the top-right
 	// corner
 	const double fStartInX(bVerticalWritintg ? aAdjustTranslate.getX() + aOutlinerScale.getX() : aAdjustTranslate.getX());
-	aNewTransformA.translate(fStartInX, aAdjustTranslate.getY());
+	const basegfx::B2DTuple aAdjOffset(fStartInX, aAdjustTranslate.getY());
+	aNewTransformA.translate(aAdjOffset.getX(), aAdjOffset.getY());
 
 	// mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y,
 	// move the null point which was top left to bottom right.
 	// #SJ# create ClipRange (if needed)
 	basegfx::B2DRange aClipRange;
 
-	if(bIsCell)
+	if(rSdrBlockTextPrimitive.getClipOnBounds())
 	{
-		aClipRange.expand(basegfx::B2DTuple(0.0, 0.0));
-		aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()));
+		aClipRange.expand(-aAdjOffset);
+		aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()) - aAdjOffset);
 	}
 
 	// now break up text primitives.

File svx/source/table/viewcontactoftableobj.cxx

 						getTransform(), 
 						*getSdrFTAttribute().getText(),
 						0,
-						true, false));
+						true, false, false));
 				}
 			}
 

File vcl/source/gdi/region.cxx

     // We still have to cover two cases:
     // 1. The region does not yet contain any bands.
     // 2. The intervall nTop->nBottom extends past the bottom most band.
-    if (nCurrentTop < nBottom && (pBand==NULL || nBottom>pBand->mnYBottom))
+    if (nCurrentTop <= nBottom
+        && (pBand==NULL || nBottom>pBand->mnYBottom))
     {
         // When there is no previous band then the new one will be the
         // first.  Otherwise the new band is inserted behind the last band.
             ImplRegionBand* pTopBand = pBand;
             // If necessary split the band at nTop so that nTop is contained
             // in the lower band.
-            if (   // Prevent the current band from becoming 0 pixel high
-                pBand->mnYTop<nTop
+            if (pBand!=NULL
+                   // Prevent the current band from becoming 0 pixel high
+                && pBand->mnYTop<nTop
                    // this allows the lowest pixel of the band to be split off
                 && pBand->mnYBottom>=nTop
                    // do not split a band that is just one pixel high
                 pBand = pBand->mpNextBand;
             // The lowest band may have to be split at nBottom so that
             // nBottom itself remains in the upper band.
-            if (   // allow the current band becoming 1 pixel high
-                pBand->mnYTop<=nBottom
+            if (pBand!=NULL
+                   // allow the current band becoming 1 pixel high
+                && pBand->mnYTop<=nBottom
                    // prevent splitting off a band that is 0 pixel high
                 && pBand->mnYBottom>nBottom
                    // do not split a band that is just one pixel high