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