Update ooo320-m1
[ooovba.git] / sw / source / ui / config / optpage.cxx
blobe96e4340853c1e017eff8ec6a49c1b511129d2d4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: optpage.cxx,v $
10 * $Revision: 1.61 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sw.hxx"
33 #ifdef SW_DLLIMPLEMENTATION
34 #undef SW_DLLIMPLEMENTATION
35 #endif
38 #include <hintids.hxx>
39 #ifndef _CMDID_H
40 #include <cmdid.h>
41 #endif
42 #include <vcl/svapp.hxx>
43 #ifndef _SVSTDARR_HXX
44 #define _SVSTDARR_STRINGSDTOR
45 #include <svtools/svstdarr.hxx>
46 #endif
47 #include <svtools/cjkoptions.hxx>
48 #include <svtools/ctrltool.hxx>
49 #include <svtools/eitem.hxx>
50 #include <svx/htmlmode.hxx>
51 #include <sfx2/printer.hxx>
52 #include <sfx2/bindings.hxx>
53 #include <svx/xtable.hxx>
54 #include <svx/fhgtitem.hxx>
55 #include <svx/fontitem.hxx>
56 #include <svx/langitem.hxx>
57 #include <svx/dlgutil.hxx>
58 #include <fmtcol.hxx>
59 #include <charatr.hxx>
60 #include <swtypes.hxx>
61 #ifndef _VIEW_HXX
62 #include <view.hxx>
63 #endif
64 #ifndef _DOCSH_HXX
65 #include <docsh.hxx>
66 #endif
67 #ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
68 #include <IDocumentDeviceAccess.hxx>
69 #endif
70 #include <swmodule.hxx>
71 #include <wrtsh.hxx>
72 #include <uitool.hxx>
73 #include <cfgitems.hxx> //Items fuer Sw-Seiten
74 #include <poolfmt.hxx>
75 #include <uiitems.hxx>
76 #include <initui.hxx>
77 #include <optpage.hxx>
78 #include <swprtopt.hxx>
79 #ifndef _MODCFG_HXX
80 #include <modcfg.hxx>
81 #endif
82 #ifndef _SRCVIEW_HXX
83 #include <srcview.hxx>
84 #endif
85 #include <crstate.hxx>
86 #include <viewopt.hxx>
87 #ifndef _GLOBALS_HRC
88 #include <globals.hrc>
89 #endif
90 #ifndef _CONFIG_HRC
91 #include <config.hrc>
92 #endif
93 #ifndef _REDLOPT_HRC
94 #include <redlopt.hrc>
95 #endif
96 #ifndef _OPTDLG_HRC
97 #include <optdlg.hrc>
98 #endif
99 #include <svx/strarray.hxx>
100 #include <svtools/slstitm.hxx>
101 #include <sfx2/request.hxx>
102 #include <swwrtshitem.hxx>
103 #include <svtools/ctloptions.hxx>
105 #include <unomid.h>
108 using namespace ::com::sun::star;
111 /*******************************************************
112 ******************************************************/
114 /*-----------------31.08.96 10.16-------------------
115 TabPage Anzeige/Inhalt
116 --------------------------------------------------*/
118 SwContentOptPage::SwContentOptPage( Window* pParent,
119 const SfxItemSet& rCoreSet ) :
120 SfxTabPage( pParent, SW_RES( TP_CONTENT_OPT ), rCoreSet ),
121 aLineFL ( this, SW_RES( FL_LINE ) ),
122 aCrossCB ( this, SW_RES( CB_CROSS ) ),
123 aSolidHandleCB( this, SW_RES( CB_HANDLE ) ),
124 aBigHandleCB ( this, SW_RES( CB_BIGHANDLE) ),
126 aWindowFL ( this, SW_RES( FL_WINDOW ) ),
127 aHScrollBox ( this, SW_RES( CB_HSCROLL ) ),
128 aVScrollBox ( this, SW_RES( CB_VSCROLL ) ),
129 aAnyRulerCB ( this, SW_RES( CB_ANY_RULER ) ),
130 aHRulerCBox ( this, SW_RES( CB_HRULER ) ),
131 aHMetric ( this, SW_RES( LB_HMETRIC ) ),
132 aVRulerCBox ( this, SW_RES( CB_VRULER ) ),
133 aVRulerRightCBox( this, SW_RES( CB_VRULER_RIGHT ) ),
134 aVMetric ( this, SW_RES( LB_VMETRIC ) ),
135 aSmoothCBox ( this, SW_RES( CB_SMOOTH_SCROLL ) ),
137 aDispFL ( this, SW_RES( FL_DISP ) ),
138 aGrfCB ( this, SW_RES( CB_GRF ) ),
139 aTblCB ( this, SW_RES( CB_TBL ) ),
140 aDrwCB ( this, SW_RES( CB_DRWFAST ) ),
141 aFldNameCB ( this, SW_RES( CB_FIELD ) ),
142 aPostItCB ( this, SW_RES( CB_POSTIT ) ),
144 aSettingsFL ( this, SW_RES( FL_SETTINGS ) ),
145 aMetricFT ( this, SW_RES( FT_METRIC ) ),
146 aMetricLB ( this, SW_RES( LB_METRIC ) )
148 FreeResource();
149 const SfxPoolItem* pItem;
150 if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
151 && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
153 aMetricLB.Show();
154 aSettingsFL.Show();
155 aMetricFT.Show();
157 SvtCJKOptions aCJKOptions;
158 if(aCJKOptions.IsVerticalTextEnabled() )
160 Point aSmoothPos(aSmoothCBox.GetPosPixel());
161 aSmoothPos.Y() += aSmoothPos.Y() - aVRulerCBox.GetPosPixel().Y();
162 aSmoothCBox.SetPosPixel(aSmoothPos);
164 else
165 aVRulerRightCBox.Hide();
166 aVRulerCBox.SetClickHdl(LINK(this, SwContentOptPage, VertRulerHdl ));
167 aAnyRulerCB.SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl));
169 SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
170 for ( USHORT i = 0; i < aMetricArr.Count(); ++i )
172 String sMetric = aMetricArr.GetStringByPos( i );
173 FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i );
175 switch ( eFUnit )
177 case FUNIT_MM:
178 case FUNIT_CM:
179 case FUNIT_POINT:
180 case FUNIT_PICA:
181 case FUNIT_INCH:
182 case FUNIT_CHAR: // add two units , 'character' and 'line' , their ticks are not fixed
183 case FUNIT_LINE:
185 // nur diese Metriken benutzen
186 // a horizontal ruler has not the 'line' unit
187 // there isn't 'line' unit in HTML format
188 if ( eFUnit != FUNIT_LINE )
190 USHORT nPos = aMetricLB.InsertEntry( sMetric );
191 aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
192 aHMetric.InsertEntry( sMetric );
193 aHMetric.SetEntryData( nPos, (void*)(long)eFUnit );
195 // a vetical ruler has not the 'character' unit
196 if ( eFUnit != FUNIT_CHAR )
198 USHORT nPos = aVMetric.InsertEntry( sMetric );
199 aVMetric.SetEntryData( nPos, (void*)(long)eFUnit );
202 default:;//prevent warning
207 /*-----------------31.08.96 13.58-------------------
209 --------------------------------------------------*/
210 SwContentOptPage::~SwContentOptPage()
214 /*-----------------31.08.96 13.58-------------------
216 --------------------------------------------------*/
217 SfxTabPage* SwContentOptPage::Create( Window* pParent,
218 const SfxItemSet& rAttrSet)
220 return new SwContentOptPage(pParent, rAttrSet);
222 /* -----------------------------07.04.01 16:57--------------------------------
224 ---------------------------------------------------------------------------*/
225 static void lcl_SelectMetricLB(ListBox& rMetric, USHORT nSID, const SfxItemSet& rSet)
227 const SfxPoolItem* pItem;
228 if( rSet.GetItemState( nSID, FALSE, &pItem ) >= SFX_ITEM_AVAILABLE )
230 FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue();
231 for ( USHORT i = 0; i < rMetric.GetEntryCount(); ++i )
233 if ( (int)(sal_IntPtr)rMetric.GetEntryData( i ) == (int)eFieldUnit )
235 rMetric.SelectEntryPos( i );
236 break;
240 rMetric.SaveValue();
242 /*-----------------31.08.96 13.58-------------------
244 --------------------------------------------------*/
245 void SwContentOptPage::Reset(const SfxItemSet& rSet)
247 const SwElemItem* pElemAttr = 0;
249 rSet.GetItemState( FN_PARAM_ELEM , FALSE,
250 (const SfxPoolItem**)&pElemAttr );
251 if(pElemAttr)
253 aTblCB .Check (pElemAttr->bTable );
254 aGrfCB .Check (pElemAttr->bGraphic );
255 aDrwCB .Check (pElemAttr->bDrawing );
256 aFldNameCB .Check (pElemAttr->bFieldName );
257 aPostItCB .Check (pElemAttr->bNotes );
258 aCrossCB .Check( pElemAttr->bCrosshair );
259 aSolidHandleCB.Check( !pElemAttr->bHandles );
260 aBigHandleCB.Check(pElemAttr->bBigHandles );
261 aHScrollBox.Check( pElemAttr->bHorzScrollbar );
262 aVScrollBox.Check( pElemAttr->bVertScrollbar );
263 aAnyRulerCB.Check( pElemAttr->bAnyRuler );
264 aHRulerCBox.Check( pElemAttr->bHorzRuler );
265 aVRulerCBox.Check( pElemAttr->bVertRuler );
266 aVRulerRightCBox.Check(pElemAttr->bVertRulerRight);
267 aSmoothCBox.Check( pElemAttr->bSmoothScroll );
269 aMetricLB.SetNoSelection();
270 lcl_SelectMetricLB(aMetricLB, SID_ATTR_METRIC, rSet);
271 lcl_SelectMetricLB(aHMetric, FN_HSCROLL_METRIC, rSet);
272 lcl_SelectMetricLB(aVMetric, FN_VSCROLL_METRIC, rSet);
273 AnyRulerHdl(&aAnyRulerCB);
276 /*-----------------31.08.96 13.58-------------------
278 --------------------------------------------------*/
279 BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet)
281 const SwElemItem* pOldAttr = (const SwElemItem*)
282 GetOldItem(GetItemSet(), FN_PARAM_ELEM);
284 SwElemItem aElem;
285 if(pOldAttr)
286 aElem = *pOldAttr;
287 aElem.bTable = aTblCB .IsChecked();
288 aElem.bGraphic = aGrfCB .IsChecked();
289 aElem.bDrawing = aDrwCB .IsChecked();
290 aElem.bFieldName = aFldNameCB .IsChecked();
291 aElem.bNotes = aPostItCB .IsChecked();
292 aElem.bCrosshair = aCrossCB .IsChecked();
293 aElem.bHandles = !aSolidHandleCB.IsChecked();
294 aElem.bBigHandles = aBigHandleCB.IsChecked();
295 aElem.bHorzScrollbar = aHScrollBox.IsChecked();
296 aElem.bVertScrollbar = aVScrollBox.IsChecked();
297 aElem.bAnyRuler = aAnyRulerCB.IsChecked();
298 aElem.bHorzRuler = aHRulerCBox.IsChecked();
299 aElem.bVertRuler = aVRulerCBox.IsChecked();
300 aElem.bVertRulerRight= aVRulerRightCBox.IsChecked();
301 aElem.bSmoothScroll = aSmoothCBox.IsChecked();
304 BOOL bRet = !pOldAttr || aElem != *pOldAttr;
305 if(bRet)
306 bRet = 0 != rSet.Put(aElem);
307 USHORT nMPos = aMetricLB.GetSelectEntryPos();
308 USHORT nGlobalMetricPos = nMPos;
309 if ( nMPos != aMetricLB.GetSavedValue() )
311 // Doppel-Cast fuer VA3.0
312 USHORT nFieldUnit = (USHORT)(long)aMetricLB.GetEntryData( nMPos );
313 rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nFieldUnit ) );
314 bRet = TRUE;
317 nMPos = aHMetric.GetSelectEntryPos();
318 if ( nMPos != aHMetric.GetSavedValue() || nMPos != nGlobalMetricPos )
320 // Doppel-Cast fuer VA3.0
321 USHORT nFieldUnit = (USHORT)(long)aHMetric.GetEntryData( nMPos );
322 rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (UINT16)nFieldUnit ) );
323 bRet = TRUE;
325 nMPos = aVMetric.GetSelectEntryPos();
326 if ( nMPos != aVMetric.GetSavedValue() || nMPos != nGlobalMetricPos )
328 // Doppel-Cast fuer VA3.0
329 USHORT nFieldUnit = (USHORT)(long)aVMetric.GetEntryData( nMPos );
330 rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (UINT16)nFieldUnit ) );
331 bRet = TRUE;
333 return bRet;
335 /* -----------------------------05.03.2002 15:07------------------------------
337 ---------------------------------------------------------------------------*/
338 IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox)
340 aVRulerRightCBox.Enable(pBox->IsEnabled() && pBox->IsChecked());
341 return 0;
343 /* -----------------20.09.2002 11:30-----------------
345 * --------------------------------------------------*/
346 IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox)
348 BOOL bChecked = pBox->IsChecked();
349 aHRulerCBox .Enable(bChecked);
350 aHMetric .Enable(bChecked);
351 aVRulerCBox .Enable(bChecked);
352 aVMetric .Enable(bChecked);
353 VertRulerHdl(&aVRulerCBox);
354 return 0;
356 /*----------------- OS 27.01.95 -----------------------
357 TabPage Drucker Zusatzeinstellungen
358 -------------------------------------------------------*/
359 SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent,
360 const SfxItemSet& rCoreSet) :
361 SfxTabPage( pParent, SW_RES( TP_OPTPRINT_PAGE ), rCoreSet),
362 aFL1 (this, SW_RES(FL_1)),
363 aGrfCB (this, SW_RES(CB_PGRF)),
364 aTabCB (this, SW_RES(CB_PTAB)),
365 aDrawCB (this, SW_RES(CB_PDRAW)),
366 aCtrlFldCB (this, SW_RES(CB_CTRLFLD)),
367 aBackgroundCB (this, SW_RES(CB_BACKGROUND)),
368 aBlackFontCB (this, SW_RES(CB_BLACK_FONT)),
369 aPrintHiddenTextCB(this, SW_RES(CB_HIDDEN_TEXT)),
370 aPrintTextPlaceholderCB(this, SW_RES(CB_TEXT_PLACEHOLDER)),
371 aSeparatorLFL (this, SW_RES(FL_SEP_PRT_LEFT )),
372 aFL2 (this, SW_RES(FL_2)),
373 aLeftPageCB (this, SW_RES(CB_LEFTP)),
374 aRightPageCB (this, SW_RES(CB_RIGHTP)),
375 aReverseCB (this, SW_RES(CB_REVERSE)),
376 aProspectCB (this, SW_RES(CB_PROSPECT)),
377 aProspectCB_RTL (this, SW_RES(CB_PROSPECT_RTL)),
378 aSeparatorRFL (this, SW_RES(FL_SEP_PRT_RIGHT)),
379 aNoRB (this, SW_RES(RB_NO)),
380 aOnlyRB (this, SW_RES(RB_ONLY)),
381 aEndRB (this, SW_RES(RB_END)),
382 aEndPageRB (this, SW_RES(RB_PAGEEND)),
383 aFL3 (this, SW_RES(FL_3)),
384 aFL4 (this, SW_RES(FL_4)),
385 aPrintEmptyPagesCB(this, SW_RES(CB_PRINTEMPTYPAGES)),
386 aSingleJobsCB (this, SW_RES(CB_SINGLEJOBS)),
387 aPaperFromSetupCB(this, SW_RES(CB_PAPERFROMSETUP)),
388 aFaxFT (this, SW_RES(FT_FAX)),
389 aFaxLB (this, SW_RES(LB_FAX)),
390 sNone(SW_RES(ST_NONE)),
391 bAttrModified( FALSE ),
392 bPreview ( FALSE )
394 Init();
395 FreeResource();
396 Link aLk = LINK( this, SwAddPrinterTabPage, AutoClickHdl);
397 aGrfCB.SetClickHdl( aLk );
398 aRightPageCB.SetClickHdl( aLk );
399 aLeftPageCB.SetClickHdl( aLk );
400 aTabCB.SetClickHdl( aLk );
401 aDrawCB.SetClickHdl( aLk );
402 aCtrlFldCB.SetClickHdl( aLk );
403 aBackgroundCB.SetClickHdl( aLk );
404 aBlackFontCB.SetClickHdl( aLk );
405 aPrintHiddenTextCB.SetClickHdl( aLk );
406 aPrintTextPlaceholderCB.SetClickHdl( aLk );
407 aReverseCB.SetClickHdl( aLk );
408 aProspectCB.SetClickHdl( aLk );
409 aProspectCB_RTL.SetClickHdl( aLk );
410 aPaperFromSetupCB.SetClickHdl( aLk );
411 aPrintEmptyPagesCB.SetClickHdl( aLk );
412 aEndPageRB.SetClickHdl( aLk );
413 aEndRB.SetClickHdl( aLk );
414 aOnlyRB.SetClickHdl( aLk );
415 aNoRB.SetClickHdl( aLk );
416 aSingleJobsCB.SetClickHdl( aLk );
417 aFaxLB.SetSelectHdl( LINK( this, SwAddPrinterTabPage, SelectHdl ) );
419 const SfxPoolItem* pItem;
420 if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
421 && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
423 aDrawCB .Hide();
424 aLeftPageCB .Hide();
425 aRightPageCB .Hide();
426 aPrintHiddenTextCB.Hide();
427 aPrintTextPlaceholderCB.Hide();
428 Point rPt(aReverseCB .GetPosPixel());
429 rPt.setX(rPt.getX() + 15); // indent
430 aProspectCB_RTL.SetPosPixel(rPt);
431 aReverseCB.SetPosPixel(aLeftPageCB .GetPosPixel());
432 aProspectCB.SetPosPixel(aRightPageCB .GetPosPixel());
433 aPrintHiddenTextCB.SetPosPixel(aBlackFontCB.GetPosPixel());
434 aBlackFontCB.SetPosPixel(aBackgroundCB.GetPosPixel());
435 aBackgroundCB.SetPosPixel(aCtrlFldCB.GetPosPixel());
436 aCtrlFldCB.SetPosPixel(aDrawCB.GetPosPixel());
438 aProspectCB_RTL.Disable();
439 SvtCTLOptions aCTLOptions;
440 aProspectCB_RTL.Show(aCTLOptions.IsCTLFontEnabled());
443 //------------------------------------------------------------------------
445 void SwAddPrinterTabPage::SetPreview(BOOL bPrev)
447 bPreview = bPrev;
449 if (bPreview)
451 aLeftPageCB.Disable();
452 aRightPageCB.Disable();
453 aProspectCB.Disable();
454 aProspectCB_RTL.Disable();
455 aFL3.Disable();
456 aNoRB.Disable();
457 aOnlyRB.Disable();
458 aEndRB.Disable();
459 aEndPageRB.Disable();
463 //------------------------------------------------------------------------
465 SfxTabPage* SwAddPrinterTabPage::Create( Window* pParent,
466 const SfxItemSet& rAttrSet )
468 return ( new SwAddPrinterTabPage( pParent, rAttrSet ) );
470 //------------------------------------------------------------------------
473 BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet )
475 if ( bAttrModified )
477 SwAddPrinterItem aAddPrinterAttr (FN_PARAM_ADDPRINTER);
478 aAddPrinterAttr.bPrintGraphic = aGrfCB.IsChecked();
479 aAddPrinterAttr.bPrintTable = aTabCB.IsChecked();
480 aAddPrinterAttr.bPrintDraw = aDrawCB.IsChecked();
481 aAddPrinterAttr.bPrintControl = aCtrlFldCB.IsChecked();
482 aAddPrinterAttr.bPrintPageBackground = aBackgroundCB.IsChecked();
483 aAddPrinterAttr.bPrintBlackFont = aBlackFontCB.IsChecked();
484 aAddPrinterAttr.bPrintHiddenText = aPrintHiddenTextCB.IsChecked();
485 aAddPrinterAttr.bPrintTextPlaceholder = aPrintTextPlaceholderCB.IsChecked();
487 aAddPrinterAttr.bPrintLeftPage = aLeftPageCB.IsChecked();
488 aAddPrinterAttr.bPrintRightPage = aRightPageCB.IsChecked();
489 aAddPrinterAttr.bPrintReverse = aReverseCB.IsChecked();
490 aAddPrinterAttr.bPrintProspect = aProspectCB.IsChecked();
491 aAddPrinterAttr.bPrintProspect_RTL = aProspectCB_RTL.IsChecked();
492 aAddPrinterAttr.bPaperFromSetup = aPaperFromSetupCB.IsChecked();
493 aAddPrinterAttr.bPrintEmptyPages = aPrintEmptyPagesCB.IsChecked();
494 aAddPrinterAttr.bPrintSingleJobs = aSingleJobsCB.IsChecked();
496 if (aNoRB.IsChecked()) aAddPrinterAttr.nPrintPostIts =
497 POSTITS_NONE;
498 if (aOnlyRB.IsChecked()) aAddPrinterAttr.nPrintPostIts =
499 POSTITS_ONLY;
500 if (aEndRB.IsChecked()) aAddPrinterAttr.nPrintPostIts =
501 POSTITS_ENDDOC;
502 if (aEndPageRB.IsChecked()) aAddPrinterAttr.nPrintPostIts =
503 POSTITS_ENDPAGE;
505 String sFax = aFaxLB.GetSelectEntry();
506 aAddPrinterAttr.sFaxName = sNone == sFax ? aEmptyStr : sFax;
507 rCoreSet.Put(aAddPrinterAttr);
509 return bAttrModified;
511 //------------------------------------------------------------------------
514 void SwAddPrinterTabPage::Reset( const SfxItemSet& )
516 const SfxItemSet& rSet = GetItemSet();
517 const SwAddPrinterItem* pAddPrinterAttr = 0;
519 if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER , FALSE,
520 (const SfxPoolItem**)&pAddPrinterAttr ))
522 aGrfCB.Check( pAddPrinterAttr->bPrintGraphic);
523 aTabCB.Check( pAddPrinterAttr->bPrintTable);
524 aDrawCB.Check( pAddPrinterAttr->bPrintDraw);
525 aCtrlFldCB.Check( pAddPrinterAttr->bPrintControl);
526 aBackgroundCB.Check( pAddPrinterAttr->bPrintPageBackground);
527 aBlackFontCB.Check( pAddPrinterAttr->bPrintBlackFont);
528 aPrintHiddenTextCB.Check( pAddPrinterAttr->bPrintHiddenText);
529 aPrintTextPlaceholderCB.Check(pAddPrinterAttr->bPrintTextPlaceholder);
530 aLeftPageCB.Check( pAddPrinterAttr->bPrintLeftPage);
531 aRightPageCB.Check( pAddPrinterAttr->bPrintRightPage);
532 aReverseCB.Check( pAddPrinterAttr->bPrintReverse);
533 aPaperFromSetupCB.Check(pAddPrinterAttr->bPaperFromSetup);
534 aPrintEmptyPagesCB.Check(pAddPrinterAttr->bPrintEmptyPages);
535 aProspectCB.Check( pAddPrinterAttr->bPrintProspect);
536 aProspectCB_RTL.Check( pAddPrinterAttr->bPrintProspect_RTL);
537 aSingleJobsCB.Check( pAddPrinterAttr->bPrintSingleJobs);
539 aNoRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_NONE ) ;
540 aOnlyRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_ONLY ) ;
541 aEndRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_ENDDOC ) ;
542 aEndPageRB.Check (pAddPrinterAttr->nPrintPostIts== POSTITS_ENDPAGE ) ;
543 aFaxLB.SelectEntry( pAddPrinterAttr->sFaxName );
545 if (aProspectCB.IsChecked())
546 aProspectCB_RTL.Enable(TRUE);
547 else
548 aProspectCB_RTL.Disable();
551 //-----------------------------------------------------------------------
554 void SwAddPrinterTabPage::Init()
558 //------------------------------------------------------------------------
561 IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
563 bAttrModified = TRUE;
564 if (aProspectCB.IsChecked())
565 aProspectCB_RTL.Enable(TRUE);
566 else
568 aProspectCB_RTL.Check( FALSE );
569 aProspectCB_RTL.Disable();
571 return 0;
573 IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
575 //------------------------------------------------------------------------
578 void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst )
580 aFaxLB.InsertEntry(sNone);
581 for ( USHORT i = 0; i < rFaxLst.Count(); ++i )
582 aFaxLB.InsertEntry( *rFaxLst.GetObject(i) );
583 aFaxLB.SelectEntryPos(0);
586 //------------------------------------------------------------------------
589 IMPL_LINK_INLINE_START( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG )
591 bAttrModified=TRUE;
592 return 0;
594 IMPL_LINK_INLINE_END( SwAddPrinterTabPage, SelectHdl, ListBox *, EMPTYARG )
596 void SwAddPrinterTabPage::PageCreated (SfxAllItemSet aSet)
598 //SFX_ITEMSET_ARG (&aSet,pListItem,SfxStringListItem,SID_FAX_LIST,sal_False);
599 SFX_ITEMSET_ARG (&aSet,pListItem,SfxBoolItem,SID_FAX_LIST,sal_False);
600 SFX_ITEMSET_ARG (&aSet,pPreviewItem,SfxBoolItem,SID_PREVIEWFLAG_TYPE,sal_False);
601 if (pPreviewItem)
603 SetPreview(pPreviewItem->GetValue());
604 Reset(aSet);
606 if (pListItem && pListItem->GetValue())
608 SvStringsDtor aFaxList;
609 const std::vector<rtl::OUString>& rPrinters = Printer::GetPrinterQueues();
610 for (unsigned int i = 0; i < rPrinters.size(); ++i)
612 String* pString = new String( rPrinters[i] );
613 String* &rpString = pString;
614 aFaxList.Insert(rpString, 0);
616 SetFax( aFaxList );
617 /* SvStringsDtor aFaxList;
618 const List *pList = (pListItem)->GetList();
619 sal_uInt32 nCount = pList->Count();
620 for(sal_uInt32 i = 0; i < nCount ; i++)
622 String* pString = (String*)(pList->GetObject(i));
623 String* &rpString = pString;
624 aFaxList.Insert(rpString, 0 );
626 SetFax(aFaxList);
630 /*-----------------03.09.96 11.53-------------------
631 Tabpage Standardfonts
632 --------------------------------------------------*/
635 SwStdFontTabPage::SwStdFontTabPage( Window* pParent,
636 const SfxItemSet& rSet ) :
637 SfxTabPage( pParent, SW_RES( TP_STD_FONT ), rSet),
638 aStdChrFL (this, SW_RES(FL_STDCHR )),
639 aTypeFT( this, SW_RES( FT_TYPE )),
641 aStandardLbl(this, SW_RES(FT_STANDARD)),
642 aStandardBox(this, SW_RES(LB_STANDARD)),
644 aHeightFT( this, SW_RES( FT_SIZE )),
645 aStandardHeightLB(this, SW_RES( LB_STANDARD_SIZE )),
647 aTitleLbl (this, SW_RES(FT_TITLE )),
648 aTitleBox (this, SW_RES(LB_TITLE )),
649 aTitleHeightLB( this, SW_RES( LB_TITLE_SIZE )),
651 aListLbl (this, SW_RES(FT_LIST )),
652 aListBox (this, SW_RES(LB_LIST )),
653 aListHeightLB( this, SW_RES( LB_LIST_SIZE )),
655 aLabelLbl (this, SW_RES(FT_LABEL )),
656 aLabelBox (this, SW_RES(LB_LABEL )),
657 aLabelHeightLB( this, SW_RES( LB_LABEL_SIZE )),
659 aIdxLbl (this, SW_RES(FT_IDX )),
660 aIdxBox (this, SW_RES(LB_IDX )),
661 aIndexHeightLB( this, SW_RES( LB_INDEX_SIZE )),
663 aDocOnlyCB (this, SW_RES(CB_DOCONLY )),
664 aStandardPB (this, SW_RES(PB_STANDARD)),
665 pPrt(0),
666 pFontList(0),
667 pFontConfig(0),
668 pWrtShell(0),
669 eLanguage( GetAppLanguage() ),
671 bListDefault(FALSE),
672 bSetListDefault(TRUE),
673 bLabelDefault(FALSE),
674 bSetLabelDefault(TRUE),
675 bIdxDefault(FALSE),
676 bSetIdxDefault(TRUE),
677 bDeletePrinter(FALSE),
679 bListHeightDefault (FALSE),
680 bSetListHeightDefault (FALSE),
681 bLabelHeightDefault (FALSE),
682 bSetLabelHeightDefault(FALSE),
683 bIndexHeightDefault (FALSE),
684 bSetIndexHeightDefault (FALSE),
686 nFontGroup(FONT_GROUP_DEFAULT),
688 sScriptWestern(SW_RES(ST_SCRIPT_WESTERN)),
689 sScriptAsian(SW_RES(ST_SCRIPT_ASIAN)),
690 sScriptComplex(SW_RES(ST_SCRIPT_CTL))
692 FreeResource();
693 aStandardPB.SetClickHdl(LINK(this, SwStdFontTabPage, StandardHdl));
694 aStandardBox.SetModifyHdl( LINK(this, SwStdFontTabPage, ModifyHdl));
695 aListBox .SetModifyHdl( LINK(this, SwStdFontTabPage, ModifyHdl));
696 aLabelBox .SetModifyHdl( LINK(this, SwStdFontTabPage, ModifyHdl));
697 aIdxBox .SetModifyHdl( LINK(this, SwStdFontTabPage, ModifyHdl));
698 Link aFocusLink = LINK( this, SwStdFontTabPage, LoseFocusHdl);
699 aStandardBox.SetLoseFocusHdl( aFocusLink );
700 aTitleBox .SetLoseFocusHdl( aFocusLink );
701 aListBox .SetLoseFocusHdl( aFocusLink );
702 aLabelBox .SetLoseFocusHdl( aFocusLink );
703 aIdxBox .SetLoseFocusHdl( aFocusLink );
705 Link aModifyHeightLink( LINK( this, SwStdFontTabPage, ModifyHeightHdl));
706 aStandardHeightLB.SetModifyHdl( aModifyHeightLink );
707 aTitleHeightLB. SetModifyHdl( aModifyHeightLink );
708 aListHeightLB. SetModifyHdl( aModifyHeightLink );
709 aLabelHeightLB. SetModifyHdl( aModifyHeightLink );
710 aIndexHeightLB. SetModifyHdl( aModifyHeightLink );
712 aDocOnlyCB.Check(SW_MOD()->GetModuleConfig()->IsDefaultFontInCurrDocOnly());
715 /*-----------------03.09.96 11.53-------------------
717 --------------------------------------------------*/
719 SwStdFontTabPage::~SwStdFontTabPage()
721 if(bDeletePrinter)
722 delete pPrt;
725 /*-----------------03.09.96 11.53-------------------
727 --------------------------------------------------*/
728 SfxTabPage* SwStdFontTabPage::Create( Window* pParent,
729 const SfxItemSet& rAttrSet )
731 return new SwStdFontTabPage(pParent, rAttrSet);
734 /*-----------------03.09.96 11.53-------------------
736 --------------------------------------------------*/
737 void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
738 SfxPrinter* pPrt, const String& rStyle,
739 USHORT nFontWhich)
741 BOOL bDelete = FALSE;
742 const SfxFont* pFnt = pPrt ? pPrt->GetFontByName(rStyle): 0;
743 if(!pFnt)
745 pFnt = new SfxFont(FAMILY_DONTKNOW, rStyle);
746 bDelete = TRUE;
748 SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType);
749 pColl->SetFmtAttr(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(),
750 aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich));
751 if(bDelete)
753 delete (SfxFont*) pFnt;
756 /*-- 11.10.2005 15:47:52---------------------------------------------------
758 -----------------------------------------------------------------------*/
759 void lcl_SetColl(SwWrtShell* pWrtShell, USHORT nType,
760 sal_Int32 nHeight, USHORT nFontHeightWhich)
762 float fSize = (float)nHeight / 10;
763 nHeight = CalcToUnit( fSize, SFX_MAPUNIT_TWIP );
764 SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType);
765 pColl->SetFmtAttr(SvxFontHeightItem(nHeight, 100, nFontHeightWhich));
767 /*-----------------03.09.96 11.53-------------------
769 --------------------------------------------------*/
770 BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
772 BOOL bNotDocOnly = !aDocOnlyCB.IsChecked();
773 SW_MOD()->GetModuleConfig()->SetDefaultFontInCurrDocOnly(!bNotDocOnly);
775 String sStandard = aStandardBox.GetText();
776 String sTitle = aTitleBox .GetText();
777 String sList = aListBox .GetText();
778 String sLabel = aLabelBox .GetText();
779 String sIdx = aIdxBox .GetText();
780 String sStandardBak = aStandardBox.GetSavedValue();
781 String sTitleBak = aTitleBox .GetSavedValue();
782 String sListBak = aListBox .GetSavedValue();
783 String sLabelBak = aLabelBox .GetSavedValue();
784 String sIdxBak = aIdxBox .GetSavedValue();
786 bool bStandardHeightChanged = aStandardHeightLB.GetSavedValue() != aStandardHeightLB.GetText();
787 bool bTitleHeightChanged = aTitleHeightLB.GetSavedValue() != aTitleHeightLB.GetText();
788 bool bListHeightChanged = aListHeightLB.GetSavedValue() != aListHeightLB.GetText() && (!bListHeightDefault || !bSetListHeightDefault );
789 bool bLabelHeightChanged = aLabelHeightLB.GetSavedValue() != aLabelHeightLB.GetText() && (!bLabelHeightDefault || !bSetLabelHeightDefault );
790 bool bIndexHeightChanged = aIndexHeightLB.GetSavedValue() != aIndexHeightLB.GetText() && (!bIndexHeightDefault || !bSetIndexHeightDefault );
791 if(bNotDocOnly)
793 pFontConfig->SetFontStandard(sStandard, nFontGroup);
794 pFontConfig->SetFontOutline(sTitle, nFontGroup);
795 pFontConfig->SetFontList(sList, nFontGroup);
796 pFontConfig->SetFontCaption(sLabel, nFontGroup);
797 pFontConfig->SetFontIndex(sIdx, nFontGroup);
798 if(bStandardHeightChanged)
800 float fSize = (float)aStandardHeightLB.GetValue() / 10;
801 pFontConfig->SetFontHeight( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), FONT_STANDARD, nFontGroup );
803 if(bTitleHeightChanged)
805 float fSize = (float)aTitleHeightLB.GetValue() / 10;
806 pFontConfig->SetFontHeight( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), FONT_OUTLINE, nFontGroup );
808 if(bListHeightChanged)
810 float fSize = (float)aListHeightLB.GetValue() / 10;
811 pFontConfig->SetFontHeight( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), FONT_LIST, nFontGroup );
813 if(bLabelHeightChanged)
815 float fSize = (float)aLabelHeightLB.GetValue() / 10;
816 pFontConfig->SetFontHeight( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), FONT_CAPTION, nFontGroup );
818 if(bIndexHeightChanged)
820 float fSize = (float)aIndexHeightLB.GetValue() / 10;
821 pFontConfig->SetFontHeight( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), FONT_INDEX, nFontGroup );
824 if(pWrtShell)
826 pWrtShell->StartAllAction();
827 SfxPrinter* pPrinter = pWrtShell->getIDocumentDeviceAccess()->getPrinter( false );
828 BOOL bMod = FALSE;
829 USHORT nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
830 nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT :
831 FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT);
832 USHORT nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
833 nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONTSIZE :
834 FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE);
835 if(sStandard != sShellStd)
837 BOOL bDelete = FALSE;
838 const SfxFont* pFnt = pPrinter ? pPrinter->GetFontByName(sStandard): 0;
839 if(!pFnt)
841 pFnt = new SfxFont(FAMILY_DONTKNOW, sStandard);
842 bDelete = TRUE;
844 pWrtShell->SetDefault(SvxFontItem(pFnt->GetFamily(), pFnt->GetName(),
845 aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), nFontWhich));
846 SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
847 pColl->ResetFmtAttr(nFontWhich);
848 if(bDelete)
850 delete (SfxFont*) pFnt;
851 bDelete = FALSE;
853 // lcl_SetColl(pWrtShell, RES_POOLCOLL_STANDARD, pPrinter, sStandard);
854 bMod = TRUE;
856 if(bStandardHeightChanged)
858 float fSize = (float)aStandardHeightLB.GetValue() / 10;
859 pWrtShell->SetDefault(SvxFontHeightItem( CalcToUnit( fSize, SFX_MAPUNIT_TWIP ), 100, nFontHeightWhich ) );
860 SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
861 pColl->ResetFmtAttr(nFontHeightWhich);
862 bMod = TRUE;
865 if(sTitle != sShellTitle )
867 lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE, pPrinter, sTitle, nFontWhich);
868 bMod = TRUE;
870 if(bTitleHeightChanged)
872 lcl_SetColl(pWrtShell, RES_POOLCOLL_HEADLINE_BASE,
873 sal::static_int_cast< sal_uInt16, sal_Int64 >(aTitleHeightLB.GetValue()), nFontHeightWhich);
874 bMod = TRUE;
876 if(sList != sShellList && (!bListDefault || !bSetListDefault ))
878 lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE, pPrinter, sList, nFontWhich);
879 bMod = TRUE;
881 if(bListHeightChanged)
883 lcl_SetColl(pWrtShell, RES_POOLCOLL_NUMBUL_BASE,
884 sal::static_int_cast< sal_uInt16, sal_Int64 >(aListHeightLB.GetValue()), nFontHeightWhich);
885 bMod = TRUE;
887 if(sLabel != sShellLabel && (!bLabelDefault || !bSetLabelDefault))
889 lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL, pPrinter, sLabel, nFontWhich);
890 bMod = TRUE;
892 if(bLabelHeightChanged)
894 lcl_SetColl(pWrtShell, RES_POOLCOLL_LABEL,
895 sal::static_int_cast< sal_uInt16, sal_Int64 >(aLabelHeightLB.GetValue()), nFontHeightWhich);
896 bMod = TRUE;
898 if(sIdx != sShellIndex && (!bIdxDefault || !bSetIdxDefault))
900 lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE, pPrinter, sIdx, nFontWhich);
901 bMod = TRUE;
903 if(bIndexHeightChanged)
905 lcl_SetColl(pWrtShell, RES_POOLCOLL_REGISTER_BASE,
906 sal::static_int_cast< sal_uInt16, sal_Int64 >(aIndexHeightLB.GetValue()), nFontHeightWhich);
907 bMod = TRUE;
909 if ( bMod )
910 pWrtShell->SetModified();
911 pWrtShell->EndAllAction();
914 return FALSE;
917 /*-----------------03.09.96 11.53-------------------
919 --------------------------------------------------*/
920 void SwStdFontTabPage::Reset( const SfxItemSet& rSet)
922 const SfxPoolItem* pLang;
923 USHORT nLangSlot = nFontGroup == FONT_GROUP_DEFAULT ? SID_ATTR_LANGUAGE :
924 FONT_GROUP_CJK == nFontGroup ? SID_ATTR_CHAR_CJK_LANGUAGE : SID_ATTR_CHAR_CTL_LANGUAGE;
927 if( SFX_ITEM_SET == rSet.GetItemState(nLangSlot, FALSE, &pLang))
928 eLanguage = ((const SvxLanguageItem*)pLang)->GetValue();
930 String sTmp(aStdChrFL.GetText());
931 String sToReplace = sScriptWestern;
932 if(FONT_GROUP_CJK == nFontGroup )
933 sToReplace = sScriptAsian;
934 else if(FONT_GROUP_CTL == nFontGroup )
935 sToReplace = sScriptComplex;
937 sTmp.SearchAndReplaceAscii("%1", sToReplace);
938 aStdChrFL.SetText(sTmp);
939 const SfxPoolItem* pItem;
941 if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_PRINTER, FALSE, &pItem))
943 pPrt = (SfxPrinter*)((const SwPtrItem*)pItem)->GetValue();
945 else
947 SfxItemSet* pPrinterSet = new SfxItemSet( *rSet.GetPool(),
948 SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN,
949 SID_PRINTER_CHANGESTODOC, SID_PRINTER_CHANGESTODOC,
950 0 );
951 pPrt = new SfxPrinter(pPrinterSet);
952 bDeletePrinter = TRUE;
954 pFontList = new FontList( pPrt );
955 // #i94536# prevent duplication of font entries when 'reset' button is pressed
956 if( !aStandardBox.GetEntryCount() )
958 const USHORT nCount = pPrt->GetFontCount();
959 for (USHORT i = 0; i < nCount; ++i)
961 const String &rString = pPrt->GetFont(i)->GetName();
962 aStandardBox.InsertEntry( rString );
963 aTitleBox .InsertEntry( rString );
964 aListBox .InsertEntry( rString );
965 aLabelBox .InsertEntry( rString );
966 aIdxBox .InsertEntry( rString );
969 if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_STDFONTS, FALSE, &pItem))
971 pFontConfig = (SwStdFontConfig*)((const SwPtrItem*)pItem)->GetValue();
974 if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_WRTSHELL, FALSE, &pItem))
976 pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue();
978 String sStdBackup;
979 String sOutBackup;
980 String sListBackup;
981 String sCapBackup;
982 String sIdxBackup;
983 sal_Int32 nStandardHeight = -1;
984 sal_Int32 nTitleHeight = -1;
985 sal_Int32 nListHeight = -1;
986 sal_Int32 nLabelHeight = -1;
987 sal_Int32 nIndexHeight = -1;
989 if(!pWrtShell)
991 sStdBackup = pFontConfig->GetFontStandard(nFontGroup);
992 sOutBackup = pFontConfig->GetFontOutline(nFontGroup);
993 sListBackup= pFontConfig->GetFontList(nFontGroup);
994 sCapBackup = pFontConfig->GetFontCaption(nFontGroup);
995 sIdxBackup = pFontConfig->GetFontIndex(nFontGroup);
996 nStandardHeight = pFontConfig->GetFontHeight( FONT_STANDARD, nFontGroup, eLanguage );
997 nTitleHeight = pFontConfig->GetFontHeight( FONT_OUTLINE , nFontGroup, eLanguage );
998 nListHeight = pFontConfig->GetFontHeight( FONT_LIST , nFontGroup, eLanguage );
999 nLabelHeight = pFontConfig->GetFontHeight( FONT_CAPTION , nFontGroup, eLanguage );
1000 nIndexHeight = pFontConfig->GetFontHeight( FONT_INDEX , nFontGroup, eLanguage );
1001 if( nStandardHeight <= 0)
1002 nStandardHeight = pFontConfig->GetDefaultHeightFor( FONT_STANDARD + nFontGroup * FONT_PER_GROUP, eLanguage);
1003 if( nTitleHeight <= 0)
1004 nTitleHeight = pFontConfig->GetDefaultHeightFor( FONT_OUTLINE + nFontGroup * FONT_PER_GROUP, eLanguage);
1005 if( nListHeight <= 0)
1006 nListHeight = pFontConfig->GetDefaultHeightFor( FONT_LIST + nFontGroup * FONT_PER_GROUP, eLanguage);
1007 if( nLabelHeight <= 0)
1008 nLabelHeight = pFontConfig->GetDefaultHeightFor( FONT_CAPTION + nFontGroup * FONT_PER_GROUP, eLanguage);
1009 if( nIndexHeight <= 0)
1010 nIndexHeight = pFontConfig->GetDefaultHeightFor( FONT_INDEX + nFontGroup * FONT_PER_GROUP, eLanguage);
1012 aDocOnlyCB.Enable(FALSE);
1014 else
1016 SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_STANDARD);
1017 const SvxFontItem& rFont = !nFontGroup ? pColl->GetFont() :
1018 FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
1019 sShellStd = sStdBackup = rFont.GetFamilyName();
1021 USHORT nFontHeightWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
1022 nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONTSIZE :
1023 FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE );
1024 const SvxFontHeightItem& rFontHeightStandard = (const SvxFontHeightItem& )pColl->GetFmtAttr(nFontHeightWhich);
1025 nStandardHeight = (sal_Int32)rFontHeightStandard.GetHeight();
1027 pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_HEADLINE_BASE);
1028 const SvxFontItem& rFontHL = !nFontGroup ? pColl->GetFont() :
1029 FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
1030 sShellTitle = sOutBackup = rFontHL.GetFamilyName();
1032 const SvxFontHeightItem& rFontHeightTitle = (const SvxFontHeightItem&)pColl->GetFmtAttr( nFontHeightWhich, sal_True );
1033 nTitleHeight = (sal_Int32)rFontHeightTitle.GetHeight();
1035 USHORT nFontWhich = sal::static_int_cast< sal_uInt16, RES_CHRATR >(
1036 nFontGroup == FONT_GROUP_DEFAULT ? RES_CHRATR_FONT :
1037 FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONT : RES_CHRATR_CTL_FONT);
1038 pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_NUMBUL_BASE);
1039 const SvxFontItem& rFontLS = !nFontGroup ? pColl->GetFont() :
1040 FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
1041 bListDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
1042 sShellList = sListBackup = rFontLS.GetFamilyName();
1044 const SvxFontHeightItem& rFontHeightList = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True);
1045 nListHeight = (sal_Int32)rFontHeightList.GetHeight();
1046 bListHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
1049 pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_LABEL);
1050 bLabelDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
1051 const SvxFontItem& rFontCP = !nFontGroup ? pColl->GetFont() :
1052 FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
1053 sShellLabel = sCapBackup = rFontCP.GetFamilyName();
1054 const SvxFontHeightItem& rFontHeightLabel = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True);
1055 nLabelHeight = (sal_Int32)rFontHeightLabel.GetHeight();
1056 bLabelHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
1058 pColl = pWrtShell->GetTxtCollFromPool(RES_POOLCOLL_REGISTER_BASE);
1059 bIdxDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
1060 const SvxFontItem& rFontIDX = !nFontGroup ? pColl->GetFont() :
1061 FONT_GROUP_CJK == nFontGroup ? pColl->GetCJKFont() : pColl->GetCTLFont();
1062 sShellIndex = sIdxBackup = rFontIDX.GetFamilyName();
1063 const SvxFontHeightItem& rFontHeightIndex = (const SvxFontHeightItem&)pColl->GetFmtAttr(nFontHeightWhich, sal_True);
1064 nIndexHeight = (sal_Int32)rFontHeightIndex.GetHeight();
1065 bIndexHeightDefault = SFX_ITEM_DEFAULT == pColl->GetAttrSet().GetItemState(nFontWhich, FALSE);
1067 aStandardBox.SetText(sStdBackup );
1068 aTitleBox .SetText(sOutBackup );
1069 aListBox .SetText(sListBackup);
1070 aLabelBox .SetText(sCapBackup );
1071 aIdxBox .SetText(sIdxBackup );
1073 FontInfo aFontInfo( pFontList->Get(sStdBackup, sStdBackup) );
1074 aStandardHeightLB.Fill( &aFontInfo, pFontList );
1075 aFontInfo = pFontList->Get(sOutBackup, sOutBackup );
1076 aTitleHeightLB.Fill( &aFontInfo, pFontList );
1077 aFontInfo = pFontList->Get(sListBackup,sListBackup);
1078 aListHeightLB.Fill( &aFontInfo, pFontList );
1079 aFontInfo = pFontList->Get(sCapBackup, sCapBackup );
1080 aLabelHeightLB.Fill( &aFontInfo, pFontList );
1081 aFontInfo = pFontList->Get(sIdxBackup, sIdxBackup );
1082 aIndexHeightLB.Fill( &aFontInfo, pFontList );
1084 aStandardHeightLB.SetValue( CalcToPoint( nStandardHeight, SFX_MAPUNIT_TWIP, 10 ) );
1085 aTitleHeightLB. SetValue( CalcToPoint( nTitleHeight , SFX_MAPUNIT_TWIP, 10 ) );
1086 aListHeightLB. SetValue( CalcToPoint( nListHeight , SFX_MAPUNIT_TWIP, 10 ) );
1087 aLabelHeightLB. SetValue( CalcToPoint( nLabelHeight , SFX_MAPUNIT_TWIP, 10 ));
1088 aIndexHeightLB. SetValue( CalcToPoint( nIndexHeight , SFX_MAPUNIT_TWIP, 10 ));
1090 aStandardBox.SaveValue();
1091 aTitleBox .SaveValue();
1092 aListBox .SaveValue();
1093 aLabelBox .SaveValue();
1094 aIdxBox .SaveValue();
1096 aStandardHeightLB.SaveValue();
1097 aTitleHeightLB. SaveValue();
1098 aListHeightLB. SaveValue();
1099 aLabelHeightLB. SaveValue();
1100 aIndexHeightLB. SaveValue();
1103 /*-----------------07.09.96 12.28-------------------
1105 --------------------------------------------------*/
1108 IMPL_LINK( SwStdFontTabPage, StandardHdl, PushButton *, EMPTYARG )
1110 sal_uInt8 nFontOffset = nFontGroup * FONT_PER_GROUP;
1111 aStandardBox.SetText(SwStdFontConfig::GetDefaultFor(FONT_STANDARD + nFontOffset, eLanguage));
1112 aTitleBox .SetText(SwStdFontConfig::GetDefaultFor(FONT_OUTLINE + nFontOffset, eLanguage));
1113 aListBox .SetText(SwStdFontConfig::GetDefaultFor(FONT_LIST + nFontOffset, eLanguage));
1114 aLabelBox .SetText(SwStdFontConfig::GetDefaultFor(FONT_CAPTION + nFontOffset, eLanguage));
1115 aIdxBox .SetText(SwStdFontConfig::GetDefaultFor(FONT_INDEX + nFontOffset, eLanguage));
1117 aStandardBox.SaveValue();
1118 aTitleBox .SaveValue();
1119 aListBox .SaveValue();
1120 aLabelBox .SaveValue();
1121 aIdxBox .SaveValue();
1123 aStandardHeightLB.SetValue( CalcToPoint(
1124 SwStdFontConfig::GetDefaultHeightFor(FONT_STANDARD + nFontOffset, eLanguage),
1125 SFX_MAPUNIT_TWIP, 10 ) );
1126 aTitleHeightLB .SetValue(CalcToPoint(
1127 SwStdFontConfig::GetDefaultHeightFor(FONT_OUTLINE +
1128 nFontOffset, eLanguage), SFX_MAPUNIT_TWIP, 10 ));
1129 aListHeightLB .SetValue(CalcToPoint(
1130 SwStdFontConfig::GetDefaultHeightFor(FONT_LIST + nFontOffset, eLanguage),
1131 SFX_MAPUNIT_TWIP, 10 ));
1132 aLabelHeightLB .SetValue(CalcToPoint(
1133 SwStdFontConfig::GetDefaultHeightFor(FONT_CAPTION + nFontOffset, eLanguage),
1134 SFX_MAPUNIT_TWIP, 10 ));
1135 aIndexHeightLB .SetValue(CalcToPoint(
1136 SwStdFontConfig::GetDefaultHeightFor(FONT_INDEX + nFontOffset, eLanguage),
1137 SFX_MAPUNIT_TWIP, 10 ));
1139 return 0;
1141 /*-----------------17.01.97 15.43-------------------
1143 --------------------------------------------------*/
1145 IMPL_LINK( SwStdFontTabPage, ModifyHdl, ComboBox*, pBox )
1147 if(pBox == &aStandardBox)
1149 String sEntry = pBox->GetText();
1150 if(bSetListDefault && bListDefault)
1151 aListBox.SetText(sEntry);
1152 if(bSetLabelDefault && bLabelDefault)
1153 aLabelBox.SetText(sEntry);
1154 if(bSetIdxDefault && bIdxDefault)
1155 aIdxBox.SetText(sEntry);
1157 else if(pBox == &aListBox)
1159 bSetListDefault = FALSE;
1161 else if(pBox == &aLabelBox)
1163 bSetLabelDefault = FALSE;
1165 else if(pBox == &aIdxBox)
1167 bSetIdxDefault = FALSE;
1169 return 0;
1172 /*-- 11.10.2005 15:11:23---------------------------------------------------
1174 -----------------------------------------------------------------------*/
1175 IMPL_LINK( SwStdFontTabPage, ModifyHeightHdl, FontSizeBox*, pBox )
1177 if(pBox == &aStandardHeightLB)
1179 sal_Int64 nValue = pBox->GetValue(FUNIT_TWIP);
1180 if(bSetListHeightDefault && bListHeightDefault)
1181 aListHeightLB.SetValue(nValue, FUNIT_TWIP);
1182 if(bSetLabelHeightDefault && bLabelHeightDefault)
1183 aLabelHeightLB.SetValue(nValue, FUNIT_TWIP);
1184 if(bSetIndexHeightDefault && bIndexHeightDefault)
1185 aIndexHeightLB.SetValue(nValue, FUNIT_TWIP);
1187 else if(pBox == &aListHeightLB)
1189 bSetListHeightDefault = FALSE;
1191 else if(pBox == &aLabelHeightLB)
1193 bSetLabelHeightDefault = FALSE;
1195 else if(pBox == &aIndexHeightLB)
1197 bSetIndexHeightDefault = FALSE;
1199 return 0;
1202 /*-- 28.09.2005 13:22:36---------------------------------------------------
1204 -----------------------------------------------------------------------*/
1205 IMPL_LINK( SwStdFontTabPage, LoseFocusHdl, ComboBox*, pBox )
1207 FontSizeBox* pHeightLB = 0;
1208 String sEntry = pBox->GetText();
1209 if(pBox == &aStandardBox)
1211 pHeightLB = &aStandardHeightLB;
1213 else if(pBox == &aTitleBox)
1215 pHeightLB = &aTitleHeightLB;
1217 else if(pBox == &aListBox)
1219 pHeightLB = &aListHeightLB;
1221 else if(pBox == &aLabelBox)
1223 pHeightLB = &aLabelHeightLB;
1225 else /*if(pBox == &aIdxBox)*/
1227 pHeightLB = &aIndexHeightLB;
1229 FontInfo aFontInfo( pFontList->Get(sEntry, sEntry) );
1230 pHeightLB->Fill( &aFontInfo, pFontList );
1232 return 0;
1236 void SwStdFontTabPage::PageCreated (SfxAllItemSet aSet)
1238 SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt16Item, SID_FONTMODE_TYPE, sal_False);
1239 if (pFlagItem)
1240 SetFontMode(sal::static_int_cast< sal_uInt8, sal_uInt16>( pFlagItem->GetValue()));
1242 /*-----------------18.01.97 12.14-------------------
1243 Optionen Tabelle
1244 --------------------------------------------------*/
1246 SwTableOptionsTabPage::SwTableOptionsTabPage( Window* pParent, const SfxItemSet& rSet ) :
1247 SfxTabPage(pParent, SW_RES(TP_OPTTABLE_PAGE), rSet),
1248 aTableFL (this, SW_RES(FL_TABLE )),
1249 aHeaderCB (this, SW_RES(CB_HEADER )),
1250 aRepeatHeaderCB (this, SW_RES(CB_REPEAT_HEADER )),
1251 aDontSplitCB (this, SW_RES(CB_DONT_SPLIT )),
1252 aBorderCB (this, SW_RES(CB_BORDER )),
1254 aSeparatorFL (this, SW_RES(FL_TABLE_SEPARATOR)),
1256 aTableInsertFL (this, SW_RES(FL_TABLE_INSERT )),
1257 aNumFormattingCB(this, SW_RES(CB_NUMFORMATTING )),
1258 aNumFmtFormattingCB(this, SW_RES(CB_NUMFMT_FORMATTING )),
1259 aNumAlignmentCB (this, SW_RES(CB_NUMALIGNMENT )),
1261 aMoveFL( this, SW_RES(FL_MOVE )),
1262 aMoveFT( this, SW_RES(FT_MOVE )),
1263 aRowMoveFT( this, SW_RES(FT_ROWMOVE )),
1264 aRowMoveMF( this, SW_RES(MF_ROWMOVE )),
1265 aColMoveFT( this, SW_RES(FT_COLMOVE )),
1266 aColMoveMF( this, SW_RES(MF_COLMOVE )),
1268 aInsertFT( this, SW_RES(FT_INSERT )),
1269 aRowInsertFT( this, SW_RES(FT_ROWINSERT)),
1270 aRowInsertMF( this, SW_RES(MF_ROWINSERT)),
1271 aColInsertFT( this, SW_RES(FT_COLINSERT)),
1272 aColInsertMF( this, SW_RES(MF_COLINSERT)),
1274 aHandlingFT( this, SW_RES(FT_HANDLING )),
1275 aFixRB( this, SW_RES(RB_FIX )),
1276 aFixPropRB( this, SW_RES(RB_FIXPROP )),
1277 aVarRB( this, SW_RES(RB_VAR )),
1278 aFixFT( this, SW_RES(FT_FIX )),
1279 aFixPropFT( this, SW_RES(FT_FIXPROP )),
1280 aVarFT( this, SW_RES(FT_VAR )),
1281 pWrtShell(0),
1282 bHTMLMode(FALSE)
1284 FreeResource();
1286 Link aLnk(LINK(this, SwTableOptionsTabPage, CheckBoxHdl));
1287 aNumFormattingCB.SetClickHdl(aLnk);
1288 aNumFmtFormattingCB.SetClickHdl(aLnk);
1289 aHeaderCB.SetClickHdl(aLnk);
1292 /*-----------------18.01.97 12.43-------------------
1294 --------------------------------------------------*/
1296 SwTableOptionsTabPage::~SwTableOptionsTabPage()
1300 /*-----------------18.01.97 12.43-------------------
1302 --------------------------------------------------*/
1304 SfxTabPage* SwTableOptionsTabPage::Create( Window* pParent,
1305 const SfxItemSet& rAttrSet )
1307 return new SwTableOptionsTabPage(pParent, rAttrSet );
1310 /*-----------------18.01.97 12.42-------------------
1312 --------------------------------------------------*/
1314 BOOL SwTableOptionsTabPage::FillItemSet( SfxItemSet& )
1316 BOOL bRet = FALSE;
1317 SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
1319 if(aRowMoveMF.IsModified())
1320 pModOpt->SetTblHMove( (USHORT)aRowMoveMF.Denormalize( aRowMoveMF.GetValue(FUNIT_TWIP)));
1322 if(aColMoveMF.IsModified())
1323 pModOpt->SetTblVMove( (USHORT)aColMoveMF.Denormalize( aColMoveMF.GetValue(FUNIT_TWIP)));
1325 if(aRowInsertMF.IsModified())
1326 pModOpt->SetTblHInsert((USHORT)aRowInsertMF.Denormalize( aRowInsertMF.GetValue(FUNIT_TWIP)));
1328 if(aColInsertMF.IsModified())
1329 pModOpt->SetTblVInsert((USHORT)aColInsertMF.Denormalize( aColInsertMF.GetValue(FUNIT_TWIP)));
1331 TblChgMode eMode;
1332 if(aFixRB.IsChecked())
1333 eMode = TBLFIX_CHGABS;
1334 else if(aFixPropRB.IsChecked())
1335 eMode = TBLFIX_CHGPROP;
1336 else
1337 eMode = TBLVAR_CHGABS;
1338 if(eMode != pModOpt->GetTblMode())
1340 pModOpt->SetTblMode(eMode);
1341 // der Tabellen-Tastatur-Modus hat sich geaendert, das soll
1342 // jetzt auch die aktuelle Tabelle erfahren
1343 if(pWrtShell && nsSelectionType::SEL_TBL & pWrtShell->GetSelectionType())
1345 pWrtShell->SetTblChgMode(eMode);
1346 static USHORT __READONLY_DATA aInva[] =
1347 { FN_TABLE_MODE_FIX,
1348 FN_TABLE_MODE_FIX_PROP,
1349 FN_TABLE_MODE_VARIABLE,
1352 pWrtShell->GetView().GetViewFrame()->GetBindings().Invalidate( aInva );
1355 bRet = TRUE;
1358 SwInsertTableOptions aInsOpts( 0, 0 );
1360 if (aHeaderCB.IsChecked())
1361 aInsOpts.mnInsMode |= tabopts::HEADLINE;
1363 if (aRepeatHeaderCB.IsEnabled() )
1364 aInsOpts.mnRowsToRepeat = aRepeatHeaderCB.IsChecked()? 1 : 0;
1366 if (!aDontSplitCB.IsChecked())
1367 aInsOpts.mnInsMode |= tabopts::SPLIT_LAYOUT;
1369 if (aBorderCB.IsChecked())
1370 aInsOpts.mnInsMode |= tabopts::DEFAULT_BORDER;
1372 if (aHeaderCB.GetSavedValue() != aHeaderCB.GetState() ||
1373 aRepeatHeaderCB.GetSavedValue() != aRepeatHeaderCB.GetState() ||
1374 aDontSplitCB.GetSavedValue() != aDontSplitCB.GetState() ||
1375 aBorderCB.GetSavedValue() != aBorderCB.GetState())
1377 pModOpt->SetInsTblFlags(bHTMLMode, aInsOpts);
1380 if (aNumFormattingCB.GetSavedValue() != aNumFormattingCB.GetState())
1382 pModOpt->SetInsTblFormatNum(bHTMLMode, aNumFormattingCB.IsChecked());
1383 bRet = TRUE;
1386 if (aNumFmtFormattingCB.GetSavedValue() != aNumFmtFormattingCB.GetState())
1388 pModOpt->SetInsTblChangeNumFormat(bHTMLMode, aNumFmtFormattingCB.IsChecked());
1389 bRet = TRUE;
1392 if (aNumAlignmentCB.GetSavedValue() != aNumAlignmentCB.GetState())
1394 pModOpt->SetInsTblAlignNum(bHTMLMode, aNumAlignmentCB.IsChecked());
1395 bRet = TRUE;
1398 return bRet;
1400 /*-----------------18.01.97 12.42-------------------
1402 --------------------------------------------------*/
1403 void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet)
1405 const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
1406 if ( rSet.GetItemState( SID_ATTR_METRIC ) >= SFX_ITEM_AVAILABLE )
1408 const SfxUInt16Item& rItem = (SfxUInt16Item&)rSet.Get( SID_ATTR_METRIC );
1409 FieldUnit eFieldUnit = (FieldUnit)rItem.GetValue();
1410 ::SetFieldUnit( aRowMoveMF, eFieldUnit );
1411 ::SetFieldUnit( aColMoveMF, eFieldUnit );
1412 ::SetFieldUnit( aRowInsertMF, eFieldUnit );
1413 ::SetFieldUnit( aColInsertMF, eFieldUnit );
1416 aRowMoveMF .SetValue(aRowMoveMF.Normalize(pModOpt->GetTblHMove()), FUNIT_TWIP);
1417 aColMoveMF .SetValue(aColMoveMF.Normalize(pModOpt->GetTblVMove()), FUNIT_TWIP);
1418 aRowInsertMF.SetValue(aRowInsertMF.Normalize(pModOpt->GetTblHInsert()), FUNIT_TWIP);
1419 aColInsertMF.SetValue(aColInsertMF.Normalize(pModOpt->GetTblVInsert()), FUNIT_TWIP);
1421 switch(pModOpt->GetTblMode())
1423 case TBLFIX_CHGABS: aFixRB.Check(); break;
1424 case TBLFIX_CHGPROP: aFixPropRB.Check(); break;
1425 case TBLVAR_CHGABS: aVarRB.Check(); break;
1427 const SfxPoolItem* pItem;
1428 if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem))
1430 bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
1433 //bestimmte Controls fuer HTML verstecken
1434 if(bHTMLMode)
1436 /* Point aPos(aCaptionFL.GetPosPixel());
1437 long nYDiff = aTableFL.GetPosPixel().Y() - aPos.Y();
1438 aTableFL.SetPosPixel(aPos);
1440 aPos = aHeaderCB.GetPosPixel();
1441 aPos.Y() -= nYDiff;
1442 aHeaderCB.SetPosPixel(aPos);
1444 aPos = aRepeatHeaderCB.GetPosPixel();
1445 aPos.Y() -= nYDiff;
1446 aRepeatHeaderCB.SetPosPixel(aPos);
1448 aPos = aDontSplitCB.GetPosPixel(); // hier muss eine Luecke geschlossen werden
1449 aPos.Y() -= nYDiff;
1450 aBorderCB.SetPosPixel(aPos);
1452 aPos = aTableInsertFL.GetPosPixel();
1453 aPos.Y() -= nYDiff;
1454 aTableInsertFL.SetPosPixel(aPos);
1456 aPos = aNumFormattingCB.GetPosPixel();
1457 aPos.Y() -= nYDiff;
1458 aNumFormattingCB.SetPosPixel(aPos);
1460 aPos = aNumFmtFormattingCB.GetPosPixel();
1461 aPos.Y() -= nYDiff;
1462 aNumFmtFormattingCB.SetPosPixel(aPos);
1464 aPos = aNumAlignmentCB.GetPosPixel();
1465 aPos.Y() -= nYDiff;
1466 aNumAlignmentCB.SetPosPixel(aPos);
1468 aCaptionFL.Hide();
1469 aCaptionCB.Hide();
1470 aCaptionFT.Hide();
1471 aCaptionPB.Hide();
1473 aDontSplitCB.Hide();
1476 SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode);
1477 USHORT nInsTblFlags = aInsOpts.mnInsMode;
1479 aHeaderCB.Check(0 != (nInsTblFlags & tabopts::HEADLINE));
1480 aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0);
1481 aDontSplitCB.Check(!(nInsTblFlags & tabopts::SPLIT_LAYOUT));
1482 aBorderCB.Check(0 != (nInsTblFlags & tabopts::DEFAULT_BORDER));
1484 aNumFormattingCB.Check(pModOpt->IsInsTblFormatNum(bHTMLMode));
1485 aNumFmtFormattingCB.Check(pModOpt->IsInsTblChangeNumFormat(bHTMLMode));
1486 aNumAlignmentCB.Check(pModOpt->IsInsTblAlignNum(bHTMLMode));
1488 aHeaderCB.SaveValue();
1489 aRepeatHeaderCB.SaveValue();
1490 aDontSplitCB.SaveValue();
1491 aBorderCB.SaveValue();
1492 aNumFormattingCB.SaveValue();
1493 aNumFmtFormattingCB.SaveValue();
1494 aNumAlignmentCB.SaveValue();
1496 CheckBoxHdl(0);
1498 /*-----------------18.01.97 12.42-------------------
1500 --------------------------------------------------*/
1501 IMPL_LINK(SwTableOptionsTabPage, CheckBoxHdl, CheckBox*, EMPTYARG)
1503 aNumFmtFormattingCB.Enable(aNumFormattingCB.IsChecked());
1504 aNumAlignmentCB.Enable(aNumFormattingCB.IsChecked());
1505 aRepeatHeaderCB.Enable(aHeaderCB.IsChecked());
1506 return 0;
1508 void SwTableOptionsTabPage::PageCreated (SfxAllItemSet aSet)
1510 SFX_ITEMSET_ARG (&aSet,pWrtSh,SwWrtShellItem,SID_WRT_SHELL,sal_False);
1511 if (pWrtSh)
1512 SetWrtShell(pWrtSh->GetValue());
1514 /* \f */
1516 /*-----------------31.10.97 17:55-------------------
1517 TabPage fuer ShadowCrsr
1518 --------------------------------------------------*/
1520 SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent,
1521 const SfxItemSet& rSet )
1522 : SfxTabPage(pParent, SW_RES(TP_OPTSHDWCRSR), rSet),
1523 aUnprintFL ( this, SW_RES( FL_NOPRINT ) ),
1524 aParaCB ( this, SW_RES( CB_PARA ) ),
1525 aSHyphCB ( this, SW_RES( CB_SHYPH ) ),
1526 aSpacesCB ( this, SW_RES( CB_SPACE ) ),
1527 aHSpacesCB ( this, SW_RES( CB_HSPACE ) ),
1528 aTabCB ( this, SW_RES( CB_TAB ) ),
1529 aBreakCB ( this, SW_RES( CB_BREAK ) ),
1530 aCharHiddenCB ( this, SW_RES( CB_CHAR_HIDDEN ) ),
1531 aFldHiddenCB ( this, SW_RES( CB_FLD_HIDDEN ) ),
1532 aFldHiddenParaCB ( this, SW_RES( CB_FLD_HIDDEN_PARA ) ),
1534 aSeparatorFL( this, SW_RES( FL_SEPARATOR_SHDW)),
1536 aFlagFL( this, SW_RES( FL_SHDWCRSFLAG )),
1537 aOnOffCB( this, SW_RES( CB_SHDWCRSONOFF )),
1539 aFillModeFT( this, SW_RES( FT_SHDWCRSFILLMODE )),
1540 aFillMarginRB( this, SW_RES( RB_SHDWCRSFILLMARGIN )),
1541 aFillIndentRB( this, SW_RES( RB_SHDWCRSFILLINDENT )),
1542 aFillTabRB( this, SW_RES( RB_SHDWCRSFILLTAB )),
1543 aFillSpaceRB( this, SW_RES( RB_SHDWCRSFILLSPACE )),
1544 aCrsrOptFL ( this, SW_RES( FL_CRSR_OPT)),
1545 aCrsrInProtCB( this, SW_RES( CB_ALLOW_IN_PROT ))
1547 FreeResource();
1548 const SfxPoolItem* pItem = 0;
1549 SwShadowCursorItem aOpt;
1551 if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ))
1552 aOpt = *(SwShadowCursorItem*)pItem;
1554 aOnOffCB.Check( aOpt.IsOn() );
1556 BYTE eMode = aOpt.GetMode();
1557 aFillIndentRB.Check( FILL_INDENT == eMode );
1558 aFillMarginRB.Check( FILL_MARGIN == eMode );
1559 aFillTabRB.Check( FILL_TAB == eMode );
1560 aFillSpaceRB.Check( FILL_SPACE == eMode );
1562 if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem )
1563 && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
1565 aTabCB .Hide();
1566 aCharHiddenCB.Hide();
1567 aFldHiddenCB .Hide();
1568 aFldHiddenParaCB.Hide();
1569 aBreakCB.SetPosPixel(aTabCB.GetPosPixel());
1570 aFlagFL .Hide();
1571 aOnOffCB .Hide();
1572 aFillModeFT .Hide();
1573 aFillMarginRB .Hide();
1574 aFillIndentRB .Hide();
1575 aFillTabRB .Hide();
1576 aFillSpaceRB .Hide();
1577 aCrsrOptFL .Hide();
1578 aCrsrInProtCB .Hide();
1579 aSeparatorFL.Hide();
1580 long nWidth = aFlagFL.GetSizePixel().Width() + aFlagFL.GetPosPixel().X()
1581 - aUnprintFL.GetPosPixel().X();
1582 Size aSize(aUnprintFL.GetSizePixel());
1583 aSize.Width() = nWidth;
1584 aUnprintFL.SetSizePixel(aSize);
1588 SwShdwCrsrOptionsTabPage::~SwShdwCrsrOptionsTabPage()
1593 SfxTabPage* SwShdwCrsrOptionsTabPage::Create( Window* pParent, const SfxItemSet& rSet )
1595 return new SwShdwCrsrOptionsTabPage( pParent, rSet );
1598 BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
1600 SwShadowCursorItem aOpt;
1601 aOpt.SetOn( aOnOffCB.IsChecked() );
1603 BYTE eMode;
1604 if( aFillIndentRB.IsChecked() )
1605 eMode= FILL_INDENT;
1606 else if( aFillMarginRB.IsChecked() )
1607 eMode = FILL_MARGIN;
1608 else if( aFillTabRB.IsChecked() )
1609 eMode = FILL_TAB;
1610 else
1611 eMode = FILL_SPACE;
1612 aOpt.SetMode( eMode );
1614 BOOL bRet = FALSE;
1615 const SfxPoolItem* pItem = 0;
1616 if( SFX_ITEM_SET != rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem )
1617 || ((SwShadowCursorItem&)*pItem) != aOpt )
1619 rSet.Put( aOpt );
1620 bRet = TRUE;
1623 if( aCrsrInProtCB.IsChecked() != aCrsrInProtCB.GetSavedValue())
1625 rSet.Put(SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, aCrsrInProtCB.IsChecked()));
1626 bRet |= TRUE;
1629 const SwDocDisplayItem* pOldAttr = (const SwDocDisplayItem*)
1630 GetOldItem(GetItemSet(), FN_PARAM_DOCDISP);
1632 SwDocDisplayItem aDisp;
1633 if(pOldAttr)
1634 aDisp = *pOldAttr;
1636 aDisp.bParagraphEnd = aParaCB .IsChecked();
1637 aDisp.bTab = aTabCB .IsChecked();
1638 aDisp.bSpace = aSpacesCB .IsChecked();
1639 aDisp.bNonbreakingSpace = aHSpacesCB .IsChecked();
1640 aDisp.bSoftHyphen = aSHyphCB .IsChecked();
1641 aDisp.bFldHiddenText = aFldHiddenCB .IsChecked();
1642 aDisp.bCharHiddenText = aCharHiddenCB.IsChecked();
1643 aDisp.bShowHiddenPara = aFldHiddenParaCB .IsChecked();
1644 aDisp.bManualBreak = aBreakCB .IsChecked();
1646 bRet |= (!pOldAttr || aDisp != *pOldAttr);
1647 if(bRet)
1648 bRet = 0 != rSet.Put(aDisp);
1650 return bRet;
1653 void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet& rSet )
1655 const SfxPoolItem* pItem = 0;
1656 SwShadowCursorItem aOpt;
1658 if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ))
1659 aOpt = *(SwShadowCursorItem*)pItem;
1661 aOnOffCB.Check( aOpt.IsOn() );
1663 BYTE eMode = aOpt.GetMode();
1664 aFillIndentRB.Check( FILL_INDENT == eMode );
1665 aFillMarginRB.Check( FILL_MARGIN == eMode );
1666 aFillTabRB.Check( FILL_TAB == eMode );
1667 aFillSpaceRB.Check( FILL_SPACE == eMode );
1669 if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem ))
1670 aCrsrInProtCB.Check(((const SfxBoolItem*)pItem)->GetValue());
1671 aCrsrInProtCB.SaveValue();
1673 const SwDocDisplayItem* pDocDisplayAttr = 0;
1675 rSet.GetItemState( FN_PARAM_DOCDISP, FALSE,
1676 (const SfxPoolItem**)&pDocDisplayAttr );
1677 if(pDocDisplayAttr)
1679 aParaCB .Check (pDocDisplayAttr->bParagraphEnd );
1680 aTabCB .Check (pDocDisplayAttr->bTab );
1681 aSpacesCB .Check (pDocDisplayAttr->bSpace );
1682 aHSpacesCB .Check (pDocDisplayAttr->bNonbreakingSpace );
1683 aSHyphCB .Check (pDocDisplayAttr->bSoftHyphen );
1684 aCharHiddenCB.Check (pDocDisplayAttr->bCharHiddenText );
1685 aFldHiddenCB .Check (pDocDisplayAttr->bFldHiddenText );
1686 aFldHiddenParaCB.Check (pDocDisplayAttr->bShowHiddenPara );
1687 aBreakCB .Check (pDocDisplayAttr->bManualBreak );
1691 /*-----------------31.10.97 17:55-------------------
1692 TabPage fuer Redlining
1693 --------------------------------------------------*/
1695 struct CharAttr
1697 USHORT nItemId;
1698 USHORT nAttr;
1701 // Editieren entspricht Einfuegen-Attributen
1702 static CharAttr __FAR_DATA aRedlineAttr[] =
1704 { SID_ATTR_CHAR_CASEMAP, SVX_CASEMAP_NOT_MAPPED },
1705 { SID_ATTR_CHAR_WEIGHT, WEIGHT_BOLD },
1706 { SID_ATTR_CHAR_POSTURE, ITALIC_NORMAL },
1707 { SID_ATTR_CHAR_UNDERLINE, UNDERLINE_SINGLE },
1708 { SID_ATTR_CHAR_UNDERLINE, UNDERLINE_DOUBLE },
1709 { SID_ATTR_CHAR_STRIKEOUT, STRIKEOUT_SINGLE },
1710 { SID_ATTR_CHAR_CASEMAP, SVX_CASEMAP_VERSALIEN },
1711 { SID_ATTR_CHAR_CASEMAP, SVX_CASEMAP_GEMEINE },
1712 { SID_ATTR_CHAR_CASEMAP, SVX_CASEMAP_KAPITAELCHEN },
1713 { SID_ATTR_CHAR_CASEMAP, SVX_CASEMAP_TITEL },
1714 { SID_ATTR_BRUSH, 0 }
1716 // Items from aRedlineAttr relevant for InsertAttr: strikethrough is
1717 // not used
1718 static USHORT aInsertAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
1720 // Items from aRedlineAttr relevant for DeleteAttr: underline and
1721 // double underline is not used
1722 static USHORT aDeletedAttrMap[] = { 0, 1, 2, 5, 6, 7, 8, 9, 10 };
1724 // Items from aRedlineAttr relevant for ChangeAttr: strikethrough is
1725 // not used
1726 static USHORT aChangedAttrMap[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 };
1728 /*-----------------------------------------------------------------------
1729 Beschreibung: Markierungsvorschau
1730 -----------------------------------------------------------------------*/
1732 SwMarkPreview::SwMarkPreview( Window *pParent, const ResId& rResID ) :
1734 Window(pParent, rResID),
1735 m_aTransCol( COL_TRANSPARENT ),
1736 m_aMarkCol( COL_LIGHTRED ),
1737 nMarkPos(0)
1740 InitColors();
1741 SetMapMode(MAP_PIXEL);
1743 const Size aSz(GetOutputSizePixel());
1745 // Seite
1746 aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
1748 ULONG nOutWPix = aPage.GetWidth();
1749 ULONG nOutHPix = aPage.GetHeight();
1751 // PrintArea
1752 ULONG nLBorder = 8;
1753 ULONG nRBorder = 8;
1754 ULONG nTBorder = 4;
1755 ULONG nBBorder = 4;
1757 aLeftPagePrtArea = Rectangle(Point(nLBorder, nTBorder), Point((nOutWPix - 1) - nRBorder, (nOutHPix - 1) - nBBorder));
1758 USHORT nWidth = (USHORT)aLeftPagePrtArea.GetWidth();
1759 USHORT nKorr = (nWidth & 1) != 0 ? 0 : 1;
1760 aLeftPagePrtArea.SetSize(Size(nWidth / 2 - (nLBorder + nRBorder) / 2 + nKorr, aLeftPagePrtArea.GetHeight()));
1762 aRightPagePrtArea = aLeftPagePrtArea;
1763 aRightPagePrtArea.Move(aLeftPagePrtArea.GetWidth() + nLBorder + nRBorder + 1, 0);
1766 SwMarkPreview::~SwMarkPreview()
1770 void SwMarkPreview::InitColors( void )
1772 // m_aTransCol and m_aMarkCol are _not_ changed because they are set from outside!
1774 const StyleSettings& rSettings = GetSettings().GetStyleSettings();
1775 m_aBgCol = Color( rSettings.GetWindowColor() );
1777 BOOL bHC = m_aBgCol.IsDark();
1778 m_aLineCol = bHC? SwViewOption::GetFontColor() : Color( COL_BLACK );
1779 m_aShadowCol = bHC? m_aBgCol : rSettings.GetShadowColor();
1780 m_aTxtCol = bHC? SwViewOption::GetFontColor() : Color( COL_GRAY );
1781 m_aPrintAreaCol = m_aTxtCol;
1784 void SwMarkPreview::DataChanged( const DataChangedEvent& rDCEvt )
1786 Window::DataChanged( rDCEvt );
1788 if( rDCEvt.GetType() == DATACHANGED_SETTINGS && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
1789 InitColors();
1792 void SwMarkPreview::Paint(const Rectangle &/*rRect*/)
1794 // Schatten zeichnen
1795 Rectangle aShadow(aPage);
1796 aShadow += Point(3, 3);
1797 DrawRect( aShadow, m_aShadowCol, m_aTransCol );
1799 // Seite zeichnen
1800 DrawRect( aPage, m_aBgCol, m_aLineCol );
1802 // Separator zeichnen
1803 Rectangle aPageSeparator(aPage);
1804 aPageSeparator.SetSize(Size(2, aPageSeparator.GetHeight()));
1805 aPageSeparator.Move(aPage.GetWidth() / 2 - 1, 0);
1806 DrawRect( aPageSeparator, m_aLineCol, m_aTransCol );
1808 PaintPage(aLeftPagePrtArea);
1809 PaintPage(aRightPagePrtArea);
1811 Rectangle aLeftMark(Point(aPage.Left() + 2, aLeftPagePrtArea.Top() + 4), Size(aLeftPagePrtArea.Left() - 4, 2));
1812 Rectangle aRightMark(Point(aRightPagePrtArea.Right() + 2, aRightPagePrtArea.Bottom() - 6), Size(aLeftPagePrtArea.Left() - 4, 2));
1814 switch (nMarkPos)
1816 case 1: // Links
1817 aRightMark.SetPos(Point(aRightPagePrtArea.Left() - 2 - aRightMark.GetWidth(), aRightMark.Top()));
1818 break;
1820 case 2: // Rechts
1821 aLeftMark.SetPos(Point(aLeftPagePrtArea.Right() + 2, aLeftMark.Top()));
1822 break;
1824 case 3: // Aussen
1825 break;
1827 case 4: // Innen
1828 aLeftMark.SetPos(Point(aLeftPagePrtArea.Right() + 2, aLeftMark.Top()));
1829 aRightMark.SetPos(Point(aRightPagePrtArea.Left() - 2 - aRightMark.GetWidth(), aRightMark.Top()));
1830 break;
1832 case 0: // Keine
1833 default:
1834 return;
1836 DrawRect( aLeftMark, m_aMarkCol, m_aTransCol );
1837 DrawRect( aRightMark, m_aMarkCol, m_aTransCol );
1840 void SwMarkPreview::PaintPage(const Rectangle &rRect)
1842 // PrintArea zeichnen
1843 DrawRect(rRect, m_aTransCol, m_aPrintAreaCol );
1845 // Testabsatz zeichnen
1846 ULONG nLTxtBorder = 4;
1847 ULONG nRTxtBorder = 4;
1848 ULONG nTTxtBorder = 4;
1850 Rectangle aTextLine = rRect;
1851 aTextLine.SetSize(Size(aTextLine.GetWidth(), 2));
1852 aTextLine.Left() += nLTxtBorder;
1853 aTextLine.Right() -= nRTxtBorder;
1854 aTextLine.Move(0, nTTxtBorder);
1856 sal_Int32 nStep;
1857 USHORT nLines;
1859 nStep = aTextLine.GetHeight() + 2;
1860 nLines = (USHORT)(rRect.GetHeight() / (aTextLine.GetHeight() + 2)) - 1;
1862 // Text simulieren
1864 for (USHORT i = 0; i < nLines; ++i)
1866 if (i == (nLines - 1))
1867 aTextLine.SetSize(Size(aTextLine.GetWidth() / 2, aTextLine.GetHeight()));
1869 if (aPage.IsInside(aTextLine))
1870 DrawRect(aTextLine, m_aTxtCol, m_aTransCol );
1872 aTextLine.Move(0, nStep);
1874 aTextLine.Move(0, -nStep);
1877 void SwMarkPreview::DrawRect(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor)
1879 SetFillColor(rFillColor);
1880 SetLineColor(rLineColor);
1881 Window::DrawRect(rRect);
1884 namespace
1886 void lcl_FillRedlineAttrListBox(
1887 ListBox& rLB, const AuthorCharAttr& rAttrToSelect,
1888 const USHORT* pAttrMap, const USHORT nAttrMapSize)
1890 for (USHORT i = 0; i != nAttrMapSize; ++i)
1892 CharAttr& rAttr(aRedlineAttr[pAttrMap[i]]);
1893 rLB.SetEntryData(i, &rAttr);
1894 if (rAttr.nItemId == rAttrToSelect.nItemId &&
1895 rAttr.nAttr == rAttrToSelect.nAttr)
1896 rLB.SelectEntryPos(i);
1901 SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( Window* pParent,
1902 const SfxItemSet& rSet )
1903 : SfxTabPage(pParent, SW_RES(TP_REDLINE_OPT), rSet),
1905 aInsertFL( this, SW_RES( FL_TE )),
1907 aInsertFT( this, SW_RES( FT_CHG_INSERT )),
1908 aInsertAttrFT( this, SW_RES( FT_INS_ATTR )),
1909 aInsertLB( this, SW_RES( LB_INS_ATTR )),
1910 aInsertColorFT( this, SW_RES( FT_INS_COL )),
1911 aInsertColorLB( this, SW_RES( LB_INS_COL )),
1912 aInsertedPreviewWN( this, SW_RES( WIN_INS )),
1914 aDeletedFT( this, SW_RES( FT_CHG_DELETE )),
1915 aDeletedAttrFT( this, SW_RES( FT_DEL_ATTR )),
1916 aDeletedLB( this, SW_RES( LB_DEL_ATTR )),
1917 aDeletedColorFT( this, SW_RES( FT_DEL_COL )),
1918 aDeletedColorLB( this, SW_RES( LB_DEL_COL )),
1919 aDeletedPreviewWN( this, SW_RES( WIN_DEL )),
1921 aChangedFT( this, SW_RES( FT_CHG_CHANGE )),
1922 aChangedAttrFT( this, SW_RES( FT_CHG_ATTR )),
1923 aChangedLB( this, SW_RES( LB_CHG_ATTR )),
1924 aChangedColorFT( this, SW_RES( FT_CHG_COL )),
1925 aChangedColorLB( this, SW_RES( LB_CHG_COL )),
1926 aChangedPreviewWN( this, SW_RES( WIN_CHG )),
1928 aChangedFL ( this, SW_RES( FL_LC )),
1930 aMarkPosFT ( this, SW_RES( FT_MARKPOS )),
1931 aMarkPosLB ( this, SW_RES( LB_MARKPOS )),
1932 aMarkColorFT ( this, SW_RES( FT_LC_COL )),
1933 aMarkColorLB ( this, SW_RES( LB_LC_COL )),
1934 aMarkPreviewWN ( this, SW_RES( WIN_MARK )),
1936 sAuthor ( SW_RES( STR_AUTHOR )),
1937 sNone ( SW_RES( STR_NOTHING ))
1940 FreeResource();
1942 for(USHORT i = 0; i < aInsertLB.GetEntryCount(); i++)
1944 String sEntry(aInsertLB.GetEntry(i));
1945 aDeletedLB.InsertEntry(sEntry);
1946 aChangedLB.InsertEntry(sEntry);
1949 // remove strikethrough from insert and change and underline + double
1950 // underline from delete
1951 aInsertLB.RemoveEntry(5);
1952 aChangedLB.RemoveEntry(5);
1953 aDeletedLB.RemoveEntry(4);
1954 aDeletedLB.RemoveEntry(3);
1956 Link aLk = LINK(this, SwRedlineOptionsTabPage, AttribHdl);
1957 aInsertLB.SetSelectHdl( aLk );
1958 aDeletedLB.SetSelectHdl( aLk );
1959 aChangedLB.SetSelectHdl( aLk );
1961 aLk = LINK(this, SwRedlineOptionsTabPage, ColorHdl);
1962 aInsertColorLB.SetSelectHdl( aLk );
1963 aDeletedColorLB.SetSelectHdl( aLk );
1964 aChangedColorLB.SetSelectHdl( aLk );
1966 aLk = LINK(this, SwRedlineOptionsTabPage, ChangedMaskPrevHdl);
1967 aMarkPosLB.SetSelectHdl( aLk );
1968 aMarkColorLB.SetSelectHdl( aLk );
1971 SwRedlineOptionsTabPage::~SwRedlineOptionsTabPage()
1975 SfxTabPage* SwRedlineOptionsTabPage::Create( Window* pParent, const SfxItemSet& rSet)
1977 return new SwRedlineOptionsTabPage( pParent, rSet );
1980 BOOL SwRedlineOptionsTabPage::FillItemSet( SfxItemSet& )
1982 CharAttr *pAttr;
1983 SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
1985 AuthorCharAttr aInsertedAttr;
1986 AuthorCharAttr aDeletedAttr;
1987 AuthorCharAttr aChangedAttr;
1989 AuthorCharAttr aOldInsertAttr(pOpt->GetInsertAuthorAttr());
1990 AuthorCharAttr aOldDeletedAttr(pOpt->GetDeletedAuthorAttr());
1991 AuthorCharAttr aOldChangedAttr(pOpt->GetFormatAuthorAttr());
1993 ColorData nOldMarkColor = pOpt->GetMarkAlignColor().GetColor();
1994 USHORT nOldMarkMode = pOpt->GetMarkAlignMode();
1996 USHORT nPos = aInsertLB.GetSelectEntryPos();
1997 if (nPos != LISTBOX_ENTRY_NOTFOUND)
1999 pAttr = (CharAttr *)aInsertLB.GetEntryData(nPos);
2000 aInsertedAttr.nItemId = pAttr->nItemId;
2001 aInsertedAttr.nAttr = pAttr->nAttr;
2003 nPos = aInsertColorLB.GetSelectEntryPos();
2005 switch (nPos)
2007 case 0:
2008 aInsertedAttr.nColor = COL_NONE;
2009 break;
2010 case 1:
2011 case LISTBOX_ENTRY_NOTFOUND:
2012 aInsertedAttr.nColor = COL_TRANSPARENT;
2013 break;
2014 default:
2015 aInsertedAttr.nColor = aInsertColorLB.GetEntryColor(nPos).GetColor();
2016 break;
2019 pOpt->SetInsertAuthorAttr(aInsertedAttr);
2022 nPos = aDeletedLB.GetSelectEntryPos();
2023 if (nPos != LISTBOX_ENTRY_NOTFOUND)
2025 pAttr = (CharAttr *)aDeletedLB.GetEntryData(nPos);
2026 aDeletedAttr.nItemId = pAttr->nItemId;
2027 aDeletedAttr.nAttr = pAttr->nAttr;
2029 nPos = aDeletedColorLB.GetSelectEntryPos();
2031 switch (nPos)
2033 case 0:
2034 aDeletedAttr.nColor = COL_NONE;
2035 break;
2036 case 1:
2037 case LISTBOX_ENTRY_NOTFOUND:
2038 aDeletedAttr.nColor = COL_TRANSPARENT;
2039 break;
2040 default:
2041 aDeletedAttr.nColor = aDeletedColorLB.GetEntryColor(nPos).GetColor();
2042 break;
2045 pOpt->SetDeletedAuthorAttr(aDeletedAttr);
2048 nPos = aChangedLB.GetSelectEntryPos();
2049 if (nPos != LISTBOX_ENTRY_NOTFOUND)
2051 pAttr = (CharAttr *)aChangedLB.GetEntryData(nPos);
2052 aChangedAttr.nItemId = pAttr->nItemId;
2053 aChangedAttr.nAttr = pAttr->nAttr;
2055 nPos = aChangedColorLB.GetSelectEntryPos();
2057 switch (nPos)
2059 case 0:
2060 aChangedAttr.nColor = COL_NONE;
2061 break;
2062 case 1:
2063 case LISTBOX_ENTRY_NOTFOUND:
2064 aChangedAttr.nColor = COL_TRANSPARENT;
2065 break;
2066 default:
2067 aChangedAttr.nColor = aChangedColorLB.GetEntryColor(nPos).GetColor();
2068 break;
2071 pOpt->SetFormatAuthorAttr(aChangedAttr);
2074 nPos = 0;
2075 switch (aMarkPosLB.GetSelectEntryPos())
2077 case 0: nPos = text::HoriOrientation::NONE; break;
2078 case 1: nPos = text::HoriOrientation::LEFT; break;
2079 case 2: nPos = text::HoriOrientation::RIGHT; break;
2080 case 3: nPos = text::HoriOrientation::OUTSIDE; break;
2081 case 4: nPos = text::HoriOrientation::INSIDE; break;
2083 pOpt->SetMarkAlignMode(nPos);
2085 pOpt->SetMarkAlignColor(aMarkColorLB.GetSelectEntryColor());
2087 if (!(aInsertedAttr == aOldInsertAttr) ||
2088 !(aDeletedAttr == aOldDeletedAttr) ||
2089 !(aChangedAttr == aOldChangedAttr) ||
2090 nOldMarkColor != pOpt->GetMarkAlignColor().GetColor() ||
2091 nOldMarkMode != pOpt->GetMarkAlignMode())
2093 // Alle Dokumente aktualisieren
2094 TypeId aType(TYPE(SwDocShell));
2095 SwDocShell* pDocShell = (SwDocShell*)SfxObjectShell::GetFirst(&aType);
2097 while( pDocShell )
2099 pDocShell->GetWrtShell()->UpdateRedlineAttr();
2100 pDocShell = (SwDocShell*)SfxObjectShell::GetNext(*pDocShell, &aType);
2104 return FALSE;
2107 void SwRedlineOptionsTabPage::Reset( const SfxItemSet& )
2109 const SwModuleOptions *pOpt = SW_MOD()->GetModuleConfig();
2111 const AuthorCharAttr &rInsertAttr = pOpt->GetInsertAuthorAttr();
2112 const AuthorCharAttr &rDeletedAttr = pOpt->GetDeletedAuthorAttr();
2113 const AuthorCharAttr &rChangedAttr = pOpt->GetFormatAuthorAttr();
2115 // Preview initialisieren
2116 InitFontStyle(aInsertedPreviewWN);
2117 InitFontStyle(aDeletedPreviewWN);
2118 InitFontStyle(aChangedPreviewWN);
2120 // Farblistboxen initialisieren
2121 String sColor;
2122 aInsertColorLB.SetUpdateMode(FALSE);
2123 aDeletedColorLB.SetUpdateMode(FALSE);
2124 aChangedColorLB.SetUpdateMode(FALSE);
2125 aMarkColorLB.SetUpdateMode(FALSE);
2127 aInsertColorLB.InsertEntry(sNone);
2128 aDeletedColorLB.InsertEntry(sNone);
2129 aChangedColorLB.InsertEntry(sNone);
2131 aInsertColorLB.InsertEntry(sAuthor);
2132 aDeletedColorLB.InsertEntry(sAuthor);
2133 aChangedColorLB.InsertEntry(sAuthor);
2135 XColorTable* pColorTbl = XColorTable::GetStdColorTable();
2136 USHORT i;
2137 for( i = 0; i < pColorTbl->Count(); ++i )
2139 XColorEntry* pEntry = pColorTbl->GetColor( i );
2140 Color aColor = pEntry->GetColor();
2141 String sName = pEntry->GetName();
2143 aInsertColorLB.InsertEntry( aColor, sName );
2144 aDeletedColorLB.InsertEntry( aColor, sName );
2145 aChangedColorLB.InsertEntry( aColor, sName );
2146 aMarkColorLB.InsertEntry( aColor, sName );
2148 aInsertColorLB.SetUpdateMode( TRUE );
2149 aDeletedColorLB.SetUpdateMode( TRUE );
2150 aChangedColorLB.SetUpdateMode( TRUE );
2151 aMarkColorLB.SetUpdateMode( TRUE );
2153 ColorData nColor = rInsertAttr.nColor;
2155 switch (nColor)
2157 case COL_TRANSPARENT:
2158 aInsertColorLB.SelectEntryPos(1);
2159 break;
2160 case COL_NONE:
2161 aInsertColorLB.SelectEntryPos(0);
2162 break;
2163 default:
2164 aInsertColorLB.SelectEntry(Color(nColor));
2167 nColor = rDeletedAttr.nColor;
2169 switch (nColor)
2171 case COL_TRANSPARENT:
2172 aDeletedColorLB.SelectEntryPos(1);
2173 break;
2174 case COL_NONE:
2175 aDeletedColorLB.SelectEntryPos(0);
2176 break;
2177 default:
2178 aDeletedColorLB.SelectEntry(Color(nColor));
2181 nColor = rChangedAttr.nColor;
2183 switch (nColor)
2185 case COL_TRANSPARENT:
2186 aChangedColorLB.SelectEntryPos(1);
2187 break;
2188 case COL_NONE:
2189 aChangedColorLB.SelectEntryPos(0);
2190 break;
2191 default:
2192 aChangedColorLB.SelectEntry(Color(nColor));
2195 aMarkColorLB.SelectEntry(pOpt->GetMarkAlignColor());
2197 aInsertLB.SelectEntryPos(0);
2198 aDeletedLB.SelectEntryPos(0);
2199 aChangedLB.SelectEntryPos(0);
2201 lcl_FillRedlineAttrListBox(aInsertLB, rInsertAttr, aInsertAttrMap,
2202 sizeof(aInsertAttrMap) / sizeof(USHORT));
2203 lcl_FillRedlineAttrListBox(aDeletedLB, rDeletedAttr, aDeletedAttrMap,
2204 sizeof(aDeletedAttrMap) / sizeof(USHORT));
2205 lcl_FillRedlineAttrListBox(aChangedLB, rChangedAttr, aChangedAttrMap,
2206 sizeof(aChangedAttrMap) / sizeof(USHORT));
2208 USHORT nPos = 0;
2209 switch (pOpt->GetMarkAlignMode())
2211 case text::HoriOrientation::NONE: nPos = 0; break;
2212 case text::HoriOrientation::LEFT: nPos = 1; break;
2213 case text::HoriOrientation::RIGHT: nPos = 2; break;
2214 case text::HoriOrientation::OUTSIDE: nPos = 3; break;
2215 case text::HoriOrientation::INSIDE: nPos = 4; break;
2217 aMarkPosLB.SelectEntryPos(nPos);
2219 // Einstellungen in Preview anzeigen
2220 AttribHdl(&aInsertLB);
2221 ColorHdl(&aInsertColorLB);
2222 AttribHdl(&aDeletedLB);
2223 ColorHdl(&aInsertColorLB);
2224 AttribHdl(&aChangedLB);
2225 ColorHdl(&aChangedColorLB);
2227 ChangedMaskPrevHdl();
2230 IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox *, pLB )
2232 SvxFontPrevWindow *pPrev = 0;
2233 ColorListBox *pColorLB;
2235 if (pLB == &aInsertLB)
2237 pColorLB = &aInsertColorLB;
2238 pPrev = &aInsertedPreviewWN;
2240 else if (pLB == &aDeletedLB)
2242 pColorLB = &aDeletedColorLB;
2243 pPrev = &aDeletedPreviewWN;
2245 else
2247 pColorLB = &aChangedColorLB;
2248 pPrev = &aChangedPreviewWN;
2251 SvxFont& rFont = pPrev->GetFont();
2252 SvxFont& rCJKFont = pPrev->GetCJKFont();
2254 rFont.SetWeight(WEIGHT_NORMAL);
2255 rCJKFont.SetWeight(WEIGHT_NORMAL);
2256 rFont.SetItalic(ITALIC_NONE);
2257 rCJKFont.SetItalic(ITALIC_NONE);
2258 rFont.SetUnderline(UNDERLINE_NONE);
2259 rCJKFont.SetUnderline(UNDERLINE_NONE);
2260 rFont.SetStrikeout(STRIKEOUT_NONE);
2261 rCJKFont.SetStrikeout(STRIKEOUT_NONE);
2262 rFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED);
2263 rCJKFont.SetCaseMap(SVX_CASEMAP_NOT_MAPPED);
2265 USHORT nPos = pColorLB->GetSelectEntryPos();
2267 switch( nPos )
2269 case 0:
2270 rFont.SetColor( Color( COL_BLACK ) );
2271 rCJKFont.SetColor( Color( COL_BLACK ) );
2272 break;
2273 case 1:
2274 case LISTBOX_ENTRY_NOTFOUND:
2275 rFont.SetColor( Color( COL_RED ) );
2276 rCJKFont.SetColor( Color( COL_RED ) );
2277 break;
2278 default:
2279 rFont.SetColor( pColorLB->GetEntryColor( nPos ) );
2280 rCJKFont.SetColor( pColorLB->GetEntryColor( nPos ) );
2281 break;
2284 nPos = pLB->GetSelectEntryPos();
2285 if( nPos == LISTBOX_ENTRY_NOTFOUND )
2286 nPos = 0;
2288 CharAttr* pAttr = ( CharAttr* ) pLB->GetEntryData( nPos );
2289 //switch off preview background color
2290 pPrev->ResetColor();
2291 switch (pAttr->nItemId)
2293 case SID_ATTR_CHAR_WEIGHT:
2294 rFont.SetWeight( ( FontWeight ) pAttr->nAttr );
2295 rCJKFont.SetWeight( ( FontWeight ) pAttr->nAttr );
2296 break;
2298 case SID_ATTR_CHAR_POSTURE:
2299 rFont.SetItalic( ( FontItalic ) pAttr->nAttr );
2300 rCJKFont.SetItalic( ( FontItalic ) pAttr->nAttr );
2301 break;
2303 case SID_ATTR_CHAR_UNDERLINE:
2304 rFont.SetUnderline( ( FontUnderline ) pAttr->nAttr );
2305 rCJKFont.SetUnderline( ( FontUnderline ) pAttr->nAttr );
2306 break;
2308 case SID_ATTR_CHAR_STRIKEOUT:
2309 rFont.SetStrikeout( ( FontStrikeout ) pAttr->nAttr );
2310 rCJKFont.SetStrikeout( ( FontStrikeout ) pAttr->nAttr );
2311 break;
2313 case SID_ATTR_CHAR_CASEMAP:
2314 rFont.SetCaseMap( ( SvxCaseMap ) pAttr->nAttr );
2315 rCJKFont.SetCaseMap( ( SvxCaseMap ) pAttr->nAttr );
2316 break;
2318 case SID_ATTR_BRUSH:
2320 nPos = pColorLB->GetSelectEntryPos();
2321 if( nPos )
2322 pPrev->SetColor( pColorLB->GetSelectEntryColor() );
2323 else
2324 pPrev->SetColor( Color( COL_LIGHTGRAY ) );
2326 rFont.SetColor( Color( COL_BLACK ) );
2327 rCJKFont.SetColor( Color( COL_BLACK ) );
2329 break;
2332 pPrev->Invalidate();
2334 return 0;
2337 IMPL_LINK( SwRedlineOptionsTabPage, ColorHdl, ColorListBox *, pColorLB )
2339 SvxFontPrevWindow *pPrev = 0;
2340 ListBox* pLB;
2342 if (pColorLB == &aInsertColorLB)
2344 pLB = &aInsertLB;
2345 pPrev = &aInsertedPreviewWN;
2347 else if (pColorLB == &aDeletedColorLB)
2349 pLB = &aDeletedLB;
2350 pPrev = &aDeletedPreviewWN;
2352 else
2354 pLB = &aChangedLB;
2355 pPrev = &aChangedPreviewWN;
2358 SvxFont& rFont = pPrev->GetFont();
2359 SvxFont& rCJKFont = pPrev->GetCJKFont();
2360 USHORT nPos = pLB->GetSelectEntryPos();
2361 if( nPos == LISTBOX_ENTRY_NOTFOUND )
2362 nPos = 0;
2364 CharAttr* pAttr = ( CharAttr* ) pLB->GetEntryData( nPos );
2366 if( pAttr->nItemId == SID_ATTR_BRUSH )
2368 rFont.SetColor( Color( COL_BLACK ) );
2369 rCJKFont.SetColor( Color( COL_BLACK ) );
2370 nPos = pColorLB->GetSelectEntryPos();
2371 if( nPos && nPos != LISTBOX_ENTRY_NOTFOUND )
2372 pPrev->SetColor( pColorLB->GetSelectEntryColor() );
2373 else
2374 pPrev->SetColor( Color( COL_LIGHTGRAY ) );
2376 else
2378 nPos = pColorLB->GetSelectEntryPos();
2380 switch( nPos )
2382 case 0:
2383 rFont.SetColor( Color( COL_BLACK ) );
2384 rCJKFont.SetColor( Color( COL_BLACK ) );
2385 break;
2386 case 1:
2387 case LISTBOX_ENTRY_NOTFOUND:
2388 rFont.SetColor( Color( COL_RED ) );
2389 rCJKFont.SetColor( Color( COL_RED ) );
2390 break;
2391 default:
2392 rFont.SetColor( pColorLB->GetEntryColor( nPos ) );
2393 rCJKFont.SetColor( pColorLB->GetEntryColor( nPos ) );
2394 break;
2398 pPrev->Invalidate();
2400 return 0;
2403 IMPL_LINK( SwRedlineOptionsTabPage, ChangedMaskPrevHdl, ListBox *, EMPTYARG )
2405 aMarkPreviewWN.SetMarkPos(aMarkPosLB.GetSelectEntryPos());
2406 aMarkPreviewWN.SetColor(aMarkColorLB.GetSelectEntryColor().GetColor());
2408 aMarkPreviewWN.Invalidate();
2410 return 0;
2413 void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin)
2415 const AllSettings& rAllSettings = Application::GetSettings();
2416 LanguageType eLangType = rAllSettings.GetUILanguage();
2417 Color aBackCol( rAllSettings.GetStyleSettings().GetWindowColor() );
2418 SvxFont& rFont = rExampleWin.GetFont();
2419 SvxFont& rCJKFont = rExampleWin.GetCJKFont();
2420 SvxFont& rCTLFont = rExampleWin.GetCTLFont();
2422 Font aFont( OutputDevice::GetDefaultFont( DEFAULTFONT_SERIF, eLangType,
2423 DEFAULTFONT_FLAGS_ONLYONE, &rExampleWin ) );
2424 Font aCJKFont( OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_TEXT, eLangType,
2425 DEFAULTFONT_FLAGS_ONLYONE, &rExampleWin ) );
2426 Font aCTLFont( OutputDevice::GetDefaultFont( DEFAULTFONT_CTL_TEXT, eLangType,
2427 DEFAULTFONT_FLAGS_ONLYONE, &rExampleWin ) );
2428 const Size aDefSize( 0, 12 );
2429 aFont.SetSize( aDefSize );
2430 aCJKFont.SetSize( aDefSize );
2431 aCTLFont.SetSize( aDefSize );
2433 aFont.SetFillColor( aBackCol );
2434 aCJKFont.SetFillColor( aBackCol );
2435 aCTLFont.SetFillColor( aBackCol );
2437 aFont.SetWeight( WEIGHT_NORMAL );
2438 aCJKFont.SetWeight( WEIGHT_NORMAL );
2439 aCTLFont.SetWeight( WEIGHT_NORMAL );
2441 rFont = aFont;
2442 rCJKFont = aCJKFont;
2443 rCTLFont = aCTLFont;
2445 const Size aNewSize( 0, rExampleWin.GetOutputSize().Height() * 2 / 3 );
2446 rFont.SetSize( aNewSize );
2447 rCJKFont.SetSize( aNewSize );
2449 rExampleWin.SetFont( rFont, rCJKFont,rCTLFont );
2451 rExampleWin.UseResourceText();
2453 Wallpaper aWall( aBackCol );
2454 rExampleWin.SetBackground( aWall );
2455 rExampleWin.Invalidate();
2459 #ifndef PRODUCT
2460 /*******************************************************
2461 ******************************************************/
2462 /*----------------- OS 11.01.95 -----------------------
2463 TabPage Testeinstellungen
2464 -------------------------------------------------------*/
2466 void lcl_SetPosSize(Window& rWin, Point aPos, Size aSize)
2468 aPos = rWin.LogicToPixel(aPos, MAP_APPFONT);
2469 aSize = rWin.OutputDevice::LogicToPixel(aSize, MAP_APPFONT);
2470 rWin.SetPosSizePixel(aPos, aSize);
2473 SwTestTabPage::SwTestTabPage( Window* pParent,
2474 const SfxItemSet& rCoreSet) :
2475 SfxTabPage( pParent, WB_HIDE, rCoreSet),
2476 aTestFL ( this, WB_GROUP ),
2477 aTest1CBox ( this, 0 ),
2478 aTest2CBox ( this, 0 ),
2479 aTest3CBox ( this, 0 ),
2480 aTest4CBox ( this, 0 ),
2481 aTest5CBox ( this, 0 ),
2482 aTest6CBox ( this, 0 ),
2483 aTest7CBox ( this, 0 ),
2484 aTest8CBox ( this, 0 ),
2485 aTest9CBox ( this, 0 ),
2486 aTest10CBox ( this, 0 ),
2487 bAttrModified( FALSE )
2489 lcl_SetPosSize(*this, Point(0,0), Size(260 , 135));
2490 lcl_SetPosSize(aTestFL, Point(6,2), Size(209,8));
2491 lcl_SetPosSize(aTest1CBox , Point(12 , 14), Size(74 , 10));
2492 lcl_SetPosSize(aTest2CBox , Point(12 , 27), Size(74 , 10));
2493 lcl_SetPosSize(aTest3CBox , Point(12 , 40), Size(74 , 10));
2494 lcl_SetPosSize(aTest4CBox , Point(12 , 53), Size(74 , 10));
2495 lcl_SetPosSize(aTest5CBox , Point(12 , 66), Size(74 , 10));
2496 lcl_SetPosSize(aTest6CBox , Point(116, 14), Size(74 , 10));
2497 lcl_SetPosSize(aTest7CBox , Point(116, 27), Size(74 , 10));
2498 lcl_SetPosSize(aTest8CBox , Point(116, 40), Size(74 , 10));
2499 lcl_SetPosSize(aTest9CBox , Point(116, 53), Size(74 , 10));
2500 lcl_SetPosSize(aTest10CBox , Point(116, 66), Size(74 , 10));
2502 aTestFL.SetText( String(ByteString("Einstellungen nur f\xFCr Testzwecke" ), RTL_TEXTENCODING_MS_1252));
2503 aTest1CBox .SetText( C2S("unused"));
2504 aTest2CBox .SetText( C2S("dynamic"));
2505 aTest3CBox .SetText( C2S("No calm" ));
2506 aTest4CBox .SetText( C2S("WYSIWYG debug" ));
2507 aTest5CBox .SetText( C2S("No idle format" ));
2508 aTest6CBox .SetText( C2S("No screen adj" ));
2509 aTest7CBox .SetText( C2S("win format" ));
2510 aTest8CBox .SetText( C2S("No Scroll" ));
2511 aTest9CBox .SetText( C2S("DrawingLayerNotLoading"));
2512 aTest10CBox.SetText( C2S("AutoFormat by Input" ));
2513 aTestFL.Show();
2514 aTest1CBox .Show();
2515 aTest2CBox .Show();
2516 aTest3CBox .Show();
2517 aTest4CBox .Show();
2518 aTest5CBox .Show();
2519 aTest6CBox .Show();
2520 aTest7CBox .Show();
2521 aTest8CBox .Show();
2522 aTest9CBox .Show();
2523 aTest10CBox.Show();
2524 Init();
2529 //------------------------------------------------------------------------
2532 SfxTabPage* SwTestTabPage::Create( Window* pParent,
2533 const SfxItemSet& rAttrSet )
2535 return ( new SwTestTabPage( pParent, rAttrSet ) );
2537 //------------------------------------------------------------------------
2540 BOOL SwTestTabPage::FillItemSet( SfxItemSet& rCoreSet )
2543 if ( bAttrModified )
2545 SwTestItem aTestItem(FN_PARAM_SWTEST);
2546 aTestItem.bTest1=aTest1CBox.IsChecked();
2547 aTestItem.bTest2=aTest2CBox.IsChecked();
2548 aTestItem.bTest3=aTest3CBox.IsChecked();
2549 aTestItem.bTest4=aTest4CBox.IsChecked();
2550 aTestItem.bTest5=aTest5CBox.IsChecked();
2551 aTestItem.bTest6=aTest6CBox.IsChecked();
2552 aTestItem.bTest7=aTest7CBox.IsChecked();
2553 aTestItem.bTest8=aTest8CBox.IsChecked();
2554 aTestItem.bTest9=aTest9CBox.IsChecked();
2555 aTestItem.bTest10=aTest10CBox.IsChecked();
2556 rCoreSet.Put(aTestItem);
2558 return bAttrModified;
2560 //------------------------------------------------------------------------
2563 void SwTestTabPage::Reset( const SfxItemSet& )
2565 const SfxItemSet& rSet = GetItemSet();
2566 const SwTestItem* pTestAttr = 0;
2568 if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SWTEST , FALSE,
2569 (const SfxPoolItem**)&pTestAttr ))
2571 aTest1CBox.Check(pTestAttr->bTest1);
2572 aTest2CBox.Check(pTestAttr->bTest2);
2573 aTest3CBox.Check(pTestAttr->bTest3);
2574 aTest4CBox.Check(pTestAttr->bTest4);
2575 aTest5CBox.Check(pTestAttr->bTest5);
2576 aTest6CBox.Check(pTestAttr->bTest6);
2577 aTest7CBox.Check(pTestAttr->bTest7);
2578 aTest8CBox.Check(pTestAttr->bTest8);
2579 aTest9CBox.Check(pTestAttr->bTest9);
2580 aTest10CBox.Check(pTestAttr->bTest10);
2583 //------------------------------------------------------------------------
2586 void SwTestTabPage::Init()
2588 // handler
2589 Link aLk = LINK( this, SwTestTabPage, AutoClickHdl );
2590 aTest1CBox.SetClickHdl( aLk );
2591 aTest2CBox.SetClickHdl( aLk );
2592 aTest3CBox.SetClickHdl( aLk );
2593 aTest4CBox.SetClickHdl( aLk );
2594 aTest5CBox.SetClickHdl( aLk );
2595 aTest6CBox.SetClickHdl( aLk );
2596 aTest7CBox.SetClickHdl( aLk );
2597 aTest8CBox.SetClickHdl( aLk );
2598 aTest9CBox.SetClickHdl( aLk );
2599 aTest10CBox.SetClickHdl( aLk );
2601 //------------------------------------------------------------------------
2604 IMPL_LINK_INLINE_START( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
2606 bAttrModified = TRUE;
2607 return 0;
2609 IMPL_LINK_INLINE_END( SwTestTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
2610 #endif