diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/Library_sc.mk | 1 | ||||
-rw-r--r-- | sc/UIConfig_scalc.mk | 1 | ||||
-rw-r--r-- | sc/inc/inputopt.hxx | 3 | ||||
-rw-r--r-- | sc/inc/sc.hrc | 3 | ||||
-rw-r--r-- | sc/source/core/tool/inputopt.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 11 | ||||
-rw-r--r-- | sc/source/ui/inc/onlyactivesheetsaveddlg.hxx | 36 | ||||
-rw-r--r-- | sc/source/ui/inc/tabvwsh.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/tpview.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/onlyactivesheetsaveddlg.cxx | 49 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpview.cxx | 19 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshh.cxx | 7 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/onlyactivesheetsaveddialog.ui | 146 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/scgeneralpage.ui | 35 |
15 files changed, 324 insertions, 8 deletions
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index eaa79cf10903..09dc856b3eae 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -496,6 +496,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/ui/miscdlgs/datatableview \ sc/source/ui/miscdlgs/highred \ sc/source/ui/miscdlgs/mergecellsdialog \ + sc/source/ui/miscdlgs/onlyactivesheetsaveddlg \ sc/source/ui/miscdlgs/optsolver \ sc/source/ui/miscdlgs/protectiondlg \ sc/source/ui/miscdlgs/redcom \ diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index 12cc9825f0c5..a030ef783d73 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -186,6 +186,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/multipleoperationsdialog \ sc/uiconfig/scalc/ui/navigatorpanel \ sc/uiconfig/scalc/ui/nosolutiondialog \ + sc/uiconfig/scalc/ui/onlyactivesheetsaveddialog \ sc/uiconfig/scalc/ui/optcalculatepage \ sc/uiconfig/scalc/ui/optchangespage \ sc/uiconfig/scalc/ui/optcompatibilitypage \ diff --git a/sc/inc/inputopt.hxx b/sc/inc/inputopt.hxx index aa4b4078e5df..fb3b9feb7ba1 100644 --- a/sc/inc/inputopt.hxx +++ b/sc/inc/inputopt.hxx @@ -38,6 +38,7 @@ private: bool bReplCellsWarn; bool bLegacyCellSelection; bool bEnterPasteMode; + bool bWarnActiveSheet; public: ScInputOptions(); @@ -70,6 +71,8 @@ public: bool GetLegacyCellSelection() const { return bLegacyCellSelection; } void SetEnterPasteMode(bool bSet) { bEnterPasteMode = bSet; } bool GetEnterPasteMode() const { return bEnterPasteMode; } + void SetWarnActiveSheet(bool bSet) { bWarnActiveSheet = bSet; } + bool GetWarnActiveSheet() const { return bWarnActiveSheet; } }; // CfgItem for input options diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 57c80e62df2d..ba9054a5a1f8 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -110,6 +110,7 @@ class SvxZoomSliderItem; // misc: #define SID_LINKS (SC_VIEW_START + 60) +#define SID_SC_INPUT_WARNACTIVESHEET TypedWhichId<SfxBoolItem>(SC_VIEW_START + 61) #define SID_INSERT_SMATH (SC_VIEW_START + 63) // Put this here since all available slots for "SC_INPUT" are taken #define SID_SC_INPUT_ENTER_PASTE_MODE TypedWhichId<SfxBoolItem>(SC_VIEW_START + 64) @@ -167,7 +168,7 @@ class SvxZoomSliderItem; #define SID_SC_OPT_KEY_BINDING_COMPAT TypedWhichId<SfxUInt16Item>(SC_VIEW_START + 99) -// NOTE: last valid ID is (SC_VIEW_START + 99) +// NOTE: last valid ID is (SC_VIEW_START + 100) // messages diff --git a/sc/source/core/tool/inputopt.cxx b/sc/source/core/tool/inputopt.cxx index bdf49863919c..01a62bb7f3a2 100644 --- a/sc/source/core/tool/inputopt.cxx +++ b/sc/source/core/tool/inputopt.cxx @@ -44,6 +44,7 @@ ScInputOptions::ScInputOptions() , bReplCellsWarn(true) , bLegacyCellSelection(false) , bEnterPasteMode(false) + , bWarnActiveSheet(true) { } @@ -63,6 +64,7 @@ constexpr OUStringLiteral CFGPATH_INPUT = u"Office.Calc/Input"; #define SCINPUTOPT_REPLCELLSWARN 9 #define SCINPUTOPT_LEGACY_CELL_SELECTION 10 #define SCINPUTOPT_ENTER_PASTE_MODE 11 +#define SCINPUTOPT_WARNACTIVESHEET 12 Sequence<OUString> ScInputCfg::GetPropertyNames() { @@ -77,7 +79,8 @@ Sequence<OUString> ScInputCfg::GetPropertyNames() u"UseTabCol"_ustr, // SCINPUTOPT_USETABCOL u"ReplaceCellsWarning"_ustr, // SCINPUTOPT_REPLCELLSWARN u"LegacyCellSelection"_ustr, // SCINPUTOPT_LEGACY_CELL_SELECTION - u"EnterPasteMode"_ustr}; // SCINPUTOPT_ENTER_PASTE_MODE + u"EnterPasteMode"_ustr, // SCINPUTOPT_ENTER_PASTE_MODE + u"WarnActiveSheet"_ustr}; // SCINPUTOPT_WARNACTIVESHEET } ScInputCfg::ScInputCfg() : @@ -120,6 +123,8 @@ void ScInputCfg::ReadCfg() SetLegacyCellSelection(bVal); if (bool bVal; aValues[SCINPUTOPT_ENTER_PASTE_MODE] >>= bVal) SetEnterPasteMode(bVal); + if (bool bVal; aValues[SCINPUTOPT_WARNACTIVESHEET] >>= bVal) + SetWarnActiveSheet(bVal); } void ScInputCfg::ImplCommit() @@ -140,6 +145,7 @@ void ScInputCfg::ImplCommit() pValues[SCINPUTOPT_REPLCELLSWARN] <<= GetReplaceCellsWarn(); pValues[SCINPUTOPT_LEGACY_CELL_SELECTION] <<= GetLegacyCellSelection(); pValues[SCINPUTOPT_ENTER_PASTE_MODE] <<= GetEnterPasteMode(); + pValues[SCINPUTOPT_WARNACTIVESHEET] <<= GetWarnActiveSheet(); PutProperties(aNames, aValues); } diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 7a0db5dc45c7..94843dd1f3a0 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1265,6 +1265,12 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) bSaveInputOptions = true; } + if( const SfxBoolItem* pItem = rOptSet.GetItemIfSet( SID_SC_INPUT_WARNACTIVESHEET ) ) + { + aInputOptions.SetWarnActiveSheet( pItem->GetValue() ); + bSaveInputOptions = true; + } + // PrintOptions if ( const ScTpPrintItem* pItem = rOptSet.GetItemIfSet(SID_SCPRINTOPTIONS) ) { @@ -1980,7 +1986,7 @@ std::optional<SfxItemSet> ScModule::CreateItemSet( sal_uInt16 nId ) // TP_VIEW, TP_CALC: SID_SCVIEWOPTIONS, SID_SCDOCOPTIONS, // TP_INPUT: - SID_SC_INPUT_ENTER_PASTE_MODE, SID_SC_INPUT_ENTER_PASTE_MODE, + SID_SC_INPUT_WARNACTIVESHEET, SID_SC_INPUT_ENTER_PASTE_MODE, // TP_PRINT: SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS, // TP_INPUT: @@ -2045,6 +2051,8 @@ std::optional<SfxItemSet> ScModule::CreateItemSet( sal_uInt16 nId ) rInpOpt.GetLegacyCellSelection() ) ); pRet->Put( SfxBoolItem( SID_SC_INPUT_ENTER_PASTE_MODE, rInpOpt.GetEnterPasteMode() ) ); + pRet->Put( SfxBoolItem( SID_SC_INPUT_WARNACTIVESHEET, + rInpOpt.GetWarnActiveSheet() ) ); // RID_SC_TP_PRINT pRet->Put( ScTpPrintItem( GetPrintOptions() ) ); diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 5ece608a0766..d30a0d7d51d2 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -84,6 +84,7 @@ #include <svx/svdpage.hxx> #include <docmodel/theme/Theme.hxx> +#include <inputopt.hxx> #include <formulacell.hxx> #include <global.hxx> #include <filter.hxx> @@ -2636,8 +2637,11 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) bRet = true; if (m_pDocument->GetTableCount() > 1) - if (!rMed.GetErrorIgnoreWarning()) - rMed.SetError(SCWARN_EXPORT_ASCII); + if (!rMed.GetErrorIgnoreWarning() && SC_MOD()->GetInputOptions().GetWarnActiveSheet()) + { + ScTabViewShell* pViewShell = GetBestViewShell(); + pViewShell->ExecuteOnlyActiveSheetSavedDlg(); + } } } } @@ -2735,7 +2739,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) bRet = true; if (m_pDocument->GetTableCount() > 1) - if (!rMed.GetErrorIgnoreWarning()) + if (!rMed.GetErrorIgnoreWarning() && SC_MOD()->GetInputOptions().GetWarnActiveSheet()) rMed.SetError(SCWARN_EXPORT_ASCII); } } @@ -2785,6 +2789,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) if (GetErrorIgnoreWarning()) SetError(SCERR_IMPORT_NI); } + return bRet; } diff --git a/sc/source/ui/inc/onlyactivesheetsaveddlg.hxx b/sc/source/ui/inc/onlyactivesheetsaveddlg.hxx new file mode 100644 index 000000000000..7b4578343f12 --- /dev/null +++ b/sc/source/ui/inc/onlyactivesheetsaveddlg.hxx @@ -0,0 +1,36 @@ +/* -*- 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 . + */ +#pragma once + +#include <vcl/weld.hxx> + +class ScOnlyActiveSheetSavedDlg : public weld::GenericDialogController +{ +private: + std::unique_ptr<weld::CheckButton> m_xWarningOnBox; + +public: + ScOnlyActiveSheetSavedDlg(weld::Window* pParent); + /** Opens dialog if IsDialogEnabled() returns true. + @descr If after executing the dialog the checkbox "Do not show again" is set, + the method DisableDialog() will be called. */ + virtual short run() override; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index a3c0d728f90f..d0bc51455ae4 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -410,6 +410,7 @@ public: bool HasAccessibilityObjects() const; bool ExecuteRetypePassDlg(ScPasswordHash eDesiredHash); + void ExecuteOnlyActiveSheetSavedDlg(); void FinishProtectTable(); void ExecProtectTable( SfxRequest& rReq ); diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx index 7d5bf5d7a699..3ed12e498982 100644 --- a/sc/source/ui/inc/tpview.hxx +++ b/sc/source/ui/inc/tpview.hxx @@ -135,6 +135,8 @@ class ScTpLayoutOptions : public SfxTabPage std::unique_ptr<weld::Widget> m_xLegacyCellSelectionImg; std::unique_ptr<weld::CheckButton> m_xEnterPasteModeCB; std::unique_ptr<weld::Widget> m_xEnterPasteModeImg; + std::unique_ptr<weld::CheckButton> m_xWarnActiveSheetCB; + std::unique_ptr<weld::Widget> m_xWarnActiveSheetImg; DECL_LINK(MetricHdl, weld::ComboBox&, void ); DECL_LINK( AlignHdl, weld::Toggleable&, void ); diff --git a/sc/source/ui/miscdlgs/onlyactivesheetsaveddlg.cxx b/sc/source/ui/miscdlgs/onlyactivesheetsaveddlg.cxx new file mode 100644 index 000000000000..6941616309ce --- /dev/null +++ b/sc/source/ui/miscdlgs/onlyactivesheetsaveddlg.cxx @@ -0,0 +1,49 @@ +/* -*- 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 <onlyactivesheetsaveddlg.hxx> +#include <scmod.hxx> +#include <inputopt.hxx> + +ScOnlyActiveSheetSavedDlg::ScOnlyActiveSheetSavedDlg(weld::Window* pParent) + : GenericDialogController(pParent, u"modules/scalc/ui/onlyactivesheetsaveddialog.ui"_ustr, + u"OnlyActiveSheetSavedDialog"_ustr) + , m_xWarningOnBox(m_xBuilder->weld_check_button("cbShow")) +{ + m_xDialog->set_default_response(RET_YES); +} + +short ScOnlyActiveSheetSavedDlg::run() +{ + short nRet = RET_YES; + ScModule* pScMod = SC_MOD(); + assert(pScMod); + if (pScMod->GetInputOptions().GetWarnActiveSheet()) + { + m_xDialog->run(); + if (!m_xWarningOnBox->get_active()) + { + ScInputOptions aInputOpt(pScMod->GetInputOptions()); + aInputOpt.SetWarnActiveSheet(false); + pScMod->SetInputOptions(aInputOpt); + } + } + return nRet; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index c7722e931cde..db7a921811e2 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -484,6 +484,8 @@ ScTpLayoutOptions::ScTpLayoutOptions(weld::Container* pPage, weld::DialogControl , m_xLegacyCellSelectionImg(m_xBuilder->weld_widget(u"locklegacy_cell"_ustr)) , m_xEnterPasteModeCB(m_xBuilder->weld_check_button(u"enter_paste_mode_cb"_ustr)) , m_xEnterPasteModeImg(m_xBuilder->weld_widget(u"lockenter_paste"_ustr)) + , m_xWarnActiveSheetCB(m_xBuilder->weld_check_button(u"warnactivesheet_cb"_ustr)) + , m_xWarnActiveSheetImg(m_xBuilder->weld_widget(u"lockwarnactivesheet"_ustr)) { SetExchangeSupport(); @@ -543,7 +545,8 @@ OUString ScTpLayoutOptions::GetAllStrings() OUString checkButton[] = { u"aligncb"_ustr, u"editmodecb"_ustr, u"enter_paste_mode_cb"_ustr, u"formatcb"_ustr, u"exprefcb"_ustr, u"sortrefupdatecb"_ustr, - u"markhdrcb"_ustr, u"replwarncb"_ustr, u"legacy_cell_selection_cb"_ustr }; + u"markhdrcb"_ustr, u"replwarncb"_ustr, u"legacy_cell_selection_cb"_ustr, + u"warnactivesheet_cb"_ustr }; for (const auto& check : checkButton) { @@ -661,6 +664,12 @@ bool ScTpLayoutOptions::FillItemSet( SfxItemSet* rCoreSet ) bRet = true; } + if (m_xWarnActiveSheetCB->get_state_changed_from_saved()) + { + rCoreSet->Put( SfxBoolItem( SID_SC_INPUT_WARNACTIVESHEET, m_xWarnActiveSheetCB->get_active() ) ); + bRet = true; + } + return bRet; } @@ -813,6 +822,13 @@ void ScTpLayoutOptions::Reset( const SfxItemSet* rCoreSet ) m_xEnterPasteModeCB->set_sensitive(!bReadOnly); m_xEnterPasteModeImg->set_visible(bReadOnly); + if( const SfxBoolItem* pWarnActiveSheetItem = rCoreSet->GetItemIfSet( SID_SC_INPUT_WARNACTIVESHEET, false ) ) + m_xWarnActiveSheetCB->set_active( pWarnActiveSheetItem->GetValue() ); + + bReadOnly = officecfg::Office::Calc::Input::WarnActiveSheet::isReadOnly(); + m_xWarnActiveSheetCB->set_sensitive(!bReadOnly); + m_xWarnActiveSheetImg->set_visible(bReadOnly); + m_xAlignCB->save_state(); m_xAlignLB->save_value(); m_xEditModeCB->save_state(); @@ -825,6 +841,7 @@ void ScTpLayoutOptions::Reset( const SfxItemSet* rCoreSet ) m_xLegacyCellSelectionCB->save_state(); m_xEnterPasteModeCB->save_state(); + m_xWarnActiveSheetCB->save_state(); AlignHdl(*m_xAlignCB); diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx index cb835e62e317..d82be8b084bc 100644 --- a/sc/source/ui/view/tabvwshh.cxx +++ b/sc/source/ui/view/tabvwshh.cxx @@ -37,6 +37,7 @@ #include <drwlayer.hxx> #include <retypepassdlg.hxx> #include <tabprotection.hxx> +#include <onlyactivesheetsaveddlg.hxx> #include <com/sun/star/embed/EmbedVerbs.hpp> @@ -260,4 +261,10 @@ bool ScTabViewShell::ExecuteRetypePassDlg(ScPasswordHash eDesiredHash) return true; } +void ScTabViewShell::ExecuteOnlyActiveSheetSavedDlg() +{ + ScOnlyActiveSheetSavedDlg aDlg(GetFrameWeld()); + aDlg.run(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/uiconfig/scalc/ui/onlyactivesheetsaveddialog.ui b/sc/uiconfig/scalc/ui/onlyactivesheetsaveddialog.ui new file mode 100644 index 000000000000..16b0c9d4e172 --- /dev/null +++ b/sc/uiconfig/scalc/ui/onlyactivesheetsaveddialog.ui @@ -0,0 +1,146 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.40.0 --> +<interface domain="sc"> + <requires lib="gtk+" version="3.20"/> + <object class="GtkDialog" id="OnlyActiveSheetSavedDialog"> + <property name="can-focus">False</property> + <property name="border-width">12</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type-hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox"> + <property name="can-focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox"> + <property name="can-focus">False</property> + <property name="hexpand">True</property> + <property name="layout-style">end</property> + <child> + <object class="GtkCheckButton" id="cbShow"> + <property name="label" translatable="yes" context="onlyactivesheetsaveddialog|checkbox">_Show this message again</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> + <property name="active">True</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + <property name="secondary">True</property> + </packing> + </child> + <child> + <object class="GtkButton" id="btnOk"> + <property name="label" translatable="yes" context="onlyactivesheetsaveddialog|button">_OK</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="has-focus">True</property> + <property name="receives-default">True</property> + <property name="use-underline">True</property> + </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">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <!-- n-columns=2 n-rows=3 --> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <child> + <object class="GtkLabel" id="lbTitle"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="margin-top">12</property> + <property name="label" translatable="yes" context="onlyactivesheetsaveddialog|title">Warning</property> + <attributes> + <attribute name="weight" value="bold"/> + <attribute name="scale" value="1.5"/> + </attributes> + <child internal-child="accessible"> + <object class="AtkObject" id="lbTitle-atkobject"> + <property name="AtkObject::accessible-role">static</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="can-focus">False</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="lbText"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="vexpand">True</property> + <property name="label" translatable="yes" context="onlyactivesheetsaveddialog|text">Only the active sheet was saved.</property> + <child internal-child="accessible"> + <object class="AtkObject" id="lbText-atkobject"> + <property name="AtkObject::accessible-role">static</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkImage" id="imWarning"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="margin-end">12</property> + <property name="icon-name">help/warning_large.png</property> + <child internal-child="accessible"> + <object class="AtkObject" id="imWarning-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="onlyactivesheetsaveddialog|image">Warning image</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + <property name="height">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="-5">btnOk</action-widget> + </action-widgets> + </object> +</interface> diff --git a/sc/uiconfig/scalc/ui/scgeneralpage.ui b/sc/uiconfig/scalc/ui/scgeneralpage.ui index 202fbb85db2d..c6ad9577b457 100644 --- a/sc/uiconfig/scalc/ui/scgeneralpage.ui +++ b/sc/uiconfig/scalc/ui/scgeneralpage.ui @@ -262,7 +262,7 @@ <property name="hexpand">True</property> <property name="vexpand">True</property> <child> - <!-- n-columns=3 n-rows=9 --> + <!-- n-columns=3 n-rows=10 --> <object class="GtkGrid" id="grid3"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -574,6 +574,39 @@ <property name="top-attach">8</property> </packing> </child> + <child> + <object class="GtkImage" id="lockwarnactivesheet"> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="halign">center</property> + <property name="valign">center</property> + <property name="icon-name">res/lock.png</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">9</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="warnactivesheet_cb"> + <property name="label" translatable="yes" context="scgeneralpage|warnactivesheet_cb">Warn when saving only the active sheet</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="warnactivesheet_cb-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|legacy_cell_selection_cb">Specifies whether a warning box informs when saving was applied to only the active sheet.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">9</property> + <property name="width">2</property> + </packing> + </child> </object> </child> </object> |