Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d214f1cb
Kaydet (Commit)
d214f1cb
authored
Eyl 22, 2015
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: prefix members of SwModule
Change-Id: I5647e60dfbe5af460a077e1c2adf036fc2bb8037
üst
050447a3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
218 additions
and
218 deletions
+218
-218
swmodule.hxx
sw/inc/swmodule.hxx
+35
-35
apphdl.cxx
sw/source/uibase/app/apphdl.cxx
+60
-60
appopt.cxx
sw/source/uibase/app/appopt.cxx
+2
-2
swmodul1.cxx
sw/source/uibase/app/swmodul1.cxx
+67
-67
swmodule.cxx
sw/source/uibase/app/swmodule.cxx
+34
-34
swdtflvr.cxx
sw/source/uibase/dochdl/swdtflvr.cxx
+16
-16
edtdd.cxx
sw/source/uibase/docvw/edtdd.cxx
+4
-4
No files found.
sw/inc/swmodule.hxx
Dosyayı görüntüle @
d214f1cb
...
...
@@ -65,47 +65,47 @@ namespace com{ namespace sun{ namespace star{ namespace scanner{
class
SW_DLLPUBLIC
SwModule
:
public
SfxModule
,
public
SfxListener
,
public
utl
::
ConfigurationListener
{
OUString
sActAuthor
;
OUString
m_
sActAuthor
;
// ConfigItems
SwModuleOptions
*
pModuleConfig
;
SwMasterUsrPref
*
pUsrPref
;
SwMasterUsrPref
*
pWebUsrPref
;
SwPrintOptions
*
pPrtOpt
;
SwPrintOptions
*
pWebPrtOpt
;
SwChapterNumRules
*
pChapterNumRules
;
SwStdFontConfig
*
pStdFontConfig
;
SwNavigationConfig
*
pNavigationConfig
;
SwToolbarConfigItem
*
pToolbarConfig
;
//For stacked toolbars. Which one was visible?
SwToolbarConfigItem
*
pWebToolbarConfig
;
SwDBConfig
*
pDBConfig
;
svtools
::
ColorConfig
*
pColorConfig
;
SvtAccessibilityOptions
*
pAccessibilityOptions
;
SvtCTLOptions
*
pCTLOptions
;
SvtUserOptions
*
pUserOptions
;
SfxErrorHandler
*
pErrorHdl
;
SwAttrPool
*
pAttrPool
;
SwModuleOptions
*
m_
pModuleConfig
;
SwMasterUsrPref
*
m_
pUsrPref
;
SwMasterUsrPref
*
m_
pWebUsrPref
;
SwPrintOptions
*
m_pPrintOptions
;
SwPrintOptions
*
m_pWebPrintOptions
;
SwChapterNumRules
*
m_
pChapterNumRules
;
SwStdFontConfig
*
m_
pStdFontConfig
;
SwNavigationConfig
*
m_
pNavigationConfig
;
SwToolbarConfigItem
*
m_
pToolbarConfig
;
//For stacked toolbars. Which one was visible?
SwToolbarConfigItem
*
m_
pWebToolbarConfig
;
SwDBConfig
*
m_
pDBConfig
;
svtools
::
ColorConfig
*
m_
pColorConfig
;
SvtAccessibilityOptions
*
m_
pAccessibilityOptions
;
SvtCTLOptions
*
m_
pCTLOptions
;
SvtUserOptions
*
m_
pUserOptions
;
SfxErrorHandler
*
m_pErrorHandler
;
SwAttrPool
*
m_
pAttrPool
;
// Current view is held here in order to avoid one's being forced
// to work via GetActiveView.
// View is valid until destroyed in Activate or exchanged.
SwView
*
pView
;
SwView
*
m_
pView
;
// List of all Redline-authors.
std
::
vector
<
OUString
>*
pAuthorNames
;
std
::
vector
<
OUString
>*
m_
pAuthorNames
;
// DictionaryList listener to trigger spellchecking or hyphenation
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
linguistic2
::
XLinguServiceEventListener
>
xLngSvcEv
tListener
;
::
com
::
sun
::
star
::
linguistic2
::
XLinguServiceEventListener
>
m_xLinguServiceEven
tListener
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
scanner
::
XScannerManager2
>
m_xScannerManager
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
linguistic2
::
XLanguageGuessing
>
m_xLanguageGuesser
;
bool
bAuthorInitialised
:
1
;
bool
bEmbeddedLoadSave
:
1
;
bool
m_
bAuthorInitialised
:
1
;
bool
m_
bEmbeddedLoadSave
:
1
;
// Catch hint for DocInfo.
virtual
void
Notify
(
SfxBroadcaster
&
rBC
,
const
SfxHint
&
rHint
)
SAL_OVERRIDE
;
...
...
@@ -119,7 +119,7 @@ protected:
public
:
// public Data - used for internal Clipboard / Drag & Drop / XSelection
SwTransferable
*
pDragDrop
,
*
pXSelection
;
SwTransferable
*
m_pDragDrop
,
*
m_
pXSelection
;
TYPEINFO_OVERRIDE
();
SFX_DECL_INTERFACE
(
SW_INTERFACE_MODULE
)
...
...
@@ -137,8 +137,8 @@ public:
virtual
~
SwModule
();
// Set view for internal use only. It is public only for technical reasons.
inline
void
SetView
(
SwView
*
pVw
)
{
pView
=
pVw
;
}
inline
SwView
*
GetView
()
{
return
pView
;
}
inline
void
SetView
(
SwView
*
pVw
)
{
m_
pView
=
pVw
;
}
inline
SwView
*
GetView
()
{
return
m_
pView
;
}
// Handler for slots.
void
StateOther
(
SfxItemSet
&
);
...
...
@@ -161,13 +161,13 @@ public:
void
ApplyUserCharUnit
(
bool
bApplyChar
,
bool
bWeb
);
// apply_char_unit
// Create ConfigItems.
SwModuleOptions
*
GetModuleConfig
()
{
return
pModuleConfig
;}
SwModuleOptions
*
GetModuleConfig
()
{
return
m_
pModuleConfig
;}
SwPrintOptions
*
GetPrtOptions
(
bool
bWeb
);
SwChapterNumRules
*
GetChapterNumRules
();
SwStdFontConfig
*
GetStdFontConfig
()
{
return
pStdFontConfig
;
}
SwStdFontConfig
*
GetStdFontConfig
()
{
return
m_
pStdFontConfig
;
}
SwNavigationConfig
*
GetNavigationConfig
();
SwToolbarConfigItem
*
GetToolbarConfig
()
{
return
pToolbarConfig
;
}
SwToolbarConfigItem
*
GetWebToolbarConfig
()
{
return
pWebToolbarConfig
;
}
SwToolbarConfigItem
*
GetToolbarConfig
()
{
return
m_
pToolbarConfig
;
}
SwToolbarConfigItem
*
GetWebToolbarConfig
()
{
return
m_
pWebToolbarConfig
;
}
SwDBConfig
*
GetDBConfig
();
svtools
::
ColorConfig
&
GetColorConfig
();
SvtAccessibilityOptions
&
GetAccessibilityOptions
();
...
...
@@ -178,8 +178,8 @@ public:
static
SwView
*
GetFirstView
();
static
SwView
*
GetNextView
(
SwView
*
);
bool
IsEmbeddedLoadSave
()
const
{
return
bEmbeddedLoadSave
;
}
void
SetEmbeddedLoadSave
(
bool
bFlag
)
{
bEmbeddedLoadSave
=
bFlag
;
}
bool
IsEmbeddedLoadSave
()
const
{
return
m_
bEmbeddedLoadSave
;
}
void
SetEmbeddedLoadSave
(
bool
bFlag
)
{
m_
bEmbeddedLoadSave
=
bFlag
;
}
static
void
ShowDBObj
(
SwView
&
rView
,
const
SwDBData
&
rData
,
bool
bOnlyIfAvailable
=
false
);
...
...
@@ -248,7 +248,7 @@ inline ::com::sun::star::uno::Reference<
::
com
::
sun
::
star
::
linguistic2
::
XLinguServiceEventListener
>
SwModule
::
GetLngSvcEvtListener
()
{
return
xLngSvcEv
tListener
;
return
m_xLinguServiceEven
tListener
;
}
// Access to SwModule, the View and the shell.
...
...
sw/source/uibase/app/apphdl.cxx
Dosyayı görüntüle @
d214f1cb
...
...
@@ -197,7 +197,7 @@ void SwModule::StateOther(SfxItemSet &rSet)
rSet
.
Put
(
SfxUInt16Item
(
SID_ATTR_METRIC
,
static_cast
<
sal_uInt16
>
(
::
GetDfltMetric
(
bWebView
))));
break
;
case
FN_SET_MODOPT_TBLNUMFMT
:
rSet
.
Put
(
SfxBoolItem
(
nWhich
,
pModuleConfig
->
rSet
.
Put
(
SfxBoolItem
(
nWhich
,
m_
pModuleConfig
->
IsInsTableFormatNum
(
bWebView
)));
break
;
default
:
...
...
@@ -670,9 +670,9 @@ void SwModule::ExecOther(SfxRequest& rReq)
nWhich
,
false
,
&
pItem
))
bSet
=
static_cast
<
const
SfxBoolItem
*>
(
pItem
)
->
GetValue
();
else
bSet
=
!
pModuleConfig
->
IsInsTableFormatNum
(
bWebView
);
bSet
=
!
m_
pModuleConfig
->
IsInsTableFormatNum
(
bWebView
);
pModuleConfig
->
SetInsTableFormatNum
(
bWebView
,
bSet
);
m_
pModuleConfig
->
SetInsTableFormatNum
(
bWebView
,
bSet
);
}
break
;
#if HAVE_FEATURE_DBCONNECTIVITY
...
...
@@ -757,37 +757,37 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
sal_uInt16
nHintId
=
static_cast
<
const
SfxSimpleHint
&>
(
rHint
).
GetId
();
if
(
SFX_HINT_DEINITIALIZING
==
nHintId
)
{
DELETEZ
(
pWebUsrPref
);
DELETEZ
(
pUsrPref
)
;
DELETEZ
(
pModuleConfig
);
DELETEZ
(
pPrtOpt
)
;
DELETEZ
(
pWebPrtOpt
)
;
DELETEZ
(
pChapterNumRules
);
DELETEZ
(
pStdFontConfig
)
;
DELETEZ
(
pNavigationConfig
)
;
DELETEZ
(
pToolbarConfig
)
;
DELETEZ
(
pWebToolbarConfig
)
;
DELETEZ
(
pAuthorNames
)
;
DELETEZ
(
pDBConfig
);
if
(
pColorConfig
)
DELETEZ
(
m_
pWebUsrPref
);
DELETEZ
(
m_
pUsrPref
)
;
DELETEZ
(
m_
pModuleConfig
);
DELETEZ
(
m_pPrintOptions
)
;
DELETEZ
(
m_pWebPrintOptions
)
;
DELETEZ
(
m_
pChapterNumRules
);
DELETEZ
(
m_
pStdFontConfig
)
;
DELETEZ
(
m_
pNavigationConfig
)
;
DELETEZ
(
m_
pToolbarConfig
)
;
DELETEZ
(
m_
pWebToolbarConfig
)
;
DELETEZ
(
m_
pAuthorNames
)
;
DELETEZ
(
m_
pDBConfig
);
if
(
m_
pColorConfig
)
{
pColorConfig
->
RemoveListener
(
this
);
DELETEZ
(
pColorConfig
);
m_
pColorConfig
->
RemoveListener
(
this
);
DELETEZ
(
m_
pColorConfig
);
}
if
(
pAccessibilityOptions
)
if
(
m_
pAccessibilityOptions
)
{
pAccessibilityOptions
->
RemoveListener
(
this
);
DELETEZ
(
pAccessibilityOptions
);
m_
pAccessibilityOptions
->
RemoveListener
(
this
);
DELETEZ
(
m_
pAccessibilityOptions
);
}
if
(
pCTLOptions
)
if
(
m_
pCTLOptions
)
{
pCTLOptions
->
RemoveListener
(
this
);
DELETEZ
(
pCTLOptions
);
m_
pCTLOptions
->
RemoveListener
(
this
);
DELETEZ
(
m_
pCTLOptions
);
}
if
(
pUserOptions
)
if
(
m_
pUserOptions
)
{
pUserOptions
->
RemoveListener
(
this
);
DELETEZ
(
pUserOptions
);
m_
pUserOptions
->
RemoveListener
(
this
);
DELETEZ
(
m_
pUserOptions
);
}
}
}
...
...
@@ -795,15 +795,15 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
void
SwModule
::
ConfigurationChanged
(
utl
::
ConfigurationBroadcaster
*
pBrdCst
,
sal_uInt32
)
{
if
(
pBrdCst
==
pUserOptions
)
if
(
pBrdCst
==
m_
pUserOptions
)
{
bAuthorInitialised
=
false
;
m_
bAuthorInitialised
=
false
;
}
else
if
(
pBrdCst
==
pColorConfig
||
pBrdCst
==
pAccessibilityOptions
)
else
if
(
pBrdCst
==
m_pColorConfig
||
pBrdCst
==
m_
pAccessibilityOptions
)
{
bool
bAccessibility
=
false
;
if
(
pBrdCst
==
pColorConfig
)
SwViewOption
::
ApplyColorConfigValues
(
*
pColorConfig
);
if
(
pBrdCst
==
m_
pColorConfig
)
SwViewOption
::
ApplyColorConfigValues
(
*
m_
pColorConfig
);
else
bAccessibility
=
true
;
...
...
@@ -823,9 +823,9 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
if
(
bAccessibility
)
{
if
(
pViewShell
->
IsA
(
aSwViewTypeId
))
static_cast
<
SwView
*>
(
pViewShell
)
->
ApplyAccessiblityOptions
(
*
pAccessibilityOptions
);
static_cast
<
SwView
*>
(
pViewShell
)
->
ApplyAccessiblityOptions
(
*
m_
pAccessibilityOptions
);
else
if
(
pViewShell
->
IsA
(
aSwPreviewTypeId
))
static_cast
<
SwPagePreview
*>
(
pViewShell
)
->
ApplyAccessiblityOptions
(
*
pAccessibilityOptions
);
static_cast
<
SwPagePreview
*>
(
pViewShell
)
->
ApplyAccessiblityOptions
(
*
m_
pAccessibilityOptions
);
}
pViewShell
->
GetWindow
()
->
Invalidate
();
}
...
...
@@ -833,7 +833,7 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
pViewShell
=
SfxViewShell
::
GetNext
(
*
pViewShell
);
}
}
else
if
(
pBrdCst
==
pCTLOptions
)
else
if
(
pBrdCst
==
m_
pCTLOptions
)
{
const
SfxObjectShell
*
pObjSh
=
SfxObjectShell
::
GetFirst
();
while
(
pObjSh
)
...
...
@@ -853,66 +853,66 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
SwDBConfig
*
SwModule
::
GetDBConfig
()
{
if
(
!
pDBConfig
)
pDBConfig
=
new
SwDBConfig
;
return
pDBConfig
;
if
(
!
m_
pDBConfig
)
m_
pDBConfig
=
new
SwDBConfig
;
return
m_
pDBConfig
;
}
svtools
::
ColorConfig
&
SwModule
::
GetColorConfig
()
{
if
(
!
pColorConfig
)
if
(
!
m_
pColorConfig
)
{
pColorConfig
=
new
svtools
::
ColorConfig
;
SwViewOption
::
ApplyColorConfigValues
(
*
pColorConfig
);
pColorConfig
->
AddListener
(
this
);
m_
pColorConfig
=
new
svtools
::
ColorConfig
;
SwViewOption
::
ApplyColorConfigValues
(
*
m_
pColorConfig
);
m_
pColorConfig
->
AddListener
(
this
);
}
return
*
pColorConfig
;
return
*
m_
pColorConfig
;
}
SvtAccessibilityOptions
&
SwModule
::
GetAccessibilityOptions
()
{
if
(
!
pAccessibilityOptions
)
if
(
!
m_
pAccessibilityOptions
)
{
pAccessibilityOptions
=
new
SvtAccessibilityOptions
;
pAccessibilityOptions
->
AddListener
(
this
);
m_
pAccessibilityOptions
=
new
SvtAccessibilityOptions
;
m_
pAccessibilityOptions
->
AddListener
(
this
);
}
return
*
pAccessibilityOptions
;
return
*
m_
pAccessibilityOptions
;
}
SvtCTLOptions
&
SwModule
::
GetCTLOptions
()
{
if
(
!
pCTLOptions
)
if
(
!
m_
pCTLOptions
)
{
pCTLOptions
=
new
SvtCTLOptions
;
pCTLOptions
->
AddListener
(
this
);
m_
pCTLOptions
=
new
SvtCTLOptions
;
m_
pCTLOptions
->
AddListener
(
this
);
}
return
*
pCTLOptions
;
return
*
m_
pCTLOptions
;
}
SvtUserOptions
&
SwModule
::
GetUserOptions
()
{
if
(
!
pUserOptions
)
if
(
!
m_
pUserOptions
)
{
pUserOptions
=
new
SvtUserOptions
;
pUserOptions
->
AddListener
(
this
);
m_
pUserOptions
=
new
SvtUserOptions
;
m_
pUserOptions
->
AddListener
(
this
);
}
return
*
pUserOptions
;
return
*
m_
pUserOptions
;
}
const
SwMasterUsrPref
*
SwModule
::
GetUsrPref
(
bool
bWeb
)
const
{
SwModule
*
pNonConstModule
=
const_cast
<
SwModule
*>
(
this
);
if
(
bWeb
&&
!
pWebUsrPref
)
if
(
bWeb
&&
!
m_
pWebUsrPref
)
{
// The SpellChecker is needed in SwMasterUsrPref's Load, but it must not
// be created there #58256#
pNonConstModule
->
pWebUsrPref
=
new
SwMasterUsrPref
(
true
);
pNonConstModule
->
m_
pWebUsrPref
=
new
SwMasterUsrPref
(
true
);
}
else
if
(
!
bWeb
&&
!
pUsrPref
)
else
if
(
!
bWeb
&&
!
m_
pUsrPref
)
{
pNonConstModule
->
pUsrPref
=
new
SwMasterUsrPref
(
false
);
pNonConstModule
->
m_
pUsrPref
=
new
SwMasterUsrPref
(
false
);
}
return
bWeb
?
pWebUsrPref
:
pUsrPref
;
return
bWeb
?
m_pWebUsrPref
:
m_
pUsrPref
;
}
void
NewXForms
(
SfxRequest
&
rReq
)
...
...
sw/source/uibase/app/appopt.cxx
Dosyayı görüntüle @
d214f1cb
...
...
@@ -77,7 +77,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
// the options for the Web- and Textdialog are put together here
SwViewOption
aViewOpt
=
*
GetUsrPref
(
!
bTextDialog
);
SwMasterUsrPref
*
pPref
=
bTextDialog
?
pUsrPref
:
pWebUsrPref
;
SwMasterUsrPref
*
pPref
=
bTextDialog
?
m_pUsrPref
:
m_
pWebUsrPref
;
// no MakeUsrPref, because only options from textdoks can be used here
SwView
*
pAppView
=
GetView
();
if
(
pAppView
&&
pAppView
->
GetViewFrame
()
!=
SfxViewFrame
::
Current
())
...
...
@@ -253,7 +253,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
}
SwViewOption
aViewOpt
=
*
GetUsrPref
(
!
bTextDialog
);
SwMasterUsrPref
*
pPref
=
bTextDialog
?
pUsrPref
:
pWebUsrPref
;
SwMasterUsrPref
*
pPref
=
bTextDialog
?
m_pUsrPref
:
m_
pWebUsrPref
;
const
SfxPoolItem
*
pItem
;
SfxBindings
*
pBindings
=
pAppView
?
&
pAppView
->
GetViewFrame
()
->
GetBindings
()
...
...
sw/source/uibase/app/swmodul1.cxx
Dosyayı görüntüle @
d214f1cb
...
...
@@ -210,15 +210,15 @@ void SwModule::ApplyUserMetric( FieldUnit eMetric, bool bWeb )
SwMasterUsrPref
*
pPref
;
if
(
bWeb
)
{
if
(
!
pWebUsrPref
)
if
(
!
m_
pWebUsrPref
)
GetUsrPref
(
true
);
pPref
=
pWebUsrPref
;
pPref
=
m_
pWebUsrPref
;
}
else
{
if
(
!
pUsrPref
)
if
(
!
m_
pUsrPref
)
GetUsrPref
(
false
);
pPref
=
pUsrPref
;
pPref
=
m_
pUsrPref
;
}
FieldUnit
eOldMetric
=
pPref
->
GetMetric
();
if
(
eOldMetric
!=
eMetric
)
...
...
@@ -246,15 +246,15 @@ void SwModule::ApplyRulerMetric( FieldUnit eMetric, bool bHorizontal, bool bWeb
SwMasterUsrPref
*
pPref
;
if
(
bWeb
)
{
if
(
!
pWebUsrPref
)
if
(
!
m_
pWebUsrPref
)
GetUsrPref
(
true
);
pPref
=
pWebUsrPref
;
pPref
=
m_
pWebUsrPref
;
}
else
{
if
(
!
pUsrPref
)
if
(
!
m_
pUsrPref
)
GetUsrPref
(
false
);
pPref
=
pUsrPref
;
pPref
=
m_
pUsrPref
;
}
if
(
bHorizontal
)
pPref
->
SetHScrollMetric
(
eMetric
);
...
...
@@ -282,15 +282,15 @@ void SwModule::ApplyUserCharUnit(bool bApplyChar, bool bWeb)
SwMasterUsrPref
*
pPref
;
if
(
bWeb
)
{
if
(
!
pWebUsrPref
)
if
(
!
m_
pWebUsrPref
)
GetUsrPref
(
true
);
pPref
=
pWebUsrPref
;
pPref
=
m_
pWebUsrPref
;
}
else
{
if
(
!
pUsrPref
)
if
(
!
m_
pUsrPref
)
GetUsrPref
(
false
);
pPref
=
pUsrPref
;
pPref
=
m_
pUsrPref
;
}
bool
bOldApplyCharUnit
=
pPref
->
IsApplyCharUnit
();
bool
bHasChanged
=
false
;
...
...
@@ -338,32 +338,32 @@ void SwModule::ApplyUserCharUnit(bool bApplyChar, bool bWeb)
SwNavigationConfig
*
SwModule
::
GetNavigationConfig
()
{
if
(
!
pNavigationConfig
)
if
(
!
m_
pNavigationConfig
)
{
pNavigationConfig
=
new
SwNavigationConfig
;
m_
pNavigationConfig
=
new
SwNavigationConfig
;
}
return
pNavigationConfig
;
return
m_
pNavigationConfig
;
}
SwPrintOptions
*
SwModule
::
GetPrtOptions
(
bool
bWeb
)
{
if
(
bWeb
&&
!
pWebPrtOpt
)
if
(
bWeb
&&
!
m_pWebPrintOptions
)
{
pWebPrtOpt
=
new
SwPrintOptions
(
true
);
m_pWebPrintOptions
=
new
SwPrintOptions
(
true
);
}
else
if
(
!
bWeb
&&
!
pPrtOpt
)
else
if
(
!
bWeb
&&
!
m_pPrintOptions
)
{
pPrtOpt
=
new
SwPrintOptions
(
false
);
m_pPrintOptions
=
new
SwPrintOptions
(
false
);
}
return
bWeb
?
pWebPrtOpt
:
pPrtOpt
;
return
bWeb
?
m_pWebPrintOptions
:
m_pPrintOptions
;
}
SwChapterNumRules
*
SwModule
::
GetChapterNumRules
()
{
if
(
!
pChapterNumRules
)
pChapterNumRules
=
new
SwChapterNumRules
;
return
pChapterNumRules
;
if
(
!
m_
pChapterNumRules
)
m_
pChapterNumRules
=
new
SwChapterNumRules
;
return
m_
pChapterNumRules
;
}
void
SwModule
::
ShowDBObj
(
SwView
&
rView
,
const
SwDBData
&
rData
,
bool
/*bOnlyIfAvailable*/
)
...
...
@@ -393,47 +393,47 @@ void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, bool /*bOnlyIfAva
sal_uInt16
SwModule
::
GetRedlineAuthor
()
{
if
(
!
bAuthorInitialised
)
if
(
!
m_
bAuthorInitialised
)
{
const
SvtUserOptions
&
rOpt
=
GetUserOptions
();
sActAuthor
=
rOpt
.
GetFullName
();
if
(
sActAuthor
.
isEmpty
())
m_
sActAuthor
=
rOpt
.
GetFullName
();
if
(
m_
sActAuthor
.
isEmpty
())
{
sActAuthor
=
rOpt
.
GetID
();
if
(
sActAuthor
.
isEmpty
())
sActAuthor
=
SW_RESSTR
(
STR_REDLINE_UNKNOWN_AUTHOR
);
m_
sActAuthor
=
rOpt
.
GetID
();
if
(
m_
sActAuthor
.
isEmpty
())
m_
sActAuthor
=
SW_RESSTR
(
STR_REDLINE_UNKNOWN_AUTHOR
);
}
bAuthorInitialised
=
true
;
m_
bAuthorInitialised
=
true
;
}
return
InsertRedlineAuthor
(
sActAuthor
);
return
InsertRedlineAuthor
(
m_
sActAuthor
);
}
void
SwModule
::
SetRedlineAuthor
(
const
OUString
&
rAuthor
)
{
bAuthorInitialised
=
true
;
sActAuthor
=
rAuthor
;
InsertRedlineAuthor
(
sActAuthor
);
m_
bAuthorInitialised
=
true
;
m_
sActAuthor
=
rAuthor
;
InsertRedlineAuthor
(
m_
sActAuthor
);
}
OUString
SwModule
::
GetRedlineAuthor
(
sal_uInt16
nPos
)
{
OSL_ENSURE
(
nPos
<
pAuthorNames
->
size
(),
"author not found!"
);
//#i45342# RTF doc with no author table caused reader to crash
while
(
!
(
nPos
<
pAuthorNames
->
size
()))
OSL_ENSURE
(
nPos
<
m_
pAuthorNames
->
size
(),
"author not found!"
);
//#i45342# RTF doc with no author table caused reader to crash
while
(
!
(
nPos
<
m_
pAuthorNames
->
size
()))
{
InsertRedlineAuthor
(
"nn"
);
}
return
(
*
pAuthorNames
)[
nPos
];
return
(
*
m_
pAuthorNames
)[
nPos
];
}
sal_uInt16
SwModule
::
InsertRedlineAuthor
(
const
OUString
&
rAuthor
)
{
sal_uInt16
nPos
=
0
;
while
(
nPos
<
pAuthorNames
->
size
()
&&
(
*
pAuthorNames
)[
nPos
]
!=
rAuthor
)
while
(
nPos
<
m_pAuthorNames
->
size
()
&&
(
*
m_
pAuthorNames
)[
nPos
]
!=
rAuthor
)
++
nPos
;
if
(
nPos
==
pAuthorNames
->
size
())
pAuthorNames
->
push_back
(
rAuthor
);
if
(
nPos
==
m_
pAuthorNames
->
size
())
m_
pAuthorNames
->
push_back
(
rAuthor
);
return
nPos
;
}
...
...
@@ -507,43 +507,43 @@ static void lcl_FillAuthorAttr( sal_uInt16 nAuthor, SfxItemSet &rSet,
void
SwModule
::
GetInsertAuthorAttr
(
sal_uInt16
nAuthor
,
SfxItemSet
&
rSet
)
{
lcl_FillAuthorAttr
(
nAuthor
,
rSet
,
pModuleConfig
->
GetInsertAuthorAttr
());
lcl_FillAuthorAttr
(
nAuthor
,
rSet
,
m_
pModuleConfig
->
GetInsertAuthorAttr
());
}
void
SwModule
::
GetDeletedAuthorAttr
(
sal_uInt16
nAuthor
,
SfxItemSet
&
rSet
)
{
lcl_FillAuthorAttr
(
nAuthor
,
rSet
,
pModuleConfig
->
GetDeletedAuthorAttr
());
lcl_FillAuthorAttr
(
nAuthor
,
rSet
,
m_
pModuleConfig
->
GetDeletedAuthorAttr
());
}
// For future extension:
void
SwModule
::
GetFormatAuthorAttr
(
sal_uInt16
nAuthor
,
SfxItemSet
&
rSet
)
{
lcl_FillAuthorAttr
(
nAuthor
,
rSet
,
pModuleConfig
->
GetFormatAuthorAttr
()
);
lcl_FillAuthorAttr
(
nAuthor
,
rSet
,
m_
pModuleConfig
->
GetFormatAuthorAttr
()
);
}
sal_uInt16
SwModule
::
GetRedlineMarkPos
()
{
return
pModuleConfig
->
GetMarkAlignMode
();
return
m_
pModuleConfig
->
GetMarkAlignMode
();
}
bool
SwModule
::
IsInsTableFormatNum
(
bool
bHTML
)
const
{
return
pModuleConfig
->
IsInsTableFormatNum
(
bHTML
);
return
m_
pModuleConfig
->
IsInsTableFormatNum
(
bHTML
);
}
bool
SwModule
::
IsInsTableChangeNumFormat
(
bool
bHTML
)
const
{
return
pModuleConfig
->
IsInsTableChangeNumFormat
(
bHTML
);
return
m_
pModuleConfig
->
IsInsTableChangeNumFormat
(
bHTML
);
}
bool
SwModule
::
IsInsTableAlignNum
(
bool
bHTML
)
const
{
return
pModuleConfig
->
IsInsTableAlignNum
(
bHTML
);
return
m_
pModuleConfig
->
IsInsTableAlignNum
(
bHTML
);
}
const
Color
&
SwModule
::
GetRedlineMarkColor
()
{
return
pModuleConfig
->
GetMarkAlignColor
();
return
m_
pModuleConfig
->
GetMarkAlignColor
();
}
const
SwViewOption
*
SwModule
::
GetViewOption
(
bool
bWeb
)
...
...
@@ -553,7 +553,7 @@ const SwViewOption* SwModule::GetViewOption(bool bWeb)
OUString
SwModule
::
GetDocStatWordDelim
()
const
{
return
pModuleConfig
->
GetWordDelimiter
();
return
m_
pModuleConfig
->
GetWordDelimiter
();
}
// Passing-through of the ModuleConfig's Metric (for HTML-Export)
...
...
@@ -562,15 +562,15 @@ FieldUnit SwModule::GetMetric( bool bWeb ) const
SwMasterUsrPref
*
pPref
;
if
(
bWeb
)
{
if
(
!
pWebUsrPref
)
if
(
!
m_
pWebUsrPref
)
GetUsrPref
(
true
);
pPref
=
pWebUsrPref
;
pPref
=
m_
pWebUsrPref
;
}
else
{
if
(
!
pUsrPref
)
if
(
!
m_
pUsrPref
)
GetUsrPref
(
false
);
pPref
=
pUsrPref
;
pPref
=
m_
pUsrPref
;
}
return
pPref
->
GetMetric
();
}
...
...
@@ -578,30 +578,30 @@ FieldUnit SwModule::GetMetric( bool bWeb ) const
// Pass-through Update-Status
sal_uInt16
SwModule
::
GetLinkUpdMode
(
bool
)
const
{
if
(
!
pUsrPref
)
if
(
!
m_
pUsrPref
)
GetUsrPref
(
false
);
return
(
sal_uInt16
)
pUsrPref
->
GetUpdateLinkMode
();
return
(
sal_uInt16
)
m_
pUsrPref
->
GetUpdateLinkMode
();
}
SwFieldUpdateFlags
SwModule
::
GetFieldUpdateFlags
(
bool
)
const
{
if
(
!
pUsrPref
)
if
(
!
m_
pUsrPref
)
GetUsrPref
(
false
);
return
pUsrPref
->
GetFieldUpdateFlags
();
return
m_
pUsrPref
->
GetFieldUpdateFlags
();
}
void
SwModule
::
ApplyFieldUpdateFlags
(
SwFieldUpdateFlags
eFieldFlags
)
{
if
(
!
pUsrPref
)
if
(
!
m_
pUsrPref
)
GetUsrPref
(
false
);
pUsrPref
->
SetFieldUpdateFlags
(
eFieldFlags
);
m_
pUsrPref
->
SetFieldUpdateFlags
(
eFieldFlags
);
}
void
SwModule
::
ApplyLinkMode
(
sal_Int32
nNewLinkMode
)
{
if
(
!
pUsrPref
)
if
(
!
m_
pUsrPref
)
GetUsrPref
(
false
);
pUsrPref
->
SetUpdateLinkMode
(
nNewLinkMode
);
m_
pUsrPref
->
SetUpdateLinkMode
(
nNewLinkMode
);
}
void
SwModule
::
CheckSpellChanges
(
bool
bOnlineSpelling
,
...
...
@@ -630,29 +630,29 @@ void SwModule::CheckSpellChanges( bool bOnlineSpelling,
void
SwModule
::
ApplyDefaultPageMode
(
bool
bIsSquaredPageMode
)
{
if
(
!
pUsrPref
)
if
(
!
m_
pUsrPref
)
GetUsrPref
(
false
);
pUsrPref
->
SetDefaultPageMode
(
bIsSquaredPageMode
);
m_
pUsrPref
->
SetDefaultPageMode
(
bIsSquaredPageMode
);
}
SvxCompareMode
SwModule
::
GetCompareMode
()
const
{
return
pModuleConfig
->
GetCompareMode
();
return
m_
pModuleConfig
->
GetCompareMode
();
}
bool
SwModule
::
IsUseRsid
()
const
{
return
pModuleConfig
->
IsUseRsid
();
return
m_
pModuleConfig
->
IsUseRsid
();
}
bool
SwModule
::
IsIgnorePieces
()
const
{
return
pModuleConfig
->
IsIgnorePieces
();
return
m_
pModuleConfig
->
IsIgnorePieces
();
}
sal_uInt16
SwModule
::
GetPieceLen
()
const
{
return
pModuleConfig
->
GetPieceLen
();
return
m_
pModuleConfig
->
GetPieceLen
();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/uibase/app/swmodule.cxx
Dosyayı görüntüle @
d214f1cb
...
...
@@ -147,45 +147,45 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
SfxObjectFactory
*
pGlobalFact
)
:
SfxModule
(
ResMgr
::
CreateResMgr
(
"sw"
),
false
,
pWebFact
,
pFact
,
pGlobalFact
,
NULL
),
pModuleConfig
(
0
),
pUsrPref
(
0
),
pWebUsrPref
(
0
),
pPrtOpt
(
0
),
pWebPrtOpt
(
0
),
pChapterNumRules
(
0
),
pStdFontConfig
(
0
),
pNavigationConfig
(
0
),
pToolbarConfig
(
0
),
pWebToolbarConfig
(
0
),
pDBConfig
(
0
),
pColorConfig
(
0
),
pAccessibilityOptions
(
0
),
pCTLOptions
(
0
),
pUserOptions
(
0
),
pAttrPool
(
0
),
pView
(
0
),
bAuthorInitialised
(
false
),
bEmbeddedLoadSave
(
false
),
pDragDrop
(
0
),
pXSelection
(
0
)
m_
pModuleConfig
(
0
),
m_
pUsrPref
(
0
),
m_
pWebUsrPref
(
0
),
m_pPrintOptions
(
0
),
m_pWebPrintOptions
(
0
),
m_
pChapterNumRules
(
0
),
m_
pStdFontConfig
(
0
),
m_
pNavigationConfig
(
0
),
m_
pToolbarConfig
(
0
),
m_
pWebToolbarConfig
(
0
),
m_
pDBConfig
(
0
),
m_
pColorConfig
(
0
),
m_
pAccessibilityOptions
(
0
),
m_
pCTLOptions
(
0
),
m_
pUserOptions
(
0
),
m_
pAttrPool
(
0
),
m_
pView
(
0
),
m_
bAuthorInitialised
(
false
),
m_
bEmbeddedLoadSave
(
false
),
m_
pDragDrop
(
0
),
m_
pXSelection
(
0
)
{
SetName
(
OUString
(
"StarWriter"
)
);
pSwResMgr
=
GetResMgr
();
SvxErrorHandler
::
ensure
();
pErrorHdl
=
new
SfxErrorHandler
(
RID_SW_ERRHDL
,
m_pErrorHandler
=
new
SfxErrorHandler
(
RID_SW_ERRHDL
,
ERRCODE_AREA_SW
,
ERRCODE_AREA_SW_END
,
pSwResMgr
);
pModuleConfig
=
new
SwModuleOptions
;
m_
pModuleConfig
=
new
SwModuleOptions
;
// We need them anyways
pToolbarConfig
=
new
SwToolbarConfigItem
(
false
);
pWebToolbarConfig
=
new
SwToolbarConfigItem
(
true
);
m_
pToolbarConfig
=
new
SwToolbarConfigItem
(
false
);
m_
pWebToolbarConfig
=
new
SwToolbarConfigItem
(
true
);
pStdFontConfig
=
new
SwStdFontConfig
;
m_
pStdFontConfig
=
new
SwStdFontConfig
;
pAuthorNames
=
new
std
::
vector
<
OUString
>
;
// All Redlining-Authors
m_
pAuthorNames
=
new
std
::
vector
<
OUString
>
;
// All Redlining-Authors
StartListening
(
*
SfxGetpApp
()
);
...
...
@@ -218,14 +218,14 @@ uno::Reference< linguistic2::XLanguageGuessing > SwModule::GetLanguageGuesser()
SwModule
::~
SwModule
()
{
delete
pErrorHdl
;
delete
m_pErrorHandler
;
EndListening
(
*
SfxGetpApp
()
);
}
void
SwModule
::
CreateLngSvcEvtListener
()
{
if
(
!
xLngSvcEv
tListener
.
is
())
xLngSvcEv
tListener
=
new
SwLinguServiceEventListener
;
if
(
!
m_xLinguServiceEven
tListener
.
is
())
m_xLinguServiceEven
tListener
=
new
SwLinguServiceEventListener
;
}
void
SwDLL
::
RegisterFactories
()
...
...
@@ -387,15 +387,15 @@ void SwDLL::RegisterControls()
// Load Module (only dummy for linking of the DLL)
void
SwModule
::
InitAttrPool
()
{
OSL_ENSURE
(
!
pAttrPool
,
"Pool already exists!"
);
pAttrPool
=
new
SwAttrPool
(
0
);
SetPool
(
pAttrPool
);
OSL_ENSURE
(
!
m_
pAttrPool
,
"Pool already exists!"
);
m_
pAttrPool
=
new
SwAttrPool
(
0
);
SetPool
(
m_
pAttrPool
);
}
void
SwModule
::
RemoveAttrPool
()
{
SetPool
(
0
);
SfxItemPool
::
Free
(
pAttrPool
);
SfxItemPool
::
Free
(
m_
pAttrPool
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/uibase/dochdl/swdtflvr.cxx
Dosyayı görüntüle @
d214f1cb
...
...
@@ -264,10 +264,10 @@ SwTransferable::~SwTransferable()
SwModule
*
pMod
=
SW_MOD
();
if
(
pMod
)
{
if
(
pMod
->
pDragDrop
==
this
)
pMod
->
pDragDrop
=
0
;
else
if
(
pMod
->
pXSelection
==
this
)
pMod
->
pXSelection
=
0
;
if
(
pMod
->
m_
pDragDrop
==
this
)
pMod
->
m_
pDragDrop
=
0
;
else
if
(
pMod
->
m_
pXSelection
==
this
)
pMod
->
m_
pXSelection
=
0
;
}
delete
m_pClpGraphic
;
...
...
@@ -295,17 +295,17 @@ static SwDoc * lcl_GetDoc(SwDocFac & rDocFac)
void
SwTransferable
::
ObjectReleased
()
{
SwModule
*
pMod
=
SW_MOD
();
if
(
this
==
pMod
->
pDragDrop
)
pMod
->
pDragDrop
=
0
;
else
if
(
this
==
pMod
->
pXSelection
)
pMod
->
pXSelection
=
0
;
if
(
this
==
pMod
->
m_
pDragDrop
)
pMod
->
m_
pDragDrop
=
0
;
else
if
(
this
==
pMod
->
m_
pXSelection
)
pMod
->
m_
pXSelection
=
0
;
}
void
SwTransferable
::
AddSupportedFormats
()
{
// only need if we are the current XSelection Object
SwModule
*
pMod
=
SW_MOD
();
if
(
this
==
pMod
->
pXSelection
||
comphelper
::
LibreOfficeKit
::
isActive
())
if
(
this
==
pMod
->
m_
pXSelection
||
comphelper
::
LibreOfficeKit
::
isActive
())
{
SetDataForDragAndDrop
(
Point
(
0
,
0
)
);
}
...
...
@@ -1194,7 +1194,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
if
(
pPt
)
{
// external Drop
if
(
bPasteSelection
?
!
pMod
->
pXSelection
:
!
pMod
->
pDragDrop
)
if
(
bPasteSelection
?
!
pMod
->
m_pXSelection
:
!
pMod
->
m_
pDragDrop
)
{
switch
(
nDestination
)
{
...
...
@@ -1248,7 +1248,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
SwTransferable
*
pTrans
=
0
,
*
pTunneledTrans
=
GetSwTransferable
(
rData
);
// check for private drop
bool
bPrivateDrop
(
pPt
&&
(
bPasteSelection
?
0
!=
(
pTrans
=
pMod
->
pXSelection
)
:
0
!=
(
pTrans
=
pMod
->
pDragDrop
)));
bool
bPrivateDrop
(
pPt
&&
(
bPasteSelection
?
0
!=
(
pTrans
=
pMod
->
m_pXSelection
)
:
0
!=
(
pTrans
=
pMod
->
m_
pDragDrop
)));
bool
bNeedToSelectBeforePaste
(
false
);
if
(
bPrivateDrop
&&
DND_ACTION_LINK
==
nDropAction
)
...
...
@@ -3168,7 +3168,7 @@ void SwTransferable::StartDrag( vcl::Window* pWin, const Point& rPos )
if
(
m_pWrtShell
->
IsSelFrmMode
()
)
m_pWrtShell
->
ShowCrsr
();
SW_MOD
()
->
pDragDrop
=
this
;
SW_MOD
()
->
m_
pDragDrop
=
this
;
SetDataForDragAndDrop
(
rPos
);
...
...
@@ -3564,7 +3564,7 @@ void SwTransferable::CreateSelection( SwWrtShell& rSh,
pNew
->
m_pCreatorView
=
_pCreatorView
;
uno
::
Reference
<
XTransferable
>
xRef
(
pNew
);
pMod
->
pXSelection
=
pNew
;
pMod
->
m_
pXSelection
=
pNew
;
pNew
->
CopyToSelection
(
rSh
.
GetWin
()
);
}
...
...
@@ -3572,9 +3572,9 @@ void SwTransferable::ClearSelection( SwWrtShell& rSh,
const
SwFrameShell
*
_pCreatorView
)
{
SwModule
*
pMod
=
SW_MOD
();
if
(
pMod
->
pXSelection
&&
((
!
pMod
->
pXSelection
->
m_pWrtShell
)
||
(
pMod
->
pXSelection
->
m_pWrtShell
==
&
rSh
))
&&
(
!
_pCreatorView
||
(
pMod
->
pXSelection
->
m_pCreatorView
==
_pCreatorView
))
)
if
(
pMod
->
m_
pXSelection
&&
((
!
pMod
->
m_pXSelection
->
m_pWrtShell
)
||
(
pMod
->
m_
pXSelection
->
m_pWrtShell
==
&
rSh
))
&&
(
!
_pCreatorView
||
(
pMod
->
m_
pXSelection
->
m_pCreatorView
==
_pCreatorView
))
)
{
TransferableHelper
::
ClearSelection
(
rSh
.
GetWin
()
);
}
...
...
sw/source/uibase/docvw/edtdd.cxx
Dosyayı görüntüle @
d214f1cb
...
...
@@ -235,9 +235,9 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt )
if
(
!
SwTransferable
::
PasteData
(
aData
,
rSh
,
m_nDropAction
,
m_nDropFormat
,
m_nDropDestination
,
false
,
rEvt
.
mbDefault
,
&
aDocPt
,
nRet
))
nRet
=
DND_ACTION_NONE
;
else
if
(
SW_MOD
()
->
pDragDrop
)
else
if
(
SW_MOD
()
->
m_
pDragDrop
)
//Don't clean up anymore at internal D&D!
SW_MOD
()
->
pDragDrop
->
SetCleanUp
(
false
);
SW_MOD
()
->
m_
pDragDrop
->
SetCleanUp
(
false
);
return
nRet
;
}
...
...
@@ -390,12 +390,12 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
//With the default action we still want to have a say.
SwModule
*
pMod
=
SW_MOD
();
if
(
pMod
->
pDragDrop
)
if
(
pMod
->
m_
pDragDrop
)
{
bool
bCleanup
=
false
;
//Drawing objects in Headers/Footers are not allowed
SwWrtShell
*
pSrcSh
=
pMod
->
pDragDrop
->
GetShell
();
SwWrtShell
*
pSrcSh
=
pMod
->
m_
pDragDrop
->
GetShell
();
if
(
(
pSrcSh
->
GetSelFrmType
()
==
FrmTypeFlags
::
DRAWOBJ
)
&&
pSrcSh
->
IsSelContainsControl
()
&&
(
rSh
.
GetFrmType
(
&
aDocPt
,
false
)
&
(
FrmTypeFlags
::
HEADER
|
FrmTypeFlags
::
FOOTER
))
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment