summaryrefslogtreecommitdiff
path: root/sfx2/source/control
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/control')
-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
5 files changed, 19 insertions, 18 deletions
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();