include/sfx2/sidebar/Sidebar.hrc | 60 ----------- include/sfx2/sidebar/SidebarResource.hxx | 35 ------ sfx2/source/sidebar/DeckTitleBar.cxx | 2 sfx2/source/sidebar/PanelTitleBar.cxx | 2 sfx2/source/sidebar/Sidebar.hrc | 28 +++++ sfx2/source/sidebar/Sidebar.src | 153 +++--------------------------- sfx2/source/sidebar/SidebarController.cxx | 10 - sfx2/source/sidebar/TabBar.cxx | 2 sfx2/source/sidebar/Theme.cxx | 3 9 files changed, 51 insertions(+), 244 deletions(-)
New commits: commit e9886d32923e5fa3995f44701f27148f59df5c0f Author: Caolán McNamara <caol...@redhat.com> Date: Thu Oct 6 21:11:11 2016 +0100 SidebarResource doesn't do anything useful Change-Id: Id716c9f9caa1a1e4f8ae0e7e05837bebdec4335a diff --git a/include/sfx2/sidebar/Sidebar.hrc b/include/sfx2/sidebar/Sidebar.hrc deleted file mode 100644 index 96597cf..0000000 --- a/include/sfx2/sidebar/Sidebar.hrc +++ /dev/null @@ -1,60 +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 RID_SIDEBAR_RESOURCE (RID_SFX_SIDEBAR_START + 0) - -#define IMAGE_SIDEBAR_PLUS 1 -#define IMAGE_SIDEBAR_MINUS 3 -#define IMAGE_SIDEBAR_GRIP 5 -#define IMAGE_SIDEBAR_MENU 7 -#define IMAGE_SIDEBAR_DETAIL_DIALOG 9 -#define IMAGE_SIDEBAR_DECK_3D_LARGE 20 -#define IMAGE_SIDEBAR_DECK_3D_SMALL 22 -#define IMAGE_SIDEBAR_DECK_ANIMATION_LARGE 30 -#define IMAGE_SIDEBAR_DECK_ANIMATION_SMALL 32 -#define IMAGE_SIDEBAR_DECK_COLORS_LARGE 40 -#define IMAGE_SIDEBAR_DECK_COLORS_SMALL 42 -#define IMAGE_SIDEBAR_DECK_EYEDROPPER_LARGE 50 -#define IMAGE_SIDEBAR_DECK_EYEDROPPER_SMALL 52 -#define IMAGE_SIDEBAR_DECK_GALLERY_LARGE 60 -#define IMAGE_SIDEBAR_DECK_GALLERY_SMALL 62 -#define IMAGE_SIDEBAR_DECK_IMGANIM_LARGE 70 -#define IMAGE_SIDEBAR_DECK_IMGANIM_SMALL 72 -#define IMAGE_SIDEBAR_DECK_NAVIGATOR_LARGE 80 -#define IMAGE_SIDEBAR_DECK_NAVIGATOR_SMALL 82 -#define IMAGE_SIDEBAR_PROPERTIES_DECK_LARGE 90 -#define IMAGE_SIDEBAR_PROPERTIES_DECK_SMALL 92 -#define IMAGE_SIDEBAR_DECK_STYLE_LARGE 100 -#define IMAGE_SIDEBAR_DECK_STYLE_SMALL 102 -#define IMAGE_SIDEBAR_DECK_TEMPLATE_LARGE 110 -#define IMAGE_SIDEBAR_DECK_TEMPLATE_SMALL 112 -#define IMAGE_SIDEBAR_DECK_TRANSITION_LARGE 120 -#define IMAGE_SIDEBAR_DECK_TRANSITION_SMALL 122 -#define IMAGE_SIDEBAR_DECK_FUNCTIONS_LARGE 130 -#define IMAGE_SIDEBAR_DECK_FUNCTIONS_SMALL 132 -#define STRING_CUSTOMIZATION 200 -#define STRING_RESTORE 201 -#define STRING_HIDE_SIDEBAR 202 - -#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) - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx index 22ddec1..29067d1 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 <sfx2/sidebar/Sidebar.hrc> +#include "Sidebar.hrc" #include <vcl/image.hxx> diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx index 7a16f33..d13dc74 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 <sfx2/sidebar/Sidebar.hrc> +#include "Sidebar.hrc" #include <sfx2/sidebar/Paint.hxx> #include <sfx2/sidebar/Panel.hxx> diff --git a/include/sfx2/sidebar/SidebarResource.hxx b/sfx2/source/sidebar/Sidebar.hrc similarity index 65% rename from include/sfx2/sidebar/SidebarResource.hxx rename to sfx2/source/sidebar/Sidebar.hrc index 78ce96b..5d2b685 100644 --- a/include/sfx2/sidebar/SidebarResource.hxx +++ b/sfx2/source/sidebar/Sidebar.hrc @@ -16,20 +16,13 @@ * 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_SFX2_SOURCE_SIDEBAR_SIDEBARRESOURCE_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_SIDEBARRESOURCE_HXX +#include <sfx2/sfx.hrc> -#include <sfx2/sidebar/Sidebar.hrc> -#include <sfx2/sfxresid.hxx> -#include <tools/rc.hxx> - -class SidebarResource : public Resource -{ -public: - SidebarResource() : Resource(SfxResId(RID_SIDEBAR_RESOURCE)){} - ~SidebarResource() { FreeResource(); } -}; - -#endif +#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 2320307..e889dbe8 100644 --- a/sfx2/source/sidebar/Sidebar.src +++ b/sfx2/source/sidebar/Sidebar.src @@ -16,144 +16,8 @@ * 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> -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"; - }; -}; +#include "Sidebar.hrc" String SFX_STR_SIDEBAR_MORE_OPTIONS { @@ -170,4 +34,19 @@ 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 56e8888..e90c9ae 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -21,7 +21,6 @@ #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> @@ -34,6 +33,7 @@ #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,8 +943,6 @@ 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); @@ -981,11 +979,11 @@ VclPtr<PopupMenu> SidebarController::CreatePopupMenu ( else pMenu->InsertItem(MID_UNLOCK_TASK_PANEL, SFX2_RESSTR(STR_SFX_UNDOCK)); - pMenu->InsertItem(MID_HIDE_SIDEBAR, SFX2_RESSTR(STRING_HIDE_SIDEBAR)); + pMenu->InsertItem(MID_HIDE_SIDEBAR, SFX2_RESSTR(SFX_STR_SIDEBAR_HIDE_SIDEBAR)); pCustomizationMenu->InsertSeparator(); - pCustomizationMenu->InsertItem(MID_RESTORE_DEFAULT, SFX2_RESSTR(STRING_RESTORE)); + pCustomizationMenu->InsertItem(MID_RESTORE_DEFAULT, SFX2_RESSTR(SFX_STR_SIDEBAR_RESTORE)); - pMenu->InsertItem(MID_CUSTOMIZATION, SFX2_RESSTR(STRING_CUSTOMIZATION)); + pMenu->InsertItem(MID_CUSTOMIZATION, SFX2_RESSTR(SFX_STR_SIDEBAR_CUSTOMIZATION)); pMenu->SetPopupMenu(MID_CUSTOMIZATION, pCustomizationMenu); pMenu->RemoveDisabledEntries(false); diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 0471cac..87777de 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 <sfx2/sidebar/Sidebar.hrc> +#include "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 6858627..b821f4f 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -18,7 +18,6 @@ */ #include <sfx2/sidebar/Theme.hxx> #include <sfx2/sidebar/Paint.hxx> -#include <sfx2/sidebar/SidebarResource.hxx> #include <sfx2/sidebar/Tools.hxx> #include <sfx2/app.hxx> @@ -144,8 +143,6 @@ void Theme::InitializeTheme() void Theme::UpdateTheme() { - SidebarResource aLocalResource; - try { const StyleSettings& rStyle (Application::GetSettings().GetStyleSettings());
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits