| 1 |
Index: source/ui/inc/output.hxx
|
| 2 |
===================================================================
|
| 3 |
RCS file: /cvs/sc/sc/source/ui/inc/output.hxx,v
|
| 4 |
retrieving revision 1.19
|
| 5 |
diff -u -r1.19 output.hxx
|
| 6 |
--- openoffice.org.orig/sc/source/ui/inc/output.hxx 26 Jun 2007 11:50:45 -0000 1.19
|
| 7 |
+++ openoffice.org/sc/source/ui/inc/output.hxx 16 Apr 2008 12:05:59 -0000
|
| 8 |
@@ -242,6 +242,7 @@
|
| 9 |
void DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBottom);
|
| 10 |
void DrawFrame();
|
| 11 |
|
| 12 |
+ bool UseNormalClip(SCROW nCellY, const SfxItemSet* pCondSet);
|
| 13 |
// with logic MapMode set!
|
| 14 |
void DrawEdit(BOOL bPixelToLogic);
|
| 15 |
|
| 16 |
Index: source/ui/view/output2.cxx
|
| 17 |
===================================================================
|
| 18 |
RCS file: /cvs/sc/sc/source/ui/view/output2.cxx,v
|
| 19 |
retrieving revision 1.54.216.1
|
| 20 |
diff -u -r1.54.216.1 output2.cxx
|
| 21 |
--- openoffice.org.orig/sc/source/ui/view/output2.cxx 18 Jan 2008 12:02:36 -0000 1.54.216.1
|
| 22 |
+++ openoffice.org/sc/source/ui/view/output2.cxx 16 Apr 2008 12:19:34 -0000
|
| 23 |
@@ -1907,6 +1907,21 @@
|
| 24 |
}
|
| 25 |
}
|
| 26 |
|
| 27 |
+bool ScOutputData::UseNormalClip(SCROW nCellY, const SfxItemSet* pCondSet)
|
| 28 |
+{
|
| 29 |
+ bool bNormalClip = false;
|
| 30 |
+ // Don't clip for text height when printing rows with optimal height,
|
| 31 |
+ // except when font size is from conditional formatting.
|
| 32 |
+ //! Allow clipping when vertically merged?
|
| 33 |
+ if ( eType != OUTTYPE_PRINTER ||
|
| 34 |
+ ( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
|
| 35 |
+ ( pCondSet && SFX_ITEM_SET ==
|
| 36 |
+ pCondSet->GetItemState(ATTR_FONT_HEIGHT, TRUE) ) )
|
| 37 |
+ bNormalClip = TRUE;
|
| 38 |
+ return bNormalClip;
|
| 39 |
+}
|
| 40 |
+
|
| 41 |
+
|
| 42 |
void ScOutputData::DrawEdit(BOOL bPixelToLogic)
|
| 43 |
{
|
| 44 |
vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() );
|
| 45 |
@@ -2524,13 +2539,8 @@
|
| 46 |
(ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
|
| 47 |
BOOL bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
|
| 48 |
|
| 49 |
- // Don't clip for text height when printing rows with optimal height,
|
| 50 |
- // except when font size is from conditional formatting.
|
| 51 |
- //! Allow clipping when vertically merged?
|
| 52 |
- if ( eType != OUTTYPE_PRINTER ||
|
| 53 |
- ( pDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
|
| 54 |
- ( pCondSet && SFX_ITEM_SET ==
|
| 55 |
- pCondSet->GetItemState(ATTR_FONT_HEIGHT, TRUE) ) )
|
| 56 |
+
|
| 57 |
+ if (UseNormalClip(nCellY, pCondSet))
|
| 58 |
bClip = TRUE;
|
| 59 |
else
|
| 60 |
bSimClip = TRUE;
|
| 61 |
@@ -2580,6 +2590,18 @@
|
| 62 |
#endif
|
| 63 |
|
| 64 |
Rectangle aLogicClip;
|
| 65 |
+ if (
|
| 66 |
+ ((nAttrRotate == 9000) || (nAttrRotate == 27000)) &&
|
| 67 |
+ (!(eOrient==SVX_ORIENTATION_STANDARD && !bAsianVertical)) &&
|
| 68 |
+ (!(bClip || bSimClip))
|
| 69 |
+ )
|
| 70 |
+ {
|
| 71 |
+ if (UseNormalClip(nCellY, pCondSet))
|
| 72 |
+ bClip = TRUE;
|
| 73 |
+ else
|
| 74 |
+ bSimClip = TRUE;
|
| 75 |
+ }
|
| 76 |
+
|
| 77 |
if (bClip || bSimClip)
|
| 78 |
{
|
| 79 |
// Clip marks are already handled in GetOutputArea
|
| 80 |
@@ -2635,10 +2657,20 @@
|
| 81 |
}
|
| 82 |
else
|
| 83 |
{
|
| 84 |
+ long nDiff = 0;
|
| 85 |
if (eHorJust==SVX_HOR_JUSTIFY_RIGHT)
|
| 86 |
- aLogicStart.X() += nAvailWidth - nEngineWidth;
|
| 87 |
+ nDiff = nAvailWidth - nEngineWidth;
|
| 88 |
else if (eHorJust==SVX_HOR_JUSTIFY_CENTER)
|
| 89 |
- aLogicStart.X() += (nAvailWidth - nEngineWidth) / 2;
|
| 90 |
+ nDiff = (nAvailWidth - nEngineWidth) / 2;
|
| 91 |
+
|
| 92 |
+ if (nEngineWidth > nAvailWidth)
|
| 93 |
+ {
|
| 94 |
+ if (nAttrRotate == 9000)
|
| 95 |
+ nDiff = 0;
|
| 96 |
+ else if (nAttrRotate == 27000)
|
| 97 |
+ nDiff = nAvailWidth - nEngineWidth;
|
| 98 |
+ }
|
| 99 |
+ aLogicStart.X() += nDiff;
|
| 100 |
}
|
| 101 |
}
|
| 102 |
|