summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-12-19 22:31:31 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-12-20 06:21:49 +0100
commite34067483ef78c1569641becfe99b79a97600aed (patch)
tree2878b9477b25623e19795fa02c446027aa439ee2 /svx
parent046e6cfa544d2ffd67fd29ba7dde41b495744618 (diff)
Set the original size in crop dialog to preferred DPI calc. size
If we have the document setting preferred image size set, then use that as the default DPI and recalcualte the logical image size using the DPI and the size in pixels. This is useful so we have the preferred DPI size as 100% in the crop dialog, so we can adjust the size in relation to that value. Change-Id: I50806f194032e228ee2cf56a39e5735a57358d46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127096 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 7f644be79052..0d1913fb4780 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -654,6 +654,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_GRFCROP );
std::unique_ptr<SfxTabPage> xTabPage = (*fnCreatePage)(aCropDialog.get_content_area(), &aCropDialog, &aCropDlgAttr);
+ OUString sPreferredDPI = OUString::number(rView.getSdrModelFromSdrView().getImagePreferredDPI());
+ xTabPage->SetUserData(sPreferredDPI);
xTabPage->SetPageTitle(aCropStr);
aCropDialog.SetTabPage(std::move(xTabPage));