return by ref instead of pointer

This commit is contained in:
Caolán McNamara 2011-05-20 09:06:56 +01:00
parent 06dc6870c7
commit 4cd346f648
27 changed files with 121 additions and 120 deletions

View file

@ -424,7 +424,7 @@ void SwAutoCompleteWord::DocumentDying(const SwDoc& rDoc)
{
pImpl->RemoveDocument(rDoc);
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get()->GetAutoCorrect();
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get().GetAutoCorrect();
const sal_Bool bDelete = !pACorr->GetSwFlags().bAutoCmpltKeepList;
for(sal_uInt16 nPos = aWordLst.Count(); nPos; nPos--)
{

View file

@ -456,7 +456,7 @@ void SwAutoCorrExceptWord::CheckChar( const SwPosition& rPos, sal_Unicode cChr )
rPos.nContent.GetIndex() == nCntnt )
{
// die akt. Autokorrektur besorgen:
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get()->GetAutoCorrect();
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get().GetAutoCorrect();
// dann in die Liste aufnehmen:
if( CptlSttWrd & nFlags )

View file

@ -126,7 +126,7 @@ const SfxFilter* SwIoSystem::GetFilterOfFormat(const String& rFmtNm,
if( pFltCnt )
{
SfxFilterMatcher aMatcher( pFltCnt->GetName() );
SfxFilterMatcherIter aIter( &aMatcher );
SfxFilterMatcherIter aIter( aMatcher );
const SfxFilter* pFilter = aIter.First();
while ( pFilter )
{
@ -234,7 +234,7 @@ sal_Bool SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
}
SfxFilterMatcher aMatcher( rFltContainer.GetName() );
SfxFilterMatcherIter aIter( &aMatcher );
SfxFilterMatcherIter aIter( aMatcher );
const SfxFilter* pFltr = aIter.First();
while ( pFltr )
{
@ -298,7 +298,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
return 0;
SfxFilterMatcher aMatcher( pFCntnr->GetName() );
SfxFilterMatcherIter aIter( &aMatcher );
SfxFilterMatcherIter aIter( aMatcher );
const SfxFilter* pFilter = aIter.First();
if ( !pFilter )
return 0;

View file

@ -338,16 +338,16 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
memset( &aAttrTab, 0, sizeof( _HTMLAttrTable ));
// Die Font-Groessen 1-7 aus der INI-Datei lesen
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
aFontHeights[0] = pHtmlOptions->GetFontSize( 0 ) * 20;
aFontHeights[1] = pHtmlOptions->GetFontSize( 1 ) * 20;
aFontHeights[2] = pHtmlOptions->GetFontSize( 2 ) * 20;
aFontHeights[3] = pHtmlOptions->GetFontSize( 3 ) * 20;
aFontHeights[4] = pHtmlOptions->GetFontSize( 4 ) * 20;
aFontHeights[5] = pHtmlOptions->GetFontSize( 5 ) * 20;
aFontHeights[6] = pHtmlOptions->GetFontSize( 6 ) * 20;
SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get();
aFontHeights[0] = rHtmlOptions.GetFontSize( 0 ) * 20;
aFontHeights[1] = rHtmlOptions.GetFontSize( 1 ) * 20;
aFontHeights[2] = rHtmlOptions.GetFontSize( 2 ) * 20;
aFontHeights[3] = rHtmlOptions.GetFontSize( 3 ) * 20;
aFontHeights[4] = rHtmlOptions.GetFontSize( 4 ) * 20;
aFontHeights[5] = rHtmlOptions.GetFontSize( 5 ) * 20;
aFontHeights[6] = rHtmlOptions.GetFontSize( 6 ) * 20;
bKeepUnknown = pHtmlOptions->IsImportUnknown();
bKeepUnknown = rHtmlOptions.IsImportUnknown();
if(bReadNewDoc)
{
@ -365,7 +365,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
pDoc->set(IDocumentSettingAccess::HTML_MODE, true);
pCSS1Parser = new SwCSS1Parser( pDoc, aFontHeights, sBaseURL, IsNewDoc() );
pCSS1Parser->SetIgnoreFontFamily( pHtmlOptions->IsIgnoreFontFamily() );
pCSS1Parser->SetIgnoreFontFamily( rHtmlOptions.IsIgnoreFontFamily() );
if( bReadUTF8 )
{

View file

@ -127,20 +127,20 @@ SwHTMLWriter::~SwHTMLWriter()
sal_uLong SwHTMLWriter::WriteStream()
{
// neue Konfiguration setzen
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get();
// die Fontgroessen 1-7
aFontHeights[0] = pHtmlOptions->GetFontSize( 0 ) * 20;
aFontHeights[1] = pHtmlOptions->GetFontSize( 1 ) * 20;
aFontHeights[2] = pHtmlOptions->GetFontSize( 2 ) * 20;
aFontHeights[3] = pHtmlOptions->GetFontSize( 3 ) * 20;
aFontHeights[4] = pHtmlOptions->GetFontSize( 4 ) * 20;
aFontHeights[5] = pHtmlOptions->GetFontSize( 5 ) * 20;
aFontHeights[6] = pHtmlOptions->GetFontSize( 6 ) * 20;
aFontHeights[0] = rHtmlOptions.GetFontSize( 0 ) * 20;
aFontHeights[1] = rHtmlOptions.GetFontSize( 1 ) * 20;
aFontHeights[2] = rHtmlOptions.GetFontSize( 2 ) * 20;
aFontHeights[3] = rHtmlOptions.GetFontSize( 3 ) * 20;
aFontHeights[4] = rHtmlOptions.GetFontSize( 4 ) * 20;
aFontHeights[5] = rHtmlOptions.GetFontSize( 5 ) * 20;
aFontHeights[6] = rHtmlOptions.GetFontSize( 6 ) * 20;
// ueberhaupt Styles ausgeben
// (dann auch obere und untere Absatz-Abstaende)
nExportMode = pHtmlOptions->GetExportMode();
nExportMode = rHtmlOptions.GetExportMode();
nHTMLMode = GetHtmlMode(0);
if( HTML_CFG_WRITER==nExportMode ||
HTML_CFG_NS40==nExportMode )
@ -187,7 +187,7 @@ sal_uLong SwHTMLWriter::WriteStream()
sal_Bool bWriteUTF8 = bWriteClipboardDoc;
eDestEnc = bWriteUTF8 ? RTL_TEXTENCODING_UTF8
: pHtmlOptions->GetTextEncoding();
: rHtmlOptions.GetTextEncoding();
const sal_Char *pCharSet =
rtl_getBestMimeCharsetFromTextEncoding( eDestEnc );
eDestEnc = rtl_getTextEncodingFromMimeCharset( pCharSet );
@ -195,10 +195,10 @@ sal_uLong SwHTMLWriter::WriteStream()
// Nur noch fuer den MS-IE ziehen wir den Export von Styles vor.
bCfgPreferStyles = HTML_CFG_MSIE==nExportMode;
bCfgStarBasic = pHtmlOptions->IsStarBasic();
bCfgStarBasic = rHtmlOptions.IsStarBasic();
bCfgFormFeed = !IsHTMLMode(HTMLMODE_PRINT_EXT);
bCfgCpyLinkedGrfs = pHtmlOptions->IsSaveGraphicsLocal();
bCfgCpyLinkedGrfs = rHtmlOptions.IsSaveGraphicsLocal();
// die HTML-Vorlage holen
sal_Bool bOldHTMLMode = sal_False;

View file

@ -580,8 +580,8 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
if( pFlt->GetUserData().EqualsAscii( "HTML") )
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
if( !pHtmlOpt->IsStarBasic() && pHtmlOpt->IsStarBasicWarning() && HasBasic() )
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
if( !rHtmlOpt.IsStarBasic() && rHtmlOpt.IsStarBasicWarning() && HasBasic() )
{
uno::Reference< XLibraryContainer > xLibCont(GetBasicContainer(), UNO_QUERY);
uno::Reference< XNameAccess > xLib;

View file

@ -636,7 +636,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
case SID_AUTO_CORRECT_DLG:
{
SvxSwAutoFmtFlags* pAFlags = &SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags();
SvxSwAutoFmtFlags* pAFlags = &SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags();
SwAutoCompleteWord& rACW = SwDoc::GetAutoCompleteWords();
bool bOldLocked = rACW.IsLockWordLstLocked(),
@ -801,7 +801,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SfxObjectFactory &rFact = GetFactory();
SfxFilterMatcher aMatcher( String::CreateFromAscii(rFact.GetShortName()) );
SfxFilterMatcherIter aIter( &aMatcher );
SfxFilterMatcherIter aIter( aMatcher );
uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
const SfxFilter* pFlt = aIter.First();
while( pFlt )
@ -1585,11 +1585,11 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
// A EnterBasicCall is not needed here, because nothing is called and
// there can't be any Dok-Basic, that has not yet been loaded inside
// of an HTML document.
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get();
//#59620# HasBasic() shows, that there already is a BasicManager at the DocShell.
// That was always generated in HTML-Import, when there are
// Macros in the source code.
if( pHtmlOptions && pHtmlOptions->IsStarBasic() && HasBasic())
if( rHtmlOptions.IsStarBasic() && HasBasic())
{
BasicManager *pBasicMan = GetBasicManager();
if( pBasicMan && (pBasicMan != SFX_APP()->GetBasicManager()) )

View file

@ -202,8 +202,8 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
case SID_STYLE_FAMILY4:
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
if( pDoc->get(IDocumentSettingAccess::HTML_MODE) && !pHtmlOpt->IsPrintLayoutExtension())
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
if( pDoc->get(IDocumentSettingAccess::HTML_MODE) && !rHtmlOpt.IsPrintLayoutExtension())
rSet.DisableItem( nWhich );
else
{

View file

@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include <boost/scoped_ptr.hpp>
#include <hintids.hxx>
#include <sfx2/request.hxx>
@ -81,14 +82,14 @@ using namespace ::com::sun::star::view;
using namespace ::com::sun::star::lang;
void lcl_SetUIPrefs(const SwViewOption* pPref, SwView* pView, ViewShell* pSh )
void lcl_SetUIPrefs(const SwViewOption &rPref, SwView* pView, ViewShell* pSh )
{
// in FrameSets the actual visibility can differ from the ViewOption's setting
sal_Bool bVScrollChanged = pPref->IsViewVScrollBar() != pSh->GetViewOptions()->IsViewVScrollBar();
sal_Bool bHScrollChanged = pPref->IsViewHScrollBar() != pSh->GetViewOptions()->IsViewHScrollBar();
sal_Bool bVAlignChanged = pPref->IsVRulerRight() != pSh->GetViewOptions()->IsVRulerRight();
sal_Bool bVScrollChanged = rPref.IsViewVScrollBar() != pSh->GetViewOptions()->IsViewVScrollBar();
sal_Bool bHScrollChanged = rPref.IsViewHScrollBar() != pSh->GetViewOptions()->IsViewHScrollBar();
sal_Bool bVAlignChanged = rPref.IsVRulerRight() != pSh->GetViewOptions()->IsVRulerRight();
pSh->SetUIOptions(*pPref);
pSh->SetUIOptions(rPref);
const SwViewOption* pNewPref = pSh->GetViewOptions();
// Scrollbars on / off
@ -199,24 +200,24 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
bReadonly = pDocSh->IsReadOnly();
else //Use existing option if DocShell missing
bReadonly = pSh->GetViewOptions()->IsReadonly();
SwViewOption* pViewOpt;
if(!bViewOnly)
pViewOpt = new SwViewOption( *pPref );
boost::scoped_ptr<SwViewOption> xViewOpt;
if (!bViewOnly)
xViewOpt.reset(new SwViewOption(*pPref));
else
pViewOpt = new SwViewOption( rUsrPref );
pViewOpt->SetReadonly( bReadonly );
if( !(*pSh->GetViewOptions() == *pViewOpt) )
xViewOpt.reset(new SwViewOption(rUsrPref));
xViewOpt->SetReadonly( bReadonly );
if( !(*pSh->GetViewOptions() == *xViewOpt) )
{
//is maybe only a ViewShell
pSh->StartAction();
pSh->ApplyViewOptions( *pViewOpt );
((SwWrtShell*)pSh)->SetReadOnlyAvailable(pViewOpt->IsCursorInProtectedArea());
pSh->ApplyViewOptions( *xViewOpt );
((SwWrtShell*)pSh)->SetReadOnlyAvailable(xViewOpt->IsCursorInProtectedArea());
pSh->EndAction();
}
if ( pSh->GetViewOptions()->IsReadonly() != bReadonly )
pSh->SetReadonlyOption(bReadonly);
lcl_SetUIPrefs(pViewOpt, pCurrView, pSh);
lcl_SetUIPrefs(*xViewOpt, pCurrView, pSh);
// in the end the Idle-Flag is set again
pPref->SetIdle(sal_True);

View file

@ -105,8 +105,8 @@ SwParaDlg::SwParaDlg(Window *pParent,
OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageRangesFunc fail!");
AddTabPage( TP_PARA_ALIGN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH) );
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
if (!bDrawParaDlg && (!bHtmlMode || pHtmlOpt->IsPrintLayoutExtension()))
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
if (!bDrawParaDlg && (!bHtmlMode || rHtmlOpt.IsPrintLayoutExtension()))
{
OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageCreatorFunc fail!");
OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageRangesFunc fail!");

View file

@ -317,7 +317,7 @@ void SwViewOption::Init( Window *pWin )
sal_Bool SwViewOption::IsAutoCompleteWords() const
{
const SvxSwAutoFmtFlags& rFlags = SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags();
const SvxSwAutoFmtFlags& rFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags();
return rFlags.bAutoCmpltCollectWords;
}
@ -334,8 +334,8 @@ sal_uInt16 GetHtmlMode(const SwDocShell* pShell)
if(!pShell || PTR_CAST(SwWebDocShell, pShell))
{
nRet = HTMLMODE_ON;
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
switch ( pHtmlOpt->GetExportMode() )
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
switch ( rHtmlOpt.GetExportMode() )
{
case HTML_CFG_MSIE_40:
nRet |= HTMLMODE_PARA_BORDER|HTMLMODE_SMALL_CAPS|

View file

@ -858,8 +858,8 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
sBodyMimeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("text/html; charset="));
sBodyMimeType += ::rtl::OUString::createFromAscii(
rtl_getBestMimeCharsetFromTextEncoding( eEncoding ));
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
eEncoding = pHtmlOptions->GetTextEncoding();
SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get();
eEncoding = rHtmlOptions.GetTextEncoding();
}
else
sBodyMimeType =

View file

@ -151,7 +151,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
SfxObjectFactory &rFact = m_pWizard->GetSwView()->GetDocShell()->GetFactory();
SfxFilterMatcher aMatcher( String::CreateFromAscii(rFact.GetShortName()) );
SfxFilterMatcherIter aIter( &aMatcher );
SfxFilterMatcherIter aIter( aMatcher );
Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
const SfxFilter* pFlt = aIter.First();
while( pFlt )

View file

@ -1065,7 +1065,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
//the method SwIOSystemGetFilterOfFormat( ) returns the template filter
//because it uses the same user data :-(
SfxFilterMatcher aMatcher( pFilterContainer->GetName() );
SfxFilterMatcherIter aIter( &aMatcher );
SfxFilterMatcherIter aIter( aMatcher );
const SfxFilter* pFilter = aIter.First();
String sFilterUserData( String::CreateFromAscii( FILTER_WW8 ));
while ( pFilter )
@ -1083,8 +1083,8 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
case MM_DOCTYPE_HTML:
{
bAsBody = true;
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
eEncoding = pHtmlOptions->GetTextEncoding();
SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get();
eEncoding = rHtmlOptions.GetTextEncoding();
}
break;
case MM_DOCTYPE_TEXT:

View file

@ -481,7 +481,7 @@ void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rC
void SwSpellDialogChildWindow::AddAutoCorrection(
const String& rOld, const String& rNew, LanguageType eLanguage)
{
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get()->GetAutoCorrect();
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get().GetAutoCorrect();
pACorr->PutText( rOld, rNew, eLanguage );
}

View file

@ -1526,8 +1526,8 @@ SwInsertSectionTabDialog::SwInsertSectionTabDialog(
AddTabPage(TP_SECTION_FTNENDNOTES, SwSectionFtnEndTabPage::Create, 0);
AddTabPage(TP_SECTION_INDENTS, SwSectionIndentTabPage::Create, 0);
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = pHtmlOpt->GetExportMode();
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = rHtmlOpt.GetExportMode();
sal_Bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
if(bWeb)
@ -2206,8 +2206,8 @@ SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
AddTabPage(TP_SECTION_FTNENDNOTES, SwSectionFtnEndTabPage::Create, 0);
AddTabPage(TP_SECTION_INDENTS, SwSectionIndentTabPage::Create, 0);
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = pHtmlOpt->GetExportMode();
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = rHtmlOpt.GetExportMode();
sal_Bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
if(bWeb)
{

View file

@ -361,10 +361,10 @@ sal_Bool SwGlossaryHdl::NewGlossary(const String& rName, const String& rShortNam
pOnlyTxt = &sOnlyTxt;
}
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
const SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
const sal_uInt16 nSuccess = pWrtShell->MakeGlossary( *pTmp, rName, rShortName,
pCfg->IsSaveRelFile(), pOnlyTxt );
rCfg.IsSaveRelFile(), pOnlyTxt );
if(nSuccess == (sal_uInt16) -1 )
{
InfoBox(pWrtShell->GetView().GetWindow(), SW_RES(MSG_ERR_INSERT_GLOS)).Execute();
@ -441,8 +441,8 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
sal_Bool bCancel = sal_False;
// search for text block
// - don't prefer current group depending on configuration setting
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
sal_uInt16 nFound = !pCfg->IsSearchInAllCategories() ? pGlossary->GetIndex( aShortName ) : -1;
const SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
sal_uInt16 nFound = !rCfg.IsSearchInAllCategories() ? pGlossary->GetIndex( aShortName ) : -1;
// if not found then search in all groups
if( nFound == (sal_uInt16) -1 )
{
@ -794,9 +794,9 @@ sal_Bool SwGlossaryHdl::ImportGlossaries( const String& rName )
SwReader aReader( *pMed, rName );
if( aReader.HasGlossaries( *pR ) )
{
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
const SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
bRet = aReader.ReadGlossaries( *pR, *pGlossary,
pCfg->IsSaveRelFile() );
rCfg.IsSaveRelFile() );
}
}
}

View file

@ -1403,7 +1403,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
rView.GetViewFrame()->GetBindings().GetRecorder();
if ( !xRecorder.is() )
{
pACfg = SvxAutoCorrCfg::Get();
pACfg = &SvxAutoCorrCfg::Get();
pACorr = pACfg->GetAutoCorrect();
}
@ -4829,8 +4829,8 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
// works on the last input character, this is escpecially in Korean text often done
// quotes that are inside of the string are not replaced!
const sal_Unicode aCh = sRecord.GetChar(sRecord.Len() - 1);
SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
SvxAutoCorrect* pACorr = pACfg->GetAutoCorrect();
SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
SvxAutoCorrect* pACorr = rACfg.GetAutoCorrect();
if(pACorr &&
(( pACorr->IsAutoCorrFlag( ChgQuotes ) && ('\"' == aCh ))||
( pACorr->IsAutoCorrFlag( ChgSglQuotes ) && ( '\'' == aCh))))
@ -4888,14 +4888,14 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
rView.GetViewFrame()->GetBindings().GetRecorder();
if(!xRecorder.is())
{
SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
SvxAutoCorrect* pACorr = pACfg->GetAutoCorrect();
if( pACfg && pACorr &&
( pACfg->IsAutoTextTip() ||
SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
SvxAutoCorrect* pACorr = rACfg.GetAutoCorrect();
if( pACorr &&
( rACfg.IsAutoTextTip() ||
pACorr->GetSwFlags().bAutoCompleteWords ) &&
rSh.GetPrevAutoCorrWord( *pACorr, sWord ) )
{
ShowAutoTextCorrectQuickHelp(sWord, pACfg, pACorr, sal_True);
ShowAutoTextCorrectQuickHelp(sWord, &rACfg, pACorr, sal_True);
}
}
}

View file

@ -206,8 +206,8 @@ SwTemplateDlg::SwTemplateDlg(Window* pParent,
SvtCJKOptions aCJKOptions;
if(nHtmlMode & HTMLMODE_ON)
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
if (!pHtmlOpt->IsPrintLayoutExtension())
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
if (!rHtmlOpt.IsPrintLayoutExtension())
RemoveTabPage(TP_PARA_EXT);
RemoveTabPage(TP_PARA_ASIAN);
RemoveTabPage(TP_TABULATOR);

View file

@ -271,9 +271,9 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame,
aNameED.SetMaxTextLen(LONG_LENGTH);
FreeResource();
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
const SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
aShowExampleCB.Check( pCfg->IsAutoTextPreview());
aShowExampleCB.Check( rCfg.IsAutoTextPreview());
ShowPreviewHdl(&aShowExampleCB);
bIsDocReadOnly = pSh->GetView().GetDocShell()->IsReadOnly() ||
@ -294,8 +294,8 @@ SwGlossaryDlg::SwGlossaryDlg(SfxViewFrame* pViewFrame,
SwGlossaryDlg::~SwGlossaryDlg()
{
SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
pCfg->SetAutoTextPreview(aShowExampleCB.IsChecked()) ;
SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
rCfg.SetAutoTextPreview(aShowExampleCB.IsChecked()) ;
aCategoryBox.Clear();
aEditBtn.SetPopupMenu(0);
@ -626,7 +626,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
SfxFilterMatcher aMatcher( String::CreateFromAscii(SwDocShell::Factory().GetShortName()) );
SfxFilterMatcherIter aIter( &aMatcher );
SfxFilterMatcherIter aIter( aMatcher );
const SfxFilter* pFilter = aIter.First();
while ( pFilter )
{
@ -823,12 +823,12 @@ void SwGlossaryDlg::Init()
aCategoryBox.SetUpdateMode( sal_True );
aCategoryBox.Update();
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
aFileRelCB.Check( pCfg->IsSaveRelFile() );
const SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
aFileRelCB.Check( rCfg.IsSaveRelFile() );
aFileRelCB.SetClickHdl(LINK(this, SwGlossaryDlg, CheckBoxHdl));
aNetRelCB.Check( pCfg->IsSaveRelNet() );
aNetRelCB.Check( rCfg.IsSaveRelNet() );
aNetRelCB.SetClickHdl(LINK(this, SwGlossaryDlg, CheckBoxHdl));
aInsertTipCB.Check( pCfg->IsAutoTextTip() );
aInsertTipCB.Check( rCfg.IsAutoTextTip() );
aInsertTipCB.SetClickHdl(LINK(this, SwGlossaryDlg, CheckBoxHdl));
}
@ -883,14 +883,14 @@ IMPL_LINK( SwNewGlosNameDlg, Rename, Button *, EMPTYARG )
IMPL_LINK( SwGlossaryDlg, CheckBoxHdl, CheckBox *, pBox )
{
SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
sal_Bool bCheck = pBox->IsChecked();
if( pBox == &aInsertTipCB )
pCfg->SetAutoTextTip(bCheck);
rCfg.SetAutoTextTip(bCheck);
else if(pBox == &aFileRelCB)
pCfg->SetSaveRelFile(bCheck);
rCfg.SetSaveRelFile(bCheck);
else
pCfg->SetSaveRelNet(bCheck);
rCfg.SetSaveRelNet(bCheck);
return 0;
}

View file

@ -109,7 +109,7 @@ void lcl_GetState( SwDocShell& rSh, SfxItemSet& rSet )
sal_Bool lcl_Save( SwWrtShell& rSh, const String& rGroupName,
const String& rShortNm, const String& rLongNm )
{
const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
const SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get();
SwTextBlocks * pBlock = ::GetGlossaries()->GetGroupDoc( rGroupName );
SvxMacro aStart(aEmptyStr, aEmptyStr);
@ -120,7 +120,7 @@ sal_Bool lcl_Save( SwWrtShell& rSh, const String& rGroupName,
pGlosHdl->GetMacros( rShortNm, aStart, aEnd, pBlock );
sal_uInt16 nRet = rSh.SaveGlossaryDoc( *pBlock, rLongNm, rShortNm,
pCfg->IsSaveRelFile(),
rCfg.IsSaveRelFile(),
pBlock->IsOnlyTextBlock( rShortNm ) );
if(aStart.GetMacName().Len() || aEnd.GetMacName().Len() )

View file

@ -172,9 +172,9 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
sal_Unicode cIns = FN_INSERT_HARD_SPACE == nSlot ? CHAR_HARDBLANK
: CHAR_HARDHYPHEN;
SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
SvxAutoCorrect* pACorr = pACfg->GetAutoCorrect();
if( pACorr && pACfg->IsAutoFmtByInput() &&
SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
SvxAutoCorrect* pACorr = rACfg.GetAutoCorrect();
if( pACorr && rACfg.IsAutoFmtByInput() &&
pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd |
AddNonBrkSpace | ChgOrdinalNumber |
ChgToEnEmDash | SetINetAttr | Autocorrect ))
@ -513,8 +513,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
sal_Bool bSingleCol = sal_False;
if( 0!= dynamic_cast< SwWebDocShell*>( GetView().GetDocShell()) )
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
sal_uInt16 nExport = pHtmlOpt->GetExportMode();
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
sal_uInt16 nExport = rHtmlOpt.GetExportMode();
if( HTML_CFG_MSIE == nExport ||
HTML_CFG_HTML32 == nExport ||
HTML_CFG_MSIE_40 == nExport ||
@ -799,8 +799,8 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
rSet.DisableItem( nWhich );
else if(SID_INSERT_FLOATINGFRAME == nWhich && nHtmlMode&HTMLMODE_ON)
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
sal_uInt16 nExport = pHtmlOpt->GetExportMode();
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
sal_uInt16 nExport = rHtmlOpt.GetExportMode();
if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport )
rSet.DisableItem(nWhich);
}

View file

@ -604,7 +604,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
case FN_AUTOFORMAT_REDLINE_APPLY:
{
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags());
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags());
// das muss fuer die Nachbearbeitung immer sal_False sein
aFlags.bAFmtByInput = sal_False;
aFlags.bWithRedlining = sal_True;
@ -648,7 +648,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_APPLY:
{
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags());
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags());
// das muss fuer die Nachbearbeitung immer sal_False sein
aFlags.bAFmtByInput = sal_False;
rWrtSh.AutoFormat( &aFlags );
@ -657,11 +657,11 @@ void SwTextShell::Execute(SfxRequest &rReq)
break;
case FN_AUTOFORMAT_AUTO:
{
SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
sal_Bool bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !pACfg->IsAutoFmtByInput();
if( bSet != pACfg->IsAutoFmtByInput() )
SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get();
sal_Bool bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !rACfg.IsAutoFmtByInput();
if( bSet != rACfg.IsAutoFmtByInput() )
{
pACfg->SetAutoFmtByInput( bSet );
rACfg.SetAutoFmtByInput( bSet );
GetView().GetViewFrame()->GetBindings().Invalidate( nSlot );
if ( !pItem )
rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), bSet ) );
@ -673,7 +673,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
// erstmal auf Blank defaulten
sal_Unicode cChar = ' ';
rWrtSh.AutoCorrect( *SvxAutoCorrCfg::Get()->GetAutoCorrect(), cChar );
rWrtSh.AutoCorrect( *SvxAutoCorrCfg::Get().GetAutoCorrect(), cChar );
rReq.Done();
}
break;
@ -1424,7 +1424,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
break;
case FN_AUTOFORMAT_AUTO:
{
rSet.Put( SfxBoolItem( nWhich, SvxAutoCorrCfg::Get()->IsAutoFmtByInput() ));
rSet.Put( SfxBoolItem( nWhich, SvxAutoCorrCfg::Get().IsAutoFmtByInput() ));
}
break;
case FN_GLOSSARY_DLG:

View file

@ -1527,8 +1527,8 @@ sal_Bool SwTextFlowPage::FillItemSet( SfxItemSet& rSet )
void SwTextFlowPage::Reset( const SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
sal_Bool bFlowAllowed = !bHtmlMode || pHtmlOpt->IsPrintLayoutExtension();
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
sal_Bool bFlowAllowed = !bHtmlMode || rHtmlOpt.IsPrintLayoutExtension();
if(bFlowAllowed)
{
// Einfuegen der vorhandenen Seitenvorlagen in die Listbox

View file

@ -197,9 +197,9 @@ rtl_TextEncoding lcl_GetStreamCharSet(rtl_TextEncoding eLoadEncoding)
rtl_TextEncoding eRet = eLoadEncoding;
if(RTL_TEXTENCODING_DONTKNOW == eRet)
{
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get();
const sal_Char *pCharSet =
rtl_getBestMimeCharsetFromTextEncoding( pHtmlOptions->GetTextEncoding() );
rtl_getBestMimeCharsetFromTextEncoding( rHtmlOptions.GetTextEncoding() );
eRet = rtl_getTextEncodingFromMimeCharset( pCharSet );
}
return eRet;
@ -779,9 +779,9 @@ void SwSrcView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
void SwSrcView::Load(SwDocShell* pDocShell)
{
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
SvxHtmlOptions& rHtmlOptions = SvxHtmlOptions::Get();
const sal_Char *pCharSet =
rtl_getBestMimeCharsetFromTextEncoding( pHtmlOptions->GetTextEncoding() );
rtl_getBestMimeCharsetFromTextEncoding( rHtmlOptions.GetTextEncoding() );
rtl_TextEncoding eDestEnc = rtl_getTextEncodingFromMimeCharset( pCharSet );
aEditWin.SetReadonly(pDocShell->IsReadOnly());

View file

@ -165,12 +165,12 @@ SwVbaApplication::ListGalleries( const uno::Any& index ) throw (uno::RuntimeExce
sal_Bool SAL_CALL SwVbaApplication::getDisplayAutoCompleteTips() throw (css::uno::RuntimeException)
{
return SvxAutoCorrCfg::Get()->IsAutoTextTip();
return SvxAutoCorrCfg::Get().IsAutoTextTip();
}
void SAL_CALL SwVbaApplication::setDisplayAutoCompleteTips( sal_Bool _displayAutoCompleteTips ) throw (css::uno::RuntimeException)
{
SvxAutoCorrCfg::Get()->SetAutoTextTip( _displayAutoCompleteTips );
SvxAutoCorrCfg::Get().SetAutoTextTip( _displayAutoCompleteTips );
}
sal_Int32 SAL_CALL SwVbaApplication::getEnableCancelKey() throw (css::uno::RuntimeException)

View file

@ -144,7 +144,7 @@ using namespace com::sun::star;
SvxAutoCorrect* lcl_IsAutoCorr()
{
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get()->GetAutoCorrect();
SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get().GetAutoCorrect();
if( pACorr && !pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd |
AddNonBrkSpace | ChgOrdinalNumber |
ChgToEnEmDash | SetINetAttr | Autocorrect ))