summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/docst.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/app/docst.cxx')
-rw-r--r--sw/source/uibase/app/docst.cxx25
1 files changed, 24 insertions, 1 deletions
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 654ff05a0650..b9ab297aef78 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -642,6 +642,22 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl, LinkParamNone*, void)
}
}
}
+
+ if (m_nFamily == SfxStyleFamily::Frame)
+ {
+ const SfxPoolItem* pItem = nullptr;
+ if (aTmpSet.HasItem(FN_KEEP_ASPECT_RATIO, &pItem))
+ {
+ const auto& rBoolItem = static_cast<const SfxBoolItem&>(*pItem);
+ const SwViewOption* pVOpt = pWrtShell->GetViewOptions();
+ SwViewOption aUsrPref(*pVOpt);
+ aUsrPref.SetKeepRatio(rBoolItem.GetValue());
+ if (rBoolItem.GetValue() != pVOpt->IsKeepRatio())
+ {
+ SW_MOD()->ApplyUsrPref(aUsrPref, &pWrtShell->GetView());
+ }
+ }
+ }
}
if(m_bNew)
@@ -913,6 +929,14 @@ void SwDocShell::Edit(
rSet.Put(*oGrabBag);
}
+ SwWrtShell* pCurrShell = pActShell ? pActShell : m_pWrtShell;
+ if (nFamily == SfxStyleFamily::Frame)
+ {
+ SfxItemSet& rSet = xTmp->GetItemSet();
+ const SwViewOption* pVOpt = pCurrShell->GetViewOptions();
+ rSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()));
+ }
+
if (!bBasic)
{
// prior to the dialog the HtmlMode at the DocShell is being sunk
@@ -921,7 +945,6 @@ void SwDocShell::Edit(
// In HTML mode, we do not always have a printer. In order to show
// the correct page size in the Format - Page dialog, we have to
// get one here.
- SwWrtShell* pCurrShell = pActShell ? pActShell : m_pWrtShell;
if( ( HTMLMODE_ON & nHtmlMode ) &&
!pCurrShell->getIDocumentDeviceAccess().getPrinter( false ) )
pCurrShell->InitPrt( pCurrShell->getIDocumentDeviceAccess().getPrinter( true ) );