summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-08 13:07:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-09 08:10:35 +0200
commit8411b80d46765f1ddd4e37aa634ec963dcf4b04f (patch)
treef14a715537b3ff3b583e8232eb989d6468c84fbc /sfx2
parent1de7e818a417a412678013c100b4bf73fd8858ac (diff)
loplugin:constfields in sfx2
and we find that bSplitable in SfxDockingWindow is always true, ever since commit 4bd28a2fee0d36c67911019eeb7d934838e27cad Date: Tue Jan 29 15:27:40 2008 +0000 INTEGRATION: CWS fwk82_SRC680 (1.45.138); FILE MERGED so we can remove all of the non-splittable code there. ` Change-Id: Ia7fe607ed02d1a7c69a92bab57e220b19f0e6e87 Reviewed-on: https://gerrit.libreoffice.org/61550 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-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
38 files changed, 156 insertions, 349 deletions
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;
};