bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / misc / pggrid.cxx
blobf45804bc726b701d76bb3d5db11487e46ed570ff
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sfx2/app.hxx>
22 #include <cmdid.h>
23 #include <hintids.hxx>
24 #include <swtypes.hxx>
25 #include <globals.hrc>
26 #include <svx/xtable.hxx>
27 #include <uitool.hxx>
28 #include <editeng/sizeitem.hxx>
29 #include <editeng/lrspitem.hxx>
30 #include <editeng/ulspitem.hxx>
31 #include <editeng/boxitem.hxx>
32 #include <editeng/frmdiritem.hxx>
33 #include <svx/ruler.hxx>
34 #include <pggrid.hxx>
35 #include <tgrditem.hxx>
37 #include "wrtsh.hxx"
38 #include "doc.hxx"
39 #include "uiitems.hxx"
40 #include "swmodule.hxx"
41 #include "view.hxx"
43 SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) :
44 SfxTabPage(pParent, "TextGridPage", "modules/swriter/ui/textgridpage.ui", rSet),
45 m_nRubyUserValue(0),
46 m_bRubyUserValue(sal_False),
47 m_aPageSize(MM50, MM50),
48 m_bVertical(false),
49 m_bSquaredMode(sal_False),
50 m_bHRulerChanged( sal_False ),
51 m_bVRulerChanged( sal_False )
53 get(m_pNoGridRB,"radioRB_NOGRID");
54 get(m_pLinesGridRB,"radioRB_LINESGRID");
55 get(m_pCharsGridRB,"radioRB_CHARSGRID");
56 get(m_pSnapToCharsCB,"checkCB_SNAPTOCHARS");
58 get(m_pExampleWN,"drawingareaWN_EXAMPLE");
59 get(m_pLayoutFL,"frameFL_LAYOUT");
61 get(m_pLinesPerPageNF,"spinNF_LINESPERPAGE");
62 get(m_pLinesRangeFT,"labelFT_LINERANGE");
64 get(m_pTextSizeMF,"spinMF_TEXTSIZE");
65 get(m_pCharsPerLineFT,"labelFT_CHARSPERLINE");
66 get(m_pCharsPerLineNF,"spinNF_CHARSPERLINE");
67 get(m_pCharsRangeFT,"labelFT_CHARRANGE");
68 get(m_pCharWidthFT,"labelFT_CHARWIDTH");
69 get(m_pCharWidthMF,"spinMF_CHARWIDTH");
70 get(m_pRubySizeFT,"labelFT_RUBYSIZE");
71 get(m_pRubySizeMF,"spinMF_RUBYSIZE");
72 get(m_pRubyBelowCB,"checkCB_RUBYBELOW");
74 get(m_pDisplayFL,"frameFL_DISPLAY");
75 get(m_pDisplayCB,"checkCB_DISPLAY");
76 get(m_pPrintCB,"checkCB_PRINT");
77 get(m_pColorLB,"listLB_COLOR");
79 Link aLink = LINK(this, SwTextGridPage, CharorLineChangedHdl);
80 m_pCharsPerLineNF->SetUpHdl(aLink);
81 m_pCharsPerLineNF->SetDownHdl(aLink);
82 m_pCharsPerLineNF->SetLoseFocusHdl(aLink);
83 m_pLinesPerPageNF->SetUpHdl(aLink);
84 m_pLinesPerPageNF->SetDownHdl(aLink);
85 m_pLinesPerPageNF->SetLoseFocusHdl(aLink);
87 Link aSizeLink = LINK(this, SwTextGridPage, TextSizeChangedHdl);
88 m_pTextSizeMF->SetUpHdl(aSizeLink);
89 m_pTextSizeMF->SetDownHdl(aSizeLink);
90 m_pTextSizeMF->SetLoseFocusHdl(aSizeLink);
91 m_pRubySizeMF->SetUpHdl(aSizeLink);
92 m_pRubySizeMF->SetDownHdl(aSizeLink);
93 m_pRubySizeMF->SetLoseFocusHdl(aSizeLink);
94 m_pCharWidthMF->SetUpHdl(aSizeLink);
95 m_pCharWidthMF->SetDownHdl(aSizeLink);
96 m_pCharWidthMF->SetLoseFocusHdl(aSizeLink);
98 Link aGridTypeHdl = LINK(this, SwTextGridPage, GridTypeHdl);
99 m_pNoGridRB->SetClickHdl(aGridTypeHdl);
100 m_pLinesGridRB->SetClickHdl(aGridTypeHdl);
101 m_pCharsGridRB->SetClickHdl(aGridTypeHdl);
103 Link aModifyLk = LINK(this, SwTextGridPage, GridModifyHdl);
104 m_pColorLB->SetSelectHdl(aModifyLk);
105 m_pPrintCB->SetClickHdl(aModifyLk);
106 m_pRubyBelowCB->SetClickHdl(aModifyLk);
108 m_pDisplayCB->SetClickHdl(LINK(this, SwTextGridPage, DisplayGridHdl));
110 XColorListRef pColorLst = XColorList::GetStdColorList();
111 m_pColorLB->InsertAutomaticEntryColor( Color( COL_AUTO ) );
112 for( sal_uInt16 i = 0; i < pColorLst->Count(); ++i )
114 XColorEntry* pEntry = pColorLst->GetColor( i );
115 Color aColor = pEntry->GetColor();
116 String sName = pEntry->GetName();
117 m_pColorLB->InsertEntry( aColor, sName );
119 m_pColorLB->SetUpdateMode( sal_True );
120 //Get the default paper mode
121 SwView *pView = ::GetActiveView();
122 if( pView )
124 SwWrtShell* pSh = pView->GetWrtShellPtr();
125 if( pSh )
127 m_bSquaredMode = pSh->GetDoc()->IsSquaredPageMode();
130 if( m_bSquaredMode )
133 m_pRubySizeFT->Show();
134 m_pRubySizeMF->Show();
135 m_pRubyBelowCB->Show();
136 m_pSnapToCharsCB->Hide();
137 m_pCharWidthFT->Hide();
138 m_pCharWidthMF->Hide();
140 else
142 m_pRubySizeFT->Hide();
143 m_pRubySizeMF->Hide();
144 m_pRubyBelowCB->Hide();
145 m_pSnapToCharsCB->Show();
146 m_pCharWidthFT->Show();
147 m_pCharWidthMF->Show();
151 SwTextGridPage::~SwTextGridPage()
155 SfxTabPage *SwTextGridPage::Create(Window *pParent, const SfxItemSet &rSet)
157 return new SwTextGridPage(pParent, rSet);
160 sal_Bool SwTextGridPage::FillItemSet(SfxItemSet &rSet)
162 sal_Bool bRet = sal_False;
163 if(m_pNoGridRB->GetSavedValue() != m_pNoGridRB->IsChecked()||
164 m_pLinesGridRB->GetSavedValue() != m_pLinesGridRB->IsChecked()||
165 m_pLinesPerPageNF->GetSavedValue().toInt32()
166 != m_pLinesPerPageNF->GetValue()||
167 m_pTextSizeMF->GetSavedValue().toInt32() != m_pTextSizeMF->GetValue()||
168 m_pCharsPerLineNF->GetSavedValue().toInt32()
169 != m_pCharsPerLineNF->GetValue()||
170 m_pSnapToCharsCB->GetSavedValue() != m_pSnapToCharsCB->IsChecked() ||
171 m_pRubySizeMF->GetSavedValue().toInt32() != m_pRubySizeMF->GetValue()||
172 m_pCharWidthMF->GetSavedValue().toInt32() != m_pCharWidthMF->GetValue()||
173 m_pRubyBelowCB->GetSavedValue() != m_pRubyBelowCB->IsChecked()||
174 m_pDisplayCB->GetSavedValue() != m_pDisplayCB->IsChecked()||
175 m_pPrintCB->GetSavedValue() != m_pPrintCB->IsChecked()||
176 m_pColorLB->GetSavedValue() != m_pColorLB->GetSelectEntryPos())
178 PutGridItem(rSet);
179 bRet = sal_True;
182 // draw ticks of ruler
183 SwView * pView = ::GetActiveView();
184 if ( m_bHRulerChanged )
185 pView->GetHRuler().DrawTicks();
186 if ( m_bVRulerChanged )
187 pView->GetVRuler().DrawTicks();
188 return bRet;
191 void SwTextGridPage::Reset(const SfxItemSet &rSet)
193 if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(RES_TEXTGRID, sal_True))
195 const SwTextGridItem& rGridItem = (const SwTextGridItem&)rSet.Get(RES_TEXTGRID);
196 RadioButton* pButton = 0;
197 switch(rGridItem.GetGridType())
199 case GRID_NONE : pButton = m_pNoGridRB; break;
200 case GRID_LINES_ONLY : pButton = m_pLinesGridRB; break;
201 default: pButton = m_pCharsGridRB;
203 pButton->Check();
204 m_pDisplayCB->Check(rGridItem.IsDisplayGrid());
205 GridTypeHdl(pButton);
206 m_pSnapToCharsCB->Check(rGridItem.IsSnapToChars());
207 m_pLinesPerPageNF->SetValue(rGridItem.GetLines());
208 SetLinesOrCharsRanges( *m_pLinesRangeFT , m_pLinesPerPageNF->GetMax() );
209 m_nRubyUserValue = rGridItem.GetBaseHeight();
210 m_bRubyUserValue = sal_True;
211 m_pTextSizeMF->SetValue(m_pTextSizeMF->Normalize(m_nRubyUserValue), FUNIT_TWIP);
212 m_pRubySizeMF->SetValue(m_pRubySizeMF->Normalize(rGridItem.GetRubyHeight()), FUNIT_TWIP);
213 m_pCharWidthMF->SetValue(m_pCharWidthMF->Normalize(rGridItem.GetBaseWidth()), FUNIT_TWIP);
214 m_pRubyBelowCB->Check(rGridItem.IsRubyTextBelow());
215 m_pPrintCB->Check(rGridItem.IsPrintGrid());
216 m_pColorLB->SelectEntry(rGridItem.GetColor());
218 UpdatePageSize(rSet);
220 m_pNoGridRB->SaveValue();
221 m_pLinesGridRB->SaveValue();
222 m_pSnapToCharsCB->SaveValue();
223 m_pLinesPerPageNF->SaveValue();
224 m_pTextSizeMF->SaveValue();
225 m_pCharsPerLineNF->SaveValue();
226 m_pRubySizeMF->SaveValue();
227 m_pCharWidthMF->SaveValue();
228 m_pRubyBelowCB->SaveValue();
229 m_pDisplayCB->SaveValue();
230 m_pPrintCB->SaveValue();
231 m_pColorLB->SaveValue();
234 void SwTextGridPage::ActivatePage( const SfxItemSet& rSet )
236 m_pExampleWN->Hide();
237 m_pExampleWN->UpdateExample( rSet );
238 UpdatePageSize(rSet);
239 m_pExampleWN->Show();
240 m_pExampleWN->Invalidate();
243 int SwTextGridPage::DeactivatePage( SfxItemSet* )
245 return LEAVE_PAGE;
248 void SwTextGridPage::PutGridItem(SfxItemSet& rSet)
250 SwTextGridItem aGridItem;
251 aGridItem.SetGridType(m_pNoGridRB->IsChecked() ? GRID_NONE :
252 m_pLinesGridRB->IsChecked() ? GRID_LINES_ONLY : GRID_LINES_CHARS );
253 aGridItem.SetSnapToChars(m_pSnapToCharsCB->IsChecked());
254 aGridItem.SetLines( static_cast< sal_uInt16 >(m_pLinesPerPageNF->GetValue()) );
255 aGridItem.SetBaseHeight( static_cast< sal_uInt16 >(
256 m_bRubyUserValue ? m_nRubyUserValue :
257 m_pTextSizeMF->Denormalize(m_pTextSizeMF->GetValue(FUNIT_TWIP))) );
258 aGridItem.SetRubyHeight( static_cast< sal_uInt16 >(m_pRubySizeMF->Denormalize(m_pRubySizeMF->GetValue(FUNIT_TWIP))) );
259 aGridItem.SetBaseWidth( static_cast< sal_uInt16 >(m_pCharWidthMF->Denormalize(m_pCharWidthMF->GetValue(FUNIT_TWIP))) );
260 aGridItem.SetRubyTextBelow(m_pRubyBelowCB->IsChecked());
261 aGridItem.SetSquaredMode(m_bSquaredMode);
262 aGridItem.SetDisplayGrid(m_pDisplayCB->IsChecked());
263 aGridItem.SetPrintGrid(m_pPrintCB->IsChecked());
264 aGridItem.SetColor(m_pColorLB->GetSelectEntryColor());
265 rSet.Put(aGridItem);
267 SwView * pView = ::GetActiveView();
268 if ( aGridItem.GetGridType() != GRID_NONE )
270 if ( aGridItem.GetGridType() == GRID_LINES_CHARS )
272 m_bHRulerChanged = sal_True;
274 m_bVRulerChanged = sal_True;
275 pView->GetHRuler().SetCharWidth((long)(m_pCharWidthMF->GetValue(FUNIT_TWIP)/56.7));
276 pView->GetVRuler().SetLineHeight((long)(m_pTextSizeMF->GetValue(FUNIT_TWIP)/56.7));
280 void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
282 if( SFX_ITEM_UNKNOWN != rSet.GetItemState( RES_FRAMEDIR, sal_True ))
284 const SvxFrameDirectionItem& rDirItem =
285 (const SvxFrameDirectionItem&)rSet.Get(RES_FRAMEDIR);
286 m_bVertical = rDirItem.GetValue() == FRMDIR_VERT_TOP_RIGHT||
287 rDirItem.GetValue() == FRMDIR_VERT_TOP_LEFT;
290 if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE ))
292 const SvxSizeItem& rSize = (const SvxSizeItem&)rSet.Get(
293 SID_ATTR_PAGE_SIZE);
294 const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)rSet.Get(
295 RES_LR_SPACE );
296 const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)rSet.Get(
297 RES_UL_SPACE );
298 const SvxBoxItem& rBox = (const SvxBoxItem&) rSet.Get(RES_BOX);
299 sal_Int32 nDistanceLR = rLRSpace.GetLeft() + rLRSpace.GetRight();
300 sal_Int32 nDistanceUL = rULSpace.GetUpper() + rULSpace.GetLower();
302 sal_Int32 nValue1 = rSize.GetSize().Height() - nDistanceUL -
303 rBox.GetDistance(BOX_LINE_TOP) -
304 rBox.GetDistance(BOX_LINE_BOTTOM);
305 sal_Int32 nValue2 = rSize.GetSize().Width() - nDistanceLR -
306 rBox.GetDistance(BOX_LINE_LEFT) -
307 rBox.GetDistance(BOX_LINE_RIGHT);
308 if(m_bVertical)
310 m_aPageSize.Width() = nValue1;
311 m_aPageSize.Height() = nValue2;
313 else
315 m_aPageSize.Width() = nValue2;
316 m_aPageSize.Height() = nValue1;
319 sal_Int32 nTextSize = static_cast< sal_Int32 >(m_bRubyUserValue ?
320 m_nRubyUserValue :
321 m_pTextSizeMF->Denormalize(m_pTextSizeMF->GetValue(FUNIT_TWIP)));
323 if ( m_bSquaredMode )
325 m_pCharsPerLineNF->SetValue(m_aPageSize.Width() / nTextSize);
326 m_pCharsPerLineNF->SetMax( m_pCharsPerLineNF->GetValue() );
327 m_pLinesPerPageNF->SetMax( m_aPageSize.Height() /
328 ( m_pTextSizeMF->Denormalize(m_pTextSizeMF->GetValue(FUNIT_TWIP)) +
329 m_pRubySizeMF->Denormalize(m_pRubySizeMF->GetValue(FUNIT_TWIP))));
330 SetLinesOrCharsRanges( *m_pCharsRangeFT , m_pCharsPerLineNF->GetMax() );
331 SetLinesOrCharsRanges( *m_pLinesRangeFT , m_pLinesPerPageNF->GetMax() );
333 else
335 sal_Int32 nTextWidth = static_cast< sal_Int32 >(m_pCharWidthMF->Denormalize(m_pCharWidthMF->GetValue(FUNIT_TWIP)));
336 m_pLinesPerPageNF->SetValue(m_aPageSize.Height() / nTextSize);
337 if (nTextWidth)
338 m_pCharsPerLineNF->SetValue(m_aPageSize.Width() / nTextWidth);
339 else
340 m_pCharsPerLineNF->SetValue( 45 );
341 SetLinesOrCharsRanges( *m_pCharsRangeFT , m_pCharsPerLineNF->GetMax() );
342 SetLinesOrCharsRanges( *m_pLinesRangeFT , m_pLinesPerPageNF->GetMax() );
347 void SwTextGridPage::SetLinesOrCharsRanges(FixedText & rField, const sal_Int32 nValue )
349 OUString aFieldStr("( 1 -");
350 aFieldStr += OUString::number(nValue);
351 aFieldStr += " )";
352 rField.SetText( aFieldStr );
355 sal_uInt16* SwTextGridPage::GetRanges()
357 static sal_uInt16 aPageRg[] = {
358 RES_TEXTGRID, RES_TEXTGRID,
360 return aPageRg;
363 IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, SpinField*, pField)
365 //if in squared mode
366 if ( m_bSquaredMode )
368 if(m_pCharsPerLineNF == pField)
370 long nWidth = (long)(m_aPageSize.Width() / m_pCharsPerLineNF->GetValue());
371 m_pTextSizeMF->SetValue(m_pTextSizeMF->Normalize(nWidth), FUNIT_TWIP);
372 //prevent rounding errors in the MetricField by saving the used value
373 m_nRubyUserValue = nWidth;
374 m_bRubyUserValue = sal_True;
377 //set maximum line per page
379 sal_Int32 nMaxLines = static_cast< sal_Int32 >(m_aPageSize.Height() /
380 ( m_pTextSizeMF->Denormalize(m_pTextSizeMF->GetValue(FUNIT_TWIP)) +
381 m_pRubySizeMF->Denormalize(m_pRubySizeMF->GetValue(FUNIT_TWIP))));
382 m_pLinesPerPageNF->SetMax(nMaxLines);
384 SetLinesOrCharsRanges( *m_pLinesRangeFT , m_pLinesPerPageNF->GetMax() );
385 SetLinesOrCharsRanges( *m_pCharsRangeFT , m_pCharsPerLineNF->GetMax() );
387 else//in normal mode
389 if(m_pLinesPerPageNF == pField)
391 long nHeight = static_cast< sal_Int32 >(m_aPageSize.Height() / m_pLinesPerPageNF->GetValue());
392 m_pTextSizeMF->SetValue(m_pTextSizeMF->Normalize(nHeight), FUNIT_TWIP);
393 m_pRubySizeMF->SetValue(0, FUNIT_TWIP);
394 SetLinesOrCharsRanges( *m_pLinesRangeFT , m_pLinesPerPageNF->GetMax() );
396 m_nRubyUserValue = nHeight;
397 m_bRubyUserValue = sal_True;
399 else if (m_pCharsPerLineNF == pField)
401 long nWidth = static_cast< sal_Int32 >(m_aPageSize.Width() / m_pCharsPerLineNF->GetValue());
402 m_pCharWidthMF->SetValue(m_pCharWidthMF->Normalize(nWidth), FUNIT_TWIP);
403 SetLinesOrCharsRanges( *m_pCharsRangeFT , m_pCharsPerLineNF->GetMax() );
406 GridModifyHdl(0);
407 return 0;
410 IMPL_LINK(SwTextGridPage, TextSizeChangedHdl, SpinField*, pField)
412 //if in squared mode
413 if( m_bSquaredMode )
415 if (m_pTextSizeMF == pField)
417 m_bRubyUserValue = sal_False;
419 // fdo#50941: set maximum characters per line
420 sal_Int32 nTextSize = static_cast< sal_Int32 >(m_pTextSizeMF->Denormalize(m_pTextSizeMF->GetValue(FUNIT_TWIP)));
421 if (nTextSize > 0)
423 sal_Int32 nMaxChars = m_aPageSize.Width() / nTextSize;
424 m_pCharsPerLineNF->SetValue(nMaxChars);
425 m_pCharsPerLineNF->SetMax(nMaxChars);
426 SetLinesOrCharsRanges( *m_pCharsRangeFT , m_pCharsPerLineNF->GetMax() );
429 //set maximum line per page
431 sal_Int32 nMaxLines = static_cast< sal_Int32 >(m_aPageSize.Height() /
432 ( m_pTextSizeMF->Denormalize(m_pTextSizeMF->GetValue(FUNIT_TWIP)) +
433 m_pRubySizeMF->Denormalize(m_pRubySizeMF->GetValue(FUNIT_TWIP))));
434 m_pLinesPerPageNF->SetMax(nMaxLines);
435 SetLinesOrCharsRanges( *m_pLinesRangeFT , m_pLinesPerPageNF->GetMax() );
438 else
440 if (m_pTextSizeMF == pField)
442 sal_Int32 nTextSize = static_cast< sal_Int32 >(m_pTextSizeMF->Denormalize(m_pTextSizeMF->GetValue(FUNIT_TWIP)));
443 m_pLinesPerPageNF->SetValue(m_aPageSize.Height() / nTextSize);
444 m_bRubyUserValue = sal_False;
445 SetLinesOrCharsRanges( *m_pLinesRangeFT , m_pLinesPerPageNF->GetMax() );
447 else if (m_pCharWidthMF == pField)
449 sal_Int32 nTextWidth = static_cast< sal_Int32 >(m_pCharWidthMF->Denormalize(m_pCharWidthMF->GetValue(FUNIT_TWIP)));
450 sal_Int32 nMaxChar = 45 ;
451 if (nTextWidth)
452 nMaxChar = m_aPageSize.Width() / nTextWidth;
453 m_pCharsPerLineNF->SetValue( nMaxChar );
454 SetLinesOrCharsRanges( *m_pCharsRangeFT , m_pCharsPerLineNF->GetMax() );
456 //rubySize is disabled
458 GridModifyHdl(0);
459 return 0;
462 IMPL_LINK(SwTextGridPage, GridTypeHdl, RadioButton*, pButton)
464 sal_Bool bEnable = m_pNoGridRB != pButton;
465 m_pLayoutFL->Enable(bEnable);
466 m_pDisplayFL->Enable(bEnable);
468 //one special case
469 if(bEnable)
470 DisplayGridHdl(m_pDisplayCB);
472 bEnable = m_pCharsGridRB == pButton;
473 m_pSnapToCharsCB->Enable(bEnable);
475 bEnable = m_pLinesGridRB == pButton;
476 if(bEnable && !m_bSquaredMode )
478 m_pCharsPerLineFT->Enable(sal_False);
479 m_pCharsPerLineNF->Enable(sal_False);
480 m_pCharsRangeFT->Enable(sal_False);
481 m_pCharWidthFT->Enable(sal_False);
482 m_pCharWidthMF->Enable(sal_False);
485 GridModifyHdl(0);
486 return 0;
489 IMPL_LINK_NOARG(SwTextGridPage, DisplayGridHdl)
491 sal_Bool bChecked = m_pDisplayCB->IsChecked();
492 m_pPrintCB->Enable(bChecked);
493 m_pPrintCB->Check(bChecked);
494 return 0;
497 IMPL_LINK_NOARG(SwTextGridPage, GridModifyHdl)
499 const SfxItemSet& rOldSet = GetItemSet();
500 SfxItemSet aSet(rOldSet);
501 const SfxItemSet* pExSet = GetTabDialog()->GetExampleSet();
502 if(pExSet)
503 aSet.Put(*pExSet);
504 PutGridItem(aSet);
505 m_pExampleWN->UpdateExample(aSet);
506 return 0;
509 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */