1 |
From 50b7a998d0229ff7f49cd6b653765410749cf747 Mon Sep 17 00:00:00 2001 |
2 |
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com> |
3 |
Date: Thu, 9 Jun 2016 13:03:57 +0100 |
4 |
Subject: [PATCH] Related: tdf#93135 adjust the ui to reflect the text fit |
5 |
options entanglement |
6 |
|
7 |
We have two major groups of text fitting options in draw/impress |
8 |
|
9 |
ones that apply only to custom shapes |
10 |
* Word wrap text in shape |
11 |
* Resize shape to fit text |
12 |
|
13 |
those that apply to other elements, e.g. text boxes, legacy rectangles and lines |
14 |
* Fit width to text |
15 |
* Fit height to text |
16 |
* Fit to frame |
17 |
* Adjust to contour |
18 |
|
19 |
Of the second group, only "fit to frame" is always available. Text boxes |
20 |
have "Fit width to text" and "Fit height to text", while stuff like legacy |
21 |
rectangles and lines etc have "Adjust to contour" instead. |
22 |
|
23 |
A fun issue is that (currently anyway) the bit for "resize shape to |
24 |
fit text" in custom shapes and the bit for "fit height to text" in text boxes |
25 |
is the same bit, SDRATTR_TEXT_AUTOGROWHEIGHT. |
26 |
|
27 |
So before this change in all circumstances the same collection of checkboxes |
28 |
for all settings was visible. With context used to enable or disable which |
29 |
ones could be set according to the type of shape it was. Simultaneously there |
30 |
is logic to enable/disable checkboxes depending on if other checkboxes that |
31 |
control contradictionary options were checked/unchecked. e.g. "Fit to frame" |
32 |
disabled if "fit height to text" is enabled. So its not apparently why some |
33 |
can be enabled and some disabled by clicking about the place in the shared |
34 |
collection. |
35 |
|
36 |
In this commit we split the sizing options into their two families, one frame and |
37 |
column for each of "custom shapes" and "everything else". When adjusting |
38 |
a single selected object we use context to determine which column to show |
39 |
or hide. When editing multiple objects or the underlying graphic styles we show |
40 |
both columns. When editing a presentation style we show just the text box |
41 |
column. (The use of HasText in the original code is a concern, cause it doesn't |
42 |
make sense to me, using it like that means that in the original dialog |
43 |
format->text on an empty text box from F2 shows the contour option, but after |
44 |
entering text and then format->text it shows a set of different text box sizing |
45 |
options, so that's dropped here) |
46 |
|
47 |
Because (currently) the same SDRATTR_TEXT_AUTOGROWHEIGHT bit it used for two |
48 |
apparently different things then we visually toggle on all things that use that |
49 |
bit in multi-column mode when its togged on, i.e. on editing a style visually |
50 |
both "fit height to text" and "resize shape to fix text" are kept in sync when |
51 |
you toggle one or the other. We don't disable the "resize shape to fit text" |
52 |
checkbox (unlike the fit height to text checkbox which controls the same bit) |
53 |
if "fit to frame" and "adjust to contour" are set, and give it additional |
54 |
powers to unset those if clicked. |
55 |
|
56 |
This hopefully makes the ui describe the way things actually are. |
57 |
|
58 |
Because this SDRATTR_TEXT_AUTOGROWHEIGHT is currently sort of doing two purposes |
59 |
selecting a freshly drawn custom rectangle and using format->default formatting |
60 |
will cause it to change properties because the underlying |
61 |
SDRATTR_TEXT_AUTOGROWHEIGHT bit is cleared. |
62 |
|
63 |
The way things should probably be I guess is that there should be a |
64 |
SDRATTR_TEXT_AUTOGROWSIZE property (which used to exist but wasn't hooked up to |
65 |
anything) just for custom shapes which overrides the old family of options if |
66 |
set. |
67 |
|
68 |
(cherry picked from commit 8d51397bfd98615e74e116582a50e29846ecb76e) |
69 |
|
70 |
Change-Id: I49241c90d919eeb5caa8775beab57746d5c6df04 |
71 |
--- |
72 |
cui/source/inc/textattr.hxx | 8 +- |
73 |
cui/source/tabpages/textanim.cxx | 17 ++- |
74 |
cui/source/tabpages/textattr.cxx | 131 +++++++++-------- |
75 |
cui/uiconfig/ui/textattrtabpage.ui | 286 ++++++++++++++++++++++--------------- |
76 |
include/svx/svxids.hrc | 2 +- |
77 |
sd/source/ui/dlg/prltempl.cxx | 11 +- |
78 |
sd/source/ui/dlg/tabtempl.cxx | 5 +- |
79 |
7 files changed, 271 insertions(+), 189 deletions(-) |
80 |
|
81 |
diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx |
82 |
index 7d67d86..a826b2f 100644 |
83 |
--- a/cui/source/inc/textattr.hxx |
84 |
+++ b/cui/source/inc/textattr.hxx |
85 |
@@ -20,6 +20,7 @@ |
86 |
#define INCLUDED_CUI_SOURCE_INC_TEXTATTR_HXX |
87 |
|
88 |
#include <svx/dlgctrl.hxx> |
89 |
+#include <svx/svdobj.hxx> |
90 |
|
91 |
#include <vcl/group.hxx> |
92 |
|
93 |
@@ -39,6 +40,9 @@ class SvxTextAttrPage : public SvxTabPage |
94 |
private: |
95 |
static const sal_uInt16 pRanges[]; |
96 |
|
97 |
+ VclPtr<VclContainer> m_pDrawingText; |
98 |
+ VclPtr<VclContainer> m_pCustomShapeText; |
99 |
+ |
100 |
VclPtr<TriStateBox> m_pTsbAutoGrowWidth; |
101 |
VclPtr<TriStateBox> m_pTsbAutoGrowHeight; |
102 |
VclPtr<TriStateBox> m_pTsbFitToSize; |
103 |
@@ -57,7 +61,7 @@ private: |
104 |
VclPtr<TriStateBox> m_pTsbFullWidth; |
105 |
|
106 |
const SfxItemSet& rOutAttrs; |
107 |
- const SdrView* pView; |
108 |
+ SdrObjKind m_eObjKind; |
109 |
|
110 |
bool bAutoGrowSizeEnabled; |
111 |
bool bContourEnabled; |
112 |
@@ -89,7 +93,7 @@ public: |
113 |
virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override; |
114 |
|
115 |
void Construct(); |
116 |
- void SetView( const SdrView* pSdrView ) { pView = pSdrView; } |
117 |
+ void SetObjKind(SdrObjKind eObjKind) { m_eObjKind = eObjKind; } |
118 |
virtual void PageCreated(const SfxAllItemSet& aSet) override; |
119 |
}; |
120 |
|
121 |
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx |
122 |
index 64bf0e1..5c9ba06 100644 |
123 |
--- a/cui/source/tabpages/textanim.cxx |
124 |
+++ b/cui/source/tabpages/textanim.cxx |
125 |
@@ -27,6 +27,8 @@ |
126 |
#include "textattr.hxx" |
127 |
#include <dialmgr.hxx> |
128 |
#include "svx/dlgutil.hxx" |
129 |
+#include "svx/svdmark.hxx" |
130 |
+#include "svx/svdview.hxx" |
131 |
|
132 |
const sal_uInt16 SvxTextAnimationPage::pRanges[] = |
133 |
{ |
134 |
@@ -63,10 +65,21 @@ SvxTextTabDialog::SvxTextTabDialog( vcl::Window* pParent, |
135 |
void SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) |
136 |
{ |
137 |
if (nId == m_nTextId) |
138 |
+ { |
139 |
+ const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); |
140 |
+ bool bHasMarked = rMarkList.GetMarkCount() > 0; |
141 |
+ SdrObjKind eKind = OBJ_NONE; |
142 |
+ if (bHasMarked) |
143 |
{ |
144 |
- static_cast<SvxTextAttrPage&>(rPage).SetView( pView ); |
145 |
- static_cast<SvxTextAttrPage&>(rPage).Construct(); |
146 |
+ if (rMarkList.GetMarkCount() == 1) |
147 |
+ { |
148 |
+ const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); |
149 |
+ eKind = (SdrObjKind)pObj->GetObjIdentifier(); |
150 |
+ } |
151 |
} |
152 |
+ static_cast<SvxTextAttrPage&>(rPage).SetObjKind(eKind); |
153 |
+ static_cast<SvxTextAttrPage&>(rPage).Construct(); |
154 |
+ } |
155 |
} |
156 |
|
157 |
|
158 |
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx |
159 |
index a0ba1bb..23dd097 100644 |
160 |
--- a/cui/source/tabpages/textattr.cxx |
161 |
+++ b/cui/source/tabpages/textattr.cxx |
162 |
@@ -56,7 +56,7 @@ const sal_uInt16 SvxTextAttrPage::pRanges[] = |
163 |
SvxTextAttrPage::SvxTextAttrPage(vcl::Window* pWindow, const SfxItemSet& rInAttrs) |
164 |
: SvxTabPage(pWindow,"TextAttributesPage","cui/ui/textattrtabpage.ui", rInAttrs) |
165 |
, rOutAttrs(rInAttrs) |
166 |
- , pView(nullptr) |
167 |
+ , m_eObjKind(OBJ_NONE) |
168 |
, bAutoGrowSizeEnabled(false) |
169 |
, bContourEnabled(false) |
170 |
, bAutoGrowWidthEnabled(false) |
171 |
@@ -64,6 +64,8 @@ SvxTextAttrPage::SvxTextAttrPage(vcl::Window* pWindow, const SfxItemSet& rInAttr |
172 |
, bWordWrapTextEnabled(false) |
173 |
, bFitToSizeEnabled(false) |
174 |
{ |
175 |
+ get(m_pDrawingText, "drawingtext"); |
176 |
+ get(m_pCustomShapeText, "customshapetext"); |
177 |
get(m_pTsbAutoGrowWidth,"TSB_AUTOGROW_WIDTH"); |
178 |
get(m_pTsbAutoGrowHeight,"TSB_AUTOGROW_HEIGHT"); |
179 |
get(m_pTsbFitToSize,"TSB_FIT_TO_SIZE"); |
180 |
@@ -90,6 +92,7 @@ SvxTextAttrPage::SvxTextAttrPage(vcl::Window* pWindow, const SfxItemSet& rInAttr |
181 |
Link<Button*,void> aLink( LINK( this, SvxTextAttrPage, ClickHdl_Impl ) ); |
182 |
m_pTsbAutoGrowWidth->SetClickHdl( aLink ); |
183 |
m_pTsbAutoGrowHeight->SetClickHdl( aLink ); |
184 |
+ m_pTsbAutoGrowSize->SetClickHdl( aLink ); |
185 |
m_pTsbFitToSize->SetClickHdl( aLink ); |
186 |
m_pTsbContour->SetClickHdl( aLink ); |
187 |
|
188 |
@@ -103,6 +106,8 @@ SvxTextAttrPage::~SvxTextAttrPage() |
189 |
|
190 |
void SvxTextAttrPage::dispose() |
191 |
{ |
192 |
+ m_pDrawingText.clear(); |
193 |
+ m_pCustomShapeText.clear(); |
194 |
m_pTsbAutoGrowWidth.clear(); |
195 |
m_pTsbAutoGrowHeight.clear(); |
196 |
m_pTsbFitToSize.clear(); |
197 |
@@ -181,16 +186,24 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) |
198 |
m_pMtrFldBottom->SetText( "" ); |
199 |
m_pMtrFldBottom->SaveValue(); |
200 |
|
201 |
- // adjust to height |
202 |
+ // adjust to height and autogrowsize |
203 |
if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SfxItemState::DONTCARE ) |
204 |
{ |
205 |
m_pTsbAutoGrowHeight->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). |
206 |
GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); |
207 |
m_pTsbAutoGrowHeight->EnableTriState( false ); |
208 |
+ |
209 |
+ m_pTsbAutoGrowSize->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). |
210 |
+ GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); |
211 |
+ m_pTsbAutoGrowSize->EnableTriState( false ); |
212 |
} |
213 |
else |
214 |
+ { |
215 |
m_pTsbAutoGrowHeight->SetState( TRISTATE_INDET ); |
216 |
+ m_pTsbAutoGrowSize->SetState( TRISTATE_INDET ); |
217 |
+ } |
218 |
m_pTsbAutoGrowHeight->SaveValue(); |
219 |
+ m_pTsbAutoGrowSize->SaveValue(); |
220 |
|
221 |
// adjust to width |
222 |
if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWWIDTH ) != SfxItemState::DONTCARE ) |
223 |
@@ -203,17 +216,6 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) |
224 |
m_pTsbAutoGrowWidth->SetState( TRISTATE_INDET ); |
225 |
m_pTsbAutoGrowWidth->SaveValue(); |
226 |
|
227 |
- // autogrowsize |
228 |
- if ( rAttrs->GetItemState( SDRATTR_TEXT_AUTOGROWHEIGHT ) != SfxItemState::DONTCARE ) |
229 |
- { |
230 |
- m_pTsbAutoGrowSize->SetState( static_cast<const SdrOnOffItem&>( rAttrs->Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). |
231 |
- GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE ); |
232 |
- m_pTsbAutoGrowSize->EnableTriState( false ); |
233 |
- } |
234 |
- else |
235 |
- m_pTsbAutoGrowSize->SetState( TRISTATE_INDET ); |
236 |
- m_pTsbAutoGrowSize->SaveValue(); |
237 |
- |
238 |
// wordwrap text |
239 |
if ( rAttrs->GetItemState( SDRATTR_TEXT_WORDWRAP ) != SfxItemState::DONTCARE ) |
240 |
{ |
241 |
@@ -481,52 +483,47 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) |
242 |
|
243 |
void SvxTextAttrPage::Construct() |
244 |
{ |
245 |
- DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" ); |
246 |
- |
247 |
- bFitToSizeEnabled = bContourEnabled = true; |
248 |
- bWordWrapTextEnabled = bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = false; |
249 |
- |
250 |
- const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); |
251 |
- if( rMarkList.GetMarkCount() == 1 ) |
252 |
+ switch (m_eObjKind) |
253 |
{ |
254 |
- const SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); |
255 |
- SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier(); |
256 |
- if( pObj->GetObjInventor() == SdrInventor ) |
257 |
- { |
258 |
- switch( eKind ) |
259 |
- { |
260 |
- case OBJ_TEXT : |
261 |
- case OBJ_TITLETEXT : |
262 |
- case OBJ_OUTLINETEXT : |
263 |
- case OBJ_CAPTION : |
264 |
- { |
265 |
- if(pObj->HasText()) |
266 |
- { |
267 |
- // contour NOT possible for pure text objects |
268 |
- bContourEnabled = false; |
269 |
- |
270 |
- // adjusting width and height is ONLY possible for pure text objects |
271 |
- bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = true; |
272 |
- } |
273 |
- } |
274 |
- break; |
275 |
- case OBJ_CUSTOMSHAPE : |
276 |
- { |
277 |
- bFitToSizeEnabled = bContourEnabled = false; |
278 |
- bAutoGrowSizeEnabled = true; |
279 |
- bWordWrapTextEnabled = true; |
280 |
- } |
281 |
- break; |
282 |
- default: ;//prevent warning |
283 |
- } |
284 |
- } |
285 |
+ case OBJ_NONE: |
286 |
+ // indeterminate, show them all |
287 |
+ bFitToSizeEnabled = bContourEnabled = bWordWrapTextEnabled = |
288 |
+ bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = true; |
289 |
+ m_pCustomShapeText->Show(); |
290 |
+ m_pDrawingText->Show(); |
291 |
+ break; |
292 |
+ case OBJ_TEXT: |
293 |
+ case OBJ_TITLETEXT: |
294 |
+ case OBJ_OUTLINETEXT: |
295 |
+ case OBJ_CAPTION: |
296 |
+ // contour NOT possible for pure text objects |
297 |
+ bContourEnabled = bWordWrapTextEnabled = bAutoGrowSizeEnabled = false; |
298 |
+ |
299 |
+ // adjusting width and height is ONLY possible for pure text objects |
300 |
+ bFitToSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = true; |
301 |
+ m_pCustomShapeText->Hide(); |
302 |
+ m_pDrawingText->Show(); |
303 |
+ break; |
304 |
+ case OBJ_CUSTOMSHAPE: |
305 |
+ bFitToSizeEnabled = bContourEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = false; |
306 |
+ bWordWrapTextEnabled = bAutoGrowSizeEnabled = true; |
307 |
+ m_pDrawingText->Hide(); |
308 |
+ m_pCustomShapeText->Show(); |
309 |
+ break; |
310 |
+ default: |
311 |
+ bFitToSizeEnabled = bContourEnabled = true; |
312 |
+ bWordWrapTextEnabled = bAutoGrowSizeEnabled = bAutoGrowWidthEnabled = bAutoGrowHeightEnabled = false; |
313 |
+ m_pCustomShapeText->Hide(); |
314 |
+ m_pDrawingText->Show(); |
315 |
+ break; |
316 |
} |
317 |
- m_pTsbAutoGrowHeight->Enable( bAutoGrowHeightEnabled ); |
318 |
- m_pTsbAutoGrowWidth->Enable( bAutoGrowWidthEnabled ); |
319 |
- m_pTsbFitToSize->Enable( bFitToSizeEnabled ); |
320 |
- m_pTsbContour->Enable( bContourEnabled ); |
321 |
- m_pTsbAutoGrowSize->Enable( bAutoGrowSizeEnabled ); |
322 |
- m_pTsbWordWrapText->Enable( bWordWrapTextEnabled ); |
323 |
+ |
324 |
+ m_pTsbAutoGrowHeight->Show( bAutoGrowHeightEnabled ); |
325 |
+ m_pTsbAutoGrowWidth->Show( bAutoGrowWidthEnabled ); |
326 |
+ m_pTsbFitToSize->Show( bFitToSizeEnabled ); |
327 |
+ m_pTsbContour->Show( bContourEnabled ); |
328 |
+ m_pTsbAutoGrowSize->Show( bAutoGrowSizeEnabled ); |
329 |
+ m_pTsbWordWrapText->Show( bWordWrapTextEnabled ); |
330 |
} |
331 |
|
332 |
VclPtr<SfxTabPage> SvxTextAttrPage::Create( vcl::Window* pWindow, |
333 |
@@ -639,8 +636,20 @@ IMPL_LINK_NOARG_TYPED(SvxTextAttrPage, ClickFullWidthHdl_Impl, Button*, void) |
334 |
|* |
335 |
\************************************************************************/ |
336 |
|
337 |
-IMPL_LINK_NOARG_TYPED(SvxTextAttrPage, ClickHdl_Impl, Button*, void) |
338 |
+IMPL_LINK_TYPED(SvxTextAttrPage, ClickHdl_Impl, Button*, pButton, void) |
339 |
{ |
340 |
+ if (pButton == m_pTsbAutoGrowSize) |
341 |
+ { |
342 |
+ m_pTsbAutoGrowHeight->SetState(m_pTsbAutoGrowSize->GetState()); |
343 |
+ if (m_pTsbAutoGrowSize->GetState() == TRISTATE_TRUE) |
344 |
+ { |
345 |
+ m_pTsbFitToSize->SetState(TRISTATE_FALSE); |
346 |
+ m_pTsbContour->SetState(TRISTATE_FALSE); |
347 |
+ } |
348 |
+ } |
349 |
+ else if (pButton == m_pTsbAutoGrowHeight) |
350 |
+ m_pTsbAutoGrowSize->SetState(m_pTsbAutoGrowHeight->GetState()); |
351 |
+ |
352 |
bool bAutoGrowWidth = m_pTsbAutoGrowWidth->GetState() == TRISTATE_TRUE; |
353 |
bool bAutoGrowHeight = m_pTsbAutoGrowHeight->GetState() == TRISTATE_TRUE; |
354 |
bool bFitToSize = m_pTsbFitToSize->GetState() == TRISTATE_TRUE; |
355 |
@@ -701,10 +710,10 @@ bool SvxTextAttrPage::IsTextDirectionLeftToRight() const |
356 |
|
357 |
void SvxTextAttrPage::PageCreated(const SfxAllItemSet& aSet) |
358 |
{ |
359 |
- const OfaPtrItem* pViewItem = aSet.GetItem<OfaPtrItem>(SID_SVXTEXTATTRPAGE_VIEW, false); |
360 |
+ const CntUInt16Item* pObjTypeItem = aSet.GetItem<CntUInt16Item>(SID_SVXTEXTATTRPAGE_OBJKIND, false); |
361 |
|
362 |
- if (pViewItem) |
363 |
- SetView( static_cast<SdrView *>(pViewItem->GetValue())); |
364 |
+ if (pObjTypeItem) |
365 |
+ SetObjKind(static_cast<SdrObjKind>(pObjTypeItem->GetValue())); |
366 |
|
367 |
Construct(); |
368 |
} |
369 |
diff --git a/cui/uiconfig/ui/textattrtabpage.ui b/cui/uiconfig/ui/textattrtabpage.ui |
370 |
index 15574d6..dc0059b 100644 |
371 |
--- a/cui/uiconfig/ui/textattrtabpage.ui |
372 |
+++ b/cui/uiconfig/ui/textattrtabpage.ui |
373 |
@@ -1,5 +1,5 @@ |
374 |
<?xml version="1.0" encoding="UTF-8"?> |
375 |
-<!-- Generated with glade 3.18.3 --> |
376 |
+<!-- Generated with glade 3.20.0 --> |
377 |
<interface> |
378 |
<requires lib="gtk+" version="3.0"/> |
379 |
<requires lib="LibreOffice" version="1.0"/> |
380 |
@@ -16,139 +16,189 @@ |
381 |
<property name="orientation">vertical</property> |
382 |
<property name="spacing">12</property> |
383 |
<child> |
384 |
- <object class="GtkFrame" id="frame1"> |
385 |
+ <object class="GtkGrid"> |
386 |
<property name="visible">True</property> |
387 |
<property name="can_focus">False</property> |
388 |
- <property name="label_xalign">0</property> |
389 |
- <property name="shadow_type">none</property> |
390 |
+ <property name="column_homogeneous">True</property> |
391 |
<child> |
392 |
- <object class="GtkAlignment" id="alignment1"> |
393 |
+ <object class="GtkFrame" id="drawingtext"> |
394 |
<property name="visible">True</property> |
395 |
<property name="can_focus">False</property> |
396 |
- <property name="top_padding">6</property> |
397 |
- <property name="left_padding">12</property> |
398 |
+ <property name="label_xalign">0</property> |
399 |
+ <property name="shadow_type">none</property> |
400 |
<child> |
401 |
- <object class="GtkGrid" id="grid1"> |
402 |
+ <object class="GtkAlignment" id="alignment1"> |
403 |
<property name="visible">True</property> |
404 |
<property name="can_focus">False</property> |
405 |
- <property name="row_spacing">6</property> |
406 |
- <property name="column_spacing">12</property> |
407 |
- <child> |
408 |
- <object class="GtkCheckButton" id="TSB_AUTOGROW_WIDTH"> |
409 |
- <property name="label" translatable="yes">Fit wi_dth to text</property> |
410 |
- <property name="visible">True</property> |
411 |
- <property name="can_focus">False</property> |
412 |
- <property name="receives_default">False</property> |
413 |
- <property name="use_underline">True</property> |
414 |
- <property name="xalign">0</property> |
415 |
- <property name="inconsistent">True</property> |
416 |
- <property name="draw_indicator">True</property> |
417 |
- </object> |
418 |
- <packing> |
419 |
- <property name="left_attach">0</property> |
420 |
- <property name="top_attach">0</property> |
421 |
- </packing> |
422 |
- </child> |
423 |
- <child> |
424 |
- <object class="GtkCheckButton" id="TSB_AUTOGROW_HEIGHT"> |
425 |
- <property name="label" translatable="yes">Fit h_eight to text</property> |
426 |
- <property name="visible">True</property> |
427 |
- <property name="can_focus">False</property> |
428 |
- <property name="receives_default">False</property> |
429 |
- <property name="use_underline">True</property> |
430 |
- <property name="xalign">0</property> |
431 |
- <property name="inconsistent">True</property> |
432 |
- <property name="draw_indicator">True</property> |
433 |
- </object> |
434 |
- <packing> |
435 |
- <property name="left_attach">0</property> |
436 |
- <property name="top_attach">1</property> |
437 |
- </packing> |
438 |
- </child> |
439 |
- <child> |
440 |
- <object class="GtkCheckButton" id="TSB_FIT_TO_SIZE"> |
441 |
- <property name="label" translatable="yes">_Fit to frame</property> |
442 |
- <property name="visible">True</property> |
443 |
- <property name="can_focus">False</property> |
444 |
- <property name="receives_default">False</property> |
445 |
- <property name="use_underline">True</property> |
446 |
- <property name="xalign">0</property> |
447 |
- <property name="inconsistent">True</property> |
448 |
- <property name="draw_indicator">True</property> |
449 |
- </object> |
450 |
- <packing> |
451 |
- <property name="left_attach">0</property> |
452 |
- <property name="top_attach">2</property> |
453 |
- </packing> |
454 |
- </child> |
455 |
- <child> |
456 |
- <object class="GtkCheckButton" id="TSB_CONTOUR"> |
457 |
- <property name="label" translatable="yes">_Adjust to contour</property> |
458 |
- <property name="visible">True</property> |
459 |
- <property name="can_focus">False</property> |
460 |
- <property name="receives_default">False</property> |
461 |
- <property name="use_underline">True</property> |
462 |
- <property name="xalign">0</property> |
463 |
- <property name="inconsistent">True</property> |
464 |
- <property name="draw_indicator">True</property> |
465 |
- </object> |
466 |
- <packing> |
467 |
- <property name="left_attach">0</property> |
468 |
- <property name="top_attach">3</property> |
469 |
- </packing> |
470 |
- </child> |
471 |
+ <property name="top_padding">6</property> |
472 |
+ <property name="left_padding">12</property> |
473 |
<child> |
474 |
- <object class="GtkCheckButton" id="TSB_WORDWRAP_TEXT"> |
475 |
- <property name="label" translatable="yes">_Word wrap text in shape</property> |
476 |
+ <object class="GtkGrid" id="grid1"> |
477 |
<property name="visible">True</property> |
478 |
<property name="can_focus">False</property> |
479 |
- <property name="receives_default">False</property> |
480 |
- <property name="use_underline">True</property> |
481 |
- <property name="xalign">0</property> |
482 |
- <property name="inconsistent">True</property> |
483 |
- <property name="draw_indicator">True</property> |
484 |
+ <property name="row_spacing">6</property> |
485 |
+ <property name="column_spacing">12</property> |
486 |
+ <child> |
487 |
+ <object class="GtkCheckButton" id="TSB_AUTOGROW_WIDTH"> |
488 |
+ <property name="label" translatable="yes">Fit wi_dth to text</property> |
489 |
+ <property name="visible">True</property> |
490 |
+ <property name="can_focus">True</property> |
491 |
+ <property name="receives_default">False</property> |
492 |
+ <property name="use_underline">True</property> |
493 |
+ <property name="xalign">0</property> |
494 |
+ <property name="inconsistent">True</property> |
495 |
+ <property name="draw_indicator">True</property> |
496 |
+ </object> |
497 |
+ <packing> |
498 |
+ <property name="left_attach">0</property> |
499 |
+ <property name="top_attach">0</property> |
500 |
+ </packing> |
501 |
+ </child> |
502 |
+ <child> |
503 |
+ <object class="GtkCheckButton" id="TSB_AUTOGROW_HEIGHT"> |
504 |
+ <property name="label" translatable="yes">Fit h_eight to text</property> |
505 |
+ <property name="visible">True</property> |
506 |
+ <property name="can_focus">True</property> |
507 |
+ <property name="receives_default">False</property> |
508 |
+ <property name="use_underline">True</property> |
509 |
+ <property name="xalign">0</property> |
510 |
+ <property name="inconsistent">True</property> |
511 |
+ <property name="draw_indicator">True</property> |
512 |
+ </object> |
513 |
+ <packing> |
514 |
+ <property name="left_attach">0</property> |
515 |
+ <property name="top_attach">1</property> |
516 |
+ </packing> |
517 |
+ </child> |
518 |
+ <child> |
519 |
+ <object class="GtkCheckButton" id="TSB_FIT_TO_SIZE"> |
520 |
+ <property name="label" translatable="yes">_Fit to frame</property> |
521 |
+ <property name="visible">True</property> |
522 |
+ <property name="can_focus">True</property> |
523 |
+ <property name="receives_default">False</property> |
524 |
+ <property name="use_underline">True</property> |
525 |
+ <property name="xalign">0</property> |
526 |
+ <property name="inconsistent">True</property> |
527 |
+ <property name="draw_indicator">True</property> |
528 |
+ </object> |
529 |
+ <packing> |
530 |
+ <property name="left_attach">0</property> |
531 |
+ <property name="top_attach">2</property> |
532 |
+ </packing> |
533 |
+ </child> |
534 |
+ <child> |
535 |
+ <object class="GtkCheckButton" id="TSB_CONTOUR"> |
536 |
+ <property name="label" translatable="yes">_Adjust to contour</property> |
537 |
+ <property name="visible">True</property> |
538 |
+ <property name="can_focus">True</property> |
539 |
+ <property name="receives_default">False</property> |
540 |
+ <property name="use_underline">True</property> |
541 |
+ <property name="xalign">0</property> |
542 |
+ <property name="inconsistent">True</property> |
543 |
+ <property name="draw_indicator">True</property> |
544 |
+ </object> |
545 |
+ <packing> |
546 |
+ <property name="left_attach">0</property> |
547 |
+ <property name="top_attach">3</property> |
548 |
+ </packing> |
549 |
+ </child> |
550 |
</object> |
551 |
- <packing> |
552 |
- <property name="left_attach">1</property> |
553 |
- <property name="top_attach">0</property> |
554 |
- </packing> |
555 |
</child> |
556 |
+ </object> |
557 |
+ </child> |
558 |
+ <child type="label"> |
559 |
+ <object class="GtkLabel" id="label1"> |
560 |
+ <property name="visible">True</property> |
561 |
+ <property name="can_focus">False</property> |
562 |
+ <property name="label" translatable="yes">Drawing Object Text</property> |
563 |
+ <property name="xalign">0</property> |
564 |
+ <attributes> |
565 |
+ <attribute name="weight" value="bold"/> |
566 |
+ </attributes> |
567 |
+ </object> |
568 |
+ </child> |
569 |
+ </object> |
570 |
+ <packing> |
571 |
+ <property name="left_attach">0</property> |
572 |
+ <property name="top_attach">0</property> |
573 |
+ </packing> |
574 |
+ </child> |
575 |
+ <child> |
576 |
+ <object class="GtkFrame" id="customshapetext"> |
577 |
+ <property name="visible">True</property> |
578 |
+ <property name="can_focus">False</property> |
579 |
+ <property name="label_xalign">0</property> |
580 |
+ <property name="shadow_type">none</property> |
581 |
+ <child> |
582 |
+ <object class="GtkAlignment" id="alignment4"> |
583 |
+ <property name="visible">True</property> |
584 |
+ <property name="can_focus">False</property> |
585 |
+ <property name="top_padding">6</property> |
586 |
+ <property name="left_padding">12</property> |
587 |
<child> |
588 |
- <object class="GtkCheckButton" id="TSB_AUTOGROW_SIZE"> |
589 |
- <property name="label" translatable="yes">_Resize shape to fit text</property> |
590 |
+ <object class="GtkGrid" id="grid3"> |
591 |
<property name="visible">True</property> |
592 |
<property name="can_focus">False</property> |
593 |
- <property name="receives_default">False</property> |
594 |
- <property name="use_underline">True</property> |
595 |
- <property name="xalign">0</property> |
596 |
- <property name="inconsistent">True</property> |
597 |
- <property name="draw_indicator">True</property> |
598 |
+ <property name="row_spacing">6</property> |
599 |
+ <property name="column_spacing">12</property> |
600 |
+ <child> |
601 |
+ <object class="GtkCheckButton" id="TSB_WORDWRAP_TEXT"> |
602 |
+ <property name="label" translatable="yes">_Word wrap text in shape</property> |
603 |
+ <property name="visible">True</property> |
604 |
+ <property name="can_focus">True</property> |
605 |
+ <property name="receives_default">False</property> |
606 |
+ <property name="use_underline">True</property> |
607 |
+ <property name="xalign">0</property> |
608 |
+ <property name="inconsistent">True</property> |
609 |
+ <property name="draw_indicator">True</property> |
610 |
+ </object> |
611 |
+ <packing> |
612 |
+ <property name="left_attach">0</property> |
613 |
+ <property name="top_attach">0</property> |
614 |
+ </packing> |
615 |
+ </child> |
616 |
+ <child> |
617 |
+ <object class="GtkCheckButton" id="TSB_AUTOGROW_SIZE"> |
618 |
+ <property name="label" translatable="yes">_Resize shape to fit text</property> |
619 |
+ <property name="visible">True</property> |
620 |
+ <property name="can_focus">True</property> |
621 |
+ <property name="receives_default">False</property> |
622 |
+ <property name="use_underline">True</property> |
623 |
+ <property name="xalign">0</property> |
624 |
+ <property name="inconsistent">True</property> |
625 |
+ <property name="draw_indicator">True</property> |
626 |
+ </object> |
627 |
+ <packing> |
628 |
+ <property name="left_attach">0</property> |
629 |
+ <property name="top_attach">1</property> |
630 |
+ </packing> |
631 |
+ </child> |
632 |
+ <child> |
633 |
+ <placeholder/> |
634 |
+ </child> |
635 |
+ <child> |
636 |
+ <placeholder/> |
637 |
+ </child> |
638 |
</object> |
639 |
- <packing> |
640 |
- <property name="left_attach">1</property> |
641 |
- <property name="top_attach">1</property> |
642 |
- </packing> |
643 |
- </child> |
644 |
- <child> |
645 |
- <placeholder/> |
646 |
- </child> |
647 |
- <child> |
648 |
- <placeholder/> |
649 |
</child> |
650 |
</object> |
651 |
</child> |
652 |
+ <child type="label"> |
653 |
+ <object class="GtkLabel" id="label8"> |
654 |
+ <property name="visible">True</property> |
655 |
+ <property name="can_focus">False</property> |
656 |
+ <property name="label" translatable="yes">Custom Shape Text</property> |
657 |
+ <property name="xalign">0</property> |
658 |
+ <attributes> |
659 |
+ <attribute name="weight" value="bold"/> |
660 |
+ </attributes> |
661 |
+ </object> |
662 |
+ </child> |
663 |
</object> |
664 |
- </child> |
665 |
- <child type="label"> |
666 |
- <object class="GtkLabel" id="label1"> |
667 |
- <property name="visible">True</property> |
668 |
- <property name="can_focus">False</property> |
669 |
- <property name="xalign">0</property> |
670 |
- <property name="label" translatable="yes">Text</property> |
671 |
- <attributes> |
672 |
- <attribute name="weight" value="bold"/> |
673 |
- </attributes> |
674 |
- </object> |
675 |
+ <packing> |
676 |
+ <property name="left_attach">1</property> |
677 |
+ <property name="top_attach">0</property> |
678 |
+ </packing> |
679 |
</child> |
680 |
</object> |
681 |
<packing> |
682 |
@@ -184,10 +234,10 @@ |
683 |
<object class="GtkLabel" id="label4"> |
684 |
<property name="visible">True</property> |
685 |
<property name="can_focus">False</property> |
686 |
- <property name="xalign">0</property> |
687 |
<property name="label" translatable="yes">_Left:</property> |
688 |
<property name="use_underline">True</property> |
689 |
<property name="mnemonic_widget">MTR_FLD_LEFT:0.00cm</property> |
690 |
+ <property name="xalign">0</property> |
691 |
</object> |
692 |
<packing> |
693 |
<property name="left_attach">0</property> |
694 |
@@ -198,10 +248,10 @@ |
695 |
<object class="GtkLabel" id="label5"> |
696 |
<property name="visible">True</property> |
697 |
<property name="can_focus">False</property> |
698 |
- <property name="xalign">0</property> |
699 |
<property name="label" translatable="yes">_Right:</property> |
700 |
<property name="use_underline">True</property> |
701 |
<property name="mnemonic_widget">MTR_FLD_RIGHT:0.00cm</property> |
702 |
+ <property name="xalign">0</property> |
703 |
</object> |
704 |
<packing> |
705 |
<property name="left_attach">0</property> |
706 |
@@ -212,10 +262,10 @@ |
707 |
<object class="GtkLabel" id="label6"> |
708 |
<property name="visible">True</property> |
709 |
<property name="can_focus">False</property> |
710 |
- <property name="xalign">0</property> |
711 |
<property name="label" translatable="yes">_Top:</property> |
712 |
<property name="use_underline">True</property> |
713 |
<property name="mnemonic_widget">MTR_FLD_TOP:0.00cm</property> |
714 |
+ <property name="xalign">0</property> |
715 |
</object> |
716 |
<packing> |
717 |
<property name="left_attach">0</property> |
718 |
@@ -226,10 +276,10 @@ |
719 |
<object class="GtkLabel" id="label7"> |
720 |
<property name="visible">True</property> |
721 |
<property name="can_focus">False</property> |
722 |
- <property name="xalign">0</property> |
723 |
<property name="label" translatable="yes">_Bottom:</property> |
724 |
<property name="use_underline">True</property> |
725 |
<property name="mnemonic_widget">MTR_FLD_BOTTOM:0.00cm</property> |
726 |
+ <property name="xalign">0</property> |
727 |
</object> |
728 |
<packing> |
729 |
<property name="left_attach">0</property> |
730 |
@@ -296,8 +346,8 @@ |
731 |
<object class="GtkLabel" id="label2"> |
732 |
<property name="visible">True</property> |
733 |
<property name="can_focus">False</property> |
734 |
- <property name="xalign">0</property> |
735 |
<property name="label" translatable="yes">Spacing to Borders</property> |
736 |
+ <property name="xalign">0</property> |
737 |
<attributes> |
738 |
<attribute name="weight" value="bold"/> |
739 |
</attributes> |
740 |
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc |
741 |
index 1ec7daa..64333be 100644 |
742 |
--- a/include/svx/svxids.hrc |
743 |
+++ b/include/svx/svxids.hrc |
744 |
@@ -886,7 +886,7 @@ |
745 |
#define SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET ( SID_SVX_START + 1030 ) |
746 |
#define SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST ( SID_SVX_START + 1031 ) |
747 |
#define SID_SVXTABULATORTABPAGE_CONTROLFLAGS ( SID_SVX_START + 1032 ) |
748 |
-#define SID_SVXTEXTATTRPAGE_VIEW ( SID_SVX_START + 1033 ) |
749 |
+#define SID_SVXTEXTATTRPAGE_OBJKIND ( SID_SVX_START + 1033 ) |
750 |
#define SID_FLAG_TYPE ( SID_SVX_START + 1034 ) |
751 |
#define SID_SWMODE_TYPE ( SID_SVX_START + 1035 ) |
752 |
#define SID_DISABLE_CTL ( SID_SVX_START + 1036 ) |
753 |
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx |
754 |
index c341a2c..5d0d6d2 100644 |
755 |
--- a/sd/source/ui/dlg/prltempl.cxx |
756 |
+++ b/sd/source/ui/dlg/prltempl.cxx |
757 |
@@ -280,9 +280,14 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) |
758 |
} |
759 |
|
760 |
else if (nId == mnEffects) |
761 |
- { |
762 |
- rPage.PageCreated(aSet); |
763 |
- } |
764 |
+ { |
765 |
+ rPage.PageCreated(aSet); |
766 |
+ } |
767 |
+ else if (nId == mnTextAtt) |
768 |
+ { |
769 |
+ aSet.Put(CntUInt16Item(SID_SVXTEXTATTRPAGE_OBJKIND, OBJ_TEXT)); |
770 |
+ rPage.PageCreated(aSet); |
771 |
+ } |
772 |
} |
773 |
|
774 |
const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const |
775 |
diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx |
776 |
index 1189922..9a06ece 100644 |
777 |
--- a/sd/source/ui/dlg/tabtempl.cxx |
778 |
+++ b/sd/source/ui/dlg/tabtempl.cxx |
779 |
@@ -24,8 +24,10 @@ |
780 |
#include <svx/drawitem.hxx> |
781 |
#include <svl/intitem.hxx> |
782 |
#include <svx/ofaitem.hxx> |
783 |
-#include <svx/svxgrahicitem.hxx> |
784 |
+#include <svx/svdmark.hxx> |
785 |
#include <svx/svdmodel.hxx> |
786 |
+#include <svx/svdview.hxx> |
787 |
+#include <svx/svxgrahicitem.hxx> |
788 |
#include <svl/cjkoptions.hxx> |
789 |
|
790 |
#include <svx/dialogs.hrc> |
791 |
@@ -156,7 +158,6 @@ void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) |
792 |
} |
793 |
else if (nId == m_nTextId) |
794 |
{ |
795 |
- aSet.Put(OfaPtrItem(SID_SVXTEXTATTRPAGE_VIEW,pSdrView)); |
796 |
rPage.PageCreated(aSet); |
797 |
} |
798 |
else if (nId == m_nDimensionId) |
799 |
-- |
800 |
2.7.4 |
801 |
|