/[packages]/cauldron/libreoffice/current/SOURCES/openoffice.org-3.0.0.ooo88341.sc.verticalboxes.patch
ViewVC logotype

Contents of /cauldron/libreoffice/current/SOURCES/openoffice.org-3.0.0.ooo88341.sc.verticalboxes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 389214 - (show annotations) (download)
Thu Jan 17 21:30:27 2013 UTC (11 years, 3 months ago) by pterjan
File size: 6493 byte(s)
oops
1 From 8208f795bb6882cf77adef940839f0c46b9befb2 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3 Date: Mon, 5 Dec 2011 15:28:19 +0100
4 Subject: [PATCH] vertical content overflowing out of cell (#i88341#)
5
6 ---
7 sc/source/ui/inc/output.hxx | 2 ++
8 sc/source/ui/view/output2.cxx | 66 ++++++++++++++++++++++++++++---------------
9 2 files changed, 45 insertions(+), 23 deletions(-)
10
11 diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
12 index 1b8d8f5..6dcbe2e 100644
13 --- a/sc/source/ui/inc/output.hxx
14 +++ b/sc/source/ui/inc/output.hxx
15 @@ -296,6 +296,8 @@ public:
16 void DrawExtraShadow(sal_Bool bLeft, sal_Bool bTop, sal_Bool bRight, sal_Bool bBottom);
17 void DrawFrame();
18
19 + bool UseNormalClip(SCROW nCellY, const SfxItemSet* pCondSet);
20 +
21 // with logic MapMode set!
22 void DrawEdit(sal_Bool bPixelToLogic);
23
24 diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
25 index ac6365c..141ef00 100644
26 --- a/sc/source/ui/view/output2.cxx
27 +++ b/sc/source/ui/view/output2.cxx
28 @@ -2905,13 +2905,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
29 (ScMergeAttr*)&rParam.mpPattern->GetItem(ATTR_MERGE);
30 bool bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
31
32 - // Don't clip for text height when printing rows with optimal height,
33 - // except when font size is from conditional formatting.
34 - //! Allow clipping when vertically merged?
35 - if ( eType != OUTTYPE_PRINTER ||
36 - ( mpDoc->GetRowFlags( rParam.mnCellY, nTab ) & CR_MANUALSIZE ) ||
37 - ( rParam.mpCondSet && SFX_ITEM_SET ==
38 - rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT, true) ) )
39 + if (UseNormalClip(rParam.mnCellY, rParam.mpCondSet))
40 bClip = true;
41 else
42 bSimClip = true;
43 @@ -2946,6 +2940,19 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
44 }
45
46 Rectangle aLogicClip;
47 + if (
48 + ((nAttrRotate == 9000) || (nAttrRotate == 27000)) &&
49 + (!(rParam.meOrient==SVX_ORIENTATION_STANDARD &&
50 + !rParam.mbAsianVertical)) &&
51 + (!(bClip || bSimClip))
52 + )
53 + {
54 + if (UseNormalClip(rParam.mnCellY, rParam.mpCondSet))
55 + bClip = true;
56 + else
57 + bSimClip = true;
58 + }
59 +
60 if (bClip || bSimClip)
61 {
62 // Clip marks are already handled in GetOutputArea
63 @@ -3278,13 +3285,8 @@ void ScOutputData::DrawEditBottomTop(DrawEditParam& rParam)
64 (ScMergeAttr*)&rParam.mpPattern->GetItem(ATTR_MERGE);
65 bool bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
66
67 - // Don't clip for text height when printing rows with optimal height,
68 - // except when font size is from conditional formatting.
69 - //! Allow clipping when vertically merged?
70 - if ( eType != OUTTYPE_PRINTER ||
71 - ( mpDoc->GetRowFlags( rParam.mnCellY, nTab ) & CR_MANUALSIZE ) ||
72 - ( rParam.mpCondSet && SFX_ITEM_SET ==
73 - rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT, true) ) )
74 +
75 + if (UseNormalClip(rParam.mnCellY, rParam.mpCondSet))
76 bClip = true;
77 else
78 bSimClip = true;
79 @@ -3650,13 +3652,7 @@ void ScOutputData::DrawEditTopBottom(DrawEditParam& rParam)
80 (ScMergeAttr*)&rParam.mpPattern->GetItem(ATTR_MERGE);
81 bool bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
82
83 - // Don't clip for text height when printing rows with optimal height,
84 - // except when font size is from conditional formatting.
85 - //! Allow clipping when vertically merged?
86 - if ( eType != OUTTYPE_PRINTER ||
87 - ( mpDoc->GetRowFlags( rParam.mnCellY, nTab ) & CR_MANUALSIZE ) ||
88 - ( rParam.mpCondSet && SFX_ITEM_SET ==
89 - rParam.mpCondSet->GetItemState(ATTR_FONT_HEIGHT, true) ) )
90 + if (UseNormalClip(rParam.mnCellY, rParam.mpCondSet))
91 bClip = true;
92 else
93 bSimClip = true;
94 @@ -4547,6 +4543,20 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
95 rParam.adjustForHyperlinkInPDF(aURLStart, mpDev);
96 }
97
98 +bool ScOutputData::UseNormalClip(SCROW nCellY, const SfxItemSet* pCondSet)
99 +{
100 + bool bNormalClip = false;
101 + // Don't clip for text height when printing rows with optimal height,
102 + // except when font size is from conditional formatting.
103 + //! Allow clipping when vertically merged?
104 + if ( eType != OUTTYPE_PRINTER ||
105 + ( mpDoc->GetRowFlags( nCellY, nTab ) & CR_MANUALSIZE ) ||
106 + ( pCondSet && SFX_ITEM_SET ==
107 + pCondSet->GetItemState(ATTR_FONT_HEIGHT, sal_True) ) )
108 + bNormalClip = true;
109 + return bNormalClip;
110 +}
111 +
112 void ScOutputData::DrawEdit(sal_Bool bPixelToLogic)
113 {
114 ScFieldEditEngine* pEngine = NULL;
115 @@ -5258,11 +5268,21 @@ void ScOutputData::DrawRotated(sal_Bool bPixelToLogic)
116 else
117 {
118 // bei gedrehtem Text ist Standard zentriert
119 + long nDiff = 0;
120 if (eHorJust==SVX_HOR_JUSTIFY_RIGHT)
121 - aLogicStart.X() += nAvailWidth - nEngineWidth;
122 + nDiff = nAvailWidth - nEngineWidth;
123 else if (eHorJust==SVX_HOR_JUSTIFY_CENTER ||
124 eHorJust==SVX_HOR_JUSTIFY_STANDARD)
125 - aLogicStart.X() += (nAvailWidth - nEngineWidth) / 2;
126 + nDiff = (nAvailWidth - nEngineWidth) / 2;
127 +
128 + if (nEngineWidth > nAvailWidth)
129 + {
130 + if (nAttrRotate == 9000)
131 + nDiff = 0;
132 + else if (nAttrRotate == 27000)
133 + nDiff = nAvailWidth - nEngineWidth;
134 + }
135 + aLogicStart.X() += nDiff;
136 }
137 }
138
139 --
140 1.8.0
141

  ViewVC Help
Powered by ViewVC 1.1.30