summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2019-10-20 18:28:07 +0200
committerMarco Cecchetti <marco.cecchetti@collabora.com>2019-10-21 12:42:57 +0200
commit58f6e7a1af4f4bcc15bfd8e0646e22f288ab40f9 (patch)
tree3e7b0852b8832432ad2645f8222d81b65329ab2a /sw/source
parent15999be9f8569e9d2b2f531b34dbc2143f670406 (diff)
lok: on insert image rotate automatically based on EXIF orientation tag
Change-Id: I55e3e76d7d21c7d0796ec9355f01479232018c66
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/uiview/view2.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index cbf9c177ce37..fefb9af1a8ed 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -232,9 +232,14 @@ ErrCode SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter,
const sal_uInt16 aRotation = aMetadata.getRotation();
if (aRotation != 0)
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "modules/swriter/ui/queryrotateintostandarddialog.ui"));
- std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("QueryRotateIntoStandardOrientationDialog"));
- if (xQueryBox->run() == RET_YES)
+ bool bRotate = comphelper::LibreOfficeKit::isActive();
+ if (!bRotate)
+ {
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "modules/swriter/ui/queryrotateintostandarddialog.ui"));
+ std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("QueryRotateIntoStandardOrientationDialog"));
+ bRotate = xQueryBox->run() == RET_YES;
+ }
+ if (bRotate)
{
GraphicNativeTransform aTransform( aGraphic );
aTransform.rotate( aRotation );