diff options
author | Gabor Kelemen <kelemeng@ubuntu.com> | 2021-12-09 15:55:16 +0100 |
---|---|---|
committer | Gabor Kelemen <kelemeng@ubuntu.com> | 2021-12-17 17:33:49 +0100 |
commit | 30f6ad6a617e7b9aa86f774e8b6da9c4ae8ad9f4 (patch) | |
tree | 7eaf08e87151952aaf70710c64cb6e5ce8a9b969 | |
parent | a214369f14d3f53d45b1889827057882c0ffd62e (diff) |
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>
-rw-r--r-- | sc/inc/strings.hrc | 1 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fuins1.cxx | 10 | ||||
-rw-r--r-- | sd/inc/strings.hrc | 1 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 10 | ||||
-rw-r--r-- | sw/UIConfig_swriter.mk | 1 | ||||
-rw-r--r-- | sw/qa/unit/data/sw-dialogs-test.txt | 2 | ||||
-rw-r--r-- | sw/qa/unit/data/sw-dialogs-test_2.txt | 2 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 11 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/queryrotateintostandarddialog.ui | 34 |
9 files changed, 6 insertions, 66 deletions
diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc index 96f4e8c3e0b2..81908559a230 100644 --- a/sc/inc/strings.hrc +++ b/sc/inc/strings.hrc @@ -59,7 +59,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 5c7bac6ce2a6..a447a56c6dca 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 c5643c8bfe0e..68be404dfaf9 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 4fa9db0b46ed..61f61b70b3cc 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 78b2b0441b8b..c7c3e3e79ca4 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -210,7 +210,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 bdb46c66f813..93fb6911bc44 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 @@ -206,4 +205,3 @@ modules/swriter/ui/bibliographyentry.ui modules/swriter/ui/inforeadonlydialog.ui modules/swriter/ui/inforeadonlydialog.ui modules/swriter/ui/inforeadonlydialog.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 fabeae19b3b2..9ddde7617e4c 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 @@ -75,4 +74,3 @@ modules/swriter/ui/bibliographyentry.ui modules/swriter/ui/inforeadonlydialog.ui modules/swriter/ui/inforeadonlydialog.ui modules/swriter/ui/inforeadonlydialog.ui -modules/swriter/ui/queryrotateintostandarddialog.ui diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index e383dfc462b0..19a7d131ad20 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 3dd945adaf0b..000000000000 --- 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> |