tdf#146019 Remove confirmation dialog about applying images EXIF rotation
Change-Id: I53553f91eeb5bd56bbad19b80421177a84625d96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126616
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127151
diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index 0cdbf7f..2b94667 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -56,7 +56,6 @@
#define SCSTR_NO_TAB_BG_COLOR NC_("SCSTR_NO_TAB_BG_COLOR", "Default")
#define SCSTR_RENAMEOBJECT NC_("SCSTR_RENAMEOBJECT", "Name Object")
#define STR_INSERTGRAPHIC NC_("STR_INSERTGRAPHIC", "Insert Image")
#define STR_QUERYROTATION NC_("STR_QUERYROTATION", "This image is rotated. Would you like to rotate it into standard orientation?")
#define SCSTR_TOTAL NNC_("SCSTR_TOTAL", "One result found", "%1 results found")
#define SCSTR_SKIPPED NC_("SCSTR_SKIPPED", "(only %1 are listed)")
// Attribute
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index 5c7bac6..a447a56 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -112,14 +112,8 @@ static void lcl_InsertGraphic( const Graphic& rGraphic,
const Degree10 aRotation = aMetadata.getRotation();
if (aRotation)
{
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(nullptr, VclMessageType::Question,VclButtonsType::YesNo,ScResId(STR_QUERYROTATION)));
// tdf#145819 Apply the rotation information if the user does NOT want to unrotate the image
// If they chose Yes we ignore the rotation
if (xQueryBox->run() == RET_NO)
{
GraphicNativeTransform aTransform( rGraphic1 );
aTransform.rotate( aRotation );
}
GraphicNativeTransform aTransform( rGraphic1 );
aTransform.rotate( aRotation );
}
}
ScDrawView* pDrawView = rViewSh.GetScDrawView();
diff --git a/sd/inc/strings.hrc b/sd/inc/strings.hrc
index c5643c8..68be404 100644
--- a/sd/inc/strings.hrc
+++ b/sd/inc/strings.hrc
@@ -31,7 +31,6 @@
#define STR_UNDO_REPLACE NC_("STR_UNDO_REPLACE", "Replace")
#define STR_UNDO_DRAGDROP NC_("STR_UNDO_DRAGDROP", "Drag and Drop")
#define STR_INSERTGRAPHIC NC_("STR_INSERTGRAPHIC", "Insert Image")
#define STR_QUERYROTATION NC_("STR_QUERYROTATION", "This image is rotated. Would you like to rotate it into standard orientation?")
#define STR_UNDO_BEZCLOSE NC_("STR_UNDO_BEZCLOSE", "Close Polygon")
#define STR_SLIDE_SORTER_MODE NC_("STR_SLIDE_SORTER_MODE", "Slide Sorter")
#define STR_NORMAL_MODE NC_("STR_NORMAL_MODE", "Normal")
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 4fa9db0..61f61b7 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -147,14 +147,8 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
const Degree10 aRotation = aMetadata.getRotation();
if (aRotation)
{
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(nullptr, VclMessageType::Question,VclButtonsType::YesNo,SdResId(STR_QUERYROTATION)));
// tdf#145819 Apply the rotation information if the user does NOT want to unrotate the image
// If they chose Yes we ignore the rotation
if (xQueryBox->run() == RET_NO)
{
GraphicNativeTransform aTransform( aGraphic );
aTransform.rotate( aRotation );
}
GraphicNativeTransform aTransform( aGraphic );
aTransform.rotate( aRotation );
}
}
if( dynamic_cast< DrawViewShell *>( mpViewShell ) )
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index ce30583..8e0901c 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -211,7 +211,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/querycontinueenddialog \
sw/uiconfig/swriter/ui/querydefaultcompatdialog \
sw/uiconfig/swriter/ui/queryredlinedialog \
sw/uiconfig/swriter/ui/queryrotateintostandarddialog \
sw/uiconfig/swriter/ui/querysavelabeldialog \
sw/uiconfig/swriter/ui/mailmerge \
sw/uiconfig/swriter/ui/managechangessidebar \
diff --git a/sw/qa/unit/data/sw-dialogs-test.txt b/sw/qa/unit/data/sw-dialogs-test.txt
index 9bddf8b..81f92eb 100644
--- a/sw/qa/unit/data/sw-dialogs-test.txt
+++ b/sw/qa/unit/data/sw-dialogs-test.txt
@@ -161,7 +161,6 @@ modules/swriter/ui/privateuserpage.ui
modules/swriter/ui/querycontinuebegindialog.ui
modules/swriter/ui/querycontinueenddialog.ui
modules/swriter/ui/querydefaultcompatdialog.ui
modules/swriter/ui/queryrotateintostandarddialog.ui
modules/swriter/ui/querysavelabeldialog.ui
modules/swriter/ui/renameautotextdialog.ui
modules/swriter/ui/renameentrydialog.ui
@@ -207,4 +206,3 @@ modules/swriter/ui/inforeadonlydialog.ui
modules/swriter/ui/inforeadonlydialog.ui
modules/swriter/ui/inforeadonlydialog.ui
modules/swriter/ui/floatingnavigation.ui
modules/swriter/ui/queryrotateintostandarddialog.ui
diff --git a/sw/qa/unit/data/sw-dialogs-test_2.txt b/sw/qa/unit/data/sw-dialogs-test_2.txt
index 9384a0a..9aa52f8 100644
--- a/sw/qa/unit/data/sw-dialogs-test_2.txt
+++ b/sw/qa/unit/data/sw-dialogs-test_2.txt
@@ -30,7 +30,6 @@ modules/swriter/ui/privateuserpage.ui
modules/swriter/ui/querycontinuebegindialog.ui
modules/swriter/ui/querycontinueenddialog.ui
modules/swriter/ui/querydefaultcompatdialog.ui
modules/swriter/ui/queryrotateintostandarddialog.ui
modules/swriter/ui/querysavelabeldialog.ui
modules/swriter/ui/renameautotextdialog.ui
modules/swriter/ui/renameentrydialog.ui
@@ -76,4 +75,3 @@ modules/swriter/ui/inforeadonlydialog.ui
modules/swriter/ui/inforeadonlydialog.ui
modules/swriter/ui/inforeadonlydialog.ui
modules/swriter/ui/floatingnavigation.ui
modules/swriter/ui/queryrotateintostandarddialog.ui
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 13cfd30..a7a11bb 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -424,15 +424,8 @@ namespace
Degree10 aRotation = aMetadata.getRotation();
if (aRotation)
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/queryrotateintostandarddialog.ui"));
std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("QueryRotateIntoStandardOrientationDialog"));
// tdf#145819 Apply the rotation information if the user does NOT want to unrotate the image
// If they chose Yes we ignore the rotation
if (xQueryBox->run() == RET_NO)
{
GraphicNativeTransform aTransform( aGraphic );
aTransform.rotate( aRotation );
}
GraphicNativeTransform aTransform( aGraphic );
aTransform.rotate( aRotation );
}
}
}
diff --git a/sw/uiconfig/swriter/ui/queryrotateintostandarddialog.ui b/sw/uiconfig/swriter/ui/queryrotateintostandarddialog.ui
deleted file mode 100644
index 3dd945a..0000000
--- a/sw/uiconfig/swriter/ui/queryrotateintostandarddialog.ui
+++ /dev/null
@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.2 -->
<interface domain="sw">
<requires lib="gtk+" version="3.20"/>
<object class="GtkMessageDialog" id="QueryRotateIntoStandardOrientationDialog">
<property name="can_focus">False</property>
<property name="title" translatable="yes" context="queryrotateintostandarddialog|QueryRotateIntoStandardOrientationDialog">Rotate into standard orientation?</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
<property name="message_type">question</property>
<property name="buttons">yes-no</property>
<property name="text" translatable="yes" context="queryrotateintostandarddialog|QueryRotateIntoStandardOrientationDialog">This image is rotated. Would you like to rotate it into standard orientation?</property>
<child internal-child="vbox">
<object class="GtkBox" id="messagedialog-vbox4">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="messagedialog-action_area4">
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
</interface>