summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-19 11:06:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-01-19 15:13:28 +0000
commit81516167e37cae84b8d74cfa7537196312fb9911 (patch)
tree959c6271d973d9116c3edf107bc4b6b2d0dbff8f /sd
parent0d08b70ec10e3100ae374564c95d74b78508a5a6 (diff)
flatten resource, drop LocalResource class
drop cargo-cult second LocalResource use Change-Id: I0c655f8ca15ad146bb11290fdefad67846ec8006
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/glob.hrc6
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsResource.hrc32
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsTheme.hxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsResource.hxx40
-rw-r--r--sd/source/ui/slidesorter/view/SlsResource.src33
-rw-r--r--sd/source/ui/slidesorter/view/SlsTheme.cxx23
6 files changed, 30 insertions, 106 deletions
diff --git a/sd/inc/glob.hrc b/sd/inc/glob.hrc
index 9f221b97066c..2296eec4d0dd 100644
--- a/sd/inc/glob.hrc
+++ b/sd/inc/glob.hrc
@@ -134,7 +134,6 @@
#define STR_CUSTOMANIMATIONPANE RID_GLOB_START+227
#define STR_SLIDE_TRANSITION_PANE RID_GLOB_START+228
-#define RID_SLIDESORTER_ICONS RID_GLOB_START+227
#define STR_DEAUTHORISE_CLIENT RID_GLOB_START+229
#define STR_MASTERSLIDE_NAME RID_GLOB_START+230
#define STR_MASTERPAGE_NAME RID_GLOB_START+231
@@ -142,6 +141,11 @@
#define STR_SHRINK_FONT_SIZE RID_GLOB_START+232
#define STR_GROW_FONT_SIZE RID_GLOB_START+233
+#define IMAGE_SHADOW RID_GLOB_START+234
+#define IMAGE_INSERT_SHADOW RID_GLOB_START+235
+#define IMAGE_HIDE_SLIDE_OVERLAY RID_GLOB_START+236
+#define IMAGE_FOCUS_BORDER RID_GLOB_START+237
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/inc/view/SlsResource.hrc b/sd/source/ui/slidesorter/inc/view/SlsResource.hrc
deleted file mode 100644
index 31c2fb228651..000000000000
--- a/sd/source/ui/slidesorter/inc/view/SlsResource.hrc
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef SD_SLIDESORTER_ICONS_HRC
-#define SD_SLIDESORTER_ICONS_HRC
-
-#include "glob.hrc"
-
-#define IMAGE_SHADOW 90
-#define IMAGE_INSERT_SHADOW 91
-#define IMAGE_HIDE_SLIDE_OVERLAY 92
-#define IMAGE_FOCUS_BORDER 93
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
index c6e8292eb403..14d3568c26c7 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
@@ -142,7 +142,7 @@ private:
GradientDescriptor& GetGradient (const GradientColorType eType);
/** Guarded initialization of the specified icon in the maIcons
- container. Call only while a LocalResource object is active.
+ container.
*/
void InitializeIcon (const IconType eType, sal_uInt16 nResourceId);
};
diff --git a/sd/source/ui/slidesorter/view/SlsResource.hxx b/sd/source/ui/slidesorter/view/SlsResource.hxx
deleted file mode 100644
index e1d642639b44..000000000000
--- a/sd/source/ui/slidesorter/view/SlsResource.hxx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SD_SOURCE_UI_SLIDESORTER_VIEW_SLSRESOURCE_HXX
-#define INCLUDED_SD_SOURCE_UI_SLIDESORTER_VIEW_SLSRESOURCE_HXX
-
-#include "view/SlsResource.hrc"
-#include "sdresid.hxx"
-#include <tools/rc.hxx>
-
-namespace sd { namespace slidesorter { namespace view {
-
-class LocalResource : public Resource
-{
-public:
- explicit LocalResource (const sal_uInt16 nResourceId) : Resource(SdResId(nResourceId)){}
- ~LocalResource() { FreeResource(); }
-};
-
-} } } // end of namespace ::sd::slidesorter::view
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/view/SlsResource.src b/sd/source/ui/slidesorter/view/SlsResource.src
index a192e557e1a9..20134d804a2a 100644
--- a/sd/source/ui/slidesorter/view/SlsResource.src
+++ b/sd/source/ui/slidesorter/view/SlsResource.src
@@ -17,29 +17,26 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "view/SlsResource.hrc"
+#include "glob.hrc"
-Resource RID_SLIDESORTER_ICONS
+Bitmap IMAGE_SHADOW
{
- Bitmap IMAGE_SHADOW
- {
- File = "slide_sorter_shadow.png";
- };
+ File = "slide_sorter_shadow.png";
+};
- Bitmap IMAGE_INSERT_SHADOW
- {
- File = "slide_sorter_insert_shadow.png";
- };
+Bitmap IMAGE_INSERT_SHADOW
+{
+ File = "slide_sorter_insert_shadow.png";
+};
- Bitmap IMAGE_HIDE_SLIDE_OVERLAY
- {
- File = "slide_sorter_hide_slide_overlay.png";
- };
+Bitmap IMAGE_HIDE_SLIDE_OVERLAY
+{
+ File = "slide_sorter_hide_slide_overlay.png";
+};
- Bitmap IMAGE_FOCUS_BORDER
- {
- File = "slide_sorter_focus_border.png";
- };
+Bitmap IMAGE_FOCUS_BORDER
+{
+ File = "slide_sorter_focus_border.png";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
index 44ca4cb50497..1ebc54c7554b 100644
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -17,8 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "glob.hrc"
#include "view/SlsTheme.hxx"
-#include "SlsResource.hxx"
#include "controller/SlsProperties.hxx"
#include "sdresid.hxx"
#include <tools/color.hxx>
@@ -66,18 +66,14 @@ Theme::Theme (const std::shared_ptr<controller::Properties>& rpProperties)
maIcons(),
maColor()
{
- {
- LocalResource aResource (RID_SLIDESORTER_ICONS);
-
- maColor.resize(ColorType_Size_);
- maColor[Color_Background] = maBackgroundColor;
- maColor[Color_PageNumberDefault] = 0x0808080;
- maColor[Color_PageNumberHover] = 0x4c4c4c;
- maColor[Color_PageNumberHighContrast] = White;
- maColor[Color_PageNumberBrightBackground] = 0x333333;
- maColor[Color_PageNumberDarkBackground] = 0xcccccc;
- maColor[Color_PreviewBorder] = 0x949599;
- }
+ maColor.resize(ColorType_Size_);
+ maColor[Color_Background] = maBackgroundColor;
+ maColor[Color_PageNumberDefault] = 0x0808080;
+ maColor[Color_PageNumberHover] = 0x4c4c4c;
+ maColor[Color_PageNumberHighContrast] = White;
+ maColor[Color_PageNumberBrightBackground] = 0x333333;
+ maColor[Color_PageNumberDarkBackground] = 0xcccccc;
+ maColor[Color_PreviewBorder] = 0x949599;
Update(rpProperties);
}
@@ -118,7 +114,6 @@ void Theme::Update (const std::shared_ptr<controller::Properties>& rpProperties)
// Set up icons.
if (maIcons.empty())
{
- LocalResource aResource (RID_SLIDESORTER_ICONS);
maIcons.resize(IconType_Size_);
InitializeIcon(Icon_RawShadow, IMAGE_SHADOW);