summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-07-23 14:30:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-24 09:57:08 +0200
commite271fce82e16359394fdeb818c2ec25a07532a8d (patch)
tree7a02fef73819170e1eab03737b6040c8f3277149 /sfx2
parent2855f12072023930a15ea852e40d05de4a6be164 (diff)
use officecfg to retrieve PrettyPrinting
Change-Id: Ia815acdb8050316293e23801d3ed5bfbeb3ab386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119417 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appcfg.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 01820c08adb7..d54a9bb42b6b 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -143,8 +143,9 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
case SID_ATTR_PRETTYPRINTING:
{
bRet = true;
- if (!aSaveOptions.IsReadOnly(SvtSaveOptions::EOption::DoPrettyPrinting))
- if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), aSaveOptions.IsPrettyPrinting())))
+ if (!officecfg::Office::Common::Save::Document::PrettyPrinting::isReadOnly())
+ if (!rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ),
+ officecfg::Office::Common::Save::Document::PrettyPrinting::get())))
bRet = false;
}
break;
@@ -433,7 +434,9 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
if ( SfxItemState::SET == rSet.GetItemState( rPool.GetWhich( SID_ATTR_PRETTYPRINTING ), true, &pItem ) )
{
DBG_ASSERT( dynamic_cast< const SfxBoolItem *>( pItem ) != nullptr, "BoolItem expected" );
- aSaveOptions.SetPrettyPrinting( static_cast< const SfxBoolItem*> ( pItem )->GetValue() );
+ officecfg::Office::Common::Save::Document::PrettyPrinting::set(
+ static_cast< const SfxBoolItem*> ( pItem )->GetValue(),
+ batch );
}
// WarnAlienFormat