summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-07 10:06:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-07 10:09:35 +0100
commitcaa1874ad72005de263e6fd13ee8c660bedc01c2 (patch)
tree56f539f33fc321d90cbdf1d113a1af00db1fd7df /sfx2
parentb8711a13834d4b141bb41de915702131dcc494e7 (diff)
Revert "SidebarResource doesn't do anything useful"
This reverts commit e9886d32923e5fa3995f44701f27148f59df5c0f.
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/DeckTitleBar.cxx2
-rw-r--r--sfx2/source/sidebar/PanelTitleBar.cxx2
-rw-r--r--sfx2/source/sidebar/Sidebar.hrc28
-rw-r--r--sfx2/source/sidebar/Sidebar.src153
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx10
-rw-r--r--sfx2/source/sidebar/TabBar.cxx2
-rw-r--r--sfx2/source/sidebar/Theme.cxx3
7 files changed, 149 insertions, 51 deletions
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx
index 29067d1a02df..22ddec13eb1b 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -21,7 +21,7 @@
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sfxresid.hxx>
-#include "Sidebar.hrc"
+#include <sfx2/sidebar/Sidebar.hrc>
#include <vcl/image.hxx>
diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx
index d13dc740a93f..7a16f337e102 100644
--- a/sfx2/source/sidebar/PanelTitleBar.cxx
+++ b/sfx2/source/sidebar/PanelTitleBar.cxx
@@ -20,7 +20,7 @@
#include <sfx2/sidebar/PanelTitleBar.hxx>
#include <sfx2/sfxresid.hxx>
-#include "Sidebar.hrc"
+#include <sfx2/sidebar/Sidebar.hrc>
#include <sfx2/sidebar/Paint.hxx>
#include <sfx2/sidebar/Panel.hxx>
diff --git a/sfx2/source/sidebar/Sidebar.hrc b/sfx2/source/sidebar/Sidebar.hrc
deleted file mode 100644
index 5d2b685dca0c..000000000000
--- a/sfx2/source/sidebar/Sidebar.hrc
+++ /dev/null
@@ -1,28 +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 .
- */
-#include <sfx2/sfx.hrc>
-
-#define SFX_STR_SIDEBAR_MORE_OPTIONS (RID_SFX_SIDEBAR_START + 1)
-#define SFX_STR_SIDEBAR_CLOSE_DECK (RID_SFX_SIDEBAR_START + 2)
-#define SFX_STR_SIDEBAR_SETTINGS (RID_SFX_SIDEBAR_START + 3)
-#define SFX_STR_SIDEBAR_CUSTOMIZATION (RID_SFX_SIDEBAR_START + 4)
-#define SFX_STR_SIDEBAR_RESTORE (RID_SFX_SIDEBAR_START + 5)
-#define SFX_STR_SIDEBAR_HIDE_SIDEBAR (RID_SFX_SIDEBAR_START + 6)
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/Sidebar.src b/sfx2/source/sidebar/Sidebar.src
index e889dbe8b042..232030747f76 100644
--- a/sfx2/source/sidebar/Sidebar.src
+++ b/sfx2/source/sidebar/Sidebar.src
@@ -16,8 +16,144 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sfx2/sidebar/Sidebar.hrc>
-#include "Sidebar.hrc"
+Resource RID_SIDEBAR_RESOURCE
+{
+ Image IMAGE_SIDEBAR_PLUS
+ {
+ ImageBitmap = Bitmap { File = "plus.png" ;};
+ };
+
+ Image IMAGE_SIDEBAR_MINUS
+ {
+ ImageBitmap = Bitmap { File = "minus.png" ;};
+ };
+
+ Image IMAGE_SIDEBAR_GRIP
+ {
+ ImageBitmap = Bitmap { File = "grip.png" ;};
+ };
+
+ Image IMAGE_SIDEBAR_MENU
+ {
+ ImageBitmap = Bitmap { File = "symphony/open_more.png" ;};
+ };
+
+ Image IMAGE_SIDEBAR_DETAIL_DIALOG
+ {
+ ImageBitmap = Bitmap { File = "symphony/morebutton.png" ;};
+ };
+
+ Image IMAGE_SIDEBAR_DECK_3D_LARGE
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-3d-large.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_3D_SMALL
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-3d-small.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_ANIMATION_LARGE
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-animation-large.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_ANIMATION_SMALL
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-animation-small.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_COLORS_LARGE
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-colors-large.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_COLORS_SMALL
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-colors-small.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_EYEDROPPER_LARGE
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-eyedropper-large.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_EYEDROPPER_SMALL
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-eyedropper-small.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_GALLERY_LARGE
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-gallery-large.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_GALLERY_SMALL
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-gallery-small.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_IMGANIM_LARGE
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-imganim-large.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_IMGANIM_SMALL
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-imganim-small.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_NAVIGATOR_LARGE
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-navigator-large.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_NAVIGATOR_SMALL
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-navigator-small.png" ;};
+ };
+ Image IMAGE_SIDEBAR_PROPERTIES_DECK_LARGE
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-property-large.png" ;};
+ };
+ Image IMAGE_SIDEBAR_PROPERTIES_DECK_SMALL
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-property-small.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_STYLE_LARGE
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-style-large.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_STYLE_SMALL
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-style-small.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_TEMPLATE_LARGE
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-template-large.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_TEMPLATE_SMALL
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-template-small.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_TRANSITION_LARGE
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-transition-large.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_TRANSITION_SMALL
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-transition-small.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_FUNCTIONS_LARGE
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-functions-large.png" ;};
+ };
+ Image IMAGE_SIDEBAR_DECK_FUNCTIONS_SMALL
+ {
+ ImageBitmap = Bitmap { File = "symphony/sidebar-functions-small.png" ;};
+ };
+ String STRING_CUSTOMIZATION
+ {
+ Text [en-US] = "Customization";
+ };
+ String STRING_RESTORE
+ {
+ Text [en-US] = "Restore Default";
+ };
+ String STRING_HIDE_SIDEBAR
+ {
+ Text [en-US] = "Close Sidebar";
+ };
+};
String SFX_STR_SIDEBAR_MORE_OPTIONS
{
@@ -34,19 +170,4 @@ String SFX_STR_SIDEBAR_SETTINGS
Text [en-US] = "Sidebar Settings";
};
-String SFX_STR_SIDEBAR_HIDE_SIDEBAR
-{
- Text [en-US] = "Close Sidebar";
-};
-
-String SFX_STR_SIDEBAR_RESTORE
-{
- Text [en-US] = "Restore Default";
-};
-
-String SFX_STR_SIDEBAR_CUSTOMIZATION
-{
- Text [en-US] = "Customization";
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index e90c9ae9c812..56e888851929 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -21,6 +21,7 @@
#include <sfx2/sidebar/DeckTitleBar.hxx>
#include <sfx2/sidebar/Panel.hxx>
#include <sfx2/sidebar/PanelTitleBar.hxx>
+#include <sfx2/sidebar/SidebarResource.hxx>
#include <sfx2/sidebar/TabBar.hxx>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/SidebarChildWindow.hxx>
@@ -33,7 +34,6 @@
#include <sfx2/sfxresid.hxx>
#include <sfx2/sfxsids.hrc>
#include <sfx2/titledockwin.hxx>
-#include "Sidebar.hrc"
#include "sfxlocal.hrc"
#include <framework/ContextChangeEventMultiplexerTunnel.hxx>
#include <vcl/floatwin.hxx>
@@ -943,6 +943,8 @@ VclPtr<PopupMenu> SidebarController::CreatePopupMenu (
// Create sub menu for customization (hiding of deck tabs.)
VclPtr<PopupMenu> pCustomizationMenu = VclPtr<PopupMenu>::Create();
+ SidebarResource aLocalResource;
+
// Add one entry for every tool panel element to individually make
// them visible or hide them.
sal_Int32 nIndex (0);
@@ -979,11 +981,11 @@ VclPtr<PopupMenu> SidebarController::CreatePopupMenu (
else
pMenu->InsertItem(MID_UNLOCK_TASK_PANEL, SFX2_RESSTR(STR_SFX_UNDOCK));
- pMenu->InsertItem(MID_HIDE_SIDEBAR, SFX2_RESSTR(SFX_STR_SIDEBAR_HIDE_SIDEBAR));
+ pMenu->InsertItem(MID_HIDE_SIDEBAR, SFX2_RESSTR(STRING_HIDE_SIDEBAR));
pCustomizationMenu->InsertSeparator();
- pCustomizationMenu->InsertItem(MID_RESTORE_DEFAULT, SFX2_RESSTR(SFX_STR_SIDEBAR_RESTORE));
+ pCustomizationMenu->InsertItem(MID_RESTORE_DEFAULT, SFX2_RESSTR(STRING_RESTORE));
- pMenu->InsertItem(MID_CUSTOMIZATION, SFX2_RESSTR(SFX_STR_SIDEBAR_CUSTOMIZATION));
+ pMenu->InsertItem(MID_CUSTOMIZATION, SFX2_RESSTR(STRING_CUSTOMIZATION));
pMenu->SetPopupMenu(MID_CUSTOMIZATION, pCustomizationMenu);
pMenu->RemoveDisabledEntries(false);
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 87777de05eb5..0471cacf21e1 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -28,7 +28,7 @@
#include <sfx2/sidebar/SidebarController.hxx>
#include <sfx2/sfxresid.hxx>
-#include "Sidebar.hrc"
+#include <sfx2/sidebar/Sidebar.hrc>
#include <vcl/gradient.hxx>
#include <vcl/image.hxx>
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index b821f4f74d69..68586272f408 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -18,6 +18,7 @@
*/
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/Paint.hxx>
+#include <sfx2/sidebar/SidebarResource.hxx>
#include <sfx2/sidebar/Tools.hxx>
#include <sfx2/app.hxx>
@@ -143,6 +144,8 @@ void Theme::InitializeTheme()
void Theme::UpdateTheme()
{
+ SidebarResource aLocalResource;
+
try
{
const StyleSettings& rStyle (Application::GetSettings().GetStyleSettings());