[PATCH] fdo#42986 Add Presentationsize 16:9 Widescreen
Rob Snelders
programming at ertai.nl
Sat Apr 14 08:26:27 PDT 2012
---
cui/source/tabpages/page.cxx | 10 +++++-----
cui/source/tabpages/page.h | 3 ++-
cui/source/tabpages/page.src | 3 ++-
i18nutil/inc/i18nutil/paper.hxx | 5 +++--
i18nutil/source/utility/paper.cxx | 6 ++++--
sd/source/core/drawdoc2.cxx | 2 +-
vcl/source/gdi/print.cxx | 2 +-
7 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index a0b5cc8..13e32e3 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -995,13 +995,13 @@ IMPL_LINK( SvxPageDescPage, PaperSizeSelect_Impl, ListBox *, pBox )
if ( eMode == SVX_PAGE_MODE_PRESENTATION )
{
- // Draw: bei Papierformat soll der Rand 1cm betragen
+ // Draw: With on screen no border
long nTmp = 0;
- sal_Bool bScreen = ( PAPER_SCREEN == ePaper );
+ sal_Bool bScreen = (( PAPER_SCREEN_4_3 == ePaper )|| ( PAPER_SCREEN_16_9 == ePaper));
if ( !bScreen )
- // bei Bildschirm keinen Rand
- nTmp = 1; // entspr. 1cm
+ // with paper take a borden
+ nTmp = 1; //cm
// Abfragen, ob fuer Raender 0 gesetzt ist:
if ( bScreen || aRightMarginEdit.GetValue() == 0 )
@@ -1410,7 +1410,7 @@ int SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet )
sal_uInt16 nPos = aPaperSizeBox.GetSelectEntryPos();
Paper ePaper = (Paper)(sal_uLong)aPaperSizeBox.GetEntryData( nPos );
- if ( ePaper != PAPER_SCREEN && IsMarginOutOfRange() )
+ if ( (ePaper != PAPER_SCREEN_4_3 || ePaper != PAPER_SCREEN_16_9) && IsMarginOutOfRange() )
{
if ( QueryBox( this, WB_YES_NO | WB_DEF_NO, aPrintRangeQueryText ).Execute() == RET_NO )
{
diff --git a/cui/source/tabpages/page.h b/cui/source/tabpages/page.h
index bc7ad78..87858fe 100644
--- a/cui/source/tabpages/page.h
+++ b/cui/source/tabpages/page.h
@@ -54,7 +54,7 @@
#define PAPERSIZE_C65 16
#define PAPERSIZE_DL 17
#define PAPERSIZE_DIA 18
-#define PAPERSIZE_SCREEN 19
+#define PAPERSIZE_SCREEN_4_3 19
#define PAPERSIZE_C 20
#define PAPERSIZE_D 21
#define PAPERSIZE_E 22
@@ -74,6 +74,7 @@
#define PAPERSIZE_B6_JIS 36
#define PAPERSIZE_POSTCARD_JP 46
#define PAPERSIZE_A6 56
+#define PAPERSIZE_SCREEN_16_9 78
#endif
diff --git a/cui/source/tabpages/page.src b/cui/source/tabpages/page.src
index 91873c7..8f81d65 100644
--- a/cui/source/tabpages/page.src
+++ b/cui/source/tabpages/page.src
@@ -452,7 +452,8 @@ StringArray RID_SVXSTRARY_PAPERSIZE_DRAW
< "C5 Envelope" ; PAPERSIZE_C5 ; > ;
< "C4 Envelope" ; PAPERSIZE_C4 ; > ;
< "Dia Slide" ; PAPERSIZE_DIA ; > ;
- < "Screen" ; PAPERSIZE_SCREEN ; > ;
+ < "Screen 4:3" ; PAPERSIZE_SCREEN_4_3 ; > ;
+ < "Screen 16:9" ; PAPERSIZE_SCREEN_16_9 ; > ;
< "Japanese Postcard" ; PAPERSIZE_POSTCARD_JP; > ;
};
};
diff --git a/i18nutil/inc/i18nutil/paper.hxx b/i18nutil/inc/i18nutil/paper.hxx
index d5be9ec..5c08661 100644
--- a/i18nutil/inc/i18nutil/paper.hxx
+++ b/i18nutil/inc/i18nutil/paper.hxx
@@ -58,7 +58,7 @@ enum Paper
PAPER_ENV_C65,
PAPER_ENV_DL,
PAPER_SLIDE_DIA,
- PAPER_SCREEN,
+ PAPER_SCREEN_4_3,
PAPER_C,
PAPER_D,
PAPER_E,
@@ -116,7 +116,8 @@ enum Paper
PAPER_ARCHB,
PAPER_ARCHC,
PAPER_ARCHD,
- PAPER_ARCHE
+ PAPER_ARCHE,
+ PAPER_SCREEN_16_9
};
// defined for 'equal size' test with the implementation array
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx
index 63b5cff..a79089d 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -93,7 +93,7 @@ static PageDesc aDinTab[] =
{ MM2MM100( 114 ), MM2MM100( 229 ), "EnvC65", NULL },
{ MM2MM100( 110 ), MM2MM100( 220 ), "EnvDL", "DL" },
{ MM2MM100( 180), MM2MM100( 270 ), NULL, NULL }, //Dia
- { MM2MM100( 210), MM2MM100( 280 ), NULL, NULL }, //Screen
+ { MM2MM100( 210), MM2MM100( 280 ), NULL, NULL }, //Screen 4:3
{ IN2MM100( 17 ), IN2MM100( 22 ), "AnsiC", "CSheet" },
{ IN2MM100( 22 ), IN2MM100( 34 ), "AnsiD", "DSheet" },
{ IN2MM100( 34 ), IN2MM100( 44 ), "AnsiE", "ESheet" },
@@ -155,7 +155,9 @@ static PageDesc aDinTab[] =
{ IN2MM100( 12 ), IN2MM100( 18 ), "ARCHB", NULL },
{ IN2MM100( 18 ), IN2MM100( 24 ), "ARCHC", NULL },
{ IN2MM100( 24 ), IN2MM100( 36 ), "ARCHD", NULL },
- { IN2MM100( 36 ), IN2MM100( 48 ), "ARCHE", NULL }
+ { IN2MM100( 36 ), IN2MM100( 48 ), "ARCHE", NULL },
+ { MM2MM100( 157.5), MM2MM100( 280 ), NULL, NULL } //Screen 16:9
+
};
static const size_t nTabSize = SAL_N_ELEMENTS(aDinTab);
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index 54a37e8..9db2394 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -624,7 +624,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
else
{
// Impress: stets Bildschirmformat, quer
- Size aSz( SvxPaperInfo::GetPaperSize(PAPER_SCREEN, MAP_100TH_MM) );
+ Size aSz( SvxPaperInfo::GetPaperSize(PAPER_SCREEN_4_3, MAP_100TH_MM) );
pPage->SetSize( Size( aSz.Height(), aSz.Width() ) );
pPage->SetBorder(0, 0, 0, 0);
}
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 90e8403..0aa773f 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1264,7 +1264,7 @@ rtl::OUString Printer::GetPaperName( Paper ePaper )
PAPER_A0, PAPER_A1, PAPER_A2, PAPER_A3, PAPER_A4, PAPER_A5,
PAPER_B4_ISO, PAPER_B5_ISO, PAPER_LETTER, PAPER_LEGAL, PAPER_TABLOID,
PAPER_USER, PAPER_B6_ISO, PAPER_ENV_C4, PAPER_ENV_C5, PAPER_ENV_C6, PAPER_ENV_C65,
- PAPER_ENV_DL, PAPER_SLIDE_DIA, PAPER_SCREEN, PAPER_C, PAPER_D, PAPER_E,
+ PAPER_ENV_DL, PAPER_SLIDE_DIA, PAPER_SCREEN_4_3, PAPER_SCREEN_16_9, PAPER_C, PAPER_D, PAPER_E,
PAPER_EXECUTIVE, PAPER_FANFOLD_LEGAL_DE, PAPER_ENV_MONARCH, PAPER_ENV_PERSONAL,
PAPER_ENV_9, PAPER_ENV_10, PAPER_ENV_11, PAPER_ENV_12, PAPER_KAI16,
PAPER_KAI32, PAPER_KAI32BIG, PAPER_B4_JIS, PAPER_B5_JIS, PAPER_B6_JIS,
--
1.7.5.4
--------------050602070700070901000101
Content-Type: text/x-patch;
name="0002-fdo-42986-Add-Presentationsize-16-9-Widescreen.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-fdo-42986-Add-Presentationsize-16-9-Widescreen.patch"
More information about the LibreOffice
mailing list