8076325
Index: source/ui/inc/output.hxx
8076325
===================================================================
8076325
RCS file: /cvs/sc/sc/source/ui/inc/output.hxx,v
8076325
retrieving revision 1.19
8076325
diff -u -r1.19 output.hxx
8076325
--- openoffice.org.orig/sc/source/ui/inc/output.hxx	26 Jun 2007 11:50:45 -0000	1.19
8076325
+++ openoffice.org/sc/source/ui/inc/output.hxx	16 Apr 2008 12:05:59 -0000
8076325
@@ -242,6 +242,7 @@
8076325
 	void	DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBottom);
8076325
 	void	DrawFrame();
8076325
 
8076325
+	bool	UseNormalClip(SCROW nCellY, const SfxItemSet* pCondSet);
8076325
 					// with logic MapMode set!
8076325
 	void	DrawEdit(BOOL bPixelToLogic);
8076325
 
8076325
Index: source/ui/view/output2.cxx
8076325
===================================================================
8076325
RCS file: /cvs/sc/sc/source/ui/view/output2.cxx,v
8076325
retrieving revision 1.54.216.1
8076325
diff -u -r1.54.216.1 output2.cxx
8076325
--- openoffice.org.orig/sc/source/ui/view/output2.cxx	18 Jan 2008 12:02:36 -0000	1.54.216.1
8076325
+++ openoffice.org/sc/source/ui/view/output2.cxx	16 Apr 2008 12:19:34 -0000
9af7fae
@@ -2378,6 +2378,22 @@
9af7fae
 
8076325
 }
8076325
 
9af7fae
+
8076325
+bool ScOutputData::UseNormalClip(SCROW nCellY, const SfxItemSet* pCondSet)
8076325
+{
8076325
+    bool bNormalClip = false;
9af7fae
+       //      Don't clip for text height when printing rows with optimal height,
9af7fae
+       //      except when font size is from conditional formatting.
9af7fae
+       //!     Allow clipping when vertically merged?
9af7fae
+       if ( eType != OUTTYPE_PRINTER ||
9af7fae
+               ( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
9af7fae
+               ( pCondSet && SFX_ITEM_SET ==
9af7fae
+                       pCondSet->GetItemState(ATTR_FONT_HEIGHT, TRUE) ) )
9af7fae
+               bNormalClip = TRUE;
8076325
+    return bNormalClip;
8076325
+}
8076325
+
8076325
+
8076325
 void ScOutputData::DrawEdit(BOOL bPixelToLogic)
8076325
 {
8076325
     vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() );
9af7fae
@@ -2892,13 +2908,8 @@
9af7fae
                                             (ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
9af7fae
                                     BOOL bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
8076325
 
9af7fae
-                                    //	Don't clip for text height when printing rows with optimal height,
9af7fae
-                                    //	except when font size is from conditional formatting.
9af7fae
-                                    //!	Allow clipping when vertically merged?
9af7fae
-                                    if ( eType != OUTTYPE_PRINTER ||
9af7fae
-                                        ( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
9af7fae
-                                        ( pCondSet && SFX_ITEM_SET ==
9af7fae
-                                            pCondSet->GetItemState(ATTR_FONT_HEIGHT, TRUE) ) )
8076325
+					
8076325
+									if (UseNormalClip(nCellY, pCondSet))
9af7fae
                                         bClip = TRUE;
9af7fae
                                     else
9af7fae
                                         bSimClip = TRUE;
9af7fae
@@ -2948,6 +2959,18 @@
8076325
 #endif
8076325
 
9af7fae
                                 Rectangle aLogicClip;
8076325
+                                if (
8076325
+										((nAttrRotate == 9000) || (nAttrRotate == 27000)) &&
8076325
+										(!(eOrient==SVX_ORIENTATION_STANDARD && !bAsianVertical)) &&
8076325
+										(!(bClip || bSimClip))
8076325
+								   )
8076325
+								{
8076325
+									if (UseNormalClip(nCellY, pCondSet))
8076325
+										bClip = TRUE;
8076325
+									else
8076325
+										bSimClip = TRUE;
8076325
+								}
8076325
+
9af7fae
                                 if (bClip || bSimClip)
9af7fae
                                 {
9af7fae
                                     // Clip marks are already handled in GetOutputArea
9af7fae
@@ -3776,11 +3799,21 @@
9af7fae
                                     else
9af7fae
                                     {
9af7fae
                                         //	bei gedrehtem Text ist Standard zentriert
9af7fae
+                                        long nDiff = 0;
9af7fae
                                         if (eHorJust==SVX_HOR_JUSTIFY_RIGHT)
9af7fae
-                                            aLogicStart.X() += nAvailWidth - nEngineWidth;
9af7fae
+                                            nDiff = nAvailWidth - nEngineWidth;
9af7fae
                                         else if (eHorJust==SVX_HOR_JUSTIFY_CENTER ||
9af7fae
                                                  eHorJust==SVX_HOR_JUSTIFY_STANDARD)
9af7fae
-                                            aLogicStart.X() += (nAvailWidth - nEngineWidth) / 2;
9af7fae
+                                            nDiff = (nAvailWidth - nEngineWidth) / 2;
8076325
+
9af7fae
+                                        if (nEngineWidth > nAvailWidth)
9af7fae
+                                        {
8076325
+                                            if (nAttrRotate == 9000)
9af7fae
+                                               nDiff = 0;
9af7fae
+                                            else if (nAttrRotate == 27000)
9af7fae
+                                               nDiff = nAvailWidth - nEngineWidth;
9af7fae
+                                        }
9af7fae
+                                        aLogicStart.X() += nDiff;
9af7fae
                                     }
9af7fae
                                 }
8076325