[Libreoffice-commits] core.git: cui/source i18nutil/source include/i18nutil svx/source vcl/inc vcl/source
Jun NOGATA (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 13 11:06:08 UTC 2021
cui/source/tabpages/page.cxx | 4 ++--
i18nutil/source/utility/paper.cxx | 6 +++++-
include/i18nutil/paper.hxx | 8 ++++++--
svx/source/dialog/page.hrc | 4 ++++
vcl/inc/print.hrc | 6 +++++-
vcl/source/gdi/print.cxx | 3 ++-
6 files changed, 24 insertions(+), 7 deletions(-)
New commits:
commit 6d4a1716624a8a045ff4e90bd221b563be44be11
Author: Jun NOGATA <nogajun at gmail.com>
AuthorDate: Sat May 29 18:07:12 2021 +0900
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jul 13 13:05:34 2021 +0200
Add PowerPoint compatible screen size for Impress
I realized that Impress does not have the same screen
size as PowerPoint. tdf#142286, tdf#142288
When I load a PowerPoint slide into Impress,
it was a custom size, but when I add this screen size,
it shows up with the screen size name.
And when I load a slide with the added screen size
into PowerPoint, it also shows up with the PowerPoint
preset screen size name and not the custom size.
The screen sizes I have added are as follows
* Widescreen (Current PowerPoint default)
* On-scren Show (4:3)
* On-scren Show (16:9) (Google slide defualt)
* On-scren Show (16:10)
Change-Id: I33e2bbc36b2c92ecbb85c610c864f735bf540d03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116374
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 71df320eb902..d7bc0cc6a9d7 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -968,7 +968,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperSizeSelect_Impl, weld::ComboBox&, void)
// Draw: if paper format the margin shall be 1 cm
tools::Long nTmp = 0;
- bool bScreen = (( PAPER_SCREEN_4_3 == ePaper )||( PAPER_SCREEN_16_9 == ePaper)||( PAPER_SCREEN_16_10 == ePaper));
+ bool bScreen = (( PAPER_SCREEN_4_3 == ePaper )||( PAPER_SCREEN_16_9 == ePaper)||( PAPER_SCREEN_16_10 == ePaper)||( PAPER_WIDESCREEN == ePaper)||( PAPER_ONSCREENSHOW_4_3 == ePaper)||( PAPER_ONSCREENSHOW_16_9 == ePaper)||( PAPER_ONSCREENSHOW_16_10 == ePaper));
if ( !bScreen )
// no margin if screen
@@ -1367,7 +1367,7 @@ DeactivateRC SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet )
// If not, stay on the TabPage.
Paper ePaper = m_xPaperSizeBox->get_active_id();
- if ( ePaper != PAPER_SCREEN_4_3 && ePaper != PAPER_SCREEN_16_9 && ePaper != PAPER_SCREEN_16_10 && IsMarginOutOfRange() )
+ if ( ePaper != PAPER_SCREEN_4_3 && ePaper != PAPER_SCREEN_16_9 && ePaper != PAPER_SCREEN_16_10 && ePaper != PAPER_WIDESCREEN && ePaper != PAPER_ONSCREENSHOW_4_3 && ePaper != PAPER_ONSCREENSHOW_16_9 && ePaper != PAPER_ONSCREENSHOW_16_10 && IsMarginOutOfRange() )
{
std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetFrameWeld(),
VclMessageType::Question, VclButtonsType::YesNo,
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx
index 995f60ce8c3e..97dbb2938c25 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -156,7 +156,11 @@ const PageDesc aDinTab[] =
{ MM2MM100( 157.5), MM2MM100( 280 ), nullptr, nullptr }, //Screen 16:9
{ MM2MM100( 175 ), MM2MM100( 280 ), nullptr, nullptr }, //Screen 16:10
{ MM2MM100( 195 ), MM2MM100( 270 ), nullptr, nullptr }, // 16k
- { MM2MM100( 197 ), MM2MM100( 273 ), nullptr, nullptr } // 16k
+ { MM2MM100( 197 ), MM2MM100( 273 ), nullptr, nullptr }, // 16k
+ { IN2MM100( 7.5 ), IN2MM100( 13.333 ), nullptr, nullptr }, //PowerPoint Widescreen
+ { IN2MM100( 7.5 ), IN2MM100( 10 ), nullptr, nullptr }, //PowerPoint On-screen Show (4:3)
+ { IN2MM100( 5.625 ), IN2MM100( 10 ), nullptr, nullptr }, //PowerPoint On-screen Show (16:9)
+ { IN2MM100( 6.25 ), IN2MM100( 10 ), nullptr, nullptr } //PowerPoint On-screen Show (16:10)
};
diff --git a/include/i18nutil/paper.hxx b/include/i18nutil/paper.hxx
index 7b99c0861e48..71ca22bb9486 100644
--- a/include/i18nutil/paper.hxx
+++ b/include/i18nutil/paper.hxx
@@ -115,11 +115,15 @@ enum Paper : unsigned
PAPER_SCREEN_16_9,
PAPER_SCREEN_16_10,
PAPER_16K_195x270,
- PAPER_16K_197x273
+ PAPER_16K_197x273,
+ PAPER_WIDESCREEN, //PowerPoint Widescreen
+ PAPER_ONSCREENSHOW_4_3, //PowerPoint On-screen Show (4:3)
+ PAPER_ONSCREENSHOW_16_9, //PowerPoint On-screen Show (16:9)
+ PAPER_ONSCREENSHOW_16_10 //PowerPoint On-screen Show (16:10)
};
// defined for 'equal size' test with the implementation array
-#define NUM_PAPER_ENTRIES (PAPER_16K_197x273 - PAPER_A0 + 1)
+#define NUM_PAPER_ENTRIES (PAPER_ONSCREENSHOW_16_10 - PAPER_A0 + 1)
class I18NUTIL_DLLPUBLIC PaperInfo
{
diff --git a/svx/source/dialog/page.hrc b/svx/source/dialog/page.hrc
index 6dc8e72f0fa6..ec845957e31f 100644
--- a/svx/source/dialog/page.hrc
+++ b/svx/source/dialog/page.hrc
@@ -91,6 +91,10 @@ const std::pair<const char*, int> RID_SVXSTRARY_PAPERSIZE_DRAW[] =
{ NC_("RID_SVXSTRARY_PAPERSIZE_DRAW", "Screen 4:3") , PAPER_SCREEN_4_3 },
{ NC_("RID_SVXSTRARY_PAPERSIZE_DRAW", "Screen 16:9") , PAPER_SCREEN_16_9 },
{ NC_("RID_SVXSTRARY_PAPERSIZE_DRAW", "Screen 16:10") , PAPER_SCREEN_16_10 },
+ { NC_("RID_SVXSTRARY_PAPERSIZE_DRAW", "Widescreen") , PAPER_WIDESCREEN },
+ { NC_("RID_SVXSTRARY_PAPERSIZE_DRAW", "On-screen Show (4:3)") , PAPER_ONSCREENSHOW_4_3 },
+ { NC_("RID_SVXSTRARY_PAPERSIZE_DRAW", "On-screen Show (16:9)") , PAPER_ONSCREENSHOW_16_9 },
+ { NC_("RID_SVXSTRARY_PAPERSIZE_DRAW", "On-screen Show (16:10)") , PAPER_ONSCREENSHOW_16_10 },
{ NC_("RID_SVXSTRARY_PAPERSIZE_DRAW", "Japanese Postcard") , PAPER_POSTCARD_JP}
};
diff --git a/vcl/inc/print.hrc b/vcl/inc/print.hrc
index 91c11309aed5..49dbcea20fa2 100644
--- a/vcl/inc/print.hrc
+++ b/vcl/inc/print.hrc
@@ -106,8 +106,12 @@ const char* RID_STR_PAPERNAMES[] =
NC_("RID_STR_PAPERNAMES", "Screen 16:9"),
NC_("RID_STR_PAPERNAMES", "Screen 16:10"),
NC_("RID_STR_PAPERNAMES", "16k (195 x 270)"),
+ NC_("RID_STR_PAPERNAMES", "16k (197 x 273)"),
+ NC_("RID_STR_PAPERNAMES", "Widescreen"),
+ NC_("RID_STR_PAPERNAMES", "On-screen Show (4:3)"),
+ NC_("RID_STR_PAPERNAMES", "On-screen Show (16:9)"),
// To translators: This is the last entry of the sequence of paper size names
- NC_("RID_STR_PAPERNAMES", "16k (197 x 273)")
+ NC_("RID_STR_PAPERNAMES", "On-screen Show (16:10)")
};
#endif // INCLUDED_VCL_INC_PRINT_HRC
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 652bc00c58be..90b74a3f6d92 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1491,7 +1491,8 @@ OUString Printer::GetPaperName( Paper ePaper )
PAPER_DOUBLEPOSTCARD_JP, PAPER_A6, PAPER_12x11, PAPER_A7, PAPER_A8, PAPER_A9, PAPER_A10, PAPER_B0_ISO,
PAPER_B1_ISO, PAPER_B2_ISO, PAPER_B3_ISO, PAPER_B7_ISO, PAPER_B8_ISO, PAPER_B9_ISO, PAPER_B10_ISO,
PAPER_ENV_C2, PAPER_ENV_C7, PAPER_ENV_C8, PAPER_ARCHA, PAPER_ARCHB, PAPER_ARCHC, PAPER_ARCHD,
- PAPER_ARCHE, PAPER_SCREEN_16_9, PAPER_SCREEN_16_10, PAPER_16K_195x270, PAPER_16K_197x273
+ PAPER_ARCHE, PAPER_SCREEN_16_9, PAPER_SCREEN_16_10, PAPER_16K_195x270, PAPER_16K_197x273,
+ PAPER_WIDESCREEN, PAPER_ONSCREENSHOW_4_3, PAPER_ONSCREENSHOW_16_9, PAPER_ONSCREENSHOW_16_10
};
assert(SAL_N_ELEMENTS(PaperIndex) == SAL_N_ELEMENTS(RID_STR_PAPERNAMES) && "localized paper name count wrong");
for (size_t i = 0; i < SAL_N_ELEMENTS(PaperIndex); ++i)
More information about the Libreoffice-commits
mailing list