summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorGulsah Kose <gulsah.1004@gmail.com>2016-04-20 18:29:07 +0300
committerKatarina Behrens <Katarina.Behrens@cib.de>2016-05-20 10:20:34 +0000
commitb12354a2de297f05dcdf4602290b56d64675006a (patch)
tree926969bea08f00ff7ffb06c7438973680ee2d88f /svx
parent824cf015683383b553c744a746ac8e8ea65495cf (diff)
tdf#87668 Add control to show or hide "Original Size" option.
Change-Id: I022ff86af2e480b061023aac50ff9f79fc6dbf9e Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/24263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdograf.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 0f2b64279e70..c67599d3a8a3 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -559,6 +559,23 @@ OUString SdrGrafObj::GetGrafStreamURL() const
return pGraphic->GetUserData();
}
+Size SdrGrafObj::getOriginalSize() const
+{
+ Size aSize;
+
+ if ( GetGrafPrefMapMode().GetMapUnit() == MAP_PIXEL )
+ aSize = Application::GetDefaultDevice()->PixelToLogic( GetGrafPrefSize(),
+ GetModel()->GetScaleUnit() );
+ else
+ {
+ aSize = OutputDevice::LogicToLogic( GetGrafPrefSize(),
+ GetGrafPrefMapMode(),
+ GetModel()->GetScaleUnit() );
+ }
+
+ return aSize;
+}
+
void SdrGrafObj::ForceSwapIn() const
{
if( mbIsPreview && pGraphic->HasUserData() )