diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/app/appopt.cxx | 40 | ||||
-rw-r--r-- | sw/source/ui/app/swmodul1.cxx | 11 | ||||
-rw-r--r-- | sw/source/ui/config/config.hrc | 8 | ||||
-rw-r--r-- | sw/source/ui/config/optdlg.hrc | 11 | ||||
-rw-r--r-- | sw/source/ui/config/optdlg.src | 77 | ||||
-rw-r--r-- | sw/source/ui/config/optload.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/config/optload.hrc | 6 | ||||
-rw-r--r-- | sw/source/ui/config/optload.src | 564 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 102 | ||||
-rw-r--r-- | sw/source/ui/config/usrpref.cxx | 56 | ||||
-rw-r--r-- | sw/source/ui/inc/optload.hxx | 6 | ||||
-rw-r--r-- | sw/source/ui/inc/optpage.hxx | 9 | ||||
-rw-r--r-- | sw/source/ui/inc/usrpref.hxx | 19 | ||||
-rw-r--r-- | sw/source/ui/inc/view.hxx | 6 | ||||
-rw-r--r-- | sw/source/ui/uiview/view.cxx | 11 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewmdi.cxx | 41 |
16 files changed, 618 insertions, 359 deletions
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx index 281197f8cfb1..d4269ee68117 100644 --- a/sw/source/ui/app/appopt.cxx +++ b/sw/source/ui/app/appopt.cxx @@ -2,9 +2,9 @@ * * $RCSfile: appopt.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: os $ $Date: 2001-03-22 10:34:48 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -220,6 +220,7 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId ) SID_HTML_MODE, SID_HTML_MODE, FN_PARAM_SHADOWCURSOR, FN_PARAM_SHADOWCURSOR, FN_PARAM_CRSR_IN_PROTECTED, FN_PARAM_CRSR_IN_PROTECTED, + FN_HSCROLL_METRIC, FN_VSCROLL_METRIC, #ifndef PRODUCT FN_PARAM_SWTEST, FN_PARAM_SWTEST, #endif @@ -263,7 +264,16 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId ) pRet->Put(aBool); } - pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, pPref->GetMetric())); + FieldUnit eUnit = pPref->GetHScrollMetric(); + if(pAppView) + pAppView->GetHLinealMetric(eUnit); + pRet->Put(SfxUInt16Item( FN_HSCROLL_METRIC, eUnit)); + + eUnit = pPref->GetVScrollMetric(); + if(pAppView) + pAppView->GetVLinealMetric(eUnit); + pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, eUnit)); + pRet->Put(SfxUInt16Item(SID_ATTR_METRIC, pPref->GetMetric())); if(bTextDialog) { if(pAppView) @@ -394,6 +404,27 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; ::SetDfltMetric((FieldUnit)pMetricItem->GetValue(), !bTextDialog); } + if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, + FALSE, &pItem ) ) + { + SFX_APP()->SetOptions(rSet); + const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; + FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); + pUsrPref->SetHScrollMetric(eUnit); + if(pAppView) + pAppView->ChangeTabMetric(eUnit); + } + + if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, + FALSE, &pItem ) ) + { + SFX_APP()->SetOptions(rSet); + const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem; + FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue(); + pUsrPref->SetVScrollMetric(eUnit); + if(pAppView) + pAppView->ChangeVLinealMetric(eUnit); + } if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem ) ) @@ -569,6 +600,9 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItem /*------------------------------------------------------------------------- $Log: not supported by cvs2svn $ + Revision 1.7 2001/03/22 10:34:48 os + include removed + Revision 1.6 2001/03/22 09:16:59 os options dialog changes diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index 714f101aafb1..03acd115a5e7 100644 --- a/sw/source/ui/app/swmodul1.cxx +++ b/sw/source/ui/app/swmodul1.cxx @@ -2,9 +2,9 @@ * * $RCSfile: swmodul1.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: os $ $Date: 2001-03-22 09:17:17 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -537,14 +537,17 @@ void SwModule::ApplyUserMetric( FieldUnit eMetric, BOOL bWeb ) if(eOldMetric != eMetric) pPref->SetMetric(eMetric); + FieldUnit eHScrollMetric = pPref->IsHScrollMetric() ? pPref->GetHScrollMetric() : eMetric; + FieldUnit eVScrollMetric = pPref->IsVScrollMetric() ? pPref->GetVScrollMetric() : eMetric; + SwView* pTmpView = SwModule::GetFirstView(); // fuer alle MDI-Fenster das Lineal umschalten while(pTmpView) { if(bWeb == (0 != PTR_CAST(SwWebView, pTmpView))) { - pTmpView->ChangeVLinealMetric(eMetric); - pTmpView->ChangeTabMetric(eMetric); + pTmpView->ChangeVLinealMetric(eHScrollMetric); + pTmpView->ChangeTabMetric(eVScrollMetric); } pTmpView = SwModule::GetNextView(pTmpView); diff --git a/sw/source/ui/config/config.hrc b/sw/source/ui/config/config.hrc index e7ee890f2bb8..22587b8b668d 100644 --- a/sw/source/ui/config/config.hrc +++ b/sw/source/ui/config/config.hrc @@ -2,9 +2,9 @@ * * $RCSfile: config.hrc,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:14:33 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -87,8 +87,8 @@ #define DLG_CONFIG_ADDR (RC_CONFIG_BEGIN + 17) #define STR_ERROR_PATH (RC_CONFIG_BEGIN + 25) - -#define CONFIG_ACT_END STR_ERROR_PATH +#define STR_ARR_METRIC (RC_CONFIG_BEGIN + 26) +#define CONFIG_ACT_END STR_ARR_METRIC #if CONFIG_ACT_END > RC_CONFIG_END #error Resource-Id Ueberlauf in #file, #line diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc index c1299299e58b..58b8208e59c0 100644 --- a/sw/source/ui/config/optdlg.hrc +++ b/sw/source/ui/config/optdlg.hrc @@ -2,9 +2,9 @@ * * $RCSfile: optdlg.hrc,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: os $ $Date: 2001-03-22 09:36:36 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -88,9 +88,13 @@ #define CB_FLDBACK 21 #define GB_LINE 22 #define CB_POSTIT 23 - #define CB_BIGHANDLE 25 +#define GB_SETTINGS 26 +#define LB_METRIC 27 +#define FT_METRIC 28 + +//test tab page #define CB_TEST1 25 #define CB_TEST2 26 #define CB_TEST3 27 @@ -148,6 +152,7 @@ #define RB_ONLY 81 #define RB_END 82 #define RB_PAGEEND 83 +#define ST_NONE 84 #define LB_FAX 86 #define CB_BLACK_FONT 87 #define LB_HMETRIC 88 diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index aa2749e51624..0cdbd953b225 100644 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -2,9 +2,9 @@ * * $RCSfile: optdlg.src,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: kz $ $Date: 2001-04-06 19:24:05 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -347,7 +347,7 @@ TabPage TP_CONTENT_OPT CheckBox CB_HRULER { Pos = MAP_APPFONT ( 136 , 40 ) ; - Size = MAP_APPFONT ( 108 , 10 ) ; + Size = MAP_APPFONT ( 65 , 10 ) ; Text = "Horizontales ~Lineal" ; Text [ ENGLISH ] = "~Horic. ruler" ; Text [ norwegian ] = "~Horic. ruler" ; @@ -381,7 +381,7 @@ TabPage TP_CONTENT_OPT CheckBox CB_VRULER { Pos = MAP_APPFONT ( 136 , 53 ) ; - Size = MAP_APPFONT ( 108 , 10 ) ; + Size = MAP_APPFONT ( 65 , 10 ) ; Text = "Verti~kales Lineal" ; Text [ ENGLISH ] = "~Vert. ruler" ; Text [ norwegian ] = "~Vert. ruler" ; @@ -740,6 +740,69 @@ TabPage TP_CONTENT_OPT Text[ turkish ] = "Alanlar"; Text[ language_user1 ] = " "; }; + FixedLine GB_SETTINGS + { + Pos = MAP_APPFONT ( 130 , 122 ) ; + Size = MAP_APPFONT ( 120 , 8 ) ; + Text = "Einstellungen"; + Text [ ENGLISH ] = "Settings" ; + Text[ english_us ] = "Settings"; + Text[ portuguese ] = "Settings"; + Text[ russian ] = ""; + Text[ greek ] = ""; + Text[ dutch ] = "Settings"; + Text[ french ] = "Settings"; + Text[ spanish ] = "Settings"; + Text[ italian ] = "Settings"; + Text[ danish ] = "Settings"; + Text[ swedish ] = "Instllningar"; + Text[ polish ] = "Ustawienia"; + Text[ portuguese_brazilian ] = "Settings"; + Text[ japanese ] = "ݒ"; + Text[ korean ] = "Settings"; + Text[ chinese_simplified ] = "趨"; + Text[ chinese_traditional ] = "]w"; + Text[ turkish ] = "Settings"; + Text[ arabic ] = ""; + Hide = TRUE; + }; + FixedText FT_METRIC + { + Pos = MAP_APPFONT ( 136 , 135 ) ; + Size = MAP_APPFONT ( 60 , 8 ) ; + Text = "Maeinheit"; + Text [ ENGLISH ] = "Measurement units" ; + Text [ italian ] = "Unit di misura"; + Text [ portuguese_brazilian ] = "Unidades mtricas"; + Text [ portuguese ] = "Unidades mtricas"; + Text [ danish ] = "Mleenhed"; + Text [ french ] = "Unit de mesure"; + Text [ swedish ] = "Mttenhet"; + Text [ dutch ] = "Maateenheid"; + Text [ spanish ] = "Unidad de medida"; + Text [ english_us ] = "Measurement unit"; + Text[ chinese_simplified ] = "λ"; + Text[ russian ] = " "; + Text[ polish ] = "Jednostka miary"; + Text[ japanese ] = "gP"; + Text [ norwegian ] = "Metriske Enheter" ; + Text [ finnish ] = "Metriset yksikt" ; + Text[ chinese_traditional ] = "pq"; + Text[ arabic ] = " "; + Text[ greek ] = " "; + Text[ korean ] = " "; + Text[ turkish ] = "l birimi"; + Text[ language_user1 ] = " "; + Hide = TRUE; + }; + ListBox LB_METRIC + { + Pos = MAP_APPFONT ( 199, 133 ) ; + Size = MAP_APPFONT ( 50 , 50 ) ; + Border = TRUE ; + DropDown = TRUE ; + Hide = TRUE; + }; }; /**************************************************************************/ /* */ @@ -1342,9 +1405,13 @@ TabPage TP_OPTPRINT_PAGE Size = MAP_APPFONT ( 184 , 70 ) ; TabStop = TRUE ; DropDown = TRUE ; - Sort = TRUE ; Group = TRUE ; }; + String ST_NONE + { + Text = "<Keiner>" ; + Text[English] = "<None>" ; + }; }; /**************************************************************************/ /* */ diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index cc594c338d18..de5457c1c572 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -2,9 +2,9 @@ * * $RCSfile: optload.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: os $ $Date: 2001-04-04 14:25:25 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -122,7 +122,9 @@ #ifndef _SWDOCSH_HXX //autogen #include <docsh.hxx> #endif - +#ifndef _CONFIG_HRC +#include <config.hrc> +#endif /* -----------------22.10.98 15:12------------------- * * --------------------------------------------------*/ @@ -149,13 +151,13 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) : aMergeDistPageStartCB(this, ResId(CB_MERGE_PARA_DIST_PAGESTART )), aCompatGB (this, ResId(GB_COMPAT )), pWrtShell (0), - aMetricArr ( SW_RES( ST_METRIC ) ), nLastTab(0), nOldLinkMode(MANUAL), bHTMLMode(FALSE) { FreeResource(); + SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) ); for ( USHORT i = 0; i < aMetricArr.Count(); ++i ) { String sMetric = aMetricArr.GetStringByPos( i ); diff --git a/sw/source/ui/config/optload.hrc b/sw/source/ui/config/optload.hrc index 7ca87447b8dc..ee8058813289 100644 --- a/sw/source/ui/config/optload.hrc +++ b/sw/source/ui/config/optload.hrc @@ -2,9 +2,9 @@ * * $RCSfile: optload.hrc,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: os $ $Date: 2001-03-22 09:36:36 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -72,7 +72,7 @@ #define CB_MERGE_PARA_DIST_PAGESTART 14 #define GB_SETTINGS 15 -#define ST_METRIC 16 + #define FT_TAB 17 #define MF_TAB 18 #define LB_METRIC 19 diff --git a/sw/source/ui/config/optload.src b/sw/source/ui/config/optload.src index 9a197e8b22c8..687a656e174c 100644 --- a/sw/source/ui/config/optload.src +++ b/sw/source/ui/config/optload.src @@ -2,9 +2,9 @@ * * $RCSfile: optload.src,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: kz $ $Date: 2001-04-06 19:25:58 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,6 +64,7 @@ #include "globals.hrc" #include "optload.hrc" #include "helpid.h" +#include "config.hrc" /**************************************************************************/ /* */ @@ -429,285 +430,6 @@ TabPage TP_OPTLOAD_PAGE Border = TRUE ; DropDown = TRUE ; }; - StringArray ST_METRIC - { - ItemList = - { - < "Millimeter" ; FUNIT_MM ; > ; - < "Zentimeter" ; FUNIT_CM ; > ; - < "Meter" ; FUNIT_M ; > ; - < "Kilometer" ; FUNIT_KM ; > ; - < "Zoll" ; FUNIT_INCH ; > ; - < "Fu" ; FUNIT_FOOT ; > ; - < "Meilen" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Point" ; FUNIT_POINT ; > ; - }; - ItemList [ English ] = - { - < "Millimeter" ; FUNIT_MM ; > ; - < "Zentimeter" ; FUNIT_CM ; > ; - < "Meter" ; FUNIT_M ; > ; - < "Kilometer" ; FUNIT_KM ; > ; - < "Zoll" ; FUNIT_INCH ; > ; - < "Fu" ; FUNIT_FOOT ; > ; - < "Meilen" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Point" ; FUNIT_POINT ; > ; - }; - ItemList [ norwegian ] = - { - < "Millimeter" ; FUNIT_MM ; > ; - < "Zentimeter" ; FUNIT_CM ; > ; - < "Meter" ; FUNIT_M ; > ; - < "Kilometer" ; FUNIT_KM ; > ; - < "Zoll" ; FUNIT_INCH ; > ; - < "Fu" ; FUNIT_FOOT ; > ; - < "Meilen" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Point" ; FUNIT_POINT ; > ; - }; - ItemList [ italian ] = - { - < "Millimetro" ; FUNIT_MM ; > ; - < "Centimetro" ; FUNIT_CM ; > ; - < "Metro" ; FUNIT_M ; > ; - < "Chilometro" ; FUNIT_KM ; > ; - < "Pollice" ; FUNIT_INCH ; > ; - < "piede" ; FUNIT_FOOT ; > ; - < "miglia" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Punto" ; FUNIT_POINT ; > ; - }; - ItemList [ portuguese_brazilian ] = - { - < "Millimeter" ; FUNIT_MM ; > ; - < "Zentimeter" ; FUNIT_CM ; > ; - < "Meter" ; FUNIT_M ; > ; - < "Kilometer" ; FUNIT_KM ; > ; - < "Zoll" ; FUNIT_INCH ; > ; - < "Fu" ; FUNIT_FOOT ; > ; - < "Meilen" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Ponto" ; FUNIT_POINT ; > ; - }; - ItemList [ portuguese ] = - { - < "Milmetro" ; FUNIT_MM ; > ; - < "Centmetro" ; FUNIT_CM ; > ; - < "Metro" ; FUNIT_M ; > ; - < "Quilmetro" ; FUNIT_KM ; > ; - < "Polegada" ; FUNIT_INCH ; > ; - < "P" ; FUNIT_FOOT ; > ; - < "Milhas" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Ponto" ; FUNIT_POINT ; > ; - }; - ItemList [ french ] = - { - < "Millimtre" ; FUNIT_MM ; > ; - < "Centimtre" ; FUNIT_CM ; > ; - < "Mtre" ; FUNIT_M ; > ; - < "Kilomtre" ; FUNIT_KM ; > ; - < "Pouce" ; FUNIT_INCH ; > ; - < "Pied" ; FUNIT_FOOT ; > ; - < "Miles" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Point" ; FUNIT_POINT ; > ; - }; - ItemList [ dutch ] = - { - < "Millimeter" ; FUNIT_MM ; > ; - < "Centimeter" ; FUNIT_CM ; > ; - < "Meter" ; FUNIT_M ; > ; - < "Kilometer" ; FUNIT_KM ; > ; - < "Duim" ; FUNIT_INCH ; > ; - < "Voet" ; FUNIT_FOOT ; > ; - < "Mijlen" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Punt" ; FUNIT_POINT ; > ; - }; - ItemList [ spanish ] = - { - < "Milmetro" ; FUNIT_MM ; > ; - < "Centmetro" ; FUNIT_CM ; > ; - < "Metro" ; FUNIT_M ; > ; - < "Kilmetro" ; FUNIT_KM ; > ; - < "Pulgadas" ; FUNIT_INCH ; > ; - < "Pie" ; FUNIT_FOOT ; > ; - < "Millas" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Punto" ; FUNIT_POINT ; > ; - }; - ItemList [ danish ] = - { - < "Millimeter" ; FUNIT_MM ; > ; - < "Centimeter" ; FUNIT_CM ; > ; - < "Meter" ; FUNIT_M ; > ; - < "Kilometer" ; FUNIT_KM ; > ; - < "Tommer" ; FUNIT_INCH ; > ; - < "Fod" ; FUNIT_FOOT ; > ; - < "Mil" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Punkt" ; FUNIT_POINT ; > ; - }; - ItemList [ swedish ] = - { - < "Millimeter" ; FUNIT_MM ; > ; - < "Centimeter" ; FUNIT_CM ; > ; - < "Meter" ; FUNIT_M ; > ; - < "Kilometer" ; FUNIT_KM ; > ; - < "Tum" ; FUNIT_INCH ; > ; - < "Fot" ; FUNIT_FOOT ; > ; - < "Mil" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Punkt" ; FUNIT_POINT ; > ; - }; - ItemList [ finnish ] = - { - < "Millimeter" ; FUNIT_MM ; > ; - < "Zentimeter" ; FUNIT_CM ; > ; - < "Meter" ; FUNIT_M ; > ; - < "Kilometer" ; FUNIT_KM ; > ; - < "Zoll" ; FUNIT_INCH ; > ; - < "Fu" ; FUNIT_FOOT ; > ; - < "Meilen" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Point" ; FUNIT_POINT ; > ; - }; - ItemList [ english_us ] = - { - < "Millimeter" ; FUNIT_MM ; > ; - < "Centimeter" ; FUNIT_CM ; > ; - < "Meter" ; FUNIT_M ; > ; - < "Kilometer" ; FUNIT_KM ; > ; - < "Inch" ; FUNIT_INCH ; > ; - < "Foot" ; FUNIT_FOOT ; > ; - < "Miles" ; FUNIT_MILE ; > ; - < "Pica" ; FUNIT_PICA ; > ; - < "Point" ; FUNIT_POINT ; > ; - }; - ItemList [ chinese_simplified ] = - { - < "" ; FUNIT_MM ; > ; - < "" ; FUNIT_CM ; > ; - < "" ; FUNIT_M ; > ; - < "" ; FUNIT_KM ; > ; - < "Ӣ" ; FUNIT_INCH ; > ; - < "Ӣ" ; FUNIT_FOOT ; > ; - < "Ӣ" ; FUNIT_MILE ; > ; - < "Ƥַ" ; FUNIT_PICA ; > ; - < "" ; FUNIT_POINT ; > ; - }; - ItemList [ russian ] = - { - < "" ; FUNIT_MM ; > ; - < "" ; FUNIT_CM ; > ; - < "" ; FUNIT_M ; > ; - < "" ; FUNIT_KM ; > ; - < "" ; FUNIT_INCH ; > ; - < "" ; FUNIT_FOOT ; > ; - < "" ; FUNIT_MILE ; > ; - < "" ; FUNIT_PICA ; > ; - < "" ; FUNIT_POINT ; > ; - }; - ItemList [ polish ] = - { - < "Milimetr" ; FUNIT_MM ; > ; - < "Centymetr" ; FUNIT_CM ; > ; - < "Metr" ; FUNIT_M ; > ; - < "Kilometr" ; FUNIT_KM ; > ; - < "Cal" ; FUNIT_INCH ; > ; - < "Stopa" ; FUNIT_FOOT ; > ; - < "Mile" ; FUNIT_MILE ; > ; - < "Cycero" ; FUNIT_PICA ; > ; - < "Punkt" ; FUNIT_POINT ; > ; - }; - ItemList [ japanese ] = - { - < "Ұ" ; FUNIT_MM ; > ; - < "Ұ" ; FUNIT_CM ; > ; - < "Ұ" ; FUNIT_M ; > ; - < "Ұ" ; FUNIT_KM ; > ; - < "" ; FUNIT_INCH ; > ; - < "̨" ; FUNIT_FOOT ; > ; - < "ϲ" ; FUNIT_MILE ; > ; - < "߲" ; FUNIT_PICA ; > ; - < "߲" ; FUNIT_POINT ; > ; - }; - ItemList [ chinese_traditional ] = - { - < "@" ; FUNIT_MM ; > ; - < "" ; FUNIT_CM ; > ; - < "" ; FUNIT_M ; > ; - < "" ; FUNIT_KM ; > ; - < "^o" ; FUNIT_INCH ; > ; - < "^" ; FUNIT_FOOT ; > ; - < "^" ; FUNIT_MILE ; > ; - < "֥ir" ; FUNIT_PICA ; > ; - < "I" ; FUNIT_POINT ; > ; - }; - ItemList [ arabic ] = - { - < "" ; FUNIT_MM ; > ; - < "" ; FUNIT_CM ; > ; - < "" ; FUNIT_M ; > ; - < "" ; FUNIT_KM ; > ; - < "" ; FUNIT_INCH ; > ; - < "" ; FUNIT_FOOT ; > ; - < "" ; FUNIT_MILE ; > ; - < "" ; FUNIT_PICA ; > ; - < "" ; FUNIT_POINT ; > ; - }; - ItemList [ greek ] = - { - < "" ; FUNIT_MM ; > ; - < "" ; FUNIT_CM ; > ; - < "" ; FUNIT_M ; > ; - < "" ; FUNIT_KM ; > ; - < "" ; FUNIT_INCH ; > ; - < "" ; FUNIT_FOOT ; > ; - < "" ; FUNIT_MILE ; > ; - < "Pica ()" ; FUNIT_PICA ; > ; - < "" ; FUNIT_POINT ; > ; - }; - ItemList [ korean ] = - { - < "и" ; FUNIT_MM ; > ; - < "Ƽ" ; FUNIT_CM ; > ; - < "" ; FUNIT_M ; > ; - < "ųι" ; FUNIT_KM ; > ; - < "ġ" ; FUNIT_INCH ; > ; - < "Ʈ" ; FUNIT_FOOT ; > ; - < "" ; FUNIT_MILE ; > ; - < "ī" ; FUNIT_PICA ; > ; - < "Ʈ" ; FUNIT_POINT ; > ; - }; - ItemList [ turkish ] = - { - < "Milimetre" ; FUNIT_MM ; > ; - < "Santimetre" ; FUNIT_CM ; > ; - < "Metre" ; FUNIT_M ; > ; - < "Kilometre" ; FUNIT_KM ; > ; - < "n" ; FUNIT_INCH ; > ; - < "Ft" ; FUNIT_FOOT ; > ; - < "Mil" ; FUNIT_MILE ; > ; - < "Pika" ; FUNIT_PICA ; > ; - < "Nokta" ; FUNIT_POINT ; > ; - }; - ItemList [ language_user1 ] = - { - < " " ; FUNIT_MM ; > ; - < " " ; FUNIT_CM ; > ; - < " " ; FUNIT_M ; > ; - < " " ; FUNIT_KM ; > ; - < " " ; FUNIT_INCH ; > ; - < " " ; FUNIT_FOOT ; > ; - < " " ; FUNIT_MILE ; > ; - < " " ; FUNIT_PICA ; > ; - < " " ; FUNIT_POINT ; > ; - }; - }; FixedText FT_TAB { Pos = MAP_APPFONT ( 130 , 110 ) ; @@ -1410,3 +1132,283 @@ TabPage TP_OPTCAPTION_PAGE Text[ turkish ] = "Resim yazs"; }; +StringArray STR_ARR_METRIC +{ + ItemList = + { + < "Millimeter" ; FUNIT_MM ; > ; + < "Zentimeter" ; FUNIT_CM ; > ; + < "Meter" ; FUNIT_M ; > ; + < "Kilometer" ; FUNIT_KM ; > ; + < "Zoll" ; FUNIT_INCH ; > ; + < "Fu" ; FUNIT_FOOT ; > ; + < "Meilen" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Point" ; FUNIT_POINT ; > ; + }; + ItemList [ English ] = + { + < "Millimeter" ; FUNIT_MM ; > ; + < "Zentimeter" ; FUNIT_CM ; > ; + < "Meter" ; FUNIT_M ; > ; + < "Kilometer" ; FUNIT_KM ; > ; + < "Zoll" ; FUNIT_INCH ; > ; + < "Fu" ; FUNIT_FOOT ; > ; + < "Meilen" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Point" ; FUNIT_POINT ; > ; + }; + ItemList [ norwegian ] = + { + < "Millimeter" ; FUNIT_MM ; > ; + < "Zentimeter" ; FUNIT_CM ; > ; + < "Meter" ; FUNIT_M ; > ; + < "Kilometer" ; FUNIT_KM ; > ; + < "Zoll" ; FUNIT_INCH ; > ; + < "Fu" ; FUNIT_FOOT ; > ; + < "Meilen" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Point" ; FUNIT_POINT ; > ; + }; + ItemList [ italian ] = + { + < "Millimetro" ; FUNIT_MM ; > ; + < "Centimetro" ; FUNIT_CM ; > ; + < "Metro" ; FUNIT_M ; > ; + < "Chilometro" ; FUNIT_KM ; > ; + < "Pollice" ; FUNIT_INCH ; > ; + < "piede" ; FUNIT_FOOT ; > ; + < "miglia" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Punto" ; FUNIT_POINT ; > ; + }; + ItemList [ portuguese_brazilian ] = + { + < "Millimeter" ; FUNIT_MM ; > ; + < "Zentimeter" ; FUNIT_CM ; > ; + < "Meter" ; FUNIT_M ; > ; + < "Kilometer" ; FUNIT_KM ; > ; + < "Zoll" ; FUNIT_INCH ; > ; + < "Fu" ; FUNIT_FOOT ; > ; + < "Meilen" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Ponto" ; FUNIT_POINT ; > ; + }; + ItemList [ portuguese ] = + { + < "Milmetro" ; FUNIT_MM ; > ; + < "Centmetro" ; FUNIT_CM ; > ; + < "Metro" ; FUNIT_M ; > ; + < "Quilmetro" ; FUNIT_KM ; > ; + < "Polegada" ; FUNIT_INCH ; > ; + < "P" ; FUNIT_FOOT ; > ; + < "Milhas" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Ponto" ; FUNIT_POINT ; > ; + }; + ItemList [ french ] = + { + < "Millimtre" ; FUNIT_MM ; > ; + < "Centimtre" ; FUNIT_CM ; > ; + < "Mtre" ; FUNIT_M ; > ; + < "Kilomtre" ; FUNIT_KM ; > ; + < "Pouce" ; FUNIT_INCH ; > ; + < "Pied" ; FUNIT_FOOT ; > ; + < "Miles" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Point" ; FUNIT_POINT ; > ; + }; + ItemList [ dutch ] = + { + < "Millimeter" ; FUNIT_MM ; > ; + < "Centimeter" ; FUNIT_CM ; > ; + < "Meter" ; FUNIT_M ; > ; + < "Kilometer" ; FUNIT_KM ; > ; + < "Duim" ; FUNIT_INCH ; > ; + < "Voet" ; FUNIT_FOOT ; > ; + < "Mijlen" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Punt" ; FUNIT_POINT ; > ; + }; + ItemList [ spanish ] = + { + < "Milmetro" ; FUNIT_MM ; > ; + < "Centmetro" ; FUNIT_CM ; > ; + < "Metro" ; FUNIT_M ; > ; + < "Kilmetro" ; FUNIT_KM ; > ; + < "Pulgadas" ; FUNIT_INCH ; > ; + < "Pie" ; FUNIT_FOOT ; > ; + < "Millas" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Punto" ; FUNIT_POINT ; > ; + }; + ItemList [ danish ] = + { + < "Millimeter" ; FUNIT_MM ; > ; + < "Centimeter" ; FUNIT_CM ; > ; + < "Meter" ; FUNIT_M ; > ; + < "Kilometer" ; FUNIT_KM ; > ; + < "Tommer" ; FUNIT_INCH ; > ; + < "Fod" ; FUNIT_FOOT ; > ; + < "Mil" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Punkt" ; FUNIT_POINT ; > ; + }; + ItemList [ swedish ] = + { + < "Millimeter" ; FUNIT_MM ; > ; + < "Centimeter" ; FUNIT_CM ; > ; + < "Meter" ; FUNIT_M ; > ; + < "Kilometer" ; FUNIT_KM ; > ; + < "Tum" ; FUNIT_INCH ; > ; + < "Fot" ; FUNIT_FOOT ; > ; + < "Miles" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Punkt" ; FUNIT_POINT ; > ; + }; + ItemList [ finnish ] = + { + < "Millimeter" ; FUNIT_MM ; > ; + < "Zentimeter" ; FUNIT_CM ; > ; + < "Meter" ; FUNIT_M ; > ; + < "Kilometer" ; FUNIT_KM ; > ; + < "Zoll" ; FUNIT_INCH ; > ; + < "Fu" ; FUNIT_FOOT ; > ; + < "Meilen" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Point" ; FUNIT_POINT ; > ; + }; + ItemList [ english_us ] = + { + < "Millimeter" ; FUNIT_MM ; > ; + < "Centimeter" ; FUNIT_CM ; > ; + < "Meter" ; FUNIT_M ; > ; + < "Kilometer" ; FUNIT_KM ; > ; + < "Inch" ; FUNIT_INCH ; > ; + < "Foot" ; FUNIT_FOOT ; > ; + < "Miles" ; FUNIT_MILE ; > ; + < "Pica" ; FUNIT_PICA ; > ; + < "Point" ; FUNIT_POINT ; > ; + }; + ItemList [ chinese_simplified ] = + { + < "" ; FUNIT_MM ; > ; + < "" ; FUNIT_CM ; > ; + < "" ; FUNIT_M ; > ; + < "" ; FUNIT_KM ; > ; + < "Ӣ" ; FUNIT_INCH ; > ; + < "Ӣ" ; FUNIT_FOOT ; > ; + < "Ӣ" ; FUNIT_MILE ; > ; + < "Ƥַ" ; FUNIT_PICA ; > ; + < "" ; FUNIT_POINT ; > ; + }; + ItemList [ russian ] = + { + < "" ; FUNIT_MM ; > ; + < "" ; FUNIT_CM ; > ; + < "" ; FUNIT_M ; > ; + < "" ; FUNIT_KM ; > ; + < "" ; FUNIT_INCH ; > ; + < "" ; FUNIT_FOOT ; > ; + < "" ; FUNIT_MILE ; > ; + < "" ; FUNIT_PICA ; > ; + < "" ; FUNIT_POINT ; > ; + }; + ItemList [ polish ] = + { + < "Milimetr" ; FUNIT_MM ; > ; + < "Centymetr" ; FUNIT_CM ; > ; + < "Metr" ; FUNIT_M ; > ; + < "Kilometr" ; FUNIT_KM ; > ; + < "Cal" ; FUNIT_INCH ; > ; + < "Stopa" ; FUNIT_FOOT ; > ; + < "Mile" ; FUNIT_MILE ; > ; + < "Cycero" ; FUNIT_PICA ; > ; + < "Punkt" ; FUNIT_POINT ; > ; + }; + ItemList [ japanese ] = + { + < "Ұ" ; FUNIT_MM ; > ; + < "Ұ" ; FUNIT_CM ; > ; + < "Ұ" ; FUNIT_M ; > ; + < "Ұ" ; FUNIT_KM ; > ; + < "" ; FUNIT_INCH ; > ; + < "̨" ; FUNIT_FOOT ; > ; + < "ϲ" ; FUNIT_MILE ; > ; + < "߲" ; FUNIT_PICA ; > ; + < "߲" ; FUNIT_POINT ; > ; + }; + ItemList [ chinese_traditional ] = + { + < "@" ; FUNIT_MM ; > ; + < "" ; FUNIT_CM ; > ; + < "" ; FUNIT_M ; > ; + < "" ; FUNIT_KM ; > ; + < "^o" ; FUNIT_INCH ; > ; + < "^" ; FUNIT_FOOT ; > ; + < "^" ; FUNIT_MILE ; > ; + < "֥ir" ; FUNIT_PICA ; > ; + < "I" ; FUNIT_POINT ; > ; + }; + ItemList [ arabic ] = + { + < "" ; FUNIT_MM ; > ; + < "" ; FUNIT_CM ; > ; + < "" ; FUNIT_M ; > ; + < "" ; FUNIT_KM ; > ; + < "" ; FUNIT_INCH ; > ; + < "" ; FUNIT_FOOT ; > ; + < "" ; FUNIT_MILE ; > ; + < "" ; FUNIT_PICA ; > ; + < "" ; FUNIT_POINT ; > ; + }; + ItemList [ greek ] = + { + < "" ; FUNIT_MM ; > ; + < "" ; FUNIT_CM ; > ; + < "" ; FUNIT_M ; > ; + < "" ; FUNIT_KM ; > ; + < "" ; FUNIT_INCH ; > ; + < "" ; FUNIT_FOOT ; > ; + < "" ; FUNIT_MILE ; > ; + < "Pica ()" ; FUNIT_PICA ; > ; + < "" ; FUNIT_POINT ; > ; + }; + ItemList [ korean ] = + { + < "и" ; FUNIT_MM ; > ; + < "Ƽ" ; FUNIT_CM ; > ; + < "" ; FUNIT_M ; > ; + < "ųι" ; FUNIT_KM ; > ; + < "ġ" ; FUNIT_INCH ; > ; + < "Ʈ" ; FUNIT_FOOT ; > ; + < "" ; FUNIT_MILE ; > ; + < "ī" ; FUNIT_PICA ; > ; + < "Ʈ" ; FUNIT_POINT ; > ; + }; + ItemList [ turkish ] = + { + < "Milimetre" ; FUNIT_MM ; > ; + < "Santimetre" ; FUNIT_CM ; > ; + < "Metre" ; FUNIT_M ; > ; + < "Kilometre" ; FUNIT_KM ; > ; + < "n" ; FUNIT_INCH ; > ; + < "Ft" ; FUNIT_FOOT ; > ; + < "Mil" ; FUNIT_MILE ; > ; + < "Pika" ; FUNIT_PICA ; > ; + < "Nokta" ; FUNIT_POINT ; > ; + }; + ItemList [ language_user1 ] = + { + < " " ; FUNIT_MM ; > ; + < " " ; FUNIT_CM ; > ; + < " " ; FUNIT_M ; > ; + < " " ; FUNIT_KM ; > ; + < " " ; FUNIT_INCH ; > ; + < " " ; FUNIT_FOOT ; > ; + < " " ; FUNIT_MILE ; > ; + < " " ; FUNIT_PICA ; > ; + < " " ; FUNIT_POINT ; > ; + }; +}; + diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index c5806336407d..c869933da475 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: optpage.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: os $ $Date: 2001-04-05 05:50:13 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -195,6 +195,10 @@ #include <optdlg.hrc> #endif +#ifndef _SVX_STRARRAY_HXX +#include <svx/strarray.hxx> +#endif + #define C2S(cChar) String::CreateFromAscii(cChar) /******************************************************* ******************************************************/ @@ -231,7 +235,10 @@ SwContentOptPage::SwContentOptPage( Window* pParent, aIdxEntryCB ( this, SW_RES( CB_IDX_ENTRY ) ), aIdxBackCB ( this, SW_RES( CB_INDEX ) ), aFootBackCB ( this, SW_RES( CB_FOOTBACK ) ), - aFldBackCB ( this, SW_RES( CB_FLDBACK ) ) + aFldBackCB ( this, SW_RES( CB_FLDBACK ) ), + aSettingsGB ( this, SW_RES( GB_SETTINGS ) ), + aMetricLB ( this, SW_RES( LB_METRIC ) ), + aMetricFT ( this, SW_RES( FT_METRIC ) ) { FreeResource(); const SfxPoolItem* pItem; @@ -242,14 +249,40 @@ SwContentOptPage::SwContentOptPage( Window* pParent, aIdxEntryCB .Hide(); aIdxBackCB.Hide(); aFldBackCB.SetPosPixel(aIdxEntryCB.GetPosPixel()); + aMetricLB.Show(); + aSettingsGB.Show(); + aMetricFT.Show(); + } + + SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) ); + for ( USHORT i = 0; i < aMetricArr.Count(); ++i ) + { + String sMetric = aMetricArr.GetStringByPos( i ); + FieldUnit eFUnit = (FieldUnit)aMetricArr.GetValue( i ); + + switch ( eFUnit ) + { + case FUNIT_MM: + case FUNIT_CM: + case FUNIT_POINT: + case FUNIT_PICA: + case FUNIT_INCH: + { + // nur diese Metriken benutzen + USHORT nPos = aMetricLB.InsertEntry( sMetric ); + aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit ); + aVMetric.InsertEntry( sMetric ); + aVMetric.SetEntryData( nPos, (void*)(long)eFUnit ); + aHMetric.InsertEntry( sMetric ); + aHMetric.SetEntryData( nPos, (void*)(long)eFUnit ); + } + } } } /*-----------------31.08.96 13.58------------------- --------------------------------------------------*/ - - SwContentOptPage::~SwContentOptPage() { } @@ -257,19 +290,34 @@ SwContentOptPage::~SwContentOptPage() /*-----------------31.08.96 13.58------------------- --------------------------------------------------*/ - - SfxTabPage* SwContentOptPage::Create( Window* pParent, const SfxItemSet& rAttrSet) { return new SwContentOptPage(pParent, rAttrSet); } +/* -----------------------------07.04.01 16:57-------------------------------- + ---------------------------------------------------------------------------*/ +void lcl_SelectMetricLB(ListBox& rMetric, USHORT nSID, const SfxItemSet& rSet) +{ + const SfxPoolItem* pItem; + if( rSet.GetItemState( nSID, FALSE, &pItem ) >= SFX_ITEM_AVAILABLE ) + { + FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue(); + for ( USHORT i = 0; i < rMetric.GetEntryCount(); ++i ) + { + if ( (int)rMetric.GetEntryData( i ) == (int)eFieldUnit ) + { + rMetric.SelectEntryPos( i ); + break; + } + } + } + rMetric.SaveValue(); +} /*-----------------31.08.96 13.58------------------- --------------------------------------------------*/ - - void SwContentOptPage::Reset(const SfxItemSet& rSet) { const SwElemItem* pElemAttr = 0; @@ -300,7 +348,10 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet) aSmoothCBox.Check( pElemAttr->bSmoothScroll ); // bHtmlMode } - + aMetricLB.SetNoSelection(); + lcl_SelectMetricLB(aMetricLB, SID_ATTR_METRIC, rSet); + lcl_SelectMetricLB(aHMetric, FN_HSCROLL_METRIC, rSet); + lcl_SelectMetricLB(aVMetric, FN_VSCROLL_METRIC, rSet); } /*-----------------31.08.96 13.58------------------- @@ -341,6 +392,31 @@ BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet) BOOL bRet = !pOldAttr || aElem != *pOldAttr; if(bRet) bRet = 0 != rSet.Put(aElem); + USHORT nMPos = aMetricLB.GetSelectEntryPos(); + if ( nMPos != aMetricLB.GetSavedValue() ) + { + // Doppel-Cast fuer VA3.0 + USHORT nFieldUnit = (USHORT)(long)aMetricLB.GetEntryData( nMPos ); + rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nFieldUnit ) ); + bRet = TRUE; + } + + nMPos = aHMetric.GetSelectEntryPos(); + if ( nMPos != aHMetric.GetSavedValue() ) + { + // Doppel-Cast fuer VA3.0 + USHORT nFieldUnit = (USHORT)(long)aHMetric.GetEntryData( nMPos ); + rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (UINT16)nFieldUnit ) ); + bRet = TRUE; + } + nMPos = aVMetric.GetSelectEntryPos(); + if ( nMPos != aVMetric.GetSavedValue() ) + { + // Doppel-Cast fuer VA3.0 + USHORT nFieldUnit = (USHORT)(long)aVMetric.GetEntryData( nMPos ); + rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (UINT16)nFieldUnit ) ); + bRet = TRUE; + } return bRet; } /*----------------- OS 27.01.95 ----------------------- @@ -372,6 +448,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage( Window* pParent, aSingleJobsCB (this, SW_RES(CB_SINGLEJOBS)), aFaxFT (this, SW_RES(FT_FAX)), aFaxLB (this, SW_RES(LB_FAX)), + sNone(ResId(ST_NONE)), bAttrModified( FALSE ) { Init(); @@ -469,7 +546,8 @@ BOOL SwAddPrinterTabPage::FillItemSet( SfxItemSet& rCoreSet ) if (aEndPageRB.IsChecked()) aAddPrinterAttr.nPrintPostIts = POSTITS_ENDPAGE; - aAddPrinterAttr.sFaxName = aFaxLB.GetSelectEntry(); + String sFax = aFaxLB.GetSelectEntry(); + aAddPrinterAttr.sFaxName = sNone == sFax ? aEmptyStr : sFax; rCoreSet.Put(aAddPrinterAttr); } return bAttrModified; @@ -529,8 +607,10 @@ IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG ) void SwAddPrinterTabPage::SetFax( const SvStringsDtor& rFaxLst ) { + aFaxLB.InsertEntry(sNone); for ( USHORT i = 0; i < rFaxLst.Count(); ++i ) aFaxLB.InsertEntry( *rFaxLst.GetObject(i) ); + aFaxLB.SelectEntryPos(0); } //------------------------------------------------------------------------ diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx index d35334eeb557..ad45cd7c9769 100644 --- a/sw/source/ui/config/usrpref.cxx +++ b/sw/source/ui/config/usrpref.cxx @@ -2,9 +2,9 @@ * * $RCSfile: usrpref.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: os $ $Date: 2001-03-22 09:28:06 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -121,7 +121,11 @@ SwMasterUsrPref::SwMasterUsrPref(BOOL bWeb) : aCursorConfig(*this), pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : 0), nFldUpdateFlags(0), - nLinkUpdateMode(0) + nLinkUpdateMode(0), + eHScrollMetric(FUNIT_CM), + eVScrollMetric(FUNIT_CM), + bIsHScrollMetricSet(sal_False), + bIsVScrollMetricSet(sal_False) { aContentConfig.Load(); aLayoutConfig.Load(); @@ -306,11 +310,13 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() "Window/VerticalScroll", // 7 "Window/HorizontalRuler", // 8 "Window/VerticalRuler", // 9 - "Window/SmoothScroll", //10 - "Other/MeasureUnit", //11 - "Other/TabStop", //12 + "Window/HorizontalRulerUnit", //10 + "Window/VerticalRulerUnit", //11 + "Window/SmoothScroll", //12 + "Other/MeasureUnit", //13 + "Other/TabStop", //14 }; - const int nCount = bWeb ? 12 : 13; + const int nCount = bWeb ? 14 : 15; Sequence<OUString> aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) @@ -367,11 +373,19 @@ void SwLayoutViewConfig::Commit() case 7: bSet = rParent.IsViewVScrollBar(); break;// "Window/VerticalScroll", case 8: bSet = rParent.IsViewTabwin(); break;// "Window/HorizontalRuler", case 9: bSet = rParent.IsViewVLin(); break;// "Window/VerticalRuler", - case 10: bSet = rParent.IsSmoothScroll(); break;// "Window/SmoothScroll", - case 11: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break;// "Other/MeasureUnit", - case 12: pValues[nProp] <<= rParent.GetDefTab(); break;// "Other/TabStop", + case 10: + if(rParent.bIsHScrollMetricSet) + pValues[nProp] <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit" + break; + case 11: + if(rParent.bIsVScrollMetricSet) + pValues[nProp] <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit" + break; + case 12: bSet = rParent.IsSmoothScroll(); break;// "Window/SmoothScroll", + case 13: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break;// "Other/MeasureUnit", + case 14: pValues[nProp] <<= rParent.GetDefTab(); break;// "Other/TabStop", } - if(nProp < 11) + if(nProp < 10 || nProp == 12) pValues[nProp].setValue(&bSet, ::getBooleanCppuType()); } PutProperties(aNames, aValues); @@ -392,7 +406,7 @@ void SwLayoutViewConfig::Load() { if(pValues[nProp].hasValue()) { - sal_Bool bSet = nProp < 11 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False; + sal_Bool bSet = nProp < 10 || nProp == 12 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False; switch(nProp) { case 0: rParent.SetSubsLines(bSet); break;// "Line/TextBoundary", @@ -405,14 +419,28 @@ void SwLayoutViewConfig::Load() case 7: rParent.SetViewVScrollBar(bSet); break;// "Window/VerticalScroll", case 8: rParent.SetViewTabwin(bSet); break;// "Window/HorizontalRuler", case 9: rParent.SetViewVLin(bSet); break;// "Window/VerticalRuler", - case 10: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll", + case 10: + { + rParent.bIsHScrollMetricSet = sal_True; + sal_Int32 nUnit; pValues[nProp] >>= nUnit; + rParent.eHScrollMetric = ((FieldUnit)nUnit); // "Window/HorizontalRulerUnit" + } + break; case 11: { + rParent.bIsVScrollMetricSet = sal_True; + sal_Int32 nUnit; pValues[nProp] >>= nUnit; + rParent.eVScrollMetric = ((FieldUnit)nUnit); // "Window/VerticalRulerUnit" + } + break; + case 12: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll", + case 13: + { sal_Int32 nUnit; pValues[nProp] >>= nUnit; rParent.SetMetric((FieldUnit)nUnit); } break;// "Other/MeasureUnit", - case 12: + case 14: { sal_Int32 nTab; pValues[nProp] >>= nTab; rParent.SetDefTab(nTab); diff --git a/sw/source/ui/inc/optload.hxx b/sw/source/ui/inc/optload.hxx index 5464c529d374..fb951c040cac 100644 --- a/sw/source/ui/inc/optload.hxx +++ b/sw/source/ui/inc/optload.hxx @@ -2,9 +2,9 @@ * * $RCSfile: optload.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: os $ $Date: 2001-03-22 09:40:18 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -134,8 +134,6 @@ private: UINT16 nLastTab; sal_Int32 nOldLinkMode; - SvxStringArray aMetricArr; - DECL_LINK(CaptionHdl, PushButton*); DECL_LINK(MetricHdl, ListBox*); DECL_LINK(UpdateHdl, CheckBox* ); diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx index 4af3d16da269..267795e2cd3f 100644 --- a/sw/source/ui/inc/optpage.hxx +++ b/sw/source/ui/inc/optpage.hxx @@ -2,9 +2,9 @@ * * $RCSfile: optpage.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: os $ $Date: 2001-03-22 09:40:18 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -136,6 +136,10 @@ class SwContentOptPage : public SfxTabPage CheckBox aFootBackCB; CheckBox aFldBackCB; + FixedLine aSettingsGB; + FixedText aMetricFT; + ListBox aMetricLB; + public: SwContentOptPage( Window* pParent, const SfxItemSet& rSet ); @@ -196,6 +200,7 @@ class SwAddPrinterTabPage : public SfxTabPage CheckBox aPaperFromSetupCB; FixedText aFaxFT; ListBox aFaxLB; + String sNone; BOOL bAttrModified; BOOL bPreview; diff --git a/sw/source/ui/inc/usrpref.hxx b/sw/source/ui/inc/usrpref.hxx index 3457daafb712..a2c7c7fdfe69 100644 --- a/sw/source/ui/inc/usrpref.hxx +++ b/sw/source/ui/inc/usrpref.hxx @@ -2,9 +2,9 @@ * * $RCSfile: usrpref.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: os $ $Date: 2001-03-22 09:08:04 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -184,6 +184,11 @@ class SwMasterUsrPref : public SwViewOption sal_Int32 nFldUpdateFlags; //udpate of fields and charts sal_Int32 nLinkUpdateMode; FieldUnit eUserMetric; + FieldUnit eHScrollMetric; + sal_Bool bIsHScrollMetricSet; + FieldUnit eVScrollMetric; + sal_Bool bIsVScrollMetricSet; + sal_Int32 nDefTab; //default tab stop distance @@ -251,6 +256,16 @@ public: FieldUnit GetMetric() const { return eUserMetric;} void SetMetric(FieldUnit eSet) { eUserMetric = eSet; SetModified();}; + sal_Bool IsHScrollMetric()const {return bIsHScrollMetricSet;} + FieldUnit GetHScrollMetric() const { return bIsHScrollMetricSet ? eHScrollMetric : eUserMetric;} + void SetHScrollMetric(FieldUnit eSet) + { eHScrollMetric = eSet; bIsHScrollMetricSet = sal_True; SetModified();}; + + sal_Bool IsVScrollMetric()const {return bIsVScrollMetricSet;} + FieldUnit GetVScrollMetric() const { return bIsVScrollMetricSet ? eVScrollMetric : eUserMetric;} + void SetVScrollMetric(FieldUnit eSet) + { eVScrollMetric = eSet; bIsVScrollMetricSet = sal_True; SetModified();}; + sal_Int32 GetDefTab() const { return nDefTab;} void SetDefTab( sal_Int32 nSet ) { nDefTab = nSet; SetModified();} diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index a8ce2b540799..779ecea75f5d 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -2,9 +2,9 @@ * * $RCSfile: view.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: mtg $ $Date: 2001-03-23 15:42:43 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -489,6 +489,7 @@ public: inline int KillVLineal(); int StatVLineal() const { return pVLineal != 0; } void ChangeVLinealMetric(FieldUnit eUnit); + BOOL GetVLinealMetric(FieldUnit& rToFill) const; inline int CreateTab(); inline int KillTab(); @@ -497,6 +498,7 @@ public: SvxRuler *GetVLineal() { return pVLineal; } void InvalidateRulerPos(); void ChangeTabMetric(FieldUnit eUnit); + BOOL GetHLinealMetric(FieldUnit& rToFill) const; // Handler void Execute(SfxRequest&); diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index eefd0ffec2a7..3b7678015b0a 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -2,9 +2,9 @@ * * $RCSfile: view.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: mtg $ $Date: 2001-03-23 15:43:00 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -822,7 +822,8 @@ SwView::SwView( SfxViewFrame *pFrame, SfxViewShell* pOldSh ) ASSERT( pDocSh, "View ohne DocShell." ); SwWebDocShell* pWebDShell = PTR_CAST( SwWebDocShell, pDocSh ); - SwViewOption aUsrPref( *SW_MOD()->GetUsrPref( 0 != pWebDShell )); + const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(0 != pWebDShell); + SwViewOption aUsrPref( *pUsrPref); uno::Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() ); sal_Bool bVal; @@ -906,9 +907,7 @@ SwView::SwView( SfxViewFrame *pFrame, SfxViewShell* pOldSh ) // Vom HLineal den ZOOM-Faktor einstellen pHLineal->SetZoom( Fraction( aUsrPref.GetZoom(), 100 ) ); pHLineal->SetDoubleClickHdl(LINK( this, SwView, ExecRulerClick )); - FieldUnit eMetric = ::GetDfltMetric( 0 != pWebDShell ); - if( FUNIT_MM == eMetric ) - eMetric = FUNIT_CM; + FieldUnit eMetric = pUsrPref->GetHScrollMetric(); pHLineal->SetUnit( eMetric ); // DocShell setzen diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index 87ff44450086..e1a076dd9d55 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -2,9 +2,9 @@ * * $RCSfile: viewmdi.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: os $ $Date: 2000-09-28 15:24:06 $ + * last change: $Author: os $ $Date: 2001-04-09 09:46:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -93,7 +93,9 @@ #include "viewopt.hxx" #include "frmatr.hxx" #include "globals.hrc" -#include "docsh.hxx" +#ifndef _WDOCSH_HXX +#include <wdocsh.hxx> +#endif #include "uitool.hxx" #include "cmdid.h" #include "edtwin.hxx" @@ -536,8 +538,6 @@ void SwView::ChangeTabMetric( FieldUnit eUnit ) { if ( pHLineal ) { - if(eUnit == FUNIT_MM) - eUnit = FUNIT_CM; if(pHLineal->GetUnit() != eUnit ) { pHLineal->SetUnit( eUnit ); @@ -550,8 +550,6 @@ void SwView::ChangeVLinealMetric( FieldUnit eUnit ) { if ( pVLineal ) { - if(eUnit == FUNIT_MM) - eUnit = FUNIT_CM; if(pVLineal->GetUnit() != eUnit) { pVLineal->SetUnit( eUnit ); @@ -559,7 +557,24 @@ void SwView::ChangeVLinealMetric( FieldUnit eUnit ) } } } +/* -----------------------------07.04.01 17:09-------------------------------- + + ---------------------------------------------------------------------------*/ +BOOL SwView::GetVLinealMetric(FieldUnit& eToFill) const +{ + if(pVLineal) + eToFill = pVLineal->GetUnit(); + return pVLineal != 0; +} +/* -----------------------------07.04.01 17:09-------------------------------- + ---------------------------------------------------------------------------*/ +BOOL SwView::GetHLinealMetric(FieldUnit& eToFill) const +{ + if(pHLineal) + eToFill = pHLineal->GetUnit(); + return pHLineal != 0; +} /************************************************************************* |* |* SwView::CreateVLineal() @@ -586,10 +601,11 @@ int SwView::_CreateVLineal() pVLineal->SetActive(GetFrame() && IsActive()); const SwViewOption* pOpt = pWrtShell->GetViewOptions(); pVLineal->SetZoom(Fraction(pOpt->GetZoom(), 100)); - BOOL bWeb = 0 != PTR_CAST(SwWebView, this); - FieldUnit eMetric = ::GetDfltMetric(bWeb); - if(eMetric == FUNIT_MM) - eMetric = FUNIT_CM; + SwDocShell* pDocSh = PTR_CAST( SwDocShell, GetViewFrame()->GetObjectShell() ); + SwWebDocShell* pWebDShell = PTR_CAST( SwWebDocShell, pDocSh ); + BOOL bWeb = 0 != PTR_CAST( SwWebDocShell, pDocSh ); + const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(bWeb); + FieldUnit eMetric = pUsrPref->GetVScrollMetric(); pVLineal->SetUnit(eMetric); InvalidateBorder(); @@ -711,6 +727,9 @@ void SwView::SetImageButtonColor(Color& rColor) /*------------------------------------------------------------------------ $Log: not supported by cvs2svn $ + Revision 1.2 2000/09/28 15:24:06 os + use of configuration service in view options + Revision 1.1.1.1 2000/09/18 17:14:49 hr initial import |