1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: swmodul1.cxx,v $
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"
35 #include <hintids.hxx>
36 #include <sfx2/request.hxx>
37 #include <sfx2/dispatch.hxx>
38 #include <sfx2/childwin.hxx>
39 #include <svtools/useroptions.hxx>
40 #include <cppuhelper/weak.hxx>
41 #include <com/sun/star/frame/FrameSearchFlag.hpp>
42 #include <com/sun/star/view/XSelectionSupplier.hpp>
43 #include <cppuhelper/implbase1.hxx> // helper for implementations
44 #include <svx/dataaccessdescriptor.hxx>
45 #include <svx/wghtitem.hxx>
46 #include <svx/postitem.hxx>
47 #include <svx/udlnitem.hxx>
48 #include <svx/crsditem.hxx>
49 #include <svx/cmapitem.hxx>
50 #include <svx/colritem.hxx>
51 #include <svx/brshitem.hxx>
52 #include <vcl/msgbox.hxx>
53 #include <svtools/cjkoptions.hxx>
54 #include <swmodule.hxx>
55 #include <swtypes.hxx>
56 #include <usrpref.hxx>
65 #include <prtopt.hxx> // fuer PrintOptions
66 #include <navicfg.hxx>
73 #include <tools/color.hxx>
74 #include "PostItMgr.hxx"
76 using ::rtl::OUString
;
77 using namespace ::svx
;
78 using namespace ::com::sun::star
;
79 using namespace ::com::sun::star::uno
;
80 using namespace ::com::sun::star::beans
;
81 using namespace ::com::sun::star::frame
;
82 using namespace ::com::sun::star::view
;
83 using namespace ::com::sun::star::lang
;
86 /*-----------------08/28/97 08:41pm-----------------
88 --------------------------------------------------*/
89 void lcl_SetUIPrefs(const SwViewOption
* pPref
, SwView
* pView
, ViewShell
* pSh
)
91 // in FrameSets kann die tatsaechliche Sichtbarkeit von der Einstellung der ViewOptions abweichen
92 sal_Bool bVScrollChanged
= pPref
->IsViewVScrollBar() != pSh
->GetViewOptions()->IsViewVScrollBar();
93 sal_Bool bHScrollChanged
= pPref
->IsViewHScrollBar() != pSh
->GetViewOptions()->IsViewHScrollBar();
94 sal_Bool bVAlignChanged
= pPref
->IsVRulerRight() != pSh
->GetViewOptions()->IsVRulerRight();
96 pSh
->SetUIOptions(*pPref
);
97 const SwViewOption
* pNewPref
= pSh
->GetViewOptions();
99 // Scrollbars an / aus
102 pView
->ShowVScrollbar(pNewPref
->IsViewVScrollBar());
106 pView
->ShowHScrollbar( pNewPref
->IsViewHScrollBar() || pSh
->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE
));
108 //if only the position of the vertical ruler has been changed initiate an update
109 if(bVAlignChanged
&& !bHScrollChanged
&& !bVScrollChanged
)
110 pView
->InvalidateBorder();
113 if(pNewPref
->IsViewVRuler())
114 pView
->CreateVLineal();
116 pView
->KillVLineal();
119 if(pNewPref
->IsViewHRuler())
124 pView
->GetPostItMgr()->PrepareView(true);
127 /*--------------------------------------------------------------------
128 Beschreibung: Aktuelle SwWrtShell
129 --------------------------------------------------------------------*/
132 SwWrtShell
* GetActiveWrtShell()
134 SwView
*pActive
= ::GetActiveView();
136 return &pActive
->GetWrtShell();
140 /*--------------------------------------------------------------------
141 Beschreibung: Pointer auf die aktuelle Sicht
142 --------------------------------------------------------------------*/
145 SwView
* GetActiveView()
147 SfxViewShell
* pView
= SfxViewShell::Current();
148 return PTR_CAST( SwView
, pView
);
150 /*--------------------------------------------------------------------
151 Beschreibung: Ueber Views iterieren - static
152 --------------------------------------------------------------------*/
154 SwView
* SwModule::GetFirstView()
156 // liefert nur sichtbare SwViews
157 const TypeId aTypeId
= TYPE(SwView
);
158 SwView
* pView
= (SwView
*)SfxViewShell::GetFirst(&aTypeId
);
163 SwView
* SwModule::GetNextView(SwView
* pView
)
165 DBG_ASSERT(PTR_CAST(SwView
, pView
),"keine SwView uebergeben");
166 const TypeId aTypeId
= TYPE(SwView
);
167 SwView
* pNView
= (SwView
*)SfxViewShell::GetNext(*pView
, &aTypeId
, TRUE
);
171 /*------------------------------------------------------------------------
172 Beschreibung: Neuer Master fuer die Einstellungen wird gesetzt;
173 dieser wirkt sich auf die aktuelle Sicht und alle
175 ------------------------------------------------------------------------*/
177 void SwModule::ApplyUsrPref(const SwViewOption
&rUsrPref
, SwView
* pActView
,
180 SwView
* pCurrView
= pActView
;
181 ViewShell
* pSh
= pCurrView
? &pCurrView
->GetWrtShell() : 0;
183 SwMasterUsrPref
* pPref
= (SwMasterUsrPref
*)GetUsrPref( static_cast< sal_Bool
>(
184 VIEWOPT_DEST_WEB
== nDest
? sal_True
:
185 VIEWOPT_DEST_TEXT
== nDest
? sal_False
:
186 pCurrView
&& pCurrView
->ISA(SwWebView
) ));
188 //per Uno soll nur die sdbcx::View, aber nicht das Module veraendert werden
189 sal_Bool bViewOnly
= VIEWOPT_DEST_VIEW_ONLY
== nDest
;
190 //PreView abfruehstuecken
191 SwPagePreView
* pPPView
;
192 if( !pCurrView
&& 0 != (pPPView
= PTR_CAST( SwPagePreView
, SfxViewShell::Current())) )
195 pPref
->SetUIOptions( rUsrPref
);
196 pPPView
->ShowVScrollbar(pPref
->IsViewVScrollBar());
197 pPPView
->ShowHScrollbar(pPref
->IsViewHScrollBar());
200 pPref
->SetPagePrevRow(rUsrPref
.GetPagePrevRow());
201 pPref
->SetPagePrevCol(rUsrPref
.GetPagePrevCol());
208 pPref
->SetUsrPref( rUsrPref
);
209 pPref
->SetModified();
215 // Weitergabe an die CORE
216 const sal_Bool bReadonly
= pCurrView
->GetDocShell()->IsReadOnly();
217 SwViewOption
* pViewOpt
;
219 pViewOpt
= new SwViewOption( *pPref
);
221 pViewOpt
= new SwViewOption( rUsrPref
);
222 pViewOpt
->SetReadonly( bReadonly
);
223 if( !(*pSh
->GetViewOptions() == *pViewOpt
) )
225 //Ist evtl. nur eine ViewShell
227 pSh
->ApplyViewOptions( *pViewOpt
);
228 ((SwWrtShell
*)pSh
)->SetReadOnlyAvailable(pViewOpt
->IsCursorInProtectedArea());
231 if ( pSh
->GetViewOptions()->IsReadonly() != bReadonly
)
232 pSh
->SetReadonlyOption(bReadonly
);
234 lcl_SetUIPrefs(pViewOpt
, pCurrView
, pSh
);
236 // zum Schluss wird das Idle-Flag wieder gesetzt
238 pPref
->SetIdle(sal_True
);
240 /* -----------------------------28.09.00 12:36--------------------------------
242 ---------------------------------------------------------------------------*/
243 void SwModule::ApplyUserMetric( FieldUnit eMetric
, BOOL bWeb
)
245 SwMasterUsrPref
* pPref
;
249 GetUsrPref(sal_True
);
255 GetUsrPref(sal_False
);
258 FieldUnit eOldMetric
= pPref
->GetMetric();
259 if(eOldMetric
!= eMetric
)
260 pPref
->SetMetric(eMetric
);
262 FieldUnit eHScrollMetric
= pPref
->IsHScrollMetric() ? pPref
->GetHScrollMetric() : eMetric
;
263 FieldUnit eVScrollMetric
= pPref
->IsVScrollMetric() ? pPref
->GetVScrollMetric() : eMetric
;
265 SwView
* pTmpView
= SwModule::GetFirstView();
266 // fuer alle MDI-Fenster das Lineal umschalten
269 if(bWeb
== (0 != PTR_CAST(SwWebView
, pTmpView
)))
271 pTmpView
->ChangeVLinealMetric(eVScrollMetric
);
272 pTmpView
->ChangeTabMetric(eHScrollMetric
);
275 pTmpView
= SwModule::GetNextView(pTmpView
);
278 /*-- 12.11.2008 14:47:58---------------------------------------------------
280 -----------------------------------------------------------------------*/
281 void SwModule::ApplyRulerMetric( FieldUnit eMetric
, BOOL bHorizontal
, BOOL bWeb
)
283 SwMasterUsrPref
* pPref
;
287 GetUsrPref(sal_True
);
293 GetUsrPref(sal_False
);
297 pPref
->SetHScrollMetric(eMetric
);
299 pPref
->SetVScrollMetric(eMetric
);
301 SwView
* pTmpView
= SwModule::GetFirstView();
302 // switch metric at the appropriate rulers
305 if(bWeb
== (0 != dynamic_cast<SwWebView
*>( pTmpView
)))
308 pTmpView
->ChangeTabMetric(eMetric
);
310 pTmpView
->ChangeVLinealMetric(eMetric
);
312 pTmpView
= SwModule::GetNextView(pTmpView
);
316 /*-------------------------------------------------
317 set the usrpref 's char unit attribute and set ruler
318 's unit as char if the "apply char unit" is checked
319 --------------------------------------------------*/
320 void SwModule::ApplyUserCharUnit(BOOL bApplyChar
, BOOL bWeb
)
322 SwMasterUsrPref
* pPref
;
326 GetUsrPref(sal_True
);
332 GetUsrPref(sal_False
);
335 BOOL bOldApplyCharUnit
= pPref
->IsApplyCharUnit();
336 BOOL bHasChanged
= FALSE
;
337 if(bOldApplyCharUnit
!= bApplyChar
)
339 pPref
->SetApplyCharUnit(bApplyChar
);
346 FieldUnit eHScrollMetric
= pPref
->IsHScrollMetric() ? pPref
->GetHScrollMetric() : pPref
->GetMetric();
347 FieldUnit eVScrollMetric
= pPref
->IsVScrollMetric() ? pPref
->GetVScrollMetric() : pPref
->GetMetric();
350 eHScrollMetric
= FUNIT_CHAR
;
351 eVScrollMetric
= FUNIT_LINE
;
355 SvtCJKOptions aCJKOptions
;
356 if ( !aCJKOptions
.IsAsianTypographyEnabled() && ( eHScrollMetric
== FUNIT_CHAR
))
357 eHScrollMetric
= FUNIT_INCH
;
358 else if ( eHScrollMetric
== FUNIT_CHAR
)
359 eHScrollMetric
= FUNIT_CM
;
360 if ( !aCJKOptions
.IsAsianTypographyEnabled() && ( eVScrollMetric
== FUNIT_LINE
))
361 eVScrollMetric
= FUNIT_INCH
;
362 else if ( eVScrollMetric
== FUNIT_LINE
)
363 eVScrollMetric
= FUNIT_CM
;
365 SwView
* pTmpView
= SwModule::GetFirstView();
366 // fuer alle MDI-Fenster das Lineal umschalten
369 if(bWeb
== (0 != PTR_CAST(SwWebView
, pTmpView
)))
371 pTmpView
->ChangeVLinealMetric(eVScrollMetric
);
372 pTmpView
->ChangeTabMetric(eHScrollMetric
);
375 pTmpView
= SwModule::GetNextView(pTmpView
);
379 /*-----------------13.11.96 11.57-------------------
381 --------------------------------------------------*/
383 SwNavigationConfig
* SwModule::GetNavigationConfig()
385 if(!pNavigationConfig
)
387 pNavigationConfig
= new SwNavigationConfig
;
389 return pNavigationConfig
;
392 /*-----------------05.02.97 08.03-------------------
394 --------------------------------------------------*/
396 SwPrintOptions
* SwModule::GetPrtOptions(sal_Bool bWeb
)
398 if(bWeb
&& !pWebPrtOpt
)
400 pWebPrtOpt
= new SwPrintOptions(TRUE
);
402 else if(!bWeb
&& !pPrtOpt
)
404 pPrtOpt
= new SwPrintOptions(FALSE
);
407 return bWeb
? pWebPrtOpt
: pPrtOpt
;
410 /*-----------------26.06.97 07.52-------------------
412 --------------------------------------------------*/
413 SwChapterNumRules
* SwModule::GetChapterNumRules()
415 if(!pChapterNumRules
)
416 pChapterNumRules
= new SwChapterNumRules
;
417 return pChapterNumRules
;
420 /*--------------------------------------------------------------------
422 --------------------------------------------------------------------*/
424 void SwModule::ShowDBObj(SwView
& rView
, const SwDBData
& rData
, BOOL
/*bOnlyIfAvailable*/)
426 Reference
<XFrame
> xFrame
= rView
.GetViewFrame()->GetFrame()->GetFrameInterface();
427 Reference
<XDispatchProvider
> xDP(xFrame
, uno::UNO_QUERY
);
429 uno::Reference
<frame::XFrame
> xBeamerFrame
= xFrame
->findFrame(
430 rtl::OUString::createFromAscii("_beamer"),
431 FrameSearchFlag::CHILDREN
);
432 if (xBeamerFrame
.is())
433 { // the beamer has been opened by the SfxViewFrame
434 Reference
<XController
> xController
= xBeamerFrame
->getController();
435 Reference
<XSelectionSupplier
> xControllerSelection(xController
, UNO_QUERY
);
436 if (xControllerSelection
.is())
439 ODataAccessDescriptor aSelection
;
440 aSelection
.setDataSource(rData
.sDataSource
);
441 aSelection
[daCommand
] <<= rData
.sCommand
;
442 aSelection
[daCommandType
] <<= rData
.nCommandType
;
443 xControllerSelection
->select(makeAny(aSelection
.createPropertyValueSequence()));
446 DBG_ERROR("no selection supplier in the beamer!");
450 /*--------------------------------------------------------------------
451 Beschreibung: Redlining
452 --------------------------------------------------------------------*/
454 sal_uInt16
SwModule::GetRedlineAuthor()
456 if (!bAuthorInitialised
)
458 const SvtUserOptions
& rOpt
= GetUserOptions();
459 if( !(sActAuthor
= rOpt
.GetFullName()).Len() )
460 if( !(sActAuthor
= rOpt
.GetID()).Len() )
461 sActAuthor
= String( SW_RES( STR_REDLINE_UNKNOWN_AUTHOR
));
462 bAuthorInitialised
= sal_True
;
464 return InsertRedlineAuthor( sActAuthor
);
467 /*--------------------------------------------------------------------
469 --------------------------------------------------------------------*/
471 const String
& SwModule::GetRedlineAuthor(sal_uInt16 nPos
)
473 DBG_ASSERT(nPos
<pAuthorNames
->Count(), "author not found!"); //#i45342# RTF doc with no author table caused reader to crash
474 while (!(nPos
<pAuthorNames
->Count()))
476 InsertRedlineAuthor(String(RTL_CONSTASCII_USTRINGPARAM("nn")));
478 return *pAuthorNames
->GetObject(nPos
);
481 /*--------------------------------------------------------------------
483 --------------------------------------------------------------------*/
485 sal_uInt16
SwModule::InsertRedlineAuthor(const String
& rAuthor
)
489 while (nPos
< pAuthorNames
->Count() && *pAuthorNames
->GetObject(nPos
) != rAuthor
)
492 if (nPos
== pAuthorNames
->Count())
493 pAuthorNames
->Insert(new String(rAuthor
), nPos
);
498 /*--------------------------------------------------------------------
500 --------------------------------------------------------------------*/
502 void lcl_FillAuthorAttr( sal_uInt16 nAuthor
, SfxItemSet
&rSet
,
503 const AuthorCharAttr
&rAttr
)
505 Color
aCol( rAttr
.nColor
);
507 if( COL_TRANSPARENT
== rAttr
.nColor
)
509 static const ColorData aColArr
[] = {
510 COL_AUTHOR1_DARK
, COL_AUTHOR2_DARK
, COL_AUTHOR3_DARK
,
511 COL_AUTHOR4_DARK
, COL_AUTHOR5_DARK
, COL_AUTHOR6_DARK
,
512 COL_AUTHOR7_DARK
, COL_AUTHOR8_DARK
, COL_AUTHOR9_DARK
};
514 aCol
.SetColor( aColArr
[ nAuthor
% (sizeof( aColArr
) /
515 sizeof( aColArr
[0] )) ] );
518 sal_Bool bBackGr
= COL_NONE
== rAttr
.nColor
;
520 switch (rAttr
.nItemId
)
522 case SID_ATTR_CHAR_WEIGHT
:
524 SvxWeightItem
aW( (FontWeight
)rAttr
.nAttr
, RES_CHRATR_WEIGHT
);
526 aW
.SetWhich( RES_CHRATR_CJK_WEIGHT
);
528 aW
.SetWhich( RES_CHRATR_CTL_WEIGHT
);
533 case SID_ATTR_CHAR_POSTURE
:
535 SvxPostureItem
aP( (FontItalic
)rAttr
.nAttr
, RES_CHRATR_POSTURE
);
537 aP
.SetWhich( RES_CHRATR_CJK_POSTURE
);
539 aP
.SetWhich( RES_CHRATR_CTL_POSTURE
);
544 case SID_ATTR_CHAR_UNDERLINE
:
545 rSet
.Put( SvxUnderlineItem( (FontUnderline
)rAttr
.nAttr
,
546 RES_CHRATR_UNDERLINE
));
549 case SID_ATTR_CHAR_STRIKEOUT
:
550 rSet
.Put(SvxCrossedOutItem( (FontStrikeout
)rAttr
.nAttr
,
551 RES_CHRATR_CROSSEDOUT
));
554 case SID_ATTR_CHAR_CASEMAP
:
555 rSet
.Put( SvxCaseMapItem( (SvxCaseMap
)rAttr
.nAttr
,
556 RES_CHRATR_CASEMAP
));
560 rSet
.Put( SvxBrushItem( aCol
, RES_CHRATR_BACKGROUND
));
566 rSet
.Put( SvxColorItem( aCol
, RES_CHRATR_COLOR
) );
569 /*--------------------------------------------------------------------
571 --------------------------------------------------------------------*/
573 void SwModule::GetInsertAuthorAttr(sal_uInt16 nAuthor
, SfxItemSet
&rSet
)
575 lcl_FillAuthorAttr(nAuthor
, rSet
, pModuleConfig
->GetInsertAuthorAttr());
578 /*--------------------------------------------------------------------
580 --------------------------------------------------------------------*/
582 void SwModule::GetDeletedAuthorAttr(sal_uInt16 nAuthor
, SfxItemSet
&rSet
)
584 lcl_FillAuthorAttr(nAuthor
, rSet
, pModuleConfig
->GetDeletedAuthorAttr());
587 /*--------------------------------------------------------------------
588 Beschreibung: Fuer zukuenftige Erweiterung:
589 --------------------------------------------------------------------*/
591 void SwModule::GetFormatAuthorAttr( sal_uInt16 nAuthor
, SfxItemSet
&rSet
)
593 lcl_FillAuthorAttr( nAuthor
, rSet
, pModuleConfig
->GetFormatAuthorAttr() );
596 /*--------------------------------------------------------------------
598 --------------------------------------------------------------------*/
600 sal_uInt16
SwModule::GetRedlineMarkPos()
602 return pModuleConfig
->GetMarkAlignMode();
605 /*--------------------------------------------------------------------
607 --------------------------------------------------------------------*/
609 sal_Bool
SwModule::IsInsTblFormatNum(sal_Bool bHTML
) const
611 return pModuleConfig
->IsInsTblFormatNum(bHTML
);
614 sal_Bool
SwModule::IsInsTblChangeNumFormat(sal_Bool bHTML
) const
616 return pModuleConfig
->IsInsTblChangeNumFormat(bHTML
);
619 /*--------------------------------------------------------------------
621 --------------------------------------------------------------------*/
623 sal_Bool
SwModule::IsInsTblAlignNum(sal_Bool bHTML
) const
625 return pModuleConfig
->IsInsTblAlignNum(bHTML
);
628 /*--------------------------------------------------------------------
630 --------------------------------------------------------------------*/
632 const Color
&SwModule::GetRedlineMarkColor()
634 return pModuleConfig
->GetMarkAlignColor();
637 /*-----------------03.03.98 16:47-------------------
639 --------------------------------------------------*/
640 const SwViewOption
* SwModule::GetViewOption(sal_Bool bWeb
)
642 return GetUsrPref( bWeb
);
645 // returne den definierten DocStat - WordDelimiter
646 const String
& SwModule::GetDocStatWordDelim() const
648 return pModuleConfig
->GetWordDelimiter();
650 /* ---------------------------------------------------------------------------
652 ---------------------------------------------------------------------------*/
653 // Durchreichen der Metric von der ModuleConfig (fuer HTML-Export)
654 sal_uInt16
SwModule::GetMetric( sal_Bool bWeb
) const
656 SwMasterUsrPref
* pPref
;
660 GetUsrPref(sal_True
);
666 GetUsrPref(sal_False
);
669 return static_cast< sal_uInt16
>(pPref
->GetMetric());
671 /* ---------------------------------------------------------------------------
673 ---------------------------------------------------------------------------*/
674 // Update-Stati durchreichen
675 sal_uInt16
SwModule::GetLinkUpdMode( sal_Bool
) const
678 GetUsrPref(sal_False
);
679 return (sal_uInt16
)pUsrPref
->GetUpdateLinkMode();
681 /* ---------------------------------------------------------------------------
683 ---------------------------------------------------------------------------*/
684 SwFldUpdateFlags
SwModule::GetFldUpdateFlags( sal_Bool
) const
687 GetUsrPref(sal_False
);
688 return pUsrPref
->GetFldUpdateFlags();
690 /* -----------------------------28.09.00 14:18--------------------------------
692 ---------------------------------------------------------------------------*/
693 void SwModule::ApplyFldUpdateFlags(SwFldUpdateFlags eFldFlags
)
696 GetUsrPref(sal_False
);
697 pUsrPref
->SetFldUpdateFlags(eFldFlags
);
699 /* -----------------------------28.09.00 14:18--------------------------------
701 ---------------------------------------------------------------------------*/
702 void SwModule::ApplyLinkMode(sal_Int32 nNewLinkMode
)
705 GetUsrPref(sal_False
);
706 pUsrPref
->SetUpdateLinkMode(nNewLinkMode
);
708 /* ---------------------------------------------------------------------------
710 ---------------------------------------------------------------------------*/
711 void SwModule::CheckSpellChanges( sal_Bool bOnlineSpelling
,
712 sal_Bool bIsSpellWrongAgain
, sal_Bool bIsSpellAllAgain
, sal_Bool bSmartTags
)
714 sal_Bool bOnlyWrong
= bIsSpellWrongAgain
&& !bIsSpellAllAgain
;
715 sal_Bool bInvalid
= bOnlyWrong
|| bIsSpellAllAgain
;
716 if( bOnlineSpelling
|| bInvalid
)
718 TypeId aType
= TYPE(SwDocShell
);
719 for( SwDocShell
*pDocSh
= (SwDocShell
*)SfxObjectShell::GetFirst(&aType
);
721 pDocSh
= (SwDocShell
*)SfxObjectShell::GetNext( *pDocSh
, &aType
) )
723 SwDoc
* pTmp
= pDocSh
->GetDoc();
724 if ( pTmp
->GetRootFrm() )
726 pTmp
->SpellItAgainSam( bInvalid
, bOnlyWrong
, bSmartTags
);
727 ViewShell
* pViewShell
= 0;
728 pTmp
->GetEditShell( &pViewShell
);
729 if ( bSmartTags
&& pViewShell
&& pViewShell
->GetWin() )
730 pViewShell
->GetWin()->Invalidate();
733 // pSpell->SetSpellWrongAgain( sal_False );
734 // pSpell->SetSpellAllAgain( sal_False );
738 void SwModule::ApplyDefaultPageMode(sal_Bool bIsSquaredPageMode
)
741 GetUsrPref(sal_False
);
742 pUsrPref
->SetDefaultPageMode(bIsSquaredPageMode
);