summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/StylePreviewRenderer.hxx2
-rw-r--r--include/sfx2/asyncfunc.hxx2
-rw-r--r--include/sfx2/childwin.hxx12
-rw-r--r--include/sfx2/controlwrapper.hxx4
-rw-r--r--include/sfx2/dinfdlg.hxx10
-rw-r--r--include/sfx2/docfac.hxx2
-rw-r--r--include/sfx2/docfilt.hxx2
-rw-r--r--include/sfx2/docinsert.hxx4
-rw-r--r--include/sfx2/emojiview.hxx2
-rw-r--r--include/sfx2/event.hxx10
-rw-r--r--include/sfx2/evntconf.hxx6
-rw-r--r--include/sfx2/fcontnr.hxx2
-rw-r--r--include/sfx2/infobar.hxx4
-rw-r--r--include/sfx2/linksrc.hxx2
-rw-r--r--include/sfx2/lokcharthelper.hxx2
-rw-r--r--include/sfx2/mgetempl.hxx2
-rw-r--r--include/sfx2/minfitem.hxx2
-rw-r--r--include/sfx2/msg.hxx16
-rw-r--r--include/sfx2/new.hxx2
-rw-r--r--include/sfx2/objface.hxx4
-rw-r--r--include/sfx2/objitem.hxx2
-rw-r--r--include/sfx2/passwd.hxx6
-rw-r--r--include/sfx2/recentdocsview.hxx8
-rw-r--r--include/sfx2/recentdocsviewitem.hxx6
-rw-r--r--include/sfx2/sfxhtml.hxx2
-rw-r--r--include/sfx2/sfxstatuslistener.hxx2
-rw-r--r--include/sfx2/sidebar/AsynchronousCall.hxx2
-rw-r--r--include/sfx2/sidebar/ResourceManager.hxx2
-rw-r--r--include/sfx2/sidebar/TabBar.hxx2
-rw-r--r--include/sfx2/stbitem.hxx8
-rw-r--r--include/sfx2/styfitem.hxx8
-rw-r--r--include/sfx2/tabdlg.hxx2
-rw-r--r--include/sfx2/tbxctrl.hxx8
-rw-r--r--include/sfx2/templatecontaineritem.hxx2
-rw-r--r--include/sfx2/templatedefaultview.hxx1
-rw-r--r--include/sfx2/templatelocalview.hxx2
-rw-r--r--include/sfx2/templateviewitem.hxx2
-rw-r--r--include/sfx2/thumbnailviewitem.hxx2
-rw-r--r--include/sfx2/viewfac.hxx4
-rw-r--r--include/sfx2/viewfrm.hxx2
-rw-r--r--sfx2/inc/srchdlg.hxx2
-rw-r--r--sfx2/qa/cppunit/test_metadatable.cxx2
-rw-r--r--sfx2/source/appl/appcfg.cxx2
-rw-r--r--sfx2/source/appl/helpinterceptor.hxx2
-rw-r--r--sfx2/source/appl/linksrc.cxx6
-rw-r--r--sfx2/source/appl/newhelp.cxx8
-rw-r--r--sfx2/source/appl/newhelp.hxx14
-rw-r--r--sfx2/source/appl/workwin.cxx45
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx4
-rw-r--r--sfx2/source/control/bindings.cxx6
-rw-r--r--sfx2/source/control/objface.cxx10
-rw-r--r--sfx2/source/control/recentdocsview.cxx9
-rw-r--r--sfx2/source/control/templatedefaultview.cxx8
-rw-r--r--sfx2/source/control/thumbnailviewacc.hxx4
-rw-r--r--sfx2/source/dialog/backingwindow.cxx4
-rw-r--r--sfx2/source/dialog/backingwindow.hxx2
-rw-r--r--sfx2/source/dialog/dockwin.cxx290
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx8
-rw-r--r--sfx2/source/dialog/securitypage.cxx2
-rw-r--r--sfx2/source/dialog/tabdlg.cxx4
-rw-r--r--sfx2/source/dialog/templdlg.cxx6
-rw-r--r--sfx2/source/doc/doctempl.cxx2
-rw-r--r--sfx2/source/doc/guisaveas.cxx2
-rw-r--r--sfx2/source/doc/iframe.cxx2
-rw-r--r--sfx2/source/doc/oleprops.cxx4
-rw-r--r--sfx2/source/doc/oleprops.hxx4
-rw-r--r--sfx2/source/doc/printhelper.cxx2
-rw-r--r--sfx2/source/doc/templatedlg.cxx4
-rw-r--r--sfx2/source/inc/objshimp.hxx2
-rw-r--r--sfx2/source/inc/openurlhint.hxx2
-rw-r--r--sfx2/source/inc/statcach.hxx4
-rw-r--r--sfx2/source/inc/workwin.hxx9
-rw-r--r--sfx2/source/view/classificationhelper.cxx2
-rw-r--r--sfx2/source/view/ipclient.cxx6
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx6
-rw-r--r--sfx2/source/view/viewimp.hxx4
-rw-r--r--sfx2/source/view/viewprn.cxx10
-rw-r--r--sfx2/source/view/viewsh.cxx2
78 files changed, 237 insertions, 433 deletions
diff --git a/include/sfx2/StylePreviewRenderer.hxx b/include/sfx2/StylePreviewRenderer.hxx
index 94ec091b2928..9843cf00e529 100644
--- a/include/sfx2/StylePreviewRenderer.hxx
+++ b/include/sfx2/StylePreviewRenderer.hxx
@@ -24,7 +24,7 @@ protected:
const SfxObjectShell& mrShell;
OutputDevice& mrOutputDev;
SfxStyleSheetBase* mpStyle;
- long mnMaxHeight;
+ long const mnMaxHeight;
public:
enum class RenderAlign
diff --git a/include/sfx2/asyncfunc.hxx b/include/sfx2/asyncfunc.hxx
index 16e01969baba..6fd68899fb99 100644
--- a/include/sfx2/asyncfunc.hxx
+++ b/include/sfx2/asyncfunc.hxx
@@ -18,7 +18,7 @@
class AsyncFunc : public cppu::WeakImplHelper<css::lang::XUnoTunnel>
{
private:
- std::function<void()> m_pAsyncFunc;
+ std::function<void()> const m_pAsyncFunc;
public:
AsyncFunc(const std::function<void()>&);
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 3059d38a5cbb..8c46889e533f 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -92,8 +92,8 @@ typedef SfxChildWindowContext* (*SfxChildWinContextCtor)( vcl::Window *pParentWi
SfxChildWinInfo *pInfo);
struct SfxChildWinContextFactory
{
- SfxChildWinContextCtor pCtor; // Factory method
- sal_uInt16 nContextId; // Identifier for SfxInterface
+ SfxChildWinContextCtor const pCtor; // Factory method
+ sal_uInt16 const nContextId; // Identifier for SfxInterface
SfxChildWinContextFactory( SfxChildWinContextCtor pTheCtor, sal_uInt16 nID )
: pCtor(pTheCtor)
@@ -105,10 +105,10 @@ class SfxChildWinContextArr_Impl;
struct SFX2_DLLPUBLIC SfxChildWinFactory
{
- SfxChildWinCtor pCtor; // Factory method
- sal_uInt16 nId; // ChildWindow-Id ( SlotId )
+ SfxChildWinCtor const pCtor; // Factory method
+ sal_uInt16 const nId; // ChildWindow-Id ( SlotId )
SfxChildWinInfo aInfo; // Configuration
- sal_uInt16 nPos; // Position in UI
+ sal_uInt16 const nPos; // Position in UI
std::unique_ptr<SfxChildWinContextArr_Impl> pArr; // Array for Contexts
SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID, sal_uInt16 n );
@@ -144,7 +144,7 @@ public:
class SFX2_DLLPUBLIC SfxChildWindow
{
VclPtr<vcl::Window> pParent; // parent window ( Topwindow )
- sal_uInt16 nType; // ChildWindow-Id
+ sal_uInt16 const nType; // ChildWindow-Id
VclPtr<vcl::Window> pWindow; // actual contents
SfxChildAlignment eChildAlignment; // Current css::drawing::Alignment
std::unique_ptr< SfxChildWindow_Impl> pImpl; // Implementation data
diff --git a/include/sfx2/controlwrapper.hxx b/include/sfx2/controlwrapper.hxx
index b81ad28d5951..6a85f0c42958 100644
--- a/include/sfx2/controlwrapper.hxx
+++ b/include/sfx2/controlwrapper.hxx
@@ -68,8 +68,8 @@ public:
/** A helper struct that contains a list position - value pair. */
struct MapEntryType
{
- PosT mnPos; /// Position in the list.
- ValueT mnValue; /// Corresponding value.
+ PosT const mnPos; /// Position in the list.
+ ValueT const mnValue; /// Corresponding value.
};
/** Constructs the map helper with the passed map.
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index a4b7e680c6e3..4b3e576df7cd 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -65,7 +65,7 @@ private:
OUString m_AutoloadURL;
bool m_isAutoloadEnabled;
OUString m_DefaultTarget;
- OUString m_TemplateName;
+ OUString const m_TemplateName;
OUString m_Author;
css::util::DateTime m_CreationDate;
OUString m_ModifiedBy;
@@ -262,7 +262,7 @@ struct CustomPropertyLine;
class CustomPropertiesEdit : public Edit
{
private:
- CustomPropertyLine* m_pLine;
+ CustomPropertyLine* const m_pLine;
public:
CustomPropertiesEdit(vcl::Window* pParent, WinBits nStyle, CustomPropertyLine* pLine)
@@ -277,7 +277,7 @@ public:
class CustomPropertiesTypeBox : public ListBox
{
private:
- CustomPropertyLine* m_pLine;
+ CustomPropertyLine* const m_pLine;
public:
CustomPropertiesTypeBox(vcl::Window* pParent, CustomPropertyLine* pLine);
@@ -309,7 +309,7 @@ public:
class CustomPropertiesDurationField : public Edit
{
- CustomPropertyLine* m_pLine;
+ CustomPropertyLine* const m_pLine;
css::util::Duration m_aDuration;
protected:
virtual void RequestHelp(const HelpEvent& rEvt) override;
@@ -333,7 +333,7 @@ public:
class CustomPropertiesRemoveButton : public ImageButton
{
private:
- CustomPropertyLine* m_pLine;
+ CustomPropertyLine* const m_pLine;
public:
CustomPropertiesRemoveButton(vcl::Window* pParent, WinBits nStyle, CustomPropertyLine* pLine)
diff --git a/include/sfx2/docfac.hxx b/include/sfx2/docfac.hxx
index c9fc6c880805..cdde177c02c8 100644
--- a/include/sfx2/docfac.hxx
+++ b/include/sfx2/docfac.hxx
@@ -45,7 +45,7 @@ class SFX2_DLLPUBLIC SfxObjectFactory
private:
const OUString m_sFactoryName;
std::unique_ptr<SfxObjectFactory_Impl> pImpl; // Additional Data
- SfxObjectShellFlags nFlags;
+ SfxObjectShellFlags const nFlags;
public:
SfxObjectFactory( const SvGlobalName &rName, SfxObjectShellFlags nFlags, const OUString& sFactoryName );
diff --git a/include/sfx2/docfilt.hxx b/include/sfx2/docfilt.hxx
index ceeae3cf980f..54d4a26922c4 100644
--- a/include/sfx2/docfilt.hxx
+++ b/include/sfx2/docfilt.hxx
@@ -55,7 +55,7 @@ class SFX2_DLLPUBLIC SfxFilter
* Custom provider name in case the filter is provided via external
* libraries. Empty for conventional filter types.
*/
- OUString maProvider;
+ OUString const maProvider;
SfxFilterFlags nFormatType;
sal_Int32 nVersion;
diff --git a/include/sfx2/docinsert.hxx b/include/sfx2/docinsert.hxx
index 6befefcb31a3..21fb1a2a9c37 100644
--- a/include/sfx2/docinsert.hxx
+++ b/include/sfx2/docinsert.hxx
@@ -40,8 +40,8 @@ namespace sfx2 {
class SFX2_DLLPUBLIC DocumentInserter
{
private:
- weld::Window* m_pParent;
- OUString m_sDocFactory;
+ weld::Window* const m_pParent;
+ OUString const m_sDocFactory;
OUString m_sFilter;
Link<sfx2::FileDialogHelper*,void> m_aDialogClosedLink;
diff --git a/include/sfx2/emojiview.hxx b/include/sfx2/emojiview.hxx
index 8830a6d83344..6c311d740e0a 100644
--- a/include/sfx2/emojiview.hxx
+++ b/include/sfx2/emojiview.hxx
@@ -48,7 +48,7 @@ public:
private:
- FILTER_CATEGORY mCategory;
+ FILTER_CATEGORY const mCategory;
};
diff --git a/include/sfx2/event.hxx b/include/sfx2/event.hxx
index 78d8736bc522..8a797d3379e1 100644
--- a/include/sfx2/event.hxx
+++ b/include/sfx2/event.hxx
@@ -189,9 +189,9 @@ inline std::basic_ostream<charT, traits> & operator <<(
class SFX2_DLLPUBLIC SfxEventHint : public SfxHint
{
- SfxObjectShell* pObjShell;
- OUString aEventName;
- SfxEventHintId nEventId;
+ SfxObjectShell* const pObjShell;
+ OUString const aEventName;
+ SfxEventHintId const nEventId;
public:
SfxEventHint( SfxEventHintId nId, const OUString& aName, SfxObjectShell *pObj )
@@ -234,8 +234,8 @@ class Printer;
class SfxPrintingHint : public SfxViewEventHint
{
- css::view::PrintableState mnPrintableState;
- css::uno::Sequence < css::beans::PropertyValue > aOpts;
+ css::view::PrintableState const mnPrintableState;
+ css::uno::Sequence < css::beans::PropertyValue > const aOpts;
public:
SfxPrintingHint(
css::view::PrintableState nState,
diff --git a/include/sfx2/evntconf.hxx b/include/sfx2/evntconf.hxx
index 670b3ec6b558..2c863eb05222 100644
--- a/include/sfx2/evntconf.hxx
+++ b/include/sfx2/evntconf.hxx
@@ -35,9 +35,9 @@ class SvxMacroTableDtor;
struct SFX2_DLLPUBLIC SfxEventName
{
- SvMacroItemId mnId;
- OUString maEventName;
- OUString maUIName;
+ SvMacroItemId const mnId;
+ OUString const maEventName;
+ OUString const maUIName;
SfxEventName( SvMacroItemId nId,
const OUString& rEventName,
diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx
index 17aff3c148b5..091599e82b9f 100644
--- a/include/sfx2/fcontnr.hxx
+++ b/include/sfx2/fcontnr.hxx
@@ -102,7 +102,7 @@ class SFX2_DLLPUBLIC SfxFilterMatcherIter
{
SfxFilterFlags nOrMask;
- SfxFilterFlags nAndMask;
+ SfxFilterFlags const nAndMask;
sal_uInt16 nCurrent;
const SfxFilterMatcher_Impl &m_rMatch;
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx
index 4a9c39578b82..caf8b5b82518 100644
--- a/include/sfx2/infobar.hxx
+++ b/include/sfx2/infobar.hxx
@@ -30,7 +30,7 @@ enum class InfoBarType {
class SFX2_DLLPUBLIC SfxInfoBarContainerChild : public SfxChildWindow
{
private:
- SfxBindings* m_pBindings;
+ SfxBindings* const m_pBindings;
public:
SfxInfoBarContainerChild( vcl::Window* pParent,
@@ -49,7 +49,7 @@ class SFX2_DLLPUBLIC SfxInfoBarContainerChild : public SfxChildWindow
class SFX2_DLLPUBLIC SfxInfoBarWindow : public vcl::Window
{
private:
- OUString m_sId;
+ OUString const m_sId;
InfoBarType m_eType;
VclPtr<FixedImage> m_pImage;
VclPtr<FixedText> m_pMessage;
diff --git a/include/sfx2/linksrc.hxx b/include/sfx2/linksrc.hxx
index 3471dde4d10a..7d592f1fe03f 100644
--- a/include/sfx2/linksrc.hxx
+++ b/include/sfx2/linksrc.hxx
@@ -103,7 +103,7 @@ public:
css::uno::Reference<css::io::XInputStream>
m_xInputStreamToLoadFrom;
- bool m_bIsReadOnly;
+ bool const m_bIsReadOnly;
};
StreamToLoadFrom getStreamToLoadFrom();
diff --git a/include/sfx2/lokcharthelper.hxx b/include/sfx2/lokcharthelper.hxx
index deb2c43f0556..92c57217f621 100644
--- a/include/sfx2/lokcharthelper.hxx
+++ b/include/sfx2/lokcharthelper.hxx
@@ -23,7 +23,7 @@ class VirtualDevice;
class SFX2_DLLPUBLIC LokChartHelper
{
private:
- SfxViewShell* mpViewShell;
+ SfxViewShell* const mpViewShell;
css::uno::Reference<css::frame::XController> mxController;
css::uno::Reference<css::frame::XDispatch> mxDispatcher;
VclPtr<vcl::Window> mpWindow;
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index b0ea05e2ee87..bce77d1d5965 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -47,7 +47,7 @@ class SfxManageStyleSheetPage final : public SfxTabPage
OUString aName;
OUString aFollow;
OUString aParent;
- SfxStyleSearchBits nFlags;
+ SfxStyleSearchBits const nFlags;
std::unique_ptr<weld::Entry> m_xName;
std::unique_ptr<weld::CheckButton> m_xAutoCB;
diff --git a/include/sfx2/minfitem.hxx b/include/sfx2/minfitem.hxx
index 4ee078822e2d..0a92857c261a 100644
--- a/include/sfx2/minfitem.hxx
+++ b/include/sfx2/minfitem.hxx
@@ -32,7 +32,7 @@ class SFX2_DLLPUBLIC SfxMacroInfoItem: public SfxPoolItem
OUString aLibName;
OUString aModuleName;
OUString aMethodName;
- OUString aCommentText;
+ OUString const aCommentText;
public:
static SfxPoolItem* CreateDefault();
diff --git a/include/sfx2/msg.hxx b/include/sfx2/msg.hxx
index a9000398103b..25b5121d3dcd 100644
--- a/include/sfx2/msg.hxx
+++ b/include/sfx2/msg.hxx
@@ -102,9 +102,9 @@ template<class T> SfxPoolItem* createSfxPoolItem()
}
struct SfxType
{
- std::function<SfxPoolItem* ()> createSfxPoolItemFunc;
+ std::function<SfxPoolItem* ()> const createSfxPoolItemFunc;
const std::type_info* pType;
- sal_uInt16 nAttribs;
+ sal_uInt16 const nAttribs;
SfxTypeAttrib aAttrib[1]; // variable length
const std::type_info* Type() const{return pType;}
@@ -114,9 +114,9 @@ struct SfxType
struct SfxType0
{
- std::function<SfxPoolItem* ()> createSfxPoolItemFunc;
- const std::type_info* pType;
- sal_uInt16 nAttribs;
+ std::function<SfxPoolItem* ()> const createSfxPoolItemFunc;
+ const std::type_info* pType;
+ sal_uInt16 const nAttribs;
const std::type_info* Type() const { return pType;}
};
#define SFX_DECL_TYPE(n) struct SfxType##n \
@@ -171,9 +171,9 @@ SFX_DECL_TYPE(23); // for SvxSearchItem
struct SfxFormalArgument
{
- const SfxType* pType; // Type of the parameter (SfxPoolItem subclass)
- const char* pName; // Name of the sParameters
- sal_uInt16 nSlotId; // Slot-Id for identification of the Parameters
+ const SfxType* pType; // Type of the parameter (SfxPoolItem subclass)
+ const char* pName; // Name of the sParameters
+ sal_uInt16 const nSlotId; // Slot-Id for identification of the Parameters
std::unique_ptr<SfxPoolItem> CreateItem() const
{ return pType->CreateItem(); }
diff --git a/include/sfx2/new.hxx b/include/sfx2/new.hxx
index 0697414fa4ca..bdc0a9b8de99 100644
--- a/include/sfx2/new.hxx
+++ b/include/sfx2/new.hxx
@@ -60,7 +60,7 @@ class SFX2_DLLPUBLIC SfxNewFileDialog : public SfxDialogController
{
private:
Idle m_aPrevIdle;
- SfxNewFileDialogMode m_nFlags;
+ SfxNewFileDialogMode const m_nFlags;
SfxDocumentTemplates m_aTemplates;
SfxObjectShellLock m_xDocShell;
diff --git a/include/sfx2/objface.hxx b/include/sfx2/objface.hxx
index cb0797b5ce6b..bfda103a48ff 100644
--- a/include/sfx2/objface.hxx
+++ b/include/sfx2/objface.hxx
@@ -62,8 +62,8 @@ friend class SfxSlotPool;
const SfxInterface* pGenoType; // base interface
SfxSlot* pSlots; // SlotMap
sal_uInt16 nCount; // number of slots in SlotMap
- SfxInterfaceId nClassId; // Id of interface
- bool bSuperClass; // Whether children inherit its toolbars etc
+ SfxInterfaceId const nClassId; // Id of interface
+ bool const bSuperClass; // Whether children inherit its toolbars etc
std::unique_ptr<SfxInterface_Impl> pImplData;
public:
diff --git a/include/sfx2/objitem.hxx b/include/sfx2/objitem.hxx
index b07478c318ef..b8d4f72ea844 100644
--- a/include/sfx2/objitem.hxx
+++ b/include/sfx2/objitem.hxx
@@ -28,7 +28,7 @@
class SFX2_DLLPUBLIC SfxObjectItem: public SfxPoolItem
{
- SfxShell* _pSh;
+ SfxShell* const _pSh;
public:
static SfxPoolItem* CreateDefault();
diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx
index a09364cf6918..414185b39113 100644
--- a/include/sfx2/passwd.hxx
+++ b/include/sfx2/passwd.hxx
@@ -64,9 +64,9 @@ private:
std::unique_ptr<weld::Button> m_xOKBtn;
- OUString maMinLenPwdStr;
- OUString maMinLenPwdStr1;
- OUString maEmptyPwdStr;
+ OUString const maMinLenPwdStr;
+ OUString const maMinLenPwdStr1;
+ OUString const maEmptyPwdStr;
OUString maMainPwdStr;
sal_uInt16 mnMinLen;
SfxShowExtras mnExtras;
diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index a22dae2d6e87..3210d47c651f 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -85,14 +85,12 @@ private:
bool isAcceptedFile(const OUString &rURL) const;
long mnItemMaxSize;
- long mnTextHeight;
- long mnItemPadding;
size_t mnLastMouseDownItem;
/// Image that appears when there is no recent document.
- Image maWelcomeImage;
- OUString maWelcomeLine1;
- OUString maWelcomeLine2;
+ Image const maWelcomeImage;
+ OUString const maWelcomeLine1;
+ OUString const maWelcomeLine2;
};
} // namespace sfx2
diff --git a/include/sfx2/recentdocsviewitem.hxx b/include/sfx2/recentdocsviewitem.hxx
index 57c11ccabb1f..8320d4710d81 100644
--- a/include/sfx2/recentdocsviewitem.hxx
+++ b/include/sfx2/recentdocsviewitem.hxx
@@ -41,16 +41,16 @@ private:
/// Return area where is the icon to remove document from the recent documents.
tools::Rectangle getRemoveIconArea() const;
- OUString maURL;
+ OUString const maURL;
OUString m_sHelpText;
/// Is the icon that the user can click to remove the document from the recent documents highlighted?
bool m_bRemoveIconHighlighted;
- BitmapEx m_aRemoveRecentBitmap;
+ BitmapEx const m_aRemoveRecentBitmap;
- BitmapEx m_aRemoveRecentBitmapHighlighted;
+ BitmapEx const m_aRemoveRecentBitmapHighlighted;
};
#endif // INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX
diff --git a/include/sfx2/sfxhtml.hxx b/include/sfx2/sfxhtml.hxx
index 19ee5cfb3864..318d70af1209 100644
--- a/include/sfx2/sfxhtml.hxx
+++ b/include/sfx2/sfxhtml.hxx
@@ -37,7 +37,7 @@ class SFX2_DLLPUBLIC SfxHTMLParser : public HTMLParser
{
OUString aScriptType;
- SfxMedium* pMedium;
+ SfxMedium* const pMedium;
std::unique_ptr<SfxMedium> pDLMedium; // Medium for Download Files
ScriptType eScriptType;
diff --git a/include/sfx2/sfxstatuslistener.hxx b/include/sfx2/sfxstatuslistener.hxx
index 0f261803bb68..f612da5f4755 100644
--- a/include/sfx2/sfxstatuslistener.hxx
+++ b/include/sfx2/sfxstatuslistener.hxx
@@ -63,7 +63,7 @@ class SFX2_DLLPUBLIC SfxStatusListener : public cppu::WeakImplHelper<
SfxStatusListener( const SfxStatusListener& ) = delete;
SfxStatusListener& operator=( const SfxStatusListener& ) = delete;
- sal_uInt16 m_nSlotID;
+ sal_uInt16 const m_nSlotID;
css::util::URL m_aCommand;
css::uno::Reference< css::frame::XDispatchProvider > m_xDispatchProvider;
css::uno::Reference< css::frame::XDispatch > m_xDispatch;
diff --git a/include/sfx2/sidebar/AsynchronousCall.hxx b/include/sfx2/sidebar/AsynchronousCall.hxx
index 5e7d06b0a344..b42caf50ed19 100644
--- a/include/sfx2/sidebar/AsynchronousCall.hxx
+++ b/include/sfx2/sidebar/AsynchronousCall.hxx
@@ -43,7 +43,7 @@ public:
void CancelRequest();
private:
- Action maAction;
+ Action const maAction;
ImplSVEvent * mnCallId;
DECL_LINK(HandleUserCall, void*, void);
diff --git a/include/sfx2/sidebar/ResourceManager.hxx b/include/sfx2/sidebar/ResourceManager.hxx
index 0e86c1f96c70..c0d9ed9ba2d9 100644
--- a/include/sfx2/sidebar/ResourceManager.hxx
+++ b/include/sfx2/sidebar/ResourceManager.hxx
@@ -105,7 +105,7 @@ private:
mutable std::set<rtl::OUString> maProcessedApplications;
std::map<OUString, OUString> maLastActiveDecks;
- SvtMiscOptions maMiscOptions;
+ SvtMiscOptions const maMiscOptions;
void ReadDeckList();
void ReadPanelList();
diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx
index e0f12a5f15ee..c672bcbf71d0 100644
--- a/include/sfx2/sidebar/TabBar.hxx
+++ b/include/sfx2/sidebar/TabBar.hxx
@@ -109,7 +109,7 @@ private:
ItemContainer maItems;
const ::std::function<void (const OUString& rsDeckId)> maDeckActivationFunctor;
sal_Int32 mnMenuSeparatorY;
- PopupMenuProvider maPopupMenuProvider;
+ PopupMenuProvider const maPopupMenuProvider;
VclPtr<RadioButton> CreateTabItem (const DeckDescriptor& rDeckDescriptor);
Image GetItemImage (const DeckDescriptor& rDeskDescriptor) const;
diff --git a/include/sfx2/stbitem.hxx b/include/sfx2/stbitem.hxx
index b72688486e94..5abab5b9f6b3 100644
--- a/include/sfx2/stbitem.hxx
+++ b/include/sfx2/stbitem.hxx
@@ -39,9 +39,9 @@ typedef SfxStatusBarControl* (*SfxStatusBarControlCtor)( sal_uInt16 nSlotId, sal
struct SfxStbCtrlFactory
{
- SfxStatusBarControlCtor pCtor;
+ SfxStatusBarControlCtor const pCtor;
const std::type_info& nTypeId;
- sal_uInt16 nSlotId;
+ sal_uInt16 const nSlotId;
SfxStbCtrlFactory( SfxStatusBarControlCtor pTheCtor,
const std::type_info& nTheTypeId, sal_uInt16 nTheSlotId ):
@@ -58,8 +58,8 @@ class UserDrawEvent;
class SFX2_DLLPUBLIC SfxStatusBarControl: public svt::StatusbarController
{
- sal_uInt16 nSlotId;
- sal_uInt16 nId;
+ sal_uInt16 const nSlotId;
+ sal_uInt16 const nId;
VclPtr<StatusBar> pBar;
protected:
diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx
index d8f6057e7513..88a69fe40c72 100644
--- a/include/sfx2/styfitem.hxx
+++ b/include/sfx2/styfitem.hxx
@@ -29,7 +29,7 @@
struct SFX2_DLLPUBLIC SfxFilterTuple
{
- OUString aName;
+ OUString const aName;
SfxStyleSearchBits nFlags;
SfxFilterTuple(const OUString& rName, SfxStyleSearchBits nArg)
: aName(rName)
@@ -42,9 +42,9 @@ typedef std::vector<SfxFilterTuple> SfxStyleFilter;
class SFX2_DLLPUBLIC SfxStyleFamilyItem
{
- SfxStyleFamily nFamily;
- OUString aText;
- Image aImage;
+ SfxStyleFamily const nFamily;
+ OUString const aText;
+ Image const aImage;
SfxStyleFilter aFilterList;
public:
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 802ef9bdb33b..4f18f9b91497 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -62,7 +62,7 @@ struct TabPageParent
return pParent->GetFrameWeld();
}
VclPtr<vcl::Window> pParent;
- weld::Container* pPage;
+ weld::Container* const pPage;
weld::DialogController* pController;
};
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index c46c8b42fa6f..d524ba892400 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -46,9 +46,9 @@ typedef SfxToolBoxControl* (*SfxToolBoxControlCtor)( sal_uInt16 nSlotId, sal_uIn
struct SfxTbxCtrlFactory
{
- SfxToolBoxControlCtor pCtor;
- const std::type_info& nTypeId;
- sal_uInt16 nSlotId;
+ SfxToolBoxControlCtor const pCtor;
+ const std::type_info& nTypeId;
+ sal_uInt16 const nSlotId;
SfxTbxCtrlFactory( SfxToolBoxControlCtor pTheCtor,
const std::type_info& nTheTypeId, sal_uInt16 nTheSlotId ):
@@ -70,7 +70,7 @@ friend class SfxFrameStatusListener;
bool m_bFloating;
bool m_bCascading;
Link<SfxPopupWindow*,void> m_aDeleteLink;
- sal_uInt16 m_nId;
+ sal_uInt16 const m_nId;
css::uno::Reference< css::frame::XFrame > const m_xFrame;
rtl::Reference<SfxFrameStatusListener> m_xStatusListener;
diff --git a/include/sfx2/templatecontaineritem.hxx b/include/sfx2/templatecontaineritem.hxx
index e2f86a4aa4c4..f7a19f64164f 100644
--- a/include/sfx2/templatecontaineritem.hxx
+++ b/include/sfx2/templatecontaineritem.hxx
@@ -15,7 +15,7 @@
class TemplateContainerItem final
{
public:
- sal_uInt16 mnId;
+ sal_uInt16 const mnId;
sal_uInt16 mnRegionId;
OUString maTitle;
std::vector<TemplateItemProperties> maTemplates;
diff --git a/include/sfx2/templatedefaultview.hxx b/include/sfx2/templatedefaultview.hxx
index 15bec26fa38a..35c437e7d95c 100644
--- a/include/sfx2/templatedefaultview.hxx
+++ b/include/sfx2/templatedefaultview.hxx
@@ -31,7 +31,6 @@ public:
private:
long mnItemMaxSize;
- long mnTextHeight;
};
#endif // INCLUDED_SFX2_TEMPLATEDEFAULTVIEW_HXX
diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index a5881e4d7820..ce2e64b828b7 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -67,7 +67,7 @@ public:
private:
- FILTER_APPLICATION mApp;
+ FILTER_APPLICATION const mApp;
};
diff --git a/include/sfx2/templateviewitem.hxx b/include/sfx2/templateviewitem.hxx
index f16d8393fbf6..e64b82ec23a2 100644
--- a/include/sfx2/templateviewitem.hxx
+++ b/include/sfx2/templateviewitem.hxx
@@ -39,7 +39,7 @@ public:
private:
OUString maPath;
- BitmapEx maDefaultBitmap;
+ BitmapEx const maDefaultBitmap;
bool mbIsDefaultTemplate;
};
diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx
index dc7f7c84cb68..3568da70d31b 100644
--- a/include/sfx2/thumbnailviewitem.hxx
+++ b/include/sfx2/thumbnailviewitem.hxx
@@ -68,7 +68,7 @@ class SFX2_DLLPUBLIC ThumbnailViewItem
public:
ThumbnailView &mrParent;
- sal_uInt16 mnId;
+ sal_uInt16 const mnId;
bool mbVisible;
bool mbSelected;
bool mbHover;
diff --git a/include/sfx2/viewfac.hxx b/include/sfx2/viewfac.hxx
index e9bef0f6cc76..a24f436d7437 100644
--- a/include/sfx2/viewfac.hxx
+++ b/include/sfx2/viewfac.hxx
@@ -51,8 +51,8 @@ public:
OUString GetAPIViewName() const;
private:
- SfxViewCtor fnCreate;
- SfxInterfaceId nOrd;
+ SfxViewCtor const fnCreate;
+ SfxInterfaceId const nOrd;
const OUString m_sViewName;
};
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index e8deab4891a6..053ff2513d8e 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -264,7 +264,7 @@ private:
class SFX2_DLLPUBLIC SfxViewFrameItem: public SfxPoolItem
{
- SfxViewFrame* pFrame;
+ SfxViewFrame* const pFrame;
public:
SfxViewFrameItem( SfxViewFrame *pViewFrame ):
diff --git a/sfx2/inc/srchdlg.hxx b/sfx2/inc/srchdlg.hxx
index 42941356012b..99903a6f9207 100644
--- a/sfx2/inc/srchdlg.hxx
+++ b/sfx2/inc/srchdlg.hxx
@@ -38,7 +38,7 @@ private:
Link<SearchDialog&,void> m_aFindHdl;
Link<LinkParamNone*,void> m_aCloseHdl;
- OUString m_sConfigName;
+ OUString const m_sConfigName;
std::unique_ptr<weld::ComboBox> m_xSearchEdit;
std::unique_ptr<weld::CheckButton> m_xWholeWordsBox;
diff --git a/sfx2/qa/cppunit/test_metadatable.cxx b/sfx2/qa/cppunit/test_metadatable.cxx
index d469859c4cf0..5073f87202b7 100644
--- a/sfx2/qa/cppunit/test_metadatable.cxx
+++ b/sfx2/qa/cppunit/test_metadatable.cxx
@@ -64,7 +64,7 @@ public:
bool const i_isInClip = false)
: m_rRegistry(i_rReg)
, m_bInClipboard(i_isInClip), m_bInUndo(false), m_bInContent(true) {}
- bool m_bInClipboard;
+ bool const m_bInClipboard;
bool m_bInUndo;
bool m_bInContent;
virtual bool IsInClipboard() const override { return m_bInClipboard; }
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 05d3224c921c..789852b40e4e 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -77,7 +77,7 @@ using namespace ::com::sun::star::beans;
class SfxEventAsyncer_Impl : public SfxListener
{
- SfxEventHint aHint;
+ SfxEventHint const aHint;
std::unique_ptr<Idle> pIdle;
public:
diff --git a/sfx2/source/appl/helpinterceptor.hxx b/sfx2/source/appl/helpinterceptor.hxx
index 92897d892343..1c7b29803472 100644
--- a/sfx2/source/appl/helpinterceptor.hxx
+++ b/sfx2/source/appl/helpinterceptor.hxx
@@ -33,7 +33,7 @@
struct HelpHistoryEntry_Impl
{
- OUString aURL;
+ OUString const aURL;
css::uno::Any aViewData;
HelpHistoryEntry_Impl( const OUString& rURL, const css::uno::Any& rViewData ) :
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index 27a2915b0429..16a94bad6abd 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -69,9 +69,9 @@ static void StartTimer( std::unique_ptr<SvLinkSourceTimer>& pTimer, SvLinkSource
struct SvLinkSource_Entry_Impl
{
tools::SvRef<SvBaseLink> xSink;
- OUString aDataMimeType;
- sal_uInt16 nAdviseModes;
- bool bIsDataSink;
+ OUString const aDataMimeType;
+ sal_uInt16 const nAdviseModes;
+ bool const bIsDataSink;
SvLinkSource_Entry_Impl( SvBaseLink* pLink, const OUString& rMimeType,
sal_uInt16 nAdvMode )
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index a7c7404cab32..7f52b252ea8a 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -243,8 +243,8 @@ namespace sfx2
struct IndexEntry_Impl
{
- bool m_bSubEntry;
- OUString m_aURL;
+ bool const m_bSubEntry;
+ OUString const m_aURL;
IndexEntry_Impl( const OUString& rURL, bool bSubEntry ) :
m_bSubEntry( bSubEntry ), m_aURL( rURL ) {}
@@ -254,8 +254,8 @@ struct IndexEntry_Impl
struct ContentEntry_Impl
{
- OUString aURL;
- bool bIsFolder;
+ OUString const aURL;
+ bool const bIsFolder;
ContentEntry_Impl( const OUString& rURL, bool bFolder ) :
aURL( rURL ), bIsFolder( bFolder ) {}
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index a887f5d00127..f32be168ec5c 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -53,9 +53,9 @@ namespace com { namespace sun { namespace star { namespace text { class XTextRan
class ContentListBox_Impl : public SvTreeListBox
{
private:
- Image aOpenBookImage;
- Image aClosedBookImage;
- Image aDocumentImage;
+ Image const aOpenBookImage;
+ Image const aClosedBookImage;
+ Image const aDocumentImage;
void InitRoot();
void ClearChildren( SvTreeListEntry* pParent );
@@ -293,7 +293,7 @@ private:
Link<SfxHelpIndexWindow_Impl*,void> aSelectFactoryLink;
Link<Control*,bool> aPageDoubleClickLink;
- Link<IndexTabPage_Impl&,void> aIndexKeywordLink;
+ Link<IndexTabPage_Impl&,void> const aIndexKeywordLink;
OUString sKeyword;
VclPtr<SfxHelpWindow_Impl> pParentWin;
@@ -424,10 +424,10 @@ private:
Idle aSelectIdle;
Image aIndexOnImage;
Image aIndexOffImage;
- OUString aIndexOnText;
- OUString aIndexOffText;
+ OUString const aIndexOnText;
+ OUString const aIndexOffText;
OUString aSearchText;
- OUString aOnStartupText;
+ OUString const aOnStartupText;
OUString sCurrentFactory;
VclPtr<SfxHelpWindow_Impl> pHelpWin;
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index cbf98e721a26..7128131c141b 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -62,7 +62,7 @@ using namespace ::com::sun::star::uno;
struct ResIdToResName
{
- ToolbarId eId;
+ ToolbarId const eId;
const char* pName;
};
@@ -127,12 +127,13 @@ static const ResIdToResName pToolBarResToName[] =
// Sort the Children according their alignment
// The order corresponds to the enum SfxChildAlignment (->CHILDWIN.HXX).
+static constexpr OUStringLiteral g_aLayoutManagerPropName = "LayoutManager";
+
// Help to make changes to the alignment compatible!
LayoutManagerListener::LayoutManagerListener(
SfxWorkWindow* pWrkWin ) :
m_bHasFrame( false ),
- m_pWrkWin( pWrkWin ),
- m_aLayoutManagerPropName( "LayoutManager" )
+ m_pWrkWin( pWrkWin )
{
}
@@ -156,7 +157,7 @@ void LayoutManagerListener::setFrame( const css::uno::Reference< css::frame::XFr
{
try
{
- Any aValue = xPropSet->getPropertyValue( m_aLayoutManagerPropName );
+ Any aValue = xPropSet->getPropertyValue( g_aLayoutManagerPropName );
aValue >>= xLayoutManager;
if ( xLayoutManager.is() )
@@ -220,7 +221,7 @@ void SAL_CALL LayoutManagerListener::dispose()
{
try
{
- css::uno::Any aValue = xPropSet->getPropertyValue( m_aLayoutManagerPropName );
+ css::uno::Any aValue = xPropSet->getPropertyValue( g_aLayoutManagerPropName );
aValue >>= xLayoutManager;
// remove as listener from layout manager
@@ -455,6 +456,9 @@ void SfxWorkWindow::Sort_Impl()
bSorted = true;
}
+static constexpr OUStringLiteral g_aStatusBarResName( "private:resource/statusbar/statusbar" );
+static constexpr OUStringLiteral g_aTbxTypeName( "private:resource/toolbar/" );
+static constexpr OUStringLiteral g_aProgressBarResName( "private:resource/progressbar/progressbar" );
// constructor for workwin of a Frame
@@ -478,10 +482,6 @@ SfxWorkWindow::SfxWorkWindow( vcl::Window *pWin, SfxFrame *pFrm, SfxFrame* pMast
bShowStatusBar( sal_False ),
#endif
m_nLock( 0 ),
- m_aStatusBarResName( "private:resource/statusbar/statusbar" ),
- m_aLayoutManagerPropName( "LayoutManager" ),
- m_aTbxTypeName( "private:resource/toolbar/" ),
- m_aProgressBarResName( "private:resource/progressbar/progressbar" ),
pMasterFrame( pMaster ),
pFrame( pFrm )
{
@@ -617,7 +617,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
{
try
{
- Any aValue = xPropSet->getPropertyValue( m_aLayoutManagerPropName );
+ Any aValue = xPropSet->getPropertyValue( g_aLayoutManagerPropName );
aValue >>= xLayoutManager;
}
catch ( Exception& )
@@ -1096,15 +1096,15 @@ Reference< css::task::XStatusIndicator > SfxWorkWindow::GetStatusIndicator()
if ( xPropSet.is() )
{
- Any aValue = xPropSet->getPropertyValue( m_aLayoutManagerPropName );
+ Any aValue = xPropSet->getPropertyValue( g_aLayoutManagerPropName );
aValue >>= xLayoutManager;
if ( xLayoutManager.is() )
{
- xLayoutManager->createElement( m_aProgressBarResName );
- xLayoutManager->showElement( m_aProgressBarResName );
+ xLayoutManager->createElement( g_aProgressBarResName );
+ xLayoutManager->showElement( g_aProgressBarResName );
Reference< css::ui::XUIElement > xProgressBar =
- xLayoutManager->getElement( m_aProgressBarResName );
+ xLayoutManager->getElement( g_aProgressBarResName );
if ( xProgressBar.is() )
{
xStatusIndicator.set( xProgressBar->getRealInterface(), UNO_QUERY );
@@ -1161,7 +1161,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl2()
if ( xPropSet.is() )
{
- Any aValue = xPropSet->getPropertyValue( m_aLayoutManagerPropName );
+ Any aValue = xPropSet->getPropertyValue( g_aLayoutManagerPropName );
aValue >>= xLayoutManager;
}
@@ -1195,15 +1195,13 @@ void SfxWorkWindow::UpdateObjectBars_Impl2()
bool bModesMatching = (nUpdateMode != SfxVisibilityFlags::Invisible) && ((nTbxMode & nUpdateMode) == nUpdateMode);
if ( bDestroy || sfx2::SfxNotebookBar::IsActive())
{
- OUString aTbxId( m_aTbxTypeName );
- aTbxId += GetResourceURLFromToolbarId(eId);
+ OUString aTbxId = g_aTbxTypeName + GetResourceURLFromToolbarId(eId);
xLayoutManager->destroyElement( aTbxId );
}
else if ( eId != ToolbarId::None && ( ( bModesMatching && !bIsFullScreen ) ||
( bIsFullScreen && bFullScreenTbx ) ) )
{
- OUString aTbxId( m_aTbxTypeName );
- aTbxId += GetResourceURLFromToolbarId(eId);
+ OUString aTbxId = g_aTbxTypeName + GetResourceURLFromToolbarId(eId);
if ( !IsDockingAllowed() && !xLayoutManager->isElementFloating( aTbxId ))
xLayoutManager->destroyElement( aTbxId );
else
@@ -1216,8 +1214,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl2()
else if ( eId != ToolbarId::None )
{
// Delete the Toolbox at this Position if possible
- OUString aTbxId( m_aTbxTypeName );
- aTbxId += GetResourceURLFromToolbarId(eId);
+ OUString aTbxId = g_aTbxTypeName + GetResourceURLFromToolbarId(eId);
xLayoutManager->destroyElement( aTbxId );
}
}
@@ -1439,7 +1436,7 @@ void SfxWorkWindow::UpdateStatusBar_Impl()
Reference< css::beans::XPropertySet > xPropSet( GetFrameInterface(), UNO_QUERY );
Reference< css::frame::XLayoutManager > xLayoutManager;
- Any aValue = xPropSet->getPropertyValue( m_aLayoutManagerPropName );
+ Any aValue = xPropSet->getPropertyValue( g_aLayoutManagerPropName );
aValue >>= xLayoutManager;
// No status bar, if no ID is required or when in FullScreenView or
@@ -1450,14 +1447,14 @@ void SfxWorkWindow::UpdateStatusBar_Impl()
// Id has changed, thus create a suitable Statusbarmanager, this takes
// over the current status bar;
if ( xLayoutManager.is() )
- xLayoutManager->requestElement( m_aStatusBarResName );
+ xLayoutManager->requestElement( g_aStatusBarResName );
}
else
{
// Destroy the current StatusBar
// The Manager only creates the Status bar, does not destroy it.
if ( xLayoutManager.is() )
- xLayoutManager->destroyElement( m_aStatusBarResName );
+ xLayoutManager->destroyElement( g_aStatusBarResName );
}
}
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 5a67eb969795..563d07cd65d5 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -127,7 +127,7 @@ static inline OUString ToUpper_Impl( const OUString &rStr )
class SfxFilterContainer_Impl
{
public:
- OUString aName;
+ OUString const aName;
explicit SfxFilterContainer_Impl( const OUString& rName )
: aName( rName )
@@ -233,7 +233,7 @@ std::shared_ptr<const SfxFilter> SfxFilterContainer::GetDefaultFilter_Impl( cons
class SfxFilterMatcher_Impl
{
public:
- OUString aName;
+ OUString const aName;
mutable SfxFilterList_Impl* pList; // is created on demand
void InitForIterating() const;
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 031a52694dc0..d583ab7123de 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -71,9 +71,9 @@ typedef std::unordered_map< sal_uInt16, bool > InvalidateSlotMap;
struct SfxFoundCache_Impl
{
- sal_uInt16 nWhichId; // If available: Which-Id, else: nSlotId
- const SfxSlot* pSlot; // Pointer to <Master-Slot>
- SfxStateCache& rCache; // Pointer to StatusCache
+ sal_uInt16 const nWhichId; // If available: Which-Id, else: nSlotId
+ const SfxSlot* pSlot; // Pointer to <Master-Slot>
+ SfxStateCache& rCache; // Pointer to StatusCache
SfxFoundCache_Impl(sal_uInt16 nW, const SfxSlot *pS, SfxStateCache& rC)
: nWhichId(nW)
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index a827d1bd6547..385d36058a82 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -52,11 +52,11 @@ SfxCompareSlots_bsearch( const void* pSmaller, const void* pBigger )
struct SfxObjectUI_Impl
{
- sal_uInt16 nPos;
- SfxVisibilityFlags nFlags;
- sal_uInt32 nObjId;
- bool bContext;
- SfxShellFeature nFeature;
+ sal_uInt16 const nPos;
+ SfxVisibilityFlags const nFlags;
+ sal_uInt32 const nObjId;
+ bool bContext;
+ SfxShellFeature const nFeature;
SfxObjectUI_Impl(sal_uInt16 n, SfxVisibilityFlags f, sal_uInt32 nId, SfxShellFeature nFeat) :
nPos(n),
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 2c4ad0bc4ebc..b35397cf9296 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -116,11 +116,12 @@ static std::map<ApplicationType,OUString> EncryptedBitmapForExtension =
{ ApplicationType::TYPE_MATH, BMP_128X128_MATH_DOC }
};
+static constexpr long gnTextHeight = 30;
+static constexpr long gnItemPadding = 5;
+
RecentDocsView::RecentDocsView( vcl::Window* pParent )
: ThumbnailView(pParent)
, mnFileTypes(ApplicationType::TYPE_NONE)
- , mnTextHeight(30)
- , mnItemPadding(5)
, mnLastMouseDownItem(THUMBNAILVIEW_ITEM_NOTFOUND)
, maWelcomeImage(BitmapEx(BMP_WELCOME))
, maWelcomeLine1(SfxResId(STR_WELCOME_LINE1))
@@ -131,7 +132,7 @@ RecentDocsView::RecentDocsView( vcl::Window* pParent )
SetStyle(GetStyle() | WB_VSCROLL);
setItemMaxTextLength( 30 );
- setItemDimensions( mnItemMaxSize, mnItemMaxSize, mnTextHeight, mnItemPadding );
+ setItemDimensions( mnItemMaxSize, mnItemMaxSize, gnTextHeight, gnItemPadding );
maFillColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsBackgroundColor::get());
maTextColor = Color(officecfg::Office::Common::Help::StartCenter::StartCenterThumbnailsTextColor::get());
@@ -333,7 +334,7 @@ void RecentDocsView::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
}
else
{
- set_width_request(mnTextHeight + mnItemMaxSize + 2 * mnItemPadding);
+ set_width_request(gnTextHeight + mnItemMaxSize + 2 * gnItemPadding);
}
if (mItemList.empty())
diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx
index 52c2017af491..f40791e23359 100644
--- a/sfx2/source/control/templatedefaultview.cxx
+++ b/sfx2/source/control/templatedefaultview.cxx
@@ -23,15 +23,15 @@
VCL_BUILDER_FACTORY(TemplateDefaultView)
-static const int gnItemPadding(5); //TODO:: Change padding to 10. It looks really crowded and occupied.
+static constexpr int gnItemPadding(5); //TODO:: Change padding to 10. It looks really crowded and occupied.
+static constexpr long gnTextHeight = 30;
TemplateDefaultView::TemplateDefaultView( Window* pParent)
: TemplateLocalView(pParent, WB_TABSTOP)
- , mnTextHeight(30)
{
tools::Rectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
mnItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 256 : 192;
- ThumbnailView::setItemDimensions( mnItemMaxSize, mnItemMaxSize, mnTextHeight, gnItemPadding );
+ ThumbnailView::setItemDimensions( mnItemMaxSize, mnItemMaxSize, gnTextHeight, gnItemPadding );
updateThumbnailDimensions(mnItemMaxSize);
// startcenter specific settings
@@ -46,7 +46,7 @@ void TemplateDefaultView::reload()
{
TemplateLocalView::reload();
// Set preferred width
- set_width_request(mnTextHeight + mnItemMaxSize + 2*gnItemPadding);
+ set_width_request(gnTextHeight + mnItemMaxSize + 2*gnItemPadding);
}
void TemplateDefaultView::showAllTemplates()
diff --git a/sfx2/source/control/thumbnailviewacc.hxx b/sfx2/source/control/thumbnailviewacc.hxx
index fb2cdc591be3..938fb9026096 100644
--- a/sfx2/source/control/thumbnailviewacc.hxx
+++ b/sfx2/source/control/thumbnailviewacc.hxx
@@ -123,7 +123,7 @@ private:
::std::vector< css::uno::Reference<
css::accessibility::XAccessibleEventListener > > mxEventListeners;
VclPtr<ThumbnailView> mpParent;
- bool mbIsTransientChildrenDisabled;
+ bool const mbIsTransientChildrenDisabled;
/// The current FOCUSED state.
bool mbIsFocused;
@@ -171,7 +171,7 @@ private:
mxEventListeners;
::osl::Mutex maMutex;
ThumbnailViewItem* mpParent;
- bool mbIsTransientChildrenDisabled;
+ bool const mbIsTransientChildrenDisabled;
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 3c911017306e..14b4e6673ca3 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -713,8 +713,8 @@ IMPL_LINK(BackingWindow, EditTemplateHdl, ThumbnailViewItem*, pItem, void)
struct ImplDelayedDispatch
{
Reference< XDispatch > xDispatch;
- css::util::URL aDispatchURL;
- Sequence< PropertyValue > aArgs;
+ css::util::URL const aDispatchURL;
+ Sequence< PropertyValue > const aArgs;
ImplDelayedDispatch( const Reference< XDispatch >& i_xDispatch,
const css::util::URL& i_rURL,
diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx
index d96734b34cfe..0b6c5b85eece 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -83,7 +83,7 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer
std::vector< VclPtr<vcl::Window> > maDndWindows;
- Color maButtonsTextColor;
+ Color const maButtonsTextColor;
tools::Rectangle maStartCentButtons;
bool mbInitControls;
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 991d2f01ccdd..8b0a5eb839c8 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -381,7 +381,6 @@ friend class SfxDockingWindow;
bool bConstructed;
Size aMinSize;
VclPtr<SfxSplitWindow> pSplitWin;
- bool bSplitable;
Idle aMoveIdle;
// The following members are only valid in the time from startDocking to
@@ -413,7 +412,6 @@ SfxDockingWindow_Impl::SfxDockingWindow_Impl(SfxDockingWindow* pBase)
,eDockAlignment(SfxChildAlignment::NOALIGNMENT)
,bConstructed(false)
,pSplitWin(nullptr)
- ,bSplitable(true)
,nHorizontalSize(0)
,nVerticalSize(0)
,nLine(0)
@@ -544,9 +542,6 @@ void SfxDockingWindow::ToggleFloatingMode()
SfxChildAlignment eLastAlign = GetAlignment();
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
- if ( pImpl->bSplitable )
- eIdent = SfxChildIdentifier::SPLITWINDOW;
if (IsFloatingMode())
{
@@ -564,8 +559,6 @@ void SfxDockingWindow::ToggleFloatingMode()
// is unchanged, then this means that it must have been a toggling
// through DClick, so use last alignment
SetAlignment (pImpl->GetLastAlignment());
- if ( !pImpl->bSplitable )
- SetSizePixel( CalcDockingSize(GetAlignment()) );
}
else
{
@@ -576,24 +569,21 @@ void SfxDockingWindow::ToggleFloatingMode()
SetAlignment (pImpl->GetDockAlignment());
}
- if ( pImpl->bSplitable )
- {
- // The DockingWindow is now in a SplitWindow
- pImpl->pSplitWin = pWorkWin->GetSplitWindow_Impl(GetAlignment());
+ // The DockingWindow is now in a SplitWindow
+ pImpl->pSplitWin = pWorkWin->GetSplitWindow_Impl(GetAlignment());
- // The LastAlignment is still the last docked
- SfxSplitWindow *pSplit = pWorkWin->GetSplitWindow_Impl(pImpl->GetLastAlignment());
+ // The LastAlignment is still the last docked
+ SfxSplitWindow *pSplit = pWorkWin->GetSplitWindow_Impl(pImpl->GetLastAlignment());
- DBG_ASSERT( pSplit, "LastAlignment is not correct!" );
- if ( pSplit && pSplit != pImpl->pSplitWin )
- pSplit->ReleaseWindow_Impl(this);
- if ( pImpl->GetDockAlignment() == eLastAlign )
- pImpl->pSplitWin->InsertWindow( this, pImpl->aSplitSize );
- else
- pImpl->pSplitWin->InsertWindow( this, pImpl->aSplitSize, pImpl->nLine, pImpl->nPos, pImpl->bNewLine );
- if ( !pImpl->pSplitWin->IsFadeIn() )
- pImpl->pSplitWin->FadeIn();
- }
+ DBG_ASSERT( pSplit, "LastAlignment is not correct!" );
+ if ( pSplit && pSplit != pImpl->pSplitWin )
+ pSplit->ReleaseWindow_Impl(this);
+ if ( pImpl->GetDockAlignment() == eLastAlign )
+ pImpl->pSplitWin->InsertWindow( this, pImpl->aSplitSize );
+ else
+ pImpl->pSplitWin->InsertWindow( this, pImpl->aSplitSize, pImpl->nLine, pImpl->nPos, pImpl->bNewLine );
+ if ( !pImpl->pSplitWin->IsFadeIn() )
+ pImpl->pSplitWin->FadeIn();
}
// Keep the old alignment for the next toggle; set it only now due to the
@@ -604,7 +594,7 @@ void SfxDockingWindow::ToggleFloatingMode()
pImpl->SetDockAlignment(GetAlignment());
// Dock or undock SfxChildWindow correctly.
- pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::TOGGLEFLOATMODE, pMgr->GetType() );
+ pWorkWin->ConfigChild_Impl( SfxChildIdentifier::SPLITWINDOW, SfxDockingConfig::TOGGLEFLOATMODE, pMgr->GetType() );
}
/* [Description]
@@ -618,11 +608,8 @@ void SfxDockingWindow::StartDocking()
{
if ( !pImpl || !pImpl->bConstructed || !pMgr )
return;
- SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
- if ( pImpl->bSplitable )
- eIdent = SfxChildIdentifier::SPLITWINDOW;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::SETDOCKINGRECTS, pMgr->GetType() );
+ pWorkWin->ConfigChild_Impl( SfxChildIdentifier::SPLITWINDOW, SfxDockingConfig::SETDOCKINGRECTS, pMgr->GetType() );
pImpl->SetDockAlignment(GetAlignment());
if ( pImpl->pSplitWin )
@@ -683,55 +670,6 @@ bool SfxDockingWindow::Docking( const Point& rPos, tools::Rectangle& rRect )
}
}
- if ( !pImpl->bSplitable )
- {
- // For individually docked window the position is set through the
- // alignment and the docking rectangle.
- Size aSize = rRect.GetSize();
- Point aPos;
-
- switch ( pImpl->GetDockAlignment() )
- {
- case SfxChildAlignment::LEFT:
- case SfxChildAlignment::FIRSTLEFT:
- case SfxChildAlignment::LASTLEFT:
- aPos = aInnerRect.TopLeft();
- if ( pImpl->GetDockAlignment() == GetAlignment() )
- aPos.AdjustX( -(aSize.Width()) );
- break;
-
- case SfxChildAlignment::TOP:
- case SfxChildAlignment::LOWESTTOP:
- case SfxChildAlignment::HIGHESTTOP:
- aPos = Point(aOuterRect.Left(), aInnerRect.Top());
- if ( pImpl->GetDockAlignment() == GetAlignment() )
- aPos.AdjustY( -(aSize.Height()) );
- break;
-
- case SfxChildAlignment::RIGHT:
- case SfxChildAlignment::FIRSTRIGHT:
- case SfxChildAlignment::LASTRIGHT:
- aPos = Point(aInnerRect.Right() - rRect.GetSize().Width(),
- aInnerRect.Top());
- if ( pImpl->GetDockAlignment() == GetAlignment() )
- aPos.AdjustX(aSize.Width() );
- break;
-
- case SfxChildAlignment::BOTTOM:
- case SfxChildAlignment::HIGHESTBOTTOM:
- case SfxChildAlignment::LOWESTBOTTOM:
- aPos = Point(aOuterRect.Left(),
- aInnerRect.Bottom() - rRect.GetSize().Height());
- if ( pImpl->GetDockAlignment() == GetAlignment() )
- aPos.AdjustY(aSize.Height() );
- break;
- default:
- break;
- }
-
- rRect.SetPos(aPos);
- }
-
return bFloatMode;
}
@@ -745,16 +683,12 @@ void SfxDockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMod
return;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- bool bReArrange = false;
- if ( pImpl->bSplitable )
- {
- // If the alignment changes and the window is in a docked state in a
- // SplitWindow, then it must be re-registered. If it is docked again,
- // PrepareToggleFloatingMode() and ToggleFloatingMode() perform the
- // re-registered
- if ( !bFloatMode )
- bReArrange = true;
- }
+
+ // If the alignment changes and the window is in a docked state in a
+ // SplitWindow, then it must be re-registered. If it is docked again,
+ // PrepareToggleFloatingMode() and ToggleFloatingMode() perform the
+ // re-registered
+ bool bReArrange = !bFloatMode;
if ( bReArrange )
{
@@ -762,7 +696,7 @@ void SfxDockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMod
{
// before Show() is called must the reassignment have been made,
// therefore the base class can not be called
- if ( IsFloatingMode() || !pImpl->bSplitable )
+ if ( IsFloatingMode() )
Show( false, ShowFlags::NoFocusChange );
// Set the size for toggling.
@@ -770,7 +704,7 @@ void SfxDockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMod
if ( IsFloatingMode() )
{
SetFloatingMode( bFloatMode );
- if ( IsFloatingMode() || !pImpl->bSplitable )
+ if ( IsFloatingMode() )
Show( true, ShowFlags::NoFocusChange );
}
else
@@ -997,20 +931,8 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
// docked window must have NOALIGNMENT as last alignment
pImpl->SetLastAlignment(SfxChildAlignment::NOALIGNMENT);
- if ( pImpl->bSplitable )
- {
- pImpl->pSplitWin = pWorkWin->GetSplitWindow_Impl(GetAlignment());
- pImpl->pSplitWin->InsertWindow(this, pImpl->aSplitSize);
- }
- else
- {
- //?????? Currently not supported
- // Window is docked individually; size is calculated.
- // It must therefore be initialized with the FloatingSize if
- // someone relies on it that a reasonable size is set
- SetSizePixel(GetFloatingSize());
- SetSizePixel(CalcDockingSize(GetAlignment()));
- }
+ pImpl->pSplitWin = pWorkWin->GetSplitWindow_Impl(GetAlignment());
+ pImpl->pSplitWin->InsertWindow(this, pImpl->aSplitSize);
}
// save alignment
@@ -1086,22 +1008,20 @@ void SfxDockingWindow::FillInfo(SfxChildWinInfo& rInfo) const
rInfo.aExtraString += OUString::number(static_cast<sal_uInt16>(GetAlignment()));
rInfo.aExtraString += ",";
rInfo.aExtraString += OUString::number (static_cast<sal_uInt16>(pImpl->GetLastAlignment()));
- if ( pImpl->bSplitable )
- {
- Point aPos(pImpl->nLine, pImpl->nPos);
- rInfo.aExtraString += ",";
- rInfo.aExtraString += OUString::number( aPos.X() );
- rInfo.aExtraString += "/";
- rInfo.aExtraString += OUString::number( aPos.Y() );
- rInfo.aExtraString += "/";
- rInfo.aExtraString += OUString::number( pImpl->nHorizontalSize );
- rInfo.aExtraString += "/";
- rInfo.aExtraString += OUString::number( pImpl->nVerticalSize );
- rInfo.aExtraString += ",";
- rInfo.aExtraString += OUString::number( pImpl->aSplitSize.Width() );
- rInfo.aExtraString += ";";
- rInfo.aExtraString += OUString::number( pImpl->aSplitSize.Height() );
- }
+
+ Point aPos(pImpl->nLine, pImpl->nPos);
+ rInfo.aExtraString += ",";
+ rInfo.aExtraString += OUString::number( aPos.X() );
+ rInfo.aExtraString += "/";
+ rInfo.aExtraString += OUString::number( aPos.Y() );
+ rInfo.aExtraString += "/";
+ rInfo.aExtraString += OUString::number( pImpl->nHorizontalSize );
+ rInfo.aExtraString += "/";
+ rInfo.aExtraString += OUString::number( pImpl->nVerticalSize );
+ rInfo.aExtraString += ",";
+ rInfo.aExtraString += OUString::number( pImpl->aSplitSize.Width() );
+ rInfo.aExtraString += ";";
+ rInfo.aExtraString += OUString::number( pImpl->aSplitSize.Height() );
rInfo.aExtraString += ")";
}
@@ -1144,8 +1064,6 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, tools::Rect
{
// calculate hypothetical sizes for different modes
Size aFloatingSize(CalcDockingSize(SfxChildAlignment::NOALIGNMENT));
- Size aVerticalSize(CalcDockingSize(SfxChildAlignment::LEFT));
- Size aHorizontalSize(CalcDockingSize(SfxChildAlignment::TOP));
// check if docking is permitted
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
@@ -1157,23 +1075,16 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, tools::Rect
// calculate borders to shrink inner area before checking for intersection with tracking rectangle
long nLRBorder, nTBBorder;
- if ( pImpl->bSplitable )
- {
- // take the smaller size of docked and floating mode
- Size aSize = pImpl->aSplitSize;
- if ( GetFloatingSize().Height() < aSize.Height() )
- aSize.setHeight( GetFloatingSize().Height() );
- if ( GetFloatingSize().Width() < aSize.Width() )
- aSize.setWidth( GetFloatingSize().Width() );
-
- nLRBorder = aSize.Width();
- nTBBorder = aSize.Height();
- }
- else
- {
- nLRBorder = aVerticalSize.Width();
- nTBBorder = aHorizontalSize.Height();
- }
+
+ // take the smaller size of docked and floating mode
+ Size aBorderTmp = pImpl->aSplitSize;
+ if ( GetFloatingSize().Height() < aBorderTmp.Height() )
+ aBorderTmp.setHeight( GetFloatingSize().Height() );
+ if ( GetFloatingSize().Width() < aBorderTmp.Width() )
+ aBorderTmp.setWidth( GetFloatingSize().Width() );
+
+ nLRBorder = aBorderTmp.Width();
+ nTBBorder = aBorderTmp.Height();
// limit border to predefined constant values
if ( nLRBorder > MAX_TOGGLEAREA_WIDTH )
@@ -1334,7 +1245,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, tools::Rect
if ( eDockAlign != pImpl->GetDockAlignment() )
aDockingRect.SetSize( aFloatingSize );
}
- else if ( pImpl->bSplitable )
+ else
{
sal_uInt16 nLine, nPos;
SfxSplitWindow *pSplitWin = pWorkWin->GetSplitWindow_Impl(eDockAlign);
@@ -1431,52 +1342,6 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, tools::Rect
aDockingRect.SetSize( aSize );
aDockingRect.SetPos( aPoint );
}
- else
- {
- // window can be docked, but outside our splitwindows
- // tracking rectangle only needs to be modified if alignment was changed
- if ( eDockAlign != pImpl->GetDockAlignment() )
- {
- switch ( eDockAlign )
- {
- case SfxChildAlignment::LEFT:
- case SfxChildAlignment::RIGHT:
- case SfxChildAlignment::FIRSTLEFT:
- aDockingRect.SetPos( aInnerRect.TopLeft() );
- aDockingRect.SetSize( aVerticalSize );
- break;
- case SfxChildAlignment::LASTLEFT:
- case SfxChildAlignment::FIRSTRIGHT:
- case SfxChildAlignment::LASTRIGHT:
- {
- Point aPt( aInnerRect.TopRight() );
- aPt.AdjustX( -(aDockingRect.GetWidth()) );
- aDockingRect.SetPos( aPt );
- aDockingRect.SetSize( aVerticalSize );
- break;
- }
-
- case SfxChildAlignment::TOP:
- case SfxChildAlignment::BOTTOM:
- case SfxChildAlignment::LOWESTTOP:
- aDockingRect.SetPos( aInnerRect.TopLeft() );
- aDockingRect.SetSize( aHorizontalSize );
- break;
- case SfxChildAlignment::HIGHESTTOP:
- case SfxChildAlignment::LOWESTBOTTOM:
- case SfxChildAlignment::HIGHESTBOTTOM:
- {
- Point aPt( aInnerRect.BottomLeft() );
- aPt.AdjustY( -(aDockingRect.GetHeight()) );
- aDockingRect.SetPos( aPt );
- aDockingRect.SetSize( aHorizontalSize );
- break;
- }
- default:
- break;
- }
- }
- }
rRect = aDockingRect;
return eDockAlign;
@@ -1553,51 +1418,8 @@ bool SfxDockingWindow::Close()
return true;
}
-/** Returns a boundary line to the docked edge and a frame when the Window is in
- a docked state. In this way SVLOOK is considered.
-*/
-void SfxDockingWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/)
+void SfxDockingWindow::Paint(vcl::RenderContext&, const tools::Rectangle& /*rRect*/)
{
- if (pImpl->bSplitable || IsFloatingMode())
- return;
-
- tools::Rectangle aRect(Point(0, 0), GetOutputSizePixel());
- switch (GetAlignment())
- {
- case SfxChildAlignment::TOP:
- {
- rRenderContext.DrawLine(aRect.BottomLeft(), aRect.BottomRight());
- aRect.AdjustBottom( -1 );
- break;
- }
-
- case SfxChildAlignment::BOTTOM:
- {
- rRenderContext.DrawLine(aRect.TopLeft(), aRect.TopRight());
- aRect.AdjustTop( 1 );
- break;
- }
-
- case SfxChildAlignment::LEFT:
- {
- rRenderContext.DrawLine(aRect.TopRight(), aRect.BottomRight());
- aRect.AdjustRight( -1 );
- break;
- }
-
- case SfxChildAlignment::RIGHT:
- {
- rRenderContext.DrawLine(aRect.TopLeft(), aRect.BottomLeft());
- aRect.AdjustLeft( 1 );
- break;
- }
-
- default:
- break;
- }
-
- DecorationView aView(&rRenderContext);
- aView.DrawFrame(aRect);
}
/** With this method, a minimal OutputSize be can set, that is queried in
@@ -1660,10 +1482,7 @@ void SfxDockingWindow::SetItemSize_Impl( const Size& rSize )
pImpl->aSplitSize = rSize;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
- if ( pImpl->bSplitable )
- eIdent = SfxChildIdentifier::SPLITWINDOW;
- pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::ALIGNDOCKINGWINDOW, pMgr->GetType() );
+ pWorkWin->ConfigChild_Impl( SfxChildIdentifier::SPLITWINDOW, SfxDockingConfig::ALIGNDOCKINGWINDOW, pMgr->GetType() );
}
void SfxDockingWindow::Disappear_Impl()
@@ -1718,11 +1537,8 @@ IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl, Timer *, void)
if( !GetFloatingWindow()->IsRollUp() )
SetFloatingSize( GetOutputSizePixel() );
pImpl->aWinState = GetFloatingWindow()->GetWindowState();
- SfxChildIdentifier eIdent = SfxChildIdentifier::DOCKINGWINDOW;
- if ( pImpl->bSplitable )
- eIdent = SfxChildIdentifier::SPLITWINDOW;
SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
- pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::ALIGNDOCKINGWINDOW, pMgr->GetType() );
+ pWorkWin->ConfigChild_Impl( SfxChildIdentifier::SPLITWINDOW, SfxDockingConfig::ALIGNDOCKINGWINDOW, pMgr->GetType() );
}
}
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index f5fbc9ec4658..c92d197f2f6e 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -188,7 +188,7 @@ namespace sfx2
struct ReadGlobalFilter
{
protected:
- OConfigurationNode m_aClassesNode;
+ OConfigurationNode const m_aClassesNode;
FilterClassReferrer& m_aClassReferrer;
public:
@@ -265,7 +265,7 @@ namespace sfx2
struct ReadLocalFilter
{
protected:
- OConfigurationNode m_aClassesNode;
+ OConfigurationNode const m_aClassesNode;
FilterClassList& m_rClasses;
public:
@@ -524,7 +524,7 @@ namespace sfx2
struct FindGroupEntry
{
- FilterGroupEntryReferrer::mapped_type aLookingFor;
+ FilterGroupEntryReferrer::mapped_type const aLookingFor;
explicit FindGroupEntry( FilterGroupEntryReferrer::mapped_type const & _rLookingFor ) : aLookingFor( _rLookingFor ) { }
bool operator() ( const MapGroupEntry2GroupEntry::value_type& _rMapEntry )
@@ -716,7 +716,7 @@ namespace sfx2
protected:
Reference< XFilterManager > m_xFilterManager;
FileDialogHelper_Impl* m_pFileDlgImpl;
- bool m_bAddExtension;
+ bool const m_bAddExtension;
public:
AppendFilter( const Reference< XFilterManager >& _rxFilterManager,
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 0633292f3239..45a2ccc0bb00 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -142,7 +142,7 @@ struct SfxSecurityPage_Impl
bool m_bNewPasswordIsValid;
OUString m_aNewPassword;
- OUString m_aEndRedliningWarning;
+ OUString const m_aEndRedliningWarning;
bool m_bEndRedliningWarningDone;
std::unique_ptr<weld::CheckButton> m_xOpenReadonlyCB;
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 9251b7f77825..e91ad194932e 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -59,8 +59,8 @@ struct TabPageImpl
struct Data_Impl
{
- sal_uInt16 nId; // The ID
- OString sId; // The ID
+ sal_uInt16 const nId; // The ID
+ OString const sId; // The ID
CreateTabPage fnCreatePage; // Pointer to Factory
GetTabPageRanges fnGetRanges; // Pointer to Ranges-Function
VclPtr<SfxTabPage> pTabPage; // The TabPage itself
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 448f70182d23..86440fbc0bf8 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -82,7 +82,7 @@ namespace
class StyleLBoxString : public SvLBoxString
{
- SfxStyleFamily meStyleFamily;
+ SfxStyleFamily const meStyleFamily;
SvViewDataItem* mpViewData;
public:
@@ -505,8 +505,8 @@ typedef std::vector<std::unique_ptr<StyleTree_Impl>> StyleTreeArr_Impl;
class StyleTree_Impl
{
private:
- OUString aName;
- OUString aParent;
+ OUString const aName;
+ OUString const aParent;
StyleTreeArr_Impl pChildren;
public:
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 3d7245bf4470..ed0e98114d82 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -113,7 +113,7 @@ class DocTempl_EntryData_Impl
// the following member must be SfxObjectShellLock since it controls that SfxObjectShell lifetime by design
// and users of this class expect it to be so.
- SfxObjectShellLock mxObjShell;
+ SfxObjectShellLock const mxObjShell;
OUString maTitle;
OUString maOwnURL;
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index d9926d5f299a..1f75ff2dc1fa 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -217,7 +217,7 @@ class DocumentSettingsGuard
bool m_bPreserveReadOnly;
bool m_bReadOnlySupported;
- bool m_bRestoreSettings;
+ bool const m_bRestoreSettings;
public:
DocumentSettingsGuard( const uno::Reference< frame::XModel >& xModel, bool bReadOnly, bool bRestore )
: m_bPreserveReadOnly( false )
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 363b0e266c4c..f6319d58abb3 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -59,7 +59,7 @@ class IFrameObject : public ::cppu::WeakImplHelper <
css::uno::Reference < css::uno::XComponentContext > mxContext;
css::uno::Reference < css::frame::XFrame2 > mxFrame;
css::uno::Reference < css::embed::XEmbeddedObject > mxObj;
- SfxItemPropertyMap maPropMap;
+ SfxItemPropertyMap const maPropMap;
SfxFrameDescriptor maFrmDescr;
public:
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 2ba0b2f1be4c..474ba9976dd6 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -197,7 +197,7 @@ private:
virtual void ImplSave( SvStream& rStrm ) override;
private:
- uno::Sequence<sal_Int8> mData;
+ uno::Sequence<sal_Int8> const mData;
};
@@ -218,7 +218,7 @@ private:
virtual void ImplSave( SvStream& rStrm ) override;
private:
- uno::Sequence<sal_Int8> mData;
+ uno::Sequence<sal_Int8> const mData;
};
diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx
index 84940350ac67..e5cb4cffa71b 100644
--- a/sfx2/source/doc/oleprops.hxx
+++ b/sfx2/source/doc/oleprops.hxx
@@ -211,7 +211,7 @@ protected:
void SetPropType( sal_Int32 nPropType ) { mnPropType = nPropType; }
private:
- sal_Int32 mnPropId;
+ sal_Int32 const mnPropId;
sal_Int32 mnPropType;
};
@@ -337,7 +337,7 @@ private:
SfxOleCodePageProperty maCodePageProp; /// The codepage property.
SfxOleDictionaryProperty maDictProp; /// The dictionary property.
sal_uInt64 mnStartPos; /// Start stream position of the section.
- bool mbSupportsDict; /// true = section supports dictionary.
+ bool const mbSupportsDict; /// true = section supports dictionary.
};
typedef std::shared_ptr< SfxOleSection > SfxOleSectionRef;
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 522b6db3272b..de1a2c269ea4 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -475,7 +475,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread
/// of course we must know the printer which execute the job
VclPtr<SfxPrinter> m_pPrinter;
/// this describes the target location for the printed temp file
- OUString m_sTargetURL;
+ OUString const m_sTargetURL;
/// it holds the temp file alive, till the print job will finish and remove it from disk automatically if the object die
::utl::TempFile* m_pTempFile;
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 2a6122c01703..2398eb635539 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -133,8 +133,8 @@ public:
private:
- OUString maKeyword;
- FILTER_APPLICATION meApp;
+ OUString const maKeyword;
+ FILTER_APPLICATION const meApp;
};
/***
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index 67628d5dbdb0..006b938664ea 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -40,7 +40,7 @@ class SfxBasicManagerHolder;
class AutoReloadTimer_Impl : public Timer
{
- OUString aUrl;
+ OUString const aUrl;
SfxObjectShell* pObjSh;
public:
diff --git a/sfx2/source/inc/openurlhint.hxx b/sfx2/source/inc/openurlhint.hxx
index 026d72636157..8eac0911fe2b 100644
--- a/sfx2/source/inc/openurlhint.hxx
+++ b/sfx2/source/inc/openurlhint.hxx
@@ -25,7 +25,7 @@
class SfxOpenUrlHint: public SfxHint
{
- OUString msDocumentURL;
+ OUString const msDocumentURL;
public:
SfxOpenUrlHint(const OUString& sDocumentURL);
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
index 58ddc1766889..dfe107940902 100644
--- a/sfx2/source/inc/statcach.hxx
+++ b/sfx2/source/inc/statcach.hxx
@@ -36,7 +36,7 @@ class BindDispatch_Impl : public ::cppu::WeakImplHelper< css::frame::XStatusLi
{
friend class SfxStateCache;
css::uno::Reference< css::frame::XDispatch > xDisp;
- css::util::URL aURL;
+ css::util::URL const aURL;
css::frame::FeatureStateEvent aStatus;
SfxStateCache* pCache;
const SfxSlot* pSlot;
@@ -60,7 +60,7 @@ class SfxStateCache
friend class BindDispatch_Impl;
rtl::Reference<BindDispatch_Impl>
mxDispatch;
- sal_uInt16 nId; // Slot-Id
+ sal_uInt16 const nId; // Slot-Id
SfxControllerItem* pInternalController;
css::uno::Reference < css::frame::XDispatch > xMyDispatch;
SfxControllerItem* pController; // Pointer to first bound Controller (interlinked with each other)
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 00abb7d53f1f..5ae37b970810 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -101,7 +101,7 @@ struct SfxChild_Impl
struct SfxChildWin_Impl
{
- sal_uInt16 nSaveId; // the ChildWindow-Id
+ sal_uInt16 const nSaveId; // the ChildWindow-Id
sal_uInt16 nInterfaceId; // the current context
sal_uInt16 nId; // current Id
SfxChildWindow* pWin;
@@ -174,7 +174,6 @@ class LayoutManagerListener : public ::cppu::WeakImplHelper<
bool m_bHasFrame;
SfxWorkWindow* m_pWrkWin;
css::uno::WeakReference< css::frame::XFrame > m_xFrame;
- OUString m_aLayoutManagerPropName;
};
class SfxWorkWindow final
@@ -205,13 +204,9 @@ class SfxWorkWindow final
bool bIsFullScreen : 1;
bool bShowStatusBar : 1;
sal_Int32 m_nLock;
- OUString m_aStatusBarResName;
- OUString m_aLayoutManagerPropName;
- OUString m_aTbxTypeName;
- OUString m_aProgressBarResName;
css::uno::Reference< css::lang::XComponent > m_xLayoutManagerListener;
SfxFrame* pMasterFrame;
- SfxFrame* pFrame;
+ SfxFrame* const pFrame;
void CreateChildWin_Impl(SfxChildWin_Impl*,bool);
void RemoveChildWin_Impl(SfxChildWin_Impl*);
diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx
index b05d13aa78eb..9d83d337ed09 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -356,7 +356,7 @@ public:
uno::Reference<document::XDocumentProperties> m_xDocumentProperties;
- bool m_bUseLocalized;
+ bool const m_bUseLocalized;
explicit Impl(uno::Reference<document::XDocumentProperties> xDocumentProperties, bool bUseLocalized);
void parsePolicy();
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 650dd05a7989..9dd4503eff7f 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -79,18 +79,16 @@ using namespace com::sun::star;
class SfxBooleanFlagGuard
{
bool& m_rFlag;
- bool m_bLifeValue;
public:
explicit SfxBooleanFlagGuard(bool& bFlag)
: m_rFlag( bFlag )
- , m_bLifeValue( true )
{
- m_rFlag = m_bLifeValue;
+ m_rFlag = true;
}
~SfxBooleanFlagGuard()
{
- m_rFlag = !m_bLifeValue;
+ m_rFlag = false;
}
};
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index a4d268eb134b..3d06277c40e8 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -109,8 +109,8 @@ using ::com::sun::star::ui::XSidebarProvider;
struct GroupIDToCommandGroup
{
- SfxGroupId nGroupID;
- sal_Int16 nCommandGroup;
+ SfxGroupId const nGroupID;
+ sal_Int16 const nCommandGroup;
};
static bool bGroupIDMapInitialized = false;
@@ -333,7 +333,7 @@ public:
private:
- SfxBaseController* m_pController;
+ SfxBaseController* const m_pController;
} ; // class IMPL_SfxBaseController_ListenerContainer
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
index 864c266f7398..00b7b51590fe 100644
--- a/sfx2/source/view/viewimp.hxx
+++ b/sfx2/source/view/viewimp.hxx
@@ -43,8 +43,8 @@ struct SfxViewShell_Impl
::comphelper::OInterfaceContainerHelper2 aInterceptorContainer;
SfxShellArr_Impl aArr;
Size aMargin;
- bool m_bHasPrintOptions;
- bool m_bIsShowView;
+ bool const m_bHasPrintOptions;
+ bool const m_bIsShowView;
sal_uInt16 m_nFamily;
::rtl::Reference<SfxBaseController> m_pController;
std::unique_ptr< ::svt::AcceleratorExecute > m_xAccExec;
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 9a034bcbe963..da95bc54b9f3 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -56,8 +56,8 @@ using namespace com::sun::star::uno;
class SfxPrinterController : public vcl::PrinterController, public SfxListener
{
- Any maCompleteSelection;
- Any maSelection;
+ Any const maCompleteSelection;
+ Any const maSelection;
Reference< view::XRenderable > mxRenderable;
mutable VclPtr<Printer> mpLastPrinter;
mutable Reference<awt::XDevice> mxDevice;
@@ -65,8 +65,8 @@ class SfxPrinterController : public vcl::PrinterController, public SfxListener
SfxObjectShell* mpObjectShell;
bool m_bOrigStatus;
bool m_bNeedsChange;
- bool m_bApi;
- bool m_bTempPrinter;
+ bool const m_bApi;
+ bool const m_bTempPrinter;
util::DateTime m_aLastPrinted;
OUString m_aLastPrintedBy;
@@ -407,7 +407,7 @@ void SfxPrinterController::jobFinished( css::view::PrintableState nState )
class SfxDialogExecutor_Impl
{
private:
- SfxViewShell* _pViewSh;
+ SfxViewShell* const _pViewSh;
PrinterSetupDialog& _rSetupParent;
std::unique_ptr<SfxItemSet> _pOptions;
bool _bHelpDisabled;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index f00c976b5e9f..f38ee6396902 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -126,7 +126,7 @@ public:
AsyncExecuteInfo( AsyncExecuteCmd eCmd, SfxClipboardChangeListener* pListener ) :
m_eCmd( eCmd ), m_xListener( pListener ) {}
- AsyncExecuteCmd m_eCmd;
+ AsyncExecuteCmd const m_eCmd;
rtl::Reference<SfxClipboardChangeListener> m_xListener;
};