[PATCH] fdo#42986 Add Presentationsize 16:9 Widescreen

Rob Snelders programming at ertai.nl
Wed Apr 18 14:30:26 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/inc/sdenumdef.hxx              |    2 +-
 sd/source/core/drawdoc2.cxx       |    2 +-
 sd/source/ui/app/sdmod1.cxx       |   10 ++++++++++
 sd/source/ui/dlg/dlgass.cxx       |    6 ++++++
 sd/source/ui/dlg/dlgass.src       |   10 ++++++++++
 sd/source/ui/inc/dlgass.hrc       |    1 +
 vcl/source/gdi/print.cxx          |    2 +-
 vcl/source/src/print.src          |    1 -
 13 files changed, 46 insertions(+), 15 deletions(-)

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index a0b5cc8..1ef696e 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..2137ff2 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/inc/sdenumdef.hxx b/sd/inc/sdenumdef.hxx
index 38563d7..c1301b8 100644
--- a/sd/inc/sdenumdef.hxx
+++ b/sd/inc/sdenumdef.hxx
@@ -29,7 +29,7 @@
 #ifndef _SD_ENUMDEF_HXX
 #define _SD_ENUMDEF_HXX
 
-enum OutputType { OUTPUT_PAGE, OUTPUT_OVERHEAD, OUTPUT_SLIDE, OUTPUT_PRESENTATION, OUTPUT_ORIGINAL };
+enum OutputType { OUTPUT_PAGE, OUTPUT_OVERHEAD, OUTPUT_SLIDE, OUTPUT_PRESENTATION, OUTPUT_ORIGINAL, OUTPUT_WIDESCREEN };
 enum StartType { ST_EMPTY, ST_TEMPLATE, ST_OPEN };
 
 #define RET_SNAP_DELETE 111
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/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 2cb4b67..222afc1 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -866,6 +866,16 @@ void SdModule::ChangeMedium( ::sd::DrawDocShell* pDocShell, SfxViewFrame* pViewF
         }
         break;
 
+        case OUTPUT_WIDESCREEN:
+        {
+            aNewSize = Size(28000, 15750);
+            nLeft =0;
+            nRight=0;
+            nUpper=0;
+            nLower=0;
+        }
+        break;
+
         case OUTPUT_PRESENTATION:
         {
             aNewSize = Size(28000, 21000);
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 6a31952..92317ed 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -322,6 +322,7 @@ public:
     RadioButton*        mpPage2Medium3RB;
     RadioButton*        mpPage2Medium4RB;
     RadioButton*        mpPage2Medium5RB;
+    RadioButton*        mpPage2Medium6RB;
 
     // Seite 3
     FixedBitmap*        mpPage3FB;
@@ -488,6 +489,8 @@ AssistentDlgImpl::AssistentDlgImpl( ::Window* pWindow, const Link& rFinishLink,
         mpPage2Medium1RB = new RadioButton( pWindow, SdResId(RB_PAGE2_MEDIUM1) ));
     maAssistentFunc.InsertControl(2,
         mpPage2Medium2RB = new RadioButton( pWindow, SdResId(RB_PAGE2_MEDIUM2) ));
+    maAssistentFunc.InsertControl(2,
+        mpPage2Medium6RB = new RadioButton( pWindow, SdResId(RB_PAGE2_MEDIUM6) ));
     mpPage2Medium5RB->Check();
 
     mpPage2RegionLB->SetSelectHdl(LINK(this,AssistentDlgImpl,SelectRegionHdl));
@@ -710,6 +713,7 @@ AssistentDlgImpl::~AssistentDlgImpl()
     delete mpPage2Medium3RB;
     delete mpPage2Medium4RB;
     delete mpPage2Medium5RB;
+    delete mpPage2Medium6RB;
 
     // Seite 3
     delete mpPage3FB;
@@ -1925,6 +1929,8 @@ OutputType AssistentDlg::GetOutputMedium() const
         return OUTPUT_OVERHEAD;
     else if(mpImpl->mpPage2Medium4RB->IsChecked())
         return OUTPUT_PAGE;
+    else if(mpImpl->mpPage2Medium6RB->IsChecked())
+        return OUTPUT_WIDESCREEN;
     else
         return OUTPUT_ORIGINAL;
 }
diff --git a/sd/source/ui/dlg/dlgass.src b/sd/source/ui/dlg/dlgass.src
index 6427b9b..7c0bad1 100644
--- a/sd/source/ui/dlg/dlgass.src
+++ b/sd/source/ui/dlg/dlgass.src
@@ -239,6 +239,16 @@ ModalDialog DLG_ASS
         Text [ en-US ] = "P~aper" ;
     };
 
+    RadioButton RB_PAGE2_MEDIUM6
+    {
+        HelpID = "sd:RadioButton:DLG_ASS:RB_PAGE2_MEDIUM6";
+        OutputSize = TRUE ;
+        Pos = MAP_APPFONT ( 75 , 149  ) ;
+        Size = MAP_APPFONT ( 59 , 10 ) ;
+        TabStop = TRUE ;
+        Text [ en-US ] = "W~idescreen" ;
+    };
+
     // Seite 3
     FixedBitmap FB_PAGE3
     {
diff --git a/sd/source/ui/inc/dlgass.hrc b/sd/source/ui/inc/dlgass.hrc
index 5e406cf..69b8579 100644
--- a/sd/source/ui/inc/dlgass.hrc
+++ b/sd/source/ui/inc/dlgass.hrc
@@ -53,6 +53,7 @@
 #define RB_PAGE2_MEDIUM3            37
 #define RB_PAGE2_MEDIUM4            38
 #define RB_PAGE2_MEDIUM5            39
+#define RB_PAGE2_MEDIUM6            66
 
 #define FB_PAGE3                    40
 #define FL_PAGE3_EFFECT         41
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 90e8403..73ece38 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_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,
diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src
index 986c381..a767c17 100644
--- a/vcl/source/src/print.src
+++ b/vcl/source/src/print.src
@@ -513,7 +513,6 @@ StringArray RID_STR_PAPERNAMES
         < "C6/5 Envelope"; >;
         < "DL Envelope"; >;
         < "Dia Slide"; >;
-        < "Screen"; >;
         < "C"; >;
         < "D"; >;
         < "E"; >;
-- 
1.7.5.4


--------------030205020301060200080808--


More information about the LibreOffice mailing list