diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2024-05-07 08:56:07 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2024-05-07 15:48:04 +0200 |
commit | a5d0114bbb40f5bffcb19d6e6b3a5bf43aab1446 (patch) | |
tree | b1985f43b332774b826ecbf0d65a1f3ca03de790 | |
parent | 606623d0fc5321754d9a054881ae9cac94cd9f04 (diff) |
Resolves tdf#156885 - Make comment authorship optional
Change-Id: I3422c9e5606fa9eb9aa450f518af8426e598ab8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167260
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 10 | ||||
-rw-r--r-- | sc/inc/ViewSettingsSequenceDefines.hxx | 35 | ||||
-rw-r--r-- | sc/inc/unonames.hxx | 1 | ||||
-rw-r--r-- | sc/inc/viewopti.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/postit.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/viewopti.cxx | 21 | ||||
-rw-r--r-- | sc/source/ui/inc/tpview.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpview.cxx | 11 | ||||
-rw-r--r-- | sc/source/ui/unoobj/confuno.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/unoobj/viewuno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 4 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/tpviewpage.ui | 52 |
12 files changed, 112 insertions, 38 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index fb6edf076f17..7303d1bacd00 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -106,13 +106,21 @@ <value>true</value> </prop> <prop oor:name="NoteIndicator" oor:type="xs:int" oor:nillable="false"> - <!-- no UI --> + <!-- UIHints: Tools - Options -Spreadsheets - Contents - [Section] Display --> <info> <desc>If less than 1, the size of comment indicator is calculated dynamically; otherwise this value will be used.</desc> <label>Comment indicator size</label> </info> <value>0</value> </prop> + <prop oor:name="NoteAuthor" oor:type="xs:boolean" oor:nillable="false"> + <!-- UIHints: Tools - Options -Spreadsheets - Contents - [Section] Display --> + <info> + <desc>Indicates whether authorship metadata for comments on hover are shown.</desc> + <label>Comment authorship</label> + </info> + <value>true</value> + </prop> <prop oor:name="FormulaMark" oor:type="xs:boolean" oor:nillable="false"> <!-- UIHints: Tools - Options -Spreadsheets - Contents - [Section] Display --> <info> diff --git a/sc/inc/ViewSettingsSequenceDefines.hxx b/sc/inc/ViewSettingsSequenceDefines.hxx index 0c04aa594e68..1cb2b59eb9fc 100644 --- a/sc/inc/ViewSettingsSequenceDefines.hxx +++ b/sc/inc/ViewSettingsSequenceDefines.hxx @@ -24,7 +24,7 @@ // this are the defines for the position of the settings in the // ViewSettingsSequence -#define SC_VIEWSETTINGS_COUNT 26 +#define SC_VIEWSETTINGS_COUNT 27 #define SC_VIEW_ID 0 #define SC_TABLE_VIEWSETTINGS 1 @@ -36,22 +36,23 @@ #define SC_PAGE_BREAK_PREVIEW 7 #define SC_SHOWZERO 8 #define SC_SHOWNOTES 9 -#define SC_SHOWFORMULASMARKS 10 -#define SC_SHOWGRID 11 -#define SC_GRIDCOLOR 12 -#define SC_SHOWPAGEBR 13 -#define SC_COLROWHDR 14 -#define SC_SHEETTABS 15 -#define SC_OUTLSYMB 16 -#define SC_VALUE_HIGHLIGHTING 17 -#define SC_SNAPTORASTER 18 -#define SC_RASTERVIS 19 -#define SC_RASTERRESX 20 -#define SC_RASTERRESY 21 -#define SC_RASTERSUBX 22 -#define SC_RASTERSUBY 23 -#define SC_RASTERSYNC 24 -#define SC_FORMULA_BAR_HEIGHT 25 +#define SC_SHOWNOTEAUTHOR 10 +#define SC_SHOWFORMULASMARKS 11 +#define SC_SHOWGRID 12 +#define SC_GRIDCOLOR 13 +#define SC_SHOWPAGEBR 14 +#define SC_COLROWHDR 15 +#define SC_SHEETTABS 16 +#define SC_OUTLSYMB 17 +#define SC_VALUE_HIGHLIGHTING 18 +#define SC_SNAPTORASTER 19 +#define SC_RASTERVIS 20 +#define SC_RASTERRESX 21 +#define SC_RASTERRESY 22 +#define SC_RASTERSUBX 23 +#define SC_RASTERSUBY 24 +#define SC_RASTERSYNC 25 +#define SC_FORMULA_BAR_HEIGHT 26 // this are the defines for the position of the settings in the // TableViewSettingsSequence diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx index 07c9c39ace30..13bb2600f471 100644 --- a/sc/inc/unonames.hxx +++ b/sc/inc/unonames.hxx @@ -561,6 +561,7 @@ inline constexpr OUString SC_UNO_SHOWFORM = u"ShowFormulas"_ustr; inline constexpr OUString SC_UNO_SHOWGRID = u"ShowGrid"_ustr; inline constexpr OUString SC_UNO_SHOWHELP = u"ShowHelpLines"_ustr; inline constexpr OUString SC_UNO_SHOWNOTES = u"ShowNotes"_ustr; +inline constexpr OUString SC_UNO_SHOWNOTEAUTHOR = u"ShowNoteAuthor"_ustr; inline constexpr OUString SC_UNO_SHOWFORMULASMARKS = u"ShowFormulasMarks"_ustr; inline constexpr OUString SC_UNO_SHOWOBJ = u"ShowObjects"_ustr; inline constexpr OUString SC_UNO_SHOWPAGEBR = u"ShowPageBreaks"_ustr; diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx index 25f7db7d8527..5850df5ed375 100644 --- a/sc/inc/viewopti.hxx +++ b/sc/inc/viewopti.hxx @@ -33,6 +33,7 @@ enum ScViewOption VOPT_NULLVALS, VOPT_SYNTAX, VOPT_NOTES, + VOPT_NOTEAUTHOR, VOPT_FORMULAS_MARKS, VOPT_VSCROLL, VOPT_HSCROLL, diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index 0118665d91b7..f31dc889e98b 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -45,6 +45,7 @@ #include <scresid.hxx> #include <utility> #include <strings.hrc> +#include <officecfg/Office/Calc.hxx> #include <com/sun/star/text/XText.hpp> #include <com/sun/star/text/XTextAppend.hpp> @@ -865,7 +866,8 @@ rtl::Reference<SdrCaptionObj> ScNoteUtil::CreateTempCaption( if( OutlinerParaObject* pOPO = pNoteCaption->GetOutlinerParaObject() ) pCaption->SetOutlinerParaObject( *pOPO ); // Setting and formatting rUserText: Author name and date time - lcl_FormatAndInsertAuthorAndDatepara(pCaption.get(), aBuffer, bUserWithTrackText); + if (officecfg::Office::Calc::Content::Display::NoteAuthor::get()) + lcl_FormatAndInsertAuthorAndDatepara(pCaption.get(), aBuffer, bUserWithTrackText); // set formatting (must be done after setting text) and resize the box to fit the text if (auto pStyleSheet = pNoteCaption->GetStyleSheet()) pCaption->SetStyleSheet(pStyleSheet, true); diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx index 0a505408e6bf..da05bcd71d6b 100644 --- a/sc/source/core/tool/viewopti.cxx +++ b/sc/source/core/tool/viewopti.cxx @@ -101,6 +101,7 @@ void ScViewOptions::SetDefaults() aOptArr[ VOPT_HELPLINES ] = false; aOptArr[ VOPT_GRID_ONTOP ] = false; aOptArr[ VOPT_NOTES ] = true; + aOptArr[ VOPT_NOTEAUTHOR ] = true; aOptArr[ VOPT_FORMULAS_MARKS ] = false; aOptArr[ VOPT_NULLVALS ] = true; aOptArr[ VOPT_VSCROLL ] = true; @@ -213,12 +214,13 @@ constexpr OUStringLiteral CFGPATH_DISPLAY = u"Office.Calc/Content/Display"; #define SCDISPLAYOPT_FORMULA 0 #define SCDISPLAYOPT_ZEROVALUE 1 #define SCDISPLAYOPT_NOTETAG 2 -#define SCDISPLAYOPT_FORMULAMARK 3 -#define SCDISPLAYOPT_VALUEHI 4 -#define SCDISPLAYOPT_ANCHOR 5 -#define SCDISPLAYOPT_OBJECTGRA 6 -#define SCDISPLAYOPT_CHART 7 -#define SCDISPLAYOPT_DRAWING 8 +#define SCDISPLAYOPT_NOTEAUTHOR 3 +#define SCDISPLAYOPT_FORMULAMARK 4 +#define SCDISPLAYOPT_VALUEHI 5 +#define SCDISPLAYOPT_ANCHOR 6 +#define SCDISPLAYOPT_OBJECTGRA 7 +#define SCDISPLAYOPT_CHART 8 +#define SCDISPLAYOPT_DRAWING 9 constexpr OUStringLiteral CFGPATH_GRID = u"Office.Calc/Grid"; @@ -252,6 +254,7 @@ Sequence<OUString> ScViewCfg::GetDisplayPropertyNames() return {"Formula", // SCDISPLAYOPT_FORMULA "ZeroValue", // SCDISPLAYOPT_ZEROVALUE "NoteTag", // SCDISPLAYOPT_NOTETAG + "NoteAuthor", // SCDISPLAYOPT_NOTEAUTHOR "FormulaMark", // SCDISPLAYOPT_FORMULAMARK "ValueHighlighting", // SCDISPLAYOPT_VALUEHI "Anchor", // SCDISPLAYOPT_ANCHOR @@ -366,6 +369,9 @@ ScViewCfg::ScViewCfg() : case SCDISPLAYOPT_NOTETAG: SetOption( VOPT_NOTES, ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) ); break; + case SCDISPLAYOPT_NOTEAUTHOR: + SetOption( VOPT_NOTEAUTHOR, ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) ); + break; case SCDISPLAYOPT_FORMULAMARK: SetOption( VOPT_FORMULAS_MARKS, ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) ); break; @@ -525,6 +531,9 @@ IMPL_LINK_NOARG(ScViewCfg, DisplayCommitHdl, ScLinkConfigItem&, void) case SCDISPLAYOPT_NOTETAG: pValues[nProp] <<= GetOption( VOPT_NOTES ); break; + case SCDISPLAYOPT_NOTEAUTHOR: + pValues[nProp] <<= GetOption( VOPT_NOTEAUTHOR ); + break; case SCDISPLAYOPT_FORMULAMARK: pValues[nProp] <<= GetOption( VOPT_FORMULAS_MARKS ); break; diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx index ace65836d800..7d5bf5d7a699 100644 --- a/sc/source/ui/inc/tpview.hxx +++ b/sc/source/ui/inc/tpview.hxx @@ -41,6 +41,8 @@ class ScTpContentOptions : public SfxTabPage std::unique_ptr<weld::Widget> m_xNilImg; std::unique_ptr<weld::CheckButton> m_xAnnotCB; std::unique_ptr<weld::Widget> m_xAnnotImg; + std::unique_ptr<weld::CheckButton> m_xNoteAuthorCB; + std::unique_ptr<weld::Widget> m_xNoteAuthorImg; std::unique_ptr<weld::CheckButton> m_xFormulaMarkCB; std::unique_ptr<weld::Widget> m_xFormulaMarkImg; std::unique_ptr<weld::CheckButton> m_xValueCB; diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index d4d9f6731add..bb479173d8a7 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -48,6 +48,8 @@ ScTpContentOptions::ScTpContentOptions(weld::Container* pPage, weld::DialogContr , m_xNilImg(m_xBuilder->weld_widget("locknil")) , m_xAnnotCB(m_xBuilder->weld_check_button("annot")) , m_xAnnotImg(m_xBuilder->weld_widget("lockannot")) + , m_xNoteAuthorCB(m_xBuilder->weld_check_button("cbNoteAuthor")) + , m_xNoteAuthorImg(m_xBuilder->weld_widget("imNoteAuthor")) , m_xFormulaMarkCB(m_xBuilder->weld_check_button("formulamark")) , m_xFormulaMarkImg(m_xBuilder->weld_widget("lockformulamark")) , m_xValueCB(m_xBuilder->weld_check_button("value")) @@ -96,6 +98,7 @@ ScTpContentOptions::ScTpContentOptions(weld::Container* pPage, weld::DialogContr m_xNilCB->connect_toggled(aCBHdl); m_xAnnotCB->connect_toggled(aCBHdl); m_xAnnotCB->set_accessible_description(ScResId(STR_A11Y_DESC_ANNOT)); + m_xNoteAuthorCB->connect_toggled(aCBHdl); m_xFormulaMarkCB->connect_toggled(aCBHdl); m_xValueCB->connect_toggled(aCBHdl); m_xColRowHighCB->connect_toggled(aCBHdl); @@ -155,6 +158,7 @@ bool ScTpContentOptions::FillItemSet( SfxItemSet* rCoreSet ) if( m_xFormulaCB->get_state_changed_from_saved() || m_xNilCB->get_state_changed_from_saved() || m_xAnnotCB->get_state_changed_from_saved() || + m_xNoteAuthorCB->get_state_changed_from_saved() || m_xFormulaMarkCB->get_state_changed_from_saved() || m_xValueCB->get_state_changed_from_saved() || m_xAnchorCB->get_state_changed_from_saved() || @@ -212,6 +216,7 @@ void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet ) m_xFormulaCB ->set_active(m_xLocalOptions->GetOption(VOPT_FORMULAS)); m_xNilCB ->set_active(m_xLocalOptions->GetOption(VOPT_NULLVALS)); m_xAnnotCB ->set_active(m_xLocalOptions->GetOption(VOPT_NOTES)); + m_xNoteAuthorCB->set_active(m_xLocalOptions->GetOption(VOPT_NOTEAUTHOR)); m_xFormulaMarkCB->set_active(m_xLocalOptions->GetOption(VOPT_FORMULAS_MARKS)); m_xValueCB ->set_active(m_xLocalOptions->GetOption(VOPT_SYNTAX)); m_xColRowHighCB->set_active(officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::get()); @@ -268,6 +273,10 @@ void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet ) m_xAnnotCB->set_sensitive(!bReadOnly); m_xAnnotImg->set_visible(bReadOnly); + bReadOnly = officecfg::Office::Calc::Content::Display::NoteAuthor::isReadOnly(); + m_xNoteAuthorCB->set_sensitive(!bReadOnly); + m_xNoteAuthorImg->set_visible(bReadOnly); + bReadOnly = officecfg::Office::Calc::Content::Display::FormulaMark::isReadOnly(); m_xFormulaMarkCB->set_sensitive(!bReadOnly); m_xFormulaMarkImg->set_visible(bReadOnly); @@ -343,6 +352,7 @@ void ScTpContentOptions::Reset( const SfxItemSet* rCoreSet ) m_xFormulaCB->save_state(); m_xNilCB->save_state(); m_xAnnotCB->save_state(); + m_xNoteAuthorCB->save_state(); m_xFormulaMarkCB->save_state(); m_xValueCB->save_state(); m_xColRowHighCB->save_state(); @@ -398,6 +408,7 @@ IMPL_LINK( ScTpContentOptions, CBHdl, weld::Toggleable&, rBtn, void ) if (m_xFormulaCB.get() == &rBtn ) eOption = VOPT_FORMULAS; else if ( m_xNilCB.get() == &rBtn ) eOption = VOPT_NULLVALS; else if ( m_xAnnotCB.get() == &rBtn ) eOption = VOPT_NOTES; + else if ( m_xNoteAuthorCB.get() == &rBtn ) eOption = VOPT_NOTEAUTHOR; else if ( m_xFormulaMarkCB.get() == &rBtn ) eOption = VOPT_FORMULAS_MARKS; else if ( m_xValueCB.get() == &rBtn ) eOption = VOPT_SYNTAX; else if ( m_xAnchorCB.get() == &rBtn ) eOption = VOPT_ANCHOR; diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index 4c69e656455d..a5475dba2c2c 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -53,6 +53,7 @@ static std::span<const SfxItemPropertyMapEntry> lcl_GetConfigPropertyMap() { { SC_UNO_SHOWZERO, 0, cppu::UnoType<bool>::get(), 0, 0}, { SC_UNO_SHOWNOTES, 0, cppu::UnoType<bool>::get(), 0, 0}, + { SC_UNO_SHOWNOTEAUTHOR, 0, cppu::UnoType<bool>::get(), 0, 0}, { SC_UNO_SHOWFORMULASMARKS, 0, cppu::UnoType<bool>::get(), 0, 0}, { SC_UNO_SHOWGRID, 0, cppu::UnoType<bool>::get(), 0, 0}, { SC_UNO_GRIDCOLOR, 0, cppu::UnoType<sal_Int32>::get(), 0, 0}, @@ -153,6 +154,8 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( aViewOpt.SetOption(VOPT_NULLVALS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); else if ( aPropertyName == SC_UNO_SHOWNOTES ) aViewOpt.SetOption(VOPT_NOTES, ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); + else if ( aPropertyName == SC_UNO_SHOWNOTEAUTHOR ) + aViewOpt.SetOption(VOPT_NOTEAUTHOR, ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); else if ( aPropertyName == SC_UNO_SHOWFORMULASMARKS ) aViewOpt.SetOption(VOPT_FORMULAS_MARKS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); else if ( aPropertyName == SC_UNO_SHOWGRID ) @@ -461,6 +464,8 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr aRet <<= aViewOpt.GetOption( VOPT_NULLVALS ); else if ( aPropertyName == SC_UNO_SHOWNOTES ) aRet <<= aViewOpt.GetOption( VOPT_NOTES ); + else if ( aPropertyName == SC_UNO_SHOWNOTEAUTHOR ) + aRet <<= aViewOpt.GetOption( VOPT_NOTEAUTHOR ); else if ( aPropertyName == SC_UNO_SHOWFORMULASMARKS ) aRet <<= aViewOpt.GetOption( VOPT_FORMULAS_MARKS ); else if ( aPropertyName == SC_UNO_SHOWGRID ) diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index 51a931650686..a445f3d797c0 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -104,6 +104,7 @@ static std::span<const SfxItemPropertyMapEntry> lcl_GetViewOptPropertyMap() { SC_UNO_SHOWGRID, 0, cppu::UnoType<bool>::get(), 0, 0}, { SC_UNO_SHOWHELP, 0, cppu::UnoType<bool>::get(), 0, 0}, { SC_UNO_SHOWNOTES, 0, cppu::UnoType<bool>::get(), 0, 0}, + { SC_UNO_SHOWNOTEAUTHOR, 0, cppu::UnoType<bool>::get(), 0, 0}, { SC_UNO_SHOWFORMULASMARKS, 0, cppu::UnoType<bool>::get(), 0, 0}, { SC_UNO_SHOWOBJ, 0, cppu::UnoType<sal_Int16>::get(), 0, 0}, { SC_UNO_SHOWPAGEBR, 0, cppu::UnoType<bool>::get(), 0, 0}, @@ -1780,6 +1781,8 @@ void SAL_CALL ScTabViewObj::setPropertyValue( aNewOpt.SetOption( VOPT_HELPLINES, ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); else if ( aPropertyName == SC_UNO_SHOWNOTES ) aNewOpt.SetOption( VOPT_NOTES, ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); + else if ( aPropertyName == SC_UNO_SHOWNOTEAUTHOR ) + aNewOpt.SetOption( VOPT_NOTEAUTHOR, ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); else if ( aPropertyName == SC_UNO_SHOWFORMULASMARKS ) aNewOpt.SetOption( VOPT_FORMULAS_MARKS, ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); else if ( aPropertyName == SC_UNO_SHOWPAGEBR ) @@ -1912,6 +1915,7 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const OUString& aPropertyName else if ( aPropertyName == SC_UNO_SHOWGRID ) aRet <<= rOpt.GetOption( VOPT_GRID ); else if ( aPropertyName == SC_UNO_SHOWHELP ) aRet <<= rOpt.GetOption( VOPT_HELPLINES ); else if ( aPropertyName == SC_UNO_SHOWNOTES ) aRet <<= rOpt.GetOption( VOPT_NOTES ); + else if ( aPropertyName == SC_UNO_SHOWNOTEAUTHOR ) aRet <<= rOpt.GetOption( VOPT_NOTEAUTHOR ); else if ( aPropertyName == SC_UNO_SHOWFORMULASMARKS ) aRet <<= rOpt.GetOption( VOPT_FORMULAS_MARKS ); else if ( aPropertyName == SC_UNO_SHOWPAGEBR ) aRet <<= rOpt.GetOption( VOPT_PAGEBREAKS ); else if ( aPropertyName == SC_UNO_SHOWZERO ) aRet <<= rOpt.GetOption( VOPT_NULLVALS ); diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index f6684f0d201a..3bed82b1dbf6 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -3785,6 +3785,8 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe pSettings[SC_SHOWZERO].Value <<= maOptions.GetOption(VOPT_NULLVALS); pSettings[SC_SHOWNOTES].Name = SC_UNO_SHOWNOTES; pSettings[SC_SHOWNOTES].Value <<= maOptions.GetOption(VOPT_NOTES); + pSettings[SC_SHOWNOTEAUTHOR].Name = SC_UNO_SHOWNOTEAUTHOR; + pSettings[SC_SHOWNOTEAUTHOR].Value <<= maOptions.GetOption(VOPT_NOTEAUTHOR); pSettings[SC_SHOWFORMULASMARKS].Name = SC_UNO_SHOWFORMULASMARKS; pSettings[SC_SHOWFORMULASMARKS].Value <<= maOptions.GetOption(VOPT_FORMULAS_MARKS); pSettings[SC_SHOWGRID].Name = SC_UNO_SHOWGRID; @@ -3931,6 +3933,8 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue> maOptions.SetOption(VOPT_NULLVALS, ScUnoHelpFunctions::GetBoolFromAny(rSetting.Value)); else if ( sName == SC_UNO_SHOWNOTES ) maOptions.SetOption(VOPT_NOTES, ScUnoHelpFunctions::GetBoolFromAny(rSetting.Value)); + else if ( sName == SC_UNO_SHOWNOTEAUTHOR ) + maOptions.SetOption(VOPT_NOTEAUTHOR, ScUnoHelpFunctions::GetBoolFromAny(rSetting.Value)); else if ( sName == SC_UNO_SHOWFORMULASMARKS ) maOptions.SetOption(VOPT_FORMULAS_MARKS, ScUnoHelpFunctions::GetBoolFromAny(rSetting.Value)); else if ( sName == SC_UNO_SHOWGRID ) diff --git a/sc/uiconfig/scalc/ui/tpviewpage.ui b/sc/uiconfig/scalc/ui/tpviewpage.ui index 68d41c216387..fb19f01ba4ec 100644 --- a/sc/uiconfig/scalc/ui/tpviewpage.ui +++ b/sc/uiconfig/scalc/ui/tpviewpage.ui @@ -20,7 +20,7 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=2 n-rows=9 --> + <!-- n-columns=2 n-rows=10 --> <object class="GtkGrid" id="grid6"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -89,7 +89,7 @@ </object> <packing> <property name="left-attach">1</property> - <property name="top-attach">3</property> + <property name="top-attach">4</property> </packing> </child> <child> @@ -108,7 +108,7 @@ </object> <packing> <property name="left-attach">1</property> - <property name="top-attach">4</property> + <property name="top-attach">5</property> </packing> </child> <child> @@ -127,7 +127,7 @@ </object> <packing> <property name="left-attach">1</property> - <property name="top-attach">8</property> + <property name="top-attach">9</property> </packing> </child> <child> @@ -179,7 +179,7 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">3</property> + <property name="top-attach">4</property> </packing> </child> <child> @@ -192,7 +192,7 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">7</property> + <property name="top-attach">8</property> </packing> </child> <child> @@ -205,7 +205,7 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">4</property> + <property name="top-attach">5</property> </packing> </child> <child> @@ -224,7 +224,7 @@ </object> <packing> <property name="left-attach">1</property> - <property name="top-attach">7</property> + <property name="top-attach">8</property> </packing> </child> <child> @@ -237,7 +237,7 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">8</property> + <property name="top-attach">9</property> </packing> </child> <child> @@ -256,7 +256,7 @@ </object> <packing> <property name="left-attach">1</property> - <property name="top-attach">5</property> + <property name="top-attach">6</property> </packing> </child> <child> @@ -269,7 +269,7 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">5</property> + <property name="top-attach">6</property> </packing> </child> <child> @@ -288,7 +288,7 @@ </object> <packing> <property name="left-attach">1</property> - <property name="top-attach">6</property> + <property name="top-attach">7</property> </packing> </child> <child> @@ -301,7 +301,33 @@ </object> <packing> <property name="left-attach">0</property> - <property name="top-attach">6</property> + <property name="top-attach">7</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="cbNoteAuthor"> + <property name="label" translatable="yes" context="tpviewpage|noteauthor">Comment authorship</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">3</property> + </packing> + </child> + <child> + <object class="GtkImage" id="imNoteAuthor"> + <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">3</property> </packing> </child> </object> |