cui/inc/strings.hrc | 47 ---- cui/source/options/appearance.cxx | 161 -------------- cui/source/options/appearance.hxx | 11 - cui/uiconfig/ui/appearance.ui | 154 -------------- include/svtools/colorcfg.hxx | 185 ++++++++--------- include/vcl/settings.hxx | 1 include/vcl/themecolors.hxx | 19 - officecfg/registry/data/org/openoffice/Office/UI.xcu | 18 - officecfg/registry/schema/org/openoffice/Office/UI.xcs | 16 - svtools/source/config/colorcfg.cxx | 64 ----- sw/inc/viewsh.hxx | 2 sw/source/core/view/viewsh.cxx | 20 - vcl/source/app/settings.cxx | 50 ---- 13 files changed, 104 insertions(+), 644 deletions(-)
New commits: commit dff301ca58eb0e1300158b4ce161f52b0119f483 Author: Sahil Gautam <sahil.gautam.ext...@allotropia.de> AuthorDate: Thu May 22 20:57:05 2025 +0530 Commit: Sahil Gautam <sahil.gautam.ext...@allotropia.de> CommitDate: Fri May 30 11:56:12 2025 +0200 tdf#164970 organize customizations grid, remove unneccessary rows Change-Id: Ic09f07269f015dcdb045fe49ececa7c2cd3ab631 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185698 Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> Reviewed-by: Sahil Gautam <sahil.gautam.ext...@allotropia.de> Tested-by: Jenkins diff --git a/cui/uiconfig/ui/appearance.ui b/cui/uiconfig/ui/appearance.ui index b19925efff6c..5b5d2c76840c 100644 --- a/cui/uiconfig/ui/appearance.ui +++ b/cui/uiconfig/ui/appearance.ui @@ -157,26 +157,12 @@ <property name="orientation">vertical</property> <property name="spacing">3</property> <child> - <!-- n-columns=2 n-rows=5 --> + <!-- n-columns=2 n-rows=3 --> <object class="GtkGrid"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="row-spacing">3</property> <property name="column-spacing">6</property> - <child> - <object class="GtkLabel" id="itemslb"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="halign">start</property> - <property name="label" translatable="yes" context="appearancetabpage|items">Items: </property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">registrydropdown</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">0</property> - </packing> - </child> <child> <object class="GtkComboBoxText" id="registrydropdown"> <property name="visible">True</property> @@ -185,13 +171,13 @@ <property name="hexpand">False</property> <child internal-child="accessible"> <object class="AtkObject" id="registrydropdown-atkobject"> - <property name="AtkObject::accessible-name" translatable="yes" context="appearancetabpage|registrycolorslist">registrycolorslist</property> - <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|registrydropdown">Select the item to customize color or render with an image.</property> + <property name="AtkObject::accessible-name" translatable="yes" context="appearancetabpage|registrycolorslist">Items</property> + <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|registrydropdown">Select the item to color customize.</property> </object> </child> </object> <packing> - <property name="left-attach">1</property> + <property name="left-attach">0</property> <property name="top-attach">0</property> </packing> </child> @@ -208,13 +194,14 @@ </child> <child internal-child="accessible"> <object class="AtkObject" id="colorsdropdownbtn-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|colorsdropdownbtn">Select the color of the item.</property> + <property name="AtkObject::accessible-name" translatable="yes" context="appearancetabpage|colorsdropdownbtn">Color</property> + <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|colorsdropdownbtn">Select the color for the selected item.</property> </object> </child> </object> <packing> <property name="left-attach">1</property> - <property name="top-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> @@ -231,8 +218,8 @@ </child> </object> <packing> - <property name="left-attach">1</property> - <property name="top-attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> @@ -241,10 +228,11 @@ <property name="visible">True</property> <property name="can-focus">True</property> <property name="receives-default">True</property> + <property name="halign">start</property> </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">4</property> + <property name="top-attach">2</property> </packing> </child> <child> commit d547590c3b10d17525f3581bc0c42922c03dbdc9 Author: Sahil Gautam <sahil.gautam.ext...@allotropia.de> AuthorDate: Thu May 22 20:44:29 2025 +0530 Commit: Sahil Gautam <sahil.gautam.ext...@allotropia.de> CommitDate: Fri May 30 11:55:58 2025 +0200 tdf#164970 [API CHANGE] remove all app background related api/ui/code previously all this was done in a single [patch] and it made things quite complicated for me (to change) and for the reviewers as many things were moving in a single patch. API CHANGE: only application background is bitmap customizable and we stored the user settings for bitmap file name and draw type as properties of AppBackground color entry in a ColorScheme. That unneccessarily complicated things as we had to check for the "/BackgroundType" while Loading and Committing (saving) the colorschemes. this patch removes the bitmap properties from AppBackground entry of the colorscheme schema along with all the feature implementation code. most of the implementation code is added back in a follow up patch with a new underlying api and ui to make it independent of color customization. [patch]: https://gerrit.libreoffice.org/c/core/+/184544 Change-Id: I71fee27467be861b610934c213cf80fbae037327 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185697 Reviewed-by: Sahil Gautam <sahil.gautam.ext...@allotropia.de> Tested-by: Jenkins diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc index ce8d0bbe3f95..37b4cbf85f6c 100644 --- a/cui/inc/strings.hrc +++ b/cui/inc/strings.hrc @@ -405,53 +405,6 @@ #define RID_COLOR_SCHEME_LIBREOFFICE_LIGHT NC_("RID_COLOR_SCHEME_LIBREOFFICE_LIGHT", "Light") #define RID_COLOR_SCHEME_LIBREOFFICE_DARK NC_("RID_COLOR_SCHEME_LIBREOFFICE_DARK", "Dark") -// Translatable Bitmap Names -#define BMP_FUZZY_LIGHTGREY NC_("BMP_FUZZY_LIGHTGREY", "Fuzzy Lightgrey") -#define BMP_ICE_LIGHT NC_("BMP_ICE_LIGHT", "Ice Light") -#define BMP_PAINTED_WHITE NC_("BMP_PAINTED_WHITE", "Painted White") -#define BMP_TEXTURE_PAPER NC_("BMP_TEXTURE_PAPER", "Texture Paper") -#define BMP_CRUMPLED_PAPER NC_("BMP_CRUMPLED_PAPER", "Crumpled Paper") -#define BMP_MARBLE NC_("BMP_MARBLE", "Marble") -#define BMP_CONCRETE NC_("BMP_CONCRETE", "Concrete") -#define BMP_FUZZY_GREY NC_("BMP_FUZZY_GREY", "Fuzzy Grey") -#define BMP_FUZZY_DARKGREY NC_("BMP_FUZZY_DARKGREY", "Fuzzy Darkgrey") -#define BMP_STONE NC_("BMP_STONE", "Stone") -#define BMP_WHITE_DIFFUSION NC_("BMP_WHITE_DIFFUSION", "White Diffusion") -#define BMP_SAND_LIGHT NC_("BMP_SAND_LIGHT", "Sand Light") -#define BMP_SAND NC_("BMP_SAND", "Sand") -#define BMP_SURFACE NC_("BMP_SURFACE", "Surface") -#define BMP_STUDIO NC_("BMP_STUDIO", "Studio") -#define BMP_INVOICE_PAPER NC_("BMP_INVOICE_PAPER", "Invoice Paper") -#define BMP_PARCHMENT_PAPER NC_("BMP_PARCHMENT_PAPER", "Parchment Paper") -#define BMP_CARDBOARD NC_("BMP_CARDBOARD", "Cardboard") -#define BMP_FENCE NC_("BMP_FENCE", "Fence") -#define BMP_WOODEN_FENCE NC_("BMP_WOODEN_FENCE", "Wooden Fence") -#define BMP_WOOD NC_("BMP_WOOD", "Wood") -#define BMP_WOODEN_BOARD NC_("BMP_WOODEN_BOARD", "Wooden Board") -#define BMP_PAINTED_WOOD NC_("BMP_PAINTED_WOOD", "Painted Wood") -#define BMP_STONES NC_("BMP_STONES", "Stones") -#define BMP_PEBBLE_LIGHT NC_("BMP_PEBBLE_LIGHT", "Pebble Light") -#define BMP_STONE_WALL NC_("BMP_STONE_WALL", "Stone Wall") -#define BMP_STONE_GRAY NC_("BMP_STONE_GRAY", "Stone Gray") -#define BMP_ROCK_WALL NC_("BMP_ROCK_WALL", "Rock Wall") -#define BMP_SURFACE_BLACK NC_("BMP_SURFACE_BLACK", "Surface Black") -#define BMP_BRICK_WALL NC_("BMP_BRICK_WALL", "Brick Wall") -#define BMP_TILES NC_("BMP_TILES", "Tiles") -#define BMP_GRAPH_PAPER NC_("BMP_GRAPH_PAPER", "Graph Paper") -#define BMP_CLOUD NC_("BMP_CLOUD", "Cloud") -#define BMP_POOL NC_("BMP_POOL", "Pool") -#define BMP_SKY NC_("BMP_SKY", "Sky") -#define BMP_CIRCUIT_BOARD NC_("BMP_CIRCUIT_BOARD", "Circuit Board") -#define BMP_COFFEE NC_("BMP_COFFEE", "Coffee") -#define BMP_COLOR_STRIPES NC_("BMP_COLOR_STRIPES", "Color Stripes") -#define BMP_FLORAL NC_("BMP_FLORAL", "Floral") -#define BMP_LEAF NC_("BMP_LEAF", "Leaf") -#define BMP_MAPLE_LEAVES NC_("BMP_MAPLE_LEAVES", "Maple Leaves") -#define BMP_SPACE NC_("BMP_SPACE", "Space") -#define BMP_GIRAFFE NC_("BMP_GIRAFFE", "Giraffe") -#define BMP_TIGER NC_("BMP_TIGER", "Tiger") -#define BMP_ZEBRA NC_("BMP_ZEBRA", "Zebra") - // Translated Registry Entries #define REG_DOCCOLOR NC_("REG_DOCCOLOR", "Document background") #define REG_DOCBOUNDARIES NC_("REG_DOCBOUNDARIES", "Document boundaries") diff --git a/cui/source/options/appearance.cxx b/cui/source/options/appearance.cxx index 648b07d07363..d4a3befad7f9 100644 --- a/cui/source/options/appearance.cxx +++ b/cui/source/options/appearance.cxx @@ -26,67 +26,6 @@ #include <comphelper/propertyvalue.hxx> #include <map> -namespace -{ -struct BitmapData -{ - OUString aTranslatedBitmapLabel; - OUString aBitmapFileName; -}; - -std::vector<BitmapData> const& getBitmapList() -{ - static const std::vector<BitmapData> aBitmapList = { - { CuiResId(BMP_FUZZY_LIGHTGREY), "fuzzy-lightgrey.jpg" }, - { CuiResId(BMP_ICE_LIGHT), "ice-light.jpg" }, - { CuiResId(BMP_PAINTED_WHITE), "painted-white.jpg" }, - { CuiResId(BMP_TEXTURE_PAPER), "texture-paper.jpg" }, - { CuiResId(BMP_CRUMPLED_PAPER), "crumpled-paper.jpg" }, - { CuiResId(BMP_MARBLE), "marble.jpg" }, - { CuiResId(BMP_CONCRETE), "concrete.jpg" }, - { CuiResId(BMP_FUZZY_GREY), "fuzzy-grey.jpg" }, - { CuiResId(BMP_FUZZY_DARKGREY), "fuzzy-darkgrey.jpg" }, - { CuiResId(BMP_STONE), "stone.jpg" }, - { CuiResId(BMP_WHITE_DIFFUSION), "white-diffusion.jpg" }, - { CuiResId(BMP_SAND_LIGHT), "sand-light.jpg" }, - { CuiResId(BMP_SAND), "sand.jpg" }, - { CuiResId(BMP_SURFACE), "surface.jpg" }, - { CuiResId(BMP_STUDIO), "studio.jpg" }, - { CuiResId(BMP_INVOICE_PAPER), "invoice-paper.jpg" }, - { CuiResId(BMP_PARCHMENT_PAPER), "parchment-paper.jpg" }, - { CuiResId(BMP_CARDBOARD), "cardboard.jpg" }, - { CuiResId(BMP_FENCE), "fence.jpg" }, - { CuiResId(BMP_WOODEN_FENCE), "wooden-fence.jpg" }, - { CuiResId(BMP_WOOD), "wood.jpg" }, - { CuiResId(BMP_WOODEN_BOARD), "wooden-board.jpg" }, - { CuiResId(BMP_PAINTED_WOOD), "painted-wood.jpg" }, - { CuiResId(BMP_STONES), "stones.jpg" }, - { CuiResId(BMP_PEBBLE_LIGHT), "pebble-light.jpg" }, - { CuiResId(BMP_STONE_WALL), "stone-wall.jpg" }, - { CuiResId(BMP_STONE_GRAY), "stone-gray.jpg" }, - { CuiResId(BMP_ROCK_WALL), "rock-wall.jpg" }, - { CuiResId(BMP_SURFACE_BLACK), "surface-black.jpg" }, - { CuiResId(BMP_BRICK_WALL), "brick-wall.png" }, - { CuiResId(BMP_TILES), "tiles.jpg" }, - { CuiResId(BMP_GRAPH_PAPER), "graph-paper.png" }, - { CuiResId(BMP_CLOUD), "cloud.jpg" }, - { CuiResId(BMP_POOL), "pool.jpg" }, - { CuiResId(BMP_SKY), "sky.jpg" }, - { CuiResId(BMP_CIRCUIT_BOARD), "circuit-board.jpg" }, - { CuiResId(BMP_COFFEE), "coffee.jpg" }, - { CuiResId(BMP_COLOR_STRIPES), "color-stripes.png" }, - { CuiResId(BMP_FLORAL), "floral.png" }, - { CuiResId(BMP_LEAF), "leaf.jpg" }, - { CuiResId(BMP_MAPLE_LEAVES), "maple-leaves.jpg" }, - { CuiResId(BMP_SPACE), "space.png" }, - { CuiResId(BMP_GIRAFFE), "giraffe.png" }, - { CuiResId(BMP_TIGER), "tiger.jpg" }, - { CuiResId(BMP_ZEBRA), "zebra.png" }, - }; - return aBitmapList; -} -} - static bool IsDarkModeEnabled() { return MiscSettings::GetAppColorMode() == AppearanceMode::DARK @@ -109,11 +48,6 @@ SvxAppearanceTabPage::SvxAppearanceTabPage(weld::Container* pPage, [this] { return GetFrameWeld(); }))) , m_xShowInDocumentChkBtn(m_xBuilder->weld_check_button(u"showindocumentchkbtn"_ustr)) , m_xResetAllBtn(m_xBuilder->weld_button(u"resetallbtn"_ustr)) - , m_xColorRadioBtn(m_xBuilder->weld_radio_button(u"colorradiobtn"_ustr)) - , m_xImageRadioBtn(m_xBuilder->weld_radio_button(u"imageradiobtn"_ustr)) - , m_xStretchedRadioBtn(m_xBuilder->weld_radio_button(u"stretchedradiobtn"_ustr)) - , m_xTiledRadioBtn(m_xBuilder->weld_radio_button(u"tiledradiobtn"_ustr)) - , m_xBitmapDropDownBtn(m_xBuilder->weld_combo_box(u"bitmapdropdown"_ustr)) { InitThemes(); InitCustomization(); @@ -249,33 +183,6 @@ IMPL_LINK_NOARG(SvxAppearanceTabPage, ColorEntryChgHdl, weld::ComboBox&, void) m_xShowInDocumentChkBtn->set_active(rCurrentEntryColor.bIsVisible); - // load image related settings if supported - if (cNames[nEntry].bCanHaveBitmap) - { - EnableImageControls(true); - m_xImageRadioBtn->set_active(rCurrentEntryColor.bUseBitmapBackground); - m_xStretchedRadioBtn->set_active(rCurrentEntryColor.bIsBitmapStretched); - - // bitmap file name to translated label - size_t i; - for (i = 0; i < getBitmapList().size(); ++i) - { - if (rCurrentEntryColor.sBitmapFileName == getBitmapList()[i].aBitmapFileName) - break; - } - - // if bitmap not in the list then reset to 0 - if (i == getBitmapList().size()) - i = 0; - - m_xBitmapDropDownBtn->set_active(i); - } - else - { - m_xColorRadioBtn->set_active(true); - EnableImageControls(false); - } - // show/hide show in document button if (!cNames[nEntry].bCanBeVisible) m_xShowInDocumentChkBtn->hide(); @@ -362,52 +269,6 @@ IMPL_STATIC_LINK_NOARG(SvxAppearanceTabPage, MoreThemesHdl, weld::Button&, void) comphelper::dispatchCommand(u".uno:AdditionsDialog"_ustr, aArgs); } -IMPL_LINK_NOARG(SvxAppearanceTabPage, ColorImageToggleHdl, weld::Toggleable&, void) -{ - // get the active entry - ColorConfigEntry nEntry = GetActiveEntry(); - if (nEntry == ColorConfigEntryCount) - return; - - ColorConfigValue aCurrentEntryColor = pColorConfig->GetColorValue(nEntry); - - aCurrentEntryColor.bUseBitmapBackground = !m_xColorRadioBtn->get_active(); - pColorConfig->SetColorValue(nEntry, aCurrentEntryColor); - m_bRestartRequired = true; -} - -IMPL_LINK_NOARG(SvxAppearanceTabPage, StretchedTiledToggleHdl, weld::Toggleable&, void) -{ - // get the active entry - ColorConfigEntry nEntry = GetActiveEntry(); - if (nEntry == ColorConfigEntryCount) - return; - - ColorConfigValue aCurrentEntryColor = pColorConfig->GetColorValue(nEntry); - - aCurrentEntryColor.bIsBitmapStretched = m_xStretchedRadioBtn->get_active(); - - pColorConfig->SetColorValue(nEntry, aCurrentEntryColor); - m_bRestartRequired = true; -} - -IMPL_LINK_NOARG(SvxAppearanceTabPage, BitmapChangeHdl, weld::ComboBox&, void) -{ - // get the active entry - ColorConfigEntry nEntry = GetActiveEntry(); - if (nEntry == ColorConfigEntryCount) - return; - - ColorConfigValue aCurrentEntryColor = pColorConfig->GetColorValue(nEntry); - - // save the bitmap file name - aCurrentEntryColor.sBitmapFileName - = getBitmapList()[m_xBitmapDropDownBtn->get_active()].aBitmapFileName; - - pColorConfig->SetColorValue(nEntry, aCurrentEntryColor); - m_bRestartRequired = true; -} - IMPL_LINK_NOARG(SvxAppearanceTabPage, ResetAllBtnHdl, weld::Button&, void) { // load default document colors @@ -452,13 +313,8 @@ void SvxAppearanceTabPage::InitCustomization() m_xColorEntryBtn->connect_changed(LINK(this, SvxAppearanceTabPage, ColorEntryChgHdl)); m_xColorChangeBtn->SetSelectHdl(LINK(this, SvxAppearanceTabPage, ColorValueChgHdl)); m_xShowInDocumentChkBtn->connect_toggled(LINK(this, SvxAppearanceTabPage, ShowInDocumentHdl)); - m_xBitmapDropDownBtn->connect_changed(LINK(this, SvxAppearanceTabPage, BitmapChangeHdl)); m_xResetAllBtn->connect_clicked(LINK(this, SvxAppearanceTabPage, ResetAllBtnHdl)); - m_xColorRadioBtn->connect_toggled(LINK(this, SvxAppearanceTabPage, ColorImageToggleHdl)); - m_xStretchedRadioBtn->connect_toggled( - LINK(this, SvxAppearanceTabPage, StretchedTiledToggleHdl)); - FillItemsList(); m_xColorChangeBtn->SetSlotId(SID_ATTR_CHAR_COLOR); @@ -467,23 +323,6 @@ void SvxAppearanceTabPage::InitCustomization() m_xShowInDocumentChkBtn->set_active(pColorConfig->GetColorValue(DOCCOLOR).bIsVisible); m_xShowInDocumentChkBtn->hide(); - - // load bitmap names - for (size_t i = 0; i < getBitmapList().size(); ++i) - m_xBitmapDropDownBtn->append_text(getBitmapList()[i].aTranslatedBitmapLabel); - m_xBitmapDropDownBtn->set_active(0); - - // DOCCOLOR uses color, so image controls are disabled - m_xColorRadioBtn->set_active(true); - EnableImageControls(false); -} - -void SvxAppearanceTabPage::EnableImageControls(bool bEnabled) -{ - m_xImageRadioBtn->set_sensitive(bEnabled); - m_xStretchedRadioBtn->set_sensitive(bEnabled); - m_xTiledRadioBtn->set_sensitive(bEnabled); - m_xBitmapDropDownBtn->set_sensitive(bEnabled); } void SvxAppearanceTabPage::UpdateColorDropdown() diff --git a/cui/source/options/appearance.hxx b/cui/source/options/appearance.hxx index 2646d568db52..55b806bddd12 100644 --- a/cui/source/options/appearance.hxx +++ b/cui/source/options/appearance.hxx @@ -45,13 +45,6 @@ private: std::unique_ptr<weld::CheckButton> m_xShowInDocumentChkBtn; std::unique_ptr<weld::Button> m_xResetAllBtn; - std::unique_ptr<weld::RadioButton> m_xColorRadioBtn; - std::unique_ptr<weld::RadioButton> m_xImageRadioBtn; - std::unique_ptr<weld::RadioButton> m_xStretchedRadioBtn; - std::unique_ptr<weld::RadioButton> m_xTiledRadioBtn; - - std::unique_ptr<weld::ComboBox> m_xBitmapDropDownBtn; - DECL_LINK(ColorEntryChgHdl, weld::ComboBox&, void); DECL_LINK(ColorValueChgHdl, ColorListBox&, void); DECL_LINK(ShowInDocumentHdl, weld::Toggleable&, void); @@ -60,16 +53,12 @@ private: DECL_LINK(SchemeChangeHdl, weld::ComboBox&, void); DECL_LINK(SchemeListToggleHdl, weld::ComboBox&, void); DECL_STATIC_LINK(SvxAppearanceTabPage, MoreThemesHdl, weld::Button&, void); - DECL_LINK(ColorImageToggleHdl, weld::Toggleable&, void); - DECL_LINK(StretchedTiledToggleHdl, weld::Toggleable&, void); - DECL_LINK(BitmapChangeHdl, weld::ComboBox&, void); DECL_LINK(ResetAllBtnHdl, weld::Button&, void); void InitThemes(); void InitCustomization(); void LoadSchemeList(); - void EnableImageControls(bool bEnabled); void UpdateColorDropdown(); void FillItemsList(); ColorConfigEntry GetActiveEntry(); diff --git a/cui/uiconfig/ui/appearance.ui b/cui/uiconfig/ui/appearance.ui index e37b9fa099b9..b19925efff6c 100644 --- a/cui/uiconfig/ui/appearance.ui +++ b/cui/uiconfig/ui/appearance.ui @@ -153,7 +153,6 @@ <property name="visible">True</property> <property name="can-focus">False</property> <property name="margin-start">12</property> - <property name="margin-start">12</property> <property name="margin-top">6</property> <property name="orientation">vertical</property> <property name="spacing">3</property> @@ -196,26 +195,6 @@ <property name="top-attach">0</property> </packing> </child> - <child> - <object class="GtkRadioButton" id="colorradiobtn"> - <property name="label" translatable="yes" context="appearancetabpage|colorradiobtn">Color:</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="halign">start</property> - <property name="draw-indicator">True</property> - <property name="group">imageradiobtn</property> - <child internal-child="accessible"> - <object class="AtkObject" id="colorradiobtn-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|colorradiobtn">Apply color to the item.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">1</property> - </packing> - </child> <child> <object class="GtkMenuButton" id="colorsdropdownbtn"> <property name="visible">True</property> @@ -256,107 +235,6 @@ <property name="top-attach">2</property> </packing> </child> - <child> - <object class="GtkRadioButton" id="imageradiobtn"> - <property name="label" translatable="yes" context="appearancetabpage|imageradiobtn">Image:</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="active">True</property> - <property name="draw-indicator">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="imageradiobtn-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|imageradiobtn">Apply an image to the item</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">3</property> - </packing> - </child> - <child> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="halign">start</property> - <property name="spacing">3</property> - <child> - <object class="GtkComboBoxText" id="bitmapdropdown"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="halign">start</property> - <child internal-child="accessible"> - <object class="AtkObject" id="bitmapdropdown-atkobject"> - <property name="AtkObject::accessible-name" translatable="yes" context="appearancetabpage|bitmapdropdown">bitmapdropdown</property> - <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|bitmapdropdown">Select the image for the item, if supported.</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="spacing">3</property> - <child> - <object class="GtkRadioButton" id="stretchedradiobtn"> - <property name="label" translatable="yes" context="appearancetabpage|stretchedradiobtn">Stretched</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="draw-indicator">True</property> - <property name="group">tiledradiobtn</property> - <child internal-child="accessible"> - <object class="AtkObject" id="stretchedradiobtn-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|stretchedradiobtn">Stretches the image to fill the area of the item.</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkRadioButton" id="tiledradiobtn"> - <property name="label" translatable="yes" context="appearancetabpage|tiledradiobtn">Tiled</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">False</property> - <property name="active">True</property> - <property name="draw-indicator">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="tiledradiobtn-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="appearance|extended_tip|tiledradiobtn">Tiles the image to fill the area of the item.</property> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="left-attach">1</property> - <property name="top-attach">3</property> - </packing> - </child> <child> <object class="GtkButton" id="resetallbtn"> <property name="label" translatable="yes" context="appearancetabpage|resetallbtn">Reset All</property> diff --git a/include/svtools/colorcfg.hxx b/include/svtools/colorcfg.hxx index 0dcfb7d2acf1..7f2b53c80878 100644 --- a/include/svtools/colorcfg.hxx +++ b/include/svtools/colorcfg.hxx @@ -139,103 +139,102 @@ namespace { { std::u16string_view cName; bool bCanBeVisible; - bool bCanHaveBitmap; }; const ColorConfigEntryData_Impl cNames[] = { - { std::u16string_view(u"DocColor"), false, false }, - { std::u16string_view(u"DocBoundaries"), false, false }, - { std::u16string_view(u"AppBackground"), false, true }, - { std::u16string_view(u"TableBoundaries"), false, false }, - { std::u16string_view(u"FontColor"), false, false }, - { std::u16string_view(u"Links"), true, false }, - { std::u16string_view(u"LinksVisited"), true, false }, - { std::u16string_view(u"Spell"), false, false }, - { std::u16string_view(u"Grammar"), false, false }, - { std::u16string_view(u"SmartTags"), false, false }, - { std::u16string_view(u"Shadow"), true, false }, - { std::u16string_view(u"WriterTextGrid"), false, false }, - { std::u16string_view(u"WriterFieldShadings"), true, false }, - { std::u16string_view(u"WriterIdxShadings"), true, false }, - { std::u16string_view(u"WriterDirectCursor"), true, false }, - { std::u16string_view(u"WriterScriptIndicator"), false, false }, - { std::u16string_view(u"WriterSectionBoundaries"), false, false }, - { std::u16string_view(u"WriterHeaderFooterMark"), false, false }, - { std::u16string_view(u"WriterPageBreaks"), false, false }, - { std::u16string_view(u"WriterNonPrintChars"), false, false }, - { std::u16string_view(u"HTMLSGML"), false, false }, - { std::u16string_view(u"HTMLComment"), false, false }, - { std::u16string_view(u"HTMLKeyword"), false, false }, - { std::u16string_view(u"HTMLUnknown"), false, false }, - { std::u16string_view(u"CalcGrid"), false, false }, - { std::u16string_view(u"CalcCellFocus"), false, false }, - { std::u16string_view(u"CalcPageBreak"), false, false }, - { std::u16string_view(u"CalcPageBreakManual"), false, false }, - { std::u16string_view(u"CalcPageBreakAutomatic"), false, false }, - { std::u16string_view(u"CalcHiddenColRow"), true, false }, - { std::u16string_view(u"CalcTextOverflow"), true, false }, - { std::u16string_view(u"CalcComments"), false, false }, - { std::u16string_view(u"CalcDetective"), false, false }, - { std::u16string_view(u"CalcDetectiveError"), false, false }, - { std::u16string_view(u"CalcReference"), false, false }, - { std::u16string_view(u"CalcNotesBackground"), false, false }, - { std::u16string_view(u"CalcValue"), false, false }, - { std::u16string_view(u"CalcFormula"), false, false }, - { std::u16string_view(u"CalcText"), false, false }, - { std::u16string_view(u"CalcProtectedBackground"), false, false }, - { std::u16string_view(u"DrawGrid"), true, false }, - { std::u16string_view(u"Author1"), false, false }, - { std::u16string_view(u"Author2"), false, false }, - { std::u16string_view(u"Author3"), false, false }, - { std::u16string_view(u"Author4"), false, false }, - { std::u16string_view(u"Author5"), false, false }, - { std::u16string_view(u"Author6"), false, false }, - { std::u16string_view(u"Author7"), false, false }, - { std::u16string_view(u"Author8"), false, false }, - { std::u16string_view(u"Author9"), false, false }, - { std::u16string_view(u"BASICEditor"), false, false }, - { std::u16string_view(u"BASICIdentifier"), false, false }, - { std::u16string_view(u"BASICComment"), false, false }, - { std::u16string_view(u"BASICNumber"), false, false }, - { std::u16string_view(u"BASICString"), false, false }, - { std::u16string_view(u"BASICOperator"), false, false }, - { std::u16string_view(u"BASICKeyword"), false, false }, - { std::u16string_view(u"BASICError"), false, false }, - { std::u16string_view(u"SQLIdentifier"), false, false }, - { std::u16string_view(u"SQLNumber"), false, false }, - { std::u16string_view(u"SQLString"), false, false }, - { std::u16string_view(u"SQLOperator"), false, false }, - { std::u16string_view(u"SQLKeyword"), false, false }, - { std::u16string_view(u"SQLParameter"), false, false }, - { std::u16string_view(u"SQLComment"), false, false }, + { std::u16string_view(u"DocColor"), false }, + { std::u16string_view(u"DocBoundaries"), false }, + { std::u16string_view(u"AppBackground"), false }, + { std::u16string_view(u"TableBoundaries"), false }, + { std::u16string_view(u"FontColor"), false }, + { std::u16string_view(u"Links"), true }, + { std::u16string_view(u"LinksVisited"), true }, + { std::u16string_view(u"Spell"), false }, + { std::u16string_view(u"Grammar"), false }, + { std::u16string_view(u"SmartTags"), false }, + { std::u16string_view(u"Shadow"), true }, + { std::u16string_view(u"WriterTextGrid"), false }, + { std::u16string_view(u"WriterFieldShadings"), true }, + { std::u16string_view(u"WriterIdxShadings"), true }, + { std::u16string_view(u"WriterDirectCursor"), true }, + { std::u16string_view(u"WriterScriptIndicator"), false }, + { std::u16string_view(u"WriterSectionBoundaries"), false }, + { std::u16string_view(u"WriterHeaderFooterMark"), false }, + { std::u16string_view(u"WriterPageBreaks"), false }, + { std::u16string_view(u"WriterNonPrintChars"), false }, + { std::u16string_view(u"HTMLSGML"), false }, + { std::u16string_view(u"HTMLComment"), false }, + { std::u16string_view(u"HTMLKeyword"), false }, + { std::u16string_view(u"HTMLUnknown"), false }, + { std::u16string_view(u"CalcGrid"), false }, + { std::u16string_view(u"CalcCellFocus"), false }, + { std::u16string_view(u"CalcPageBreak"), false }, + { std::u16string_view(u"CalcPageBreakManual"), false }, + { std::u16string_view(u"CalcPageBreakAutomatic"), false }, + { std::u16string_view(u"CalcHiddenColRow"), true }, + { std::u16string_view(u"CalcTextOverflow"), true }, + { std::u16string_view(u"CalcComments"), false }, + { std::u16string_view(u"CalcDetective"), false }, + { std::u16string_view(u"CalcDetectiveError"), false }, + { std::u16string_view(u"CalcReference"), false }, + { std::u16string_view(u"CalcNotesBackground"), false }, + { std::u16string_view(u"CalcValue"), false }, + { std::u16string_view(u"CalcFormula"), false }, + { std::u16string_view(u"CalcText"), false }, + { std::u16string_view(u"CalcProtectedBackground"), false }, + { std::u16string_view(u"DrawGrid"), true }, + { std::u16string_view(u"Author1"), false }, + { std::u16string_view(u"Author2"), false }, + { std::u16string_view(u"Author3"), false }, + { std::u16string_view(u"Author4"), false }, + { std::u16string_view(u"Author5"), false }, + { std::u16string_view(u"Author6"), false }, + { std::u16string_view(u"Author7"), false }, + { std::u16string_view(u"Author8"), false }, + { std::u16string_view(u"Author9"), false }, + { std::u16string_view(u"BASICEditor"), false }, + { std::u16string_view(u"BASICIdentifier"), false }, + { std::u16string_view(u"BASICComment"), false }, + { std::u16string_view(u"BASICNumber"), false }, + { std::u16string_view(u"BASICString"), false }, + { std::u16string_view(u"BASICOperator"), false }, + { std::u16string_view(u"BASICKeyword"), false }, + { std::u16string_view(u"BASICError"), false }, + { std::u16string_view(u"SQLIdentifier"), false }, + { std::u16string_view(u"SQLNumber"), false }, + { std::u16string_view(u"SQLString"), false }, + { std::u16string_view(u"SQLOperator"), false }, + { std::u16string_view(u"SQLKeyword"), false }, + { std::u16string_view(u"SQLParameter"), false }, + { std::u16string_view(u"SQLComment"), false }, - { std::u16string_view(u"WindowColor"), false, false }, - { std::u16string_view(u"WindowTextColor"), false, false }, - { std::u16string_view(u"BaseColor"), false, false }, - { std::u16string_view(u"ButtonColor"), false, false }, - { std::u16string_view(u"ButtonTextColor"), false, false }, - { std::u16string_view(u"AccentColor"), false, false }, - { std::u16string_view(u"DisabledColor"), false, false }, - { std::u16string_view(u"DisabledTextColor"), false, false }, - { std::u16string_view(u"ShadowColor"), false, false }, - { std::u16string_view(u"SeparatorColor"), false, false }, - { std::u16string_view(u"FaceColor"), false, false }, - { std::u16string_view(u"ActiveColor"), false, false }, - { std::u16string_view(u"ActiveTextColor"), false, false }, - { std::u16string_view(u"ActiveBorderColor"), false, false }, - { std::u16string_view(u"FieldColor"), false, false }, - { std::u16string_view(u"MenuBarColor"), false, false }, - { std::u16string_view(u"MenuBarTextColor"), false, false }, - { std::u16string_view(u"MenuBarHighlightColor"), false, false }, - { std::u16string_view(u"MenuBarHighlightTextColor"), false, false }, - { std::u16string_view(u"MenuColor"), false, false }, - { std::u16string_view(u"MenuTextColor"), false, false }, - { std::u16string_view(u"MenuHighlightColor"), false, false }, - { std::u16string_view(u"MenuHighlightTextColor"), false, false }, - { std::u16string_view(u"MenuBorderColor"), false, false }, - { std::u16string_view(u"InactiveColor"), false, false }, - { std::u16string_view(u"InactiveTextColor"), false, false }, - { std::u16string_view(u"InactiveBorderColor"), false, false } + { std::u16string_view(u"WindowColor"), false }, + { std::u16string_view(u"WindowTextColor"), false }, + { std::u16string_view(u"BaseColor"), false }, + { std::u16string_view(u"ButtonColor"), false }, + { std::u16string_view(u"ButtonTextColor"), false }, + { std::u16string_view(u"AccentColor"), false }, + { std::u16string_view(u"DisabledColor"), false }, + { std::u16string_view(u"DisabledTextColor"), false }, + { std::u16string_view(u"ShadowColor"), false }, + { std::u16string_view(u"SeparatorColor"), false }, + { std::u16string_view(u"FaceColor"), false }, + { std::u16string_view(u"ActiveColor"), false }, + { std::u16string_view(u"ActiveTextColor"), false }, + { std::u16string_view(u"ActiveBorderColor"), false }, + { std::u16string_view(u"FieldColor"), false }, + { std::u16string_view(u"MenuBarColor"), false }, + { std::u16string_view(u"MenuBarTextColor"), false }, + { std::u16string_view(u"MenuBarHighlightColor"), false }, + { std::u16string_view(u"MenuBarHighlightTextColor"), false }, + { std::u16string_view(u"MenuColor"), false }, + { std::u16string_view(u"MenuTextColor"), false }, + { std::u16string_view(u"MenuHighlightColor"), false }, + { std::u16string_view(u"MenuHighlightTextColor"), false }, + { std::u16string_view(u"MenuBorderColor"), false }, + { std::u16string_view(u"InactiveColor"), false }, + { std::u16string_view(u"InactiveTextColor"), false }, + { std::u16string_view(u"InactiveBorderColor"), false } }; } diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index 4d2b0d55cf17..b0ea6ab7e336 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -607,7 +607,6 @@ public: void SetPreferredIconTheme(const OUString&, bool bDarkIconTheme = false); const DialogStyle& GetDialogStyle() const; - const BitmapEx& GetAppBackgroundBitmap() const; // global switch to allow EdgeBlenging; currently possible for ValueSet and ListBox // when activated there using Get/SetEdgeBlending; default is true diff --git a/include/vcl/themecolors.hxx b/include/vcl/themecolors.hxx index 9e04f40a5f54..37e32bebbefe 100644 --- a/include/vcl/themecolors.hxx +++ b/include/vcl/themecolors.hxx @@ -116,13 +116,6 @@ public: void SetInactiveBorderColor(const Color& rColor) { m_aInactiveBorderColor = rColor; } void SetThemeName(const OUString& rName) { m_sThemeName = rName; } - void SetAppBackBitmapFileName(const OUString& rBitmapStr) - { - m_aAppBackBitmapFileName = rBitmapStr; - } - void SetAppBackBitmapStretched(bool bStretched) { m_bStretched = bStretched; } - void SetAppBackUseBitmap(bool bDrawBitmap) { m_bUseBitmapForAppBack = bDrawBitmap; } - const Color& GetWindowColor() const { return m_aWindowColor; } const Color& GetWindowTextColor() const { return m_aWindowTextColor; } const Color& GetBaseColor() const { return m_aBaseColor; } @@ -152,10 +145,6 @@ public: const Color& GetInactiveBorderColor() const { return m_aInactiveBorderColor; } const OUString& GetThemeName() const { return m_sThemeName; } - const OUString& GetAppBackBitmapFileName() const { return m_aAppBackBitmapFileName; } - bool IsAppBackBitmapStretched() { return m_bStretched; } - bool GetAppBackUseBitmap() { return m_bUseBitmapForAppBack; } - private: Color m_aWindowColor; Color m_aWindowTextColor; @@ -186,14 +175,6 @@ private: Color m_aInactiveBorderColor; OUString m_sThemeName; - - // using values for now as only one element is bitmap customizable. but as the number increases - // we might want to replace these colors with structs similar to `struct ColorConfigValue` - // The actual bitmap object is in StyleSettings because we cannot have non primitive objects in - // static singleton classes as the order of initialization would be undefined. - bool m_bStretched = false; - bool m_bUseBitmapForAppBack = false; - OUString m_aAppBackBitmapFileName = ""; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/officecfg/registry/data/org/openoffice/Office/UI.xcu b/officecfg/registry/data/org/openoffice/Office/UI.xcu index 27f4677db5d8..32cf6b4ccd7e 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI.xcu @@ -162,12 +162,6 @@ <prop oor:name="Dark"> <value xsi:nil="true"/> </prop> - <prop oor:name="BackgroundType"> - <value xsi:nil="true"/> - </prop> - <prop oor:name="Bitmap"> - <value xsi:nil="true"/> - </prop> </node> <node oor:name="TableBoundaries"> <prop oor:name="Light"> @@ -935,12 +929,6 @@ <prop oor:name="Dark"> <value xsi:nil="true"/> </prop> - <prop oor:name="BackgroundType"> - <value xsi:nil="true"/> - </prop> - <prop oor:name="Bitmap"> - <value xsi:nil="true"/> - </prop> </node> <node oor:name="TableBoundaries"> <prop oor:name="Light"> @@ -1708,12 +1696,6 @@ <prop oor:name="Dark"> <value xsi:nil="true"/> </prop> - <prop oor:name="BackgroundType"> - <value xsi:nil="true"/> - </prop> - <prop oor:name="Bitmap"> - <value xsi:nil="true"/> - </prop> </node> <node oor:name="TableBoundaries"> <prop oor:name="Light"> diff --git a/officecfg/registry/schema/org/openoffice/Office/UI.xcs b/officecfg/registry/schema/org/openoffice/Office/UI.xcs index 85c3999bb851..b81a3b17d782 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI.xcs @@ -90,22 +90,6 @@ <desc>Specifies dark color for the application background.</desc> </info> </prop> - <prop oor:name="BackgroundType" oor:type="xs:boolean"> - <info> - <desc> - Specifies whether to use color or bitmap for the background, - true for bitmap and false for color. - </desc> - </info> - </prop> - <prop oor:name="Bitmap" oor:type="xs:string"> - <info> - <desc> - Specifies bitmap and stretched/tiled for the bitmap - like "wood.jpg;stretched" or "wood.jpg;tiled" - </desc> - </info> - </prop> </group> <group oor:name="TableBoundaries"> <info> diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index 1e7dfd0ea082..60f99a894a36 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -49,7 +49,6 @@ using namespace utl; using namespace com::sun::star; const char g_sIsVisible[] = "/IsVisible"; -const char g_sBackgroundType[] = "/BackgroundType"; namespace svtools @@ -112,10 +111,6 @@ namespace { uno::Sequence< OUString> GetPropertyNames(std::u16string_view rScheme) { - // this assumes that all the entries will have at max 3 properties. this - // might not be the case as more and more UI elements support the bitmap - // background property. If that happens we might want to increase it to - // 5 * ColorConfigEntryCount; shouldn't be a problem now uno::Sequence<OUString> aNames(3 * ColorConfigEntryCount); OUString* pNames = aNames.getArray(); int nIndex = 0; @@ -130,12 +125,6 @@ uno::Sequence< OUString> GetPropertyNames(std::u16string_view rScheme) pNames[nIndex++] = sBaseName + "/Light"; pNames[nIndex++] = sBaseName + "/Dark"; - if (cNames[i].bCanHaveBitmap) - { - pNames[nIndex++] = sBaseName + "/BackgroundType"; - pNames[nIndex++] = sBaseName + "/Bitmap"; - } - if(cNames[i].bCanBeVisible) pNames[nIndex++] = sBaseName + g_sIsVisible; } @@ -226,34 +215,6 @@ void ColorConfig_Impl::Load(const OUString& rScheme) if(nIndex >= aColors.getLength()) break; - m_aConfigValues[i].bUseBitmapBackground = false; - - // for entries that support bitmap background customization - if (pColorNames[nIndex].endsWith(g_sBackgroundType)) - { - // use bitmap for background - bool bUseBitmapBackground = false; - pColors[nIndex++] >>= bUseBitmapBackground; - m_aConfigValues[i].bUseBitmapBackground = bUseBitmapBackground; - - OUString aBitmapStr = ""; - pColors[nIndex++] >>= aBitmapStr; - - // stretched or tiled - bool bIsBitmapStretched = aBitmapStr.endsWith("stretched"); - m_aConfigValues[i].bIsBitmapStretched = bIsBitmapStretched; - - // bitmap file name - int nNameEnding = aBitmapStr.indexOf(";"); - std::u16string_view aBitmapFileName; - if (aBitmapStr.isEmpty()) - aBitmapFileName = u""; - else - aBitmapFileName = aBitmapStr.subView(0, nNameEnding); - - m_aConfigValues[i].sBitmapFileName = aBitmapFileName; - } - // we check if the property ends with "/IsVisible" because not all entries are visible // see cNames[nIndex].bCanBeVisible if(pColorNames[nIndex].endsWith(g_sIsVisible)) @@ -342,21 +303,6 @@ void ColorConfig_Impl::ImplCommit() if(nIndex >= aColorNames.getLength()) break; - if (pColorNames[nIndex].endsWith(g_sBackgroundType)) - { - pPropValues[nIndex].Name = pColorNames[nIndex]; - pPropValues[nIndex].Value <<= m_aConfigValues[i].bUseBitmapBackground; - - ++nIndex; // Bitmap - OUString aBitmapStr = m_aConfigValues[i].sBitmapFileName + ";"; - aBitmapStr += m_aConfigValues[i].bIsBitmapStretched ? std::u16string_view(u"stretched") - : std::u16string_view(u"tiled"); - - pPropValues[nIndex].Name = pColorNames[nIndex]; - pPropValues[nIndex].Value <<= aBitmapStr; - ++nIndex; - } - // we check if the property ends with "/IsVisible" because not all entries are visible // see cNames[nIndex].bCanBeVisible if(pColorNames[nIndex].endsWith(g_sIsVisible)) @@ -468,16 +414,6 @@ void ColorConfig_Impl::LoadThemeColorsFromRegistry() rThemeColors.SetInactiveTextColor(GetColorValue(svtools::INACTIVETEXTCOLOR).nColor); rThemeColors.SetInactiveBorderColor(GetColorValue(svtools::INACTIVEBORDERCOLOR).nColor); rThemeColors.SetThemeName(GetCurrentSchemeName()); - - // as more controls support it, we might want to have ColorConfigValue entries in ThemeColors - // instead of just colors. for now that seems overkill for just one control. - rThemeColors.SetAppBackBitmapFileName( - GetColorConfigValue(svtools::APPBACKGROUND).sBitmapFileName); - rThemeColors.SetAppBackUseBitmap( - GetColorConfigValue(svtools::APPBACKGROUND).bUseBitmapBackground); - rThemeColors.SetAppBackBitmapStretched( - GetColorConfigValue(svtools::APPBACKGROUND).bIsBitmapStretched); - ThemeColors::SetThemeCached(true); } diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index dc2b09f4440a..7f9a9b04fafc 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -187,8 +187,6 @@ class SAL_DLLPUBLIC_RTTI SwViewShell : public sw::Ring<SwViewShell> // PaintDesktop split. This pars is also used by PreviewPage. void PaintDesktop_(const SwRegionRects &rRegion); - static bool DrawAppBackgroundBitmap(vcl::RenderContext* rRenderContext, const SwRect& rRect); - bool CheckInvalidForPaint( const SwRect & ); // Direct Paint or rather // trigger an action. diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index a388e12109d0..ba4ea438ff1f 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1784,28 +1784,10 @@ void SwViewShell::PaintDesktop(const vcl::RenderContext& rRenderContext, const S PaintDesktop_(aRegion); } -bool SwViewShell::DrawAppBackgroundBitmap(vcl::RenderContext* rRenderContext, const SwRect& rRect) -{ - if (Application::IsHeadlessModeEnabled() - || !ThemeColors::GetThemeColors().GetAppBackUseBitmap()) - return false; - - const BitmapEx& aAppBackImg - = Application::GetSettings().GetStyleSettings().GetAppBackgroundBitmap(); - if (aAppBackImg.IsEmpty()) - return false; - - Wallpaper aWallpaper(aAppBackImg); - aWallpaper.SetStyle(WallpaperStyle::Tile); - - rRenderContext->DrawWallpaper(rRect.SVRect(), aWallpaper); - return true; -} - // PaintDesktop is split in two, this part is also used by PreviewPage void SwViewShell::PaintDesktop_(const SwRegionRects &rRegion) { - if (DrawAppBackgroundBitmap(GetOut(), rRegion.GetOrigin())) + if (Application::IsHeadlessModeEnabled()) return; // OD 2004-04-23 #116347# diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index d5d846d0a250..fac81e31f699 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -250,9 +250,6 @@ struct ImplStyleData Size maListBoxPreviewDefaultLogicSize = getInitListBoxPreviewDefaultLogicSize(); // on-demand calculated in GetListBoxPreviewDefaultPixelSize() Size mutable maListBoxPreviewDefaultPixelSize; - BitmapEx mutable maAppBackgroundBitmap; // cache AppBackground bitmap - OUString mutable maAppBackgroundBitmapFileName; // cache AppBackground bitmap file name - bool operator==(const ImplStyleData& rSet) const; }; @@ -1953,49 +1950,6 @@ StyleSettings::GetDialogStyle() const return mxData->maDialogStyle; } -static BitmapEx readBitmapEx(const OUString& rPath) -{ - OUString aPath(rPath); - rtl::Bootstrap::expandMacros(aPath); - - // import the image - Graphic aGraphic; - if (GraphicFilter::LoadGraphic(aPath, OUString(), aGraphic) != ERRCODE_NONE) - return BitmapEx(); - return aGraphic.GetBitmapEx(); -} - -static void setupAppBackgroundBitmap(OUString& rAppBackBitmapFileName, BitmapEx& rAppBackBitmap) -{ - if (Application::IsHeadlessModeEnabled() - || !ThemeColors::GetThemeColors().GetAppBackUseBitmap()) - return; - - OUString sAppBackgroundBitmap = ThemeColors::GetThemeColors().GetAppBackBitmapFileName(); - if (rAppBackBitmapFileName == sAppBackgroundBitmap) - return; - - rAppBackBitmapFileName = sAppBackgroundBitmap; - - if (!rAppBackBitmapFileName.isEmpty()) - { - rAppBackBitmap = readBitmapEx("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/gallery/backgrounds/" - + rAppBackBitmapFileName); - } - - if (rAppBackBitmap.IsEmpty()) - { - SAL_WARN("vcl.app", "Failed to load AppBackground bitmap file: " << rAppBackBitmapFileName); - ThemeColors::GetThemeColors().SetAppBackUseBitmap(false); - } -} - -BitmapEx const& StyleSettings::GetAppBackgroundBitmap() const -{ - setupAppBackgroundBitmap(mxData->maAppBackgroundBitmapFileName, mxData->maAppBackgroundBitmap); - return mxData->maAppBackgroundBitmap; -} - void StyleSettings::SetEdgeBlending(sal_uInt16 nCount) { @@ -2236,9 +2190,7 @@ bool ImplStyleData::operator==(const ImplStyleData& rSet) const (mnListBoxMaximumLineCount == rSet.mnListBoxMaximumLineCount) && (mnColorValueSetColumnCount == rSet.mnColorValueSetColumnCount) && (maListBoxPreviewDefaultLogicSize == rSet.maListBoxPreviewDefaultLogicSize) && - (mbPreviewUsesCheckeredBackground == rSet.mbPreviewUsesCheckeredBackground) && - (maAppBackgroundBitmapFileName == rSet.maAppBackgroundBitmapFileName) && - (maAppBackgroundBitmap == rSet.maAppBackgroundBitmap); + (mbPreviewUsesCheckeredBackground == rSet.mbPreviewUsesCheckeredBackground); } ImplMiscData::ImplMiscData() :