diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/viewopt.hxx | 11 | ||||
-rw-r--r-- | sw/source/ui/app/swmodul1.cxx | 11 | ||||
-rw-r--r-- | sw/source/ui/config/cfgitems.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/config/optdlg.hrc | 5 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 31 | ||||
-rw-r--r-- | sw/source/ui/config/usrpref.cxx | 11 | ||||
-rw-r--r-- | sw/source/ui/inc/cfgitems.hxx | 5 | ||||
-rw-r--r-- | sw/source/ui/inc/optpage.hxx | 6 | ||||
-rw-r--r-- | sw/source/ui/inc/view.hxx | 16 | ||||
-rw-r--r-- | sw/source/ui/uiview/view.cxx | 30 | ||||
-rw-r--r-- | sw/source/ui/uiview/view1.cxx | 60 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewfunc.hxx | 7 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewmdi.cxx | 286 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewport.cxx | 103 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewtab.cxx | 23 |
15 files changed, 212 insertions, 405 deletions
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx index 5ab18f0ba194..da595ee81e04 100644 --- a/sw/inc/viewopt.hxx +++ b/sw/inc/viewopt.hxx @@ -2,9 +2,9 @@ * * $RCSfile: viewopt.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: os $ $Date: 2001-09-20 12:43:57 $ + * last change: $Author: os $ $Date: 2002-03-07 08:56:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -144,6 +144,7 @@ class SwDocShell; #define VIEWOPT_2_RESERVED4 0x00400000L #define VIEWOPT_2_PRTFORMAT 0x00800000L #define VIEWOPT_2_SHADOWCRSR 0x01000000L +#define VIEWOPT_2_VLIN_RIGHT 0x02000000L //Tabellenhintergrund #define TBL_DEST_CELL 0 @@ -547,6 +548,12 @@ public: void SetShadowCursor(BOOL b) { b ? (nUIOptions |= VIEWOPT_2_SHADOWCRSR ) : ( nUIOptions &= ~VIEWOPT_2_SHADOWCRSR); } + //move vertical ruler to the right + BOOL IsVRulerRight() const + { return nUIOptions & VIEWOPT_2_VLIN_RIGHT ? TRUE : FALSE; } + void SetVRulerRight(BOOL b) + { b ? (nUIOptions |= VIEWOPT_2_VLIN_RIGHT ) : ( nUIOptions &= ~VIEWOPT_2_VLIN_RIGHT); } + BOOL IsStarOneSetting() const {return bStarOneSetting; } void SetStarOneSetting(BOOL bSet) {bStarOneSetting = bSet; } diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx index 2361ec75cc06..d1ce822e8e87 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.16 $ + * $Revision: 1.17 $ * - * last change: $Author: os $ $Date: 2001-06-25 13:50:52 $ + * last change: $Author: os $ $Date: 2002-03-07 08:56:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -287,10 +287,10 @@ void lcl_SetUIPrefs(const SwViewOption* pPref, SwView* pView, ViewShell* pSh ) { // in FrameSets kann die tatsaechliche Sichtbarkeit von der Einstellung der ViewOptions abweichen sal_Bool bVScrollChanged = pPref->IsViewVScrollBar() != pSh->GetViewOptions()->IsViewVScrollBar(); - sal_Bool bHScrollChanged = pPref->IsViewHScrollBar() != pSh->GetViewOptions()->IsViewHScrollBar();; + sal_Bool bHScrollChanged = pPref->IsViewHScrollBar() != pSh->GetViewOptions()->IsViewHScrollBar(); + sal_Bool bVAlignChanged = pPref->IsVRulerRight() != pSh->GetViewOptions()->IsVRulerRight(); pSh->SetUIOptions(*pPref); - const SwViewOption* pNewPref = pSh->GetViewOptions(); // Scrollbars an / aus @@ -308,6 +308,9 @@ void lcl_SetUIPrefs(const SwViewOption* pPref, SwView* pView, ViewShell* pSh ) else pView->KillHScrollbar(); } + //if only the position of the vertical ruler has been changed initiate an update + if(bVAlignChanged && !bHScrollChanged && !bVScrollChanged) + pView->InvalidateBorder(); // Lineale an / aus if(pNewPref->IsViewVLin()) diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx index 1d5f27d5daef..17fc232f23b8 100644 --- a/sw/source/ui/config/cfgitems.cxx +++ b/sw/source/ui/config/cfgitems.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cfgitems.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: os $ $Date: 2001-05-10 08:47:33 $ + * last change: $Author: os $ $Date: 2002-03-07 08:57:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -207,6 +207,7 @@ SwElemItem::SwElemItem( USHORT nWhich ) : bVertScrollbar = bHorzRuler = bVertRuler = + bVertRulerRight= bTableBounds = bSectionBounds = bCrosshair = @@ -244,6 +245,7 @@ SwElemItem::SwElemItem(const SwViewOption& rVOpt, USHORT nWhich) : bVertScrollbar = rVOpt.IsViewVScrollBar(); bHorzRuler = rVOpt.IsViewTabwin(); bVertRuler = rVOpt.IsViewVLin(); + bVertRulerRight = rVOpt.IsVRulerRight(); bTableBounds = rVOpt.IsSubsTable(); bSectionBounds = rVOpt.IsSectionBounds(); bCrosshair = rVOpt.IsCrossHair(); @@ -286,6 +288,7 @@ int SwElemItem::operator==( const SfxPoolItem& rAttr ) const bVertScrollbar == rItem.bVertScrollbar && bHorzRuler == rItem.bHorzRuler && bVertRuler == rItem.bVertRuler && + bVertRulerRight == rItem.bVertRulerRight&& bTableBounds == rItem.bTableBounds && bSectionBounds == rItem.bSectionBounds && bCrosshair == rItem.bCrosshair && @@ -315,6 +318,7 @@ void SwElemItem::operator=( const SwElemItem& rElemItem) bVertScrollbar = rElemItem. bVertScrollbar ; bHorzRuler = rElemItem. bHorzRuler ; bVertRuler = rElemItem. bVertRuler ; + bVertRulerRight = rElemItem. bVertRulerRight ; bTableBounds = rElemItem. bTableBounds ; bSectionBounds = rElemItem. bSectionBounds ; bCrosshair = rElemItem. bCrosshair ; @@ -343,6 +347,7 @@ void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const rVOpt.SetViewVScrollBar(bVertScrollbar ); rVOpt.SetViewTabwin(bHorzRuler ); rVOpt.SetViewVLin(bVertRuler ); + rVOpt.SetVRulerRight(bVertRulerRight ); rVOpt.SetSubsTable(bTableBounds ); rVOpt.SetSectionBounds(bSectionBounds); rVOpt.SetCrossHair(bCrosshair ); @@ -519,6 +524,9 @@ int SwTestItem::operator==( const SfxPoolItem& rAttr ) const /*------------------------------------------------------------------------ $Log: not supported by cvs2svn $ + Revision 1.3 2001/05/10 08:47:33 os + store print options at the document + Revision 1.2 2001/03/22 09:28:06 os options dialog changes diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc index a3d9468aed5e..c8cdbe2ba006 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.7 $ + * $Revision: 1.8 $ * - * last change: $Author: fme $ $Date: 2001-06-01 10:39:39 $ + * last change: $Author: os $ $Date: 2002-03-07 08:57:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -88,6 +88,7 @@ #define CB_FLDBACK 21 #define FL_LINE 22 #define CB_POSTIT 23 +#define CB_VRULER_RIGHT 24 #define CB_BIGHANDLE 25 #define FL_SETTINGS 26 diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 3184d2d53a41..0572d9b31407 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.23 $ + * $Revision: 1.24 $ * - * last change: $Author: mib $ $Date: 2001-10-12 14:20:21 $ + * last change: $Author: os $ $Date: 2002-03-07 08:57:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,6 +79,9 @@ #define _SVSTDARR_STRINGSDTOR #include <svtools/svstdarr.hxx> #endif +#ifndef _SVTOOLS_CJKOPTIONS_HXX +#include <svtools/cjkoptions.hxx> +#endif #ifndef _SFXENUMITEM_HXX //autogen #include <svtools/eitem.hxx> @@ -226,6 +229,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent, aHRulerCBox ( this, SW_RES( CB_HRULER ) ), aHMetric ( this, SW_RES( LB_HMETRIC ) ), aVRulerCBox ( this, SW_RES( CB_VRULER ) ), + aVRulerRightCBox( this, SW_RES( CB_VRULER_RIGHT ) ), aVMetric ( this, SW_RES( LB_VMETRIC ) ), aSmoothCBox ( this, SW_RES( CB_SMOOTH_SCROLL ) ), aDispFL ( this, SW_RES( FL_DISP ) ), @@ -256,6 +260,16 @@ SwContentOptPage::SwContentOptPage( Window* pParent, aSettingsFL.Show(); aMetricFT.Show(); } + SvtCJKOptions aCJKOptions; + if(aCJKOptions.IsVerticalTextEnabled() ) + { + Point aSmoothPos(aSmoothCBox.GetPosPixel()); + aSmoothPos.Y() += aSmoothPos.Y() - aVRulerCBox.GetPosPixel().Y(); + aSmoothCBox.SetPosPixel(aSmoothPos); + } + else + aVRulerRightCBox.Hide(); + aVRulerCBox.SetClickHdl(LINK(this, SwContentOptPage, VertRulerHdl )); SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) ); for ( USHORT i = 0; i < aMetricArr.Count(); ++i ) @@ -348,6 +362,7 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet) aVScrollBox.Check( pElemAttr->bVertScrollbar ); aHRulerCBox.Check( pElemAttr->bHorzRuler ); aVRulerCBox.Check( pElemAttr->bVertRuler ); + aVRulerRightCBox.Check(pElemAttr->bVertRulerRight); aSmoothCBox.Check( pElemAttr->bSmoothScroll ); // bHtmlMode } @@ -355,13 +370,12 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet) lcl_SelectMetricLB(aMetricLB, SID_ATTR_METRIC, rSet); lcl_SelectMetricLB(aHMetric, FN_HSCROLL_METRIC, rSet); lcl_SelectMetricLB(aVMetric, FN_VSCROLL_METRIC, rSet); + VertRulerHdl(&aVRulerCBox); } /*-----------------31.08.96 13.58------------------- --------------------------------------------------*/ - - BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet) { const SwElemItem* pOldAttr = (const SwElemItem*) @@ -389,6 +403,7 @@ BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet) aElem.bVertScrollbar = aVScrollBox.IsChecked(); aElem.bHorzRuler = aHRulerCBox.IsChecked(); aElem.bVertRuler = aVRulerCBox.IsChecked(); + aElem.bVertRulerRight= aVRulerRightCBox.IsChecked(); aElem.bSmoothScroll = aSmoothCBox.IsChecked(); @@ -422,6 +437,14 @@ BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet) } return bRet; } +/* -----------------------------05.03.2002 15:07------------------------------ + + ---------------------------------------------------------------------------*/ +IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox) +{ + aVRulerRightCBox.Enable(pBox->IsChecked()); + return 0; +} /*----------------- OS 27.01.95 ----------------------- TabPage Drucker Zusatzeinstellungen -------------------------------------------------------*/ diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx index 6ded09be5b14..6d5913613273 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.17 $ + * $Revision: 1.18 $ * - * last change: $Author: os $ $Date: 2001-10-29 13:48:02 $ + * last change: $Author: os $ $Date: 2002-03-07 08:57:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -309,9 +309,10 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() "Zoom/Value", //13 "Zoom/Type", //14 "Other/MeasureUnit", //15 - "Other/TabStop" //16 + "Other/TabStop", //16 + "Window/IsVerticalRulerRight" //17 }; - const int nCount = bWeb ? 16 : 17; + const int nCount = bWeb ? 16 : 18; Sequence<OUString> aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) @@ -375,6 +376,7 @@ void SwLayoutViewConfig::Commit() case 14: pValues[nProp] <<= (sal_Int32)rParent.GetZoomType(); break;// "Zoom/Type", case 15: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break;// "Other/MeasureUnit", case 16: pValues[nProp] <<= rParent.GetDefTab(); break;// "Other/TabStop", + case 17: bSet = rParent.IsVRulerRight(); break;// "Window/IsVerticalRulerRight", } if(nProp < 10 || nProp == 12) pValues[nProp].setValue(&bSet, ::getBooleanCppuType()); @@ -448,6 +450,7 @@ void SwLayoutViewConfig::Load() rParent.SetDefTab(nTab, TRUE); } break;// "Other/TabStop", + case 17: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight", } } } diff --git a/sw/source/ui/inc/cfgitems.hxx b/sw/source/ui/inc/cfgitems.hxx index 446b2abfe867..b86759072bfa 100644 --- a/sw/source/ui/inc/cfgitems.hxx +++ b/sw/source/ui/inc/cfgitems.hxx @@ -2,9 +2,9 @@ * * $RCSfile: cfgitems.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: os $ $Date: 2001-05-10 08:48:32 $ + * last change: $Author: os $ $Date: 2002-03-07 08:57:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -134,6 +134,7 @@ class SwElemItem : public SfxPoolItem BOOL bVertScrollbar :1; BOOL bHorzRuler :1; BOOL bVertRuler :1; + BOOL bVertRulerRight:1; BOOL bSmoothScroll :1; //visual aids BOOL bTableBounds :1; diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx index a9044132aab6..779f0727ee63 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.9 $ + * $Revision: 1.10 $ * - * last change: $Author: os $ $Date: 2001-08-15 09:50:39 $ + * last change: $Author: os $ $Date: 2002-03-07 08:57:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -120,6 +120,7 @@ class SwContentOptPage : public SfxTabPage CheckBox aHRulerCBox; ListBox aHMetric; CheckBox aVRulerCBox; + CheckBox aVRulerRightCBox; ListBox aVMetric; CheckBox aSmoothCBox; @@ -141,6 +142,7 @@ class SwContentOptPage : public SfxTabPage FixedText aMetricFT; ListBox aMetricLB; + DECL_LINK(VertRulerHdl, CheckBox*); public: SwContentOptPage( Window* pParent, const SfxItemSet& rSet ); diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 15cf54964555..56302b75b8b5 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.8 $ + * $Revision: 1.9 $ * - * last change: $Author: os $ $Date: 2001-07-12 13:10:25 $ + * last change: $Author: os $ $Date: 2002-03-07 08:57:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -250,8 +250,8 @@ class SwView: public SfxViewShell // unteren Ecke, wenn beide Scrollbars // aktiv sind - SvxRuler *pHLineal, - *pVLineal; + SvxRuler *pHRuler, + *pVRuler; ImageButton *pTogglePageBtn; SwHlpImageButton *pPageUpBtn, @@ -496,15 +496,15 @@ public: inline int CreateVLineal(); inline int KillVLineal(); - int StatVLineal() const { return pVLineal != 0; } + int StatVLineal() const { return ((Window*)pVRuler)->IsVisible(); } void ChangeVLinealMetric(FieldUnit eUnit); BOOL GetVLinealMetric(FieldUnit& rToFill) const; inline int CreateTab(); inline int KillTab(); - int StatTab() const { return ((Window*)pHLineal)->IsVisible(); } - SvxRuler *GetHLineal() { return pHLineal; } - SvxRuler *GetVLineal() { return pVLineal; } + int StatTab() const { return ((Window*)pHRuler)->IsVisible(); } + SvxRuler& GetHLineal() { return *pHRuler; } + SvxRuler& GetVLineal() { return *pVRuler; } void InvalidateRulerPos(); void ChangeTabMetric(FieldUnit eUnit); BOOL GetHLinealMetric(FieldUnit& rToFill) const; diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 990349644c68..e7e909277b42 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.37 $ + * $Revision: 1.38 $ * - * last change: $Author: tl $ $Date: 2002-02-19 13:32:01 $ + * last change: $Author: os $ $Date: 2002-03-07 08:55:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -790,14 +790,18 @@ SwView::SwView( SfxViewFrame *pFrame, SfxViewShell* pOldSh ) pHScrollbar(0), pVScrollbar(0), pScrollFill(0), - pHLineal( new SvxRuler(&GetViewFrame()->GetWindow(), pEditWin, + pHRuler( new SvxRuler(&GetViewFrame()->GetWindow(), pEditWin, SVXRULER_SUPPORT_TABS | SVXRULER_SUPPORT_PARAGRAPH_MARGINS | SVXRULER_SUPPORT_BORDERS | SVXRULER_SUPPORT_NEGATIVE_MARGINS, GetViewFrame()->GetBindings(), WB_STDRULER | WB_EXTRAFIELD | WB_3DLOOK | WB_BORDER)), - pVLineal(0), + pVRuler(new SvxRuler(&GetViewFrame()->GetWindow(), pEditWin, + SVXRULER_SUPPORT_TABS | SVXRULER_SUPPORT_PARAGRAPH_MARGINS_VERTICAL| + SVXRULER_SUPPORT_BORDERS, + GetViewFrame()->GetBindings(), + WB_VSCROLL | WB_3DLOOK | WB_EXTRAFIELD | WB_BORDER )), pTogglePageBtn(0), pPageUpBtn(0), pPageDownBtn(0), @@ -909,7 +913,7 @@ SwView::SwView( SfxViewFrame *pFrame, SfxViewShell* pOldSh ) sal_Bool bOld = bNoInterrupt; bNoInterrupt = sal_True; - pHLineal->SetActive( sal_True ); + pHRuler->SetActive( sal_True ); SfxViewFrame* pViewFrame = GetViewFrame(); if( pViewFrame->GetFrame()->GetParentFrame()) @@ -922,10 +926,10 @@ SwView::SwView( SfxViewFrame *pFrame, SfxViewShell* pOldSh ) StartListening( *pDocSh ); // Vom HLineal den ZOOM-Faktor einstellen - pHLineal->SetZoom( Fraction( aUsrPref.GetZoom(), 100 ) ); - pHLineal->SetDoubleClickHdl(LINK( this, SwView, ExecRulerClick )); + pHRuler->SetZoom( Fraction( aUsrPref.GetZoom(), 100 ) ); + pHRuler->SetDoubleClickHdl(LINK( this, SwView, ExecRulerClick )); FieldUnit eMetric = pUsrPref->GetHScrollMetric(); - pHLineal->SetUnit( eMetric ); + pHRuler->SetUnit( eMetric ); // DocShell setzen pDocSh->SetView( this ); @@ -1073,8 +1077,8 @@ SwView::~SwView() pShell = 0; delete pHScrollbar; delete pVScrollbar; - delete pHLineal; - delete pVLineal; + delete pHRuler; + delete pVRuler; delete pTogglePageBtn; delete pPageUpBtn; delete pNaviBtn; @@ -1486,10 +1490,8 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { // Modalmodus-Umschaltung? sal_Bool bModal = GetDocShell()->IsInModalMode(); - if(pHLineal) - pHLineal->SetActive( !bModal ); - if(pVLineal) - pVLineal->SetActive( !bModal ); + pHRuler->SetActive( !bModal ); + pVRuler->SetActive( !bModal ); } /* kein break hier */ diff --git a/sw/source/ui/uiview/view1.cxx b/sw/source/ui/uiview/view1.cxx index 57d6031d8e51..72bc73a6715b 100644 --- a/sw/source/ui/uiview/view1.cxx +++ b/sw/source/ui/uiview/view1.cxx @@ -2,9 +2,9 @@ * * $RCSfile: view1.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: jp $ $Date: 2001-10-15 15:01:02 $ + * last change: $Author: os $ $Date: 2002-03-07 08:55:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -139,9 +139,8 @@ void SwView::Activate(BOOL bMDIActivate) if(!bDocSzUpdated) DocSzChgd(aDocSz); - pHLineal->SetActive( TRUE ); - if(pVLineal) - pVLineal->SetActive( TRUE ); + pHRuler->SetActive( TRUE ); + pVRuler->SetActive( TRUE ); if ( bMDIActivate ) { @@ -211,9 +210,8 @@ void SwView::Deactivate(BOOL bMDIActivate) { pWrtShell->ShLooseFcs(); // Selektionen unsichtbar - pHLineal->SetActive( FALSE ); - if(pVLineal) - pVLineal->SetActive( FALSE ); + pHRuler->SetActive( FALSE ); + pVRuler->SetActive( FALSE ); } SfxViewShell::Deactivate(bMDIActivate); } @@ -228,51 +226,5 @@ void SwView::MarginChanged() } -/*------------------------------------------------------------------------ - $Log: not supported by cvs2svn $ - Revision 1.2 2001/09/11 15:09:47 jp - Task #91678#: 'selection clipbord' implemented - - Revision 1.1.1.1 2000/09/18 17:14:49 hr - initial import - - Revision 1.79 2000/09/18 16:06:12 willem.vandorp - OpenOffice header added. - - Revision 1.78 2000/09/08 08:12:53 os - Change: Set/Toggle/Has/Knows/Show/GetChildWindow - - Revision 1.77 2000/08/15 14:08:20 jp - Task #77422#: PrintPreView in the same window - - Revision 1.76 1999/09/15 14:13:05 os - dialog for authorities - - Revision 1.75 1999/09/07 13:56:53 os - Insert/EditIndexEntry as FloatingWindow - - Revision 1.74 1999/01/25 12:49:14 JP - Task #58677#: Crsr in Readonly Bereichen zulassen - - - Rev 1.73 25 Jan 1999 13:49:14 JP - Task #58677#: Crsr in Readonly Bereichen zulassen - - Rev 1.72 19 Jun 1998 08:54:14 OS - VC-Sbx-Reste auch noch raus - - Rev 1.71 19 Jun 1998 07:58:34 MH - GetSBxForm entfallen (OS) - - Rev 1.70 09 Jun 1998 15:32:52 OM - VC-Controls entfernt - - Rev 1.69 31 Mar 1998 15:31:52 OS - SetReadonlyUI von IsAllProtect abhaengig #49077# - - Rev 1.68 27 Mar 1998 14:15:16 OM - ChildWindows im Modified-Hdl updaten - -------------------------------------------------------------------------*/ diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx index 1c337e4823b2..bd766936e37e 100644 --- a/sw/source/ui/uiview/viewfunc.hxx +++ b/sw/source/ui/uiview/viewfunc.hxx @@ -2,9 +2,9 @@ * * $RCSfile: viewfunc.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: os $ $Date: 2001-05-10 08:48:50 $ + * last change: $Author: os $ $Date: 2002-03-07 08:55:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -101,7 +101,8 @@ void ViewResizePixel( const Window &rRef, SvxRuler* pVLineal = 0, SvxRuler* pHLineal = 0, BOOL bIgnoreVisibility = FALSE, - BOOL bWebView = FALSE ); + BOOL bWebView = FALSE, + BOOL bVRulerRight = FALSE ); #endif diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index bf03f7ef1ed3..160b8f544bff 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.7 $ + * $Revision: 1.8 $ * - * last change: $Author: os $ $Date: 2002-02-27 09:06:00 $ + * last change: $Author: os $ $Date: 2002-03-07 08:55:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -271,16 +271,10 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType, } const Fraction aFrac( nFac, 100 ); - if ( pVLineal ) - { - pVLineal->SetZoom( aFrac ); - pVLineal->ForceUpdate(); - } - if ( pHLineal ) - { - pHLineal->SetZoom( aFrac ); - pHLineal->ForceUpdate(); - } + pVRuler->SetZoom( aFrac ); + pVRuler->ForceUpdate(); + pHRuler->SetZoom( aFrac ); + pHRuler->ForceUpdate(); ((SwViewOption*)pWrtShell->GetViewOptions())->SetZoomType((BYTE)eZoomType); } pWrtShell->UnlockPaint(); @@ -551,9 +545,9 @@ int SwView::_CreateTab() { ASSERT( !StatTab(), "vorher abpruefen!" ) - pHLineal->SetActive(GetFrame() && IsActive()); + pHRuler->SetActive(GetFrame() && IsActive()); - pHLineal->Show(); + pHRuler->Show(); InvalidateBorder(); return 1; } @@ -572,33 +566,27 @@ int SwView::_KillTab() { ASSERT( StatTab(), "vorher abpruefen!" ) - pHLineal->Hide(); -// DELETEZ(pHLineal); + pHRuler->Hide(); +// DELETEZ(pHRuler); InvalidateBorder(); return 1; } void SwView::ChangeTabMetric( FieldUnit eUnit ) { - if ( pHLineal ) + if(pHRuler->GetUnit() != eUnit ) { - if(pHLineal->GetUnit() != eUnit ) - { - pHLineal->SetUnit( eUnit ); - pHLineal->Invalidate(); - } + pHRuler->SetUnit( eUnit ); + pHRuler->Invalidate(); } } void SwView::ChangeVLinealMetric( FieldUnit eUnit ) { - if ( pVLineal ) + if(pVRuler->GetUnit() != eUnit) { - if(pVLineal->GetUnit() != eUnit) - { - pVLineal->SetUnit( eUnit ); - pVLineal->Invalidate(); - } + pVRuler->SetUnit( eUnit ); + pVRuler->Invalidate(); } } /* -----------------------------07.04.01 17:09-------------------------------- @@ -606,18 +594,16 @@ void SwView::ChangeVLinealMetric( FieldUnit eUnit ) ---------------------------------------------------------------------------*/ BOOL SwView::GetVLinealMetric(FieldUnit& eToFill) const { - if(pVLineal) - eToFill = pVLineal->GetUnit(); - return pVLineal != 0; + eToFill = pVRuler->GetUnit(); + return pVRuler != 0; } /* -----------------------------07.04.01 17:09-------------------------------- ---------------------------------------------------------------------------*/ BOOL SwView::GetHLinealMetric(FieldUnit& eToFill) const { - if(pHLineal) - eToFill = pHLineal->GetUnit(); - return pHLineal != 0; + eToFill = pHRuler->GetUnit(); + return pHRuler != 0; } /************************************************************************* |* @@ -625,7 +611,6 @@ BOOL SwView::GetHLinealMetric(FieldUnit& eToFill) const |* |* Beschreibung |* Ersterstellung VB 29.05.91 -|* Letzte Aenderung VB 19.05.92 |* *************************************************************************/ @@ -633,29 +618,12 @@ int SwView::_CreateVLineal() { ASSERT( !StatVLineal(), "vorher abpruefen!" ) - Window *pMDI = &GetViewFrame()->GetWindow(); + pHRuler->SetBorderPos( pVRuler->GetSizePixel().Width()-1 ); - pVLineal = new SvxRuler(pMDI, pEditWin, - SVXRULER_SUPPORT_TABS | SVXRULER_SUPPORT_PARAGRAPH_MARGINS_VERTICAL| - SVXRULER_SUPPORT_BORDERS, - GetViewFrame()->GetBindings(), - WB_VSCROLL | WB_3DLOOK | WB_BORDER ); - if( pVLineal && pHLineal ) - pHLineal->SetBorderPos( pVLineal->GetSizePixel().Width()-1 ); - - pVLineal->SetActive(GetFrame() && IsActive()); + pVRuler->SetActive(GetFrame() && IsActive()); const SwViewOption* pOpt = pWrtShell->GetViewOptions(); - pVLineal->SetZoom(Fraction(pOpt->GetZoom(), 100)); - 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); - + pVRuler->Show(); InvalidateBorder(); - if ( !bShowAtResize ) - pVLineal->Show(); return 1; } @@ -665,20 +633,14 @@ int SwView::_CreateVLineal() |* |* Beschreibung |* Ersterstellung VB 29.05.91 -|* Letzte Aenderung VB 29.05.91 |* *************************************************************************/ int SwView::_KillVLineal() { ASSERT( StatVLineal(), "vorher abpruefen!" ) - - pVLineal->Hide(); - - if ( pHLineal ) - pHLineal->SetBorderPos( 0 ); - - DELETEZ(pVLineal); + pVRuler->Hide(); + pHRuler->SetBorderPos( 0 ); InvalidateBorder(); return 1; } @@ -769,201 +731,3 @@ void SwView::SetImageButtonColor(Color& rColor) } -/*------------------------------------------------------------------------ - - $Log: not supported by cvs2svn $ - Revision 1.6 2001/12/13 16:06:40 os - #95871# OuterResizePixel mustn't initiate a change of global view options - - Revision 1.5 2001/10/10 18:26:41 jp - Bug #91228#: _SetZoom - don't move the cursor into the visible area - - Revision 1.4 2001/04/27 10:49:32 os - new zoom type for preview added - - Revision 1.3 2001/04/09 09:46:35 os - #85859# some option dialog errors fixed - - 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 - - Revision 1.126 2000/09/18 16:06:13 willem.vandorp - OpenOffice header added. - - Revision 1.125 2000/09/07 15:59:33 os - change: SFX_DISPATCHER/SFX_BINDINGS removed - - Revision 1.124 2000/05/24 13:13:57 hr - conflict between STLPORT and Workshop header - - Revision 1.123 2000/05/10 11:53:20 os - Basic API removed - - Revision 1.122 2000/03/03 15:17:04 os - StarView remainders removed - - Revision 1.121 1999/07/20 07:44:28 OS - #67585# ZoomValue/ZoomType :SetZoom changed - - - Rev 1.120 20 Jul 1999 09:44:28 OS - #67585# ZoomValue/ZoomType :SetZoom changed - - Rev 1.119 14 Jan 1999 14:19:54 JP - Bug #60794#: Fehlererkennung beim Tabellenrechnen und anspringen von Formeln - - Rev 1.118 03 Dec 1998 10:26:18 OS - #59441# Verzeichniseintrag in der Navigation - - Rev 1.117 22 Sep 1998 11:36:28 MA - #56856# Kontext besser - - Rev 1.116 22 Sep 1998 11:28:16 MA - #56856# Paint locken fuer Anderung vom Zoom - - Rev 1.115 08 Sep 1998 17:05:12 OS - #56134# Metric fuer Text und HTML getrennt - - Rev 1.114 14 Jun 1998 16:13:52 MA - chg: Navi-Tool auch fuer Browse-View - - Rev 1.113 20 Mar 1998 13:23:54 MA - OleVis2Page durch BrowseMode ersetzt - - Rev 1.112 24 Feb 1998 18:06:38 OS - includes, SwapPam - - Rev 1.111 24 Feb 1998 12:02:02 OS - Navigationstool erweitert - - Rev 1.110 07 Feb 1998 10:39:36 OS - GrabFocus nach Navigations-Move #47160# - - Rev 1.109 21 Nov 1997 15:00:20 MA - includes - - Rev 1.108 03 Nov 1997 13:58:30 MA - precomp entfernt - - Rev 1.107 04 Sep 1997 17:14:42 MA - includes - - Rev 1.106 01 Sep 1997 13:13:50 OS - DLL-Umstellung - - Rev 1.105 23 Aug 1997 10:12:02 OS - Zoom ganze Seite: Factor nicht zusaetzlich mit den ViewOpt-Einstellungen multiplizieren #43052# - - Rev 1.104 12 Aug 1997 15:57:26 OS - frmitems/textitem/paraitem aufgeteilt - - Rev 1.103 08 Aug 1997 17:25:56 OM - Headerfile-Umstellung - - Rev 1.102 07 Aug 1997 14:58:56 OM - Headerfile-Umstellung - - Rev 1.101 16 Jul 1997 17:25:54 AMA - Fix: Rundungsfehler minimieren durch PixelToLogic mit 100%-MapMode - - Rev 1.100 20 Jun 1997 13:55:36 OS - neu: MoveNavigation - - Rev 1.99 09 Jun 1997 14:28:06 MA - chg: Browse-Flag nur noch am Doc - - Rev 1.98 08 Apr 1997 10:22:46 MA - includes - - Rev 1.97 24 Mar 1997 15:57:54 OS - SetZoomType vor CalcVisArea - - Rev 1.96 15 Mar 1997 11:27:24 OS - PageUp/Down-Buttons faerben - - Rev 1.95 04 Mar 1997 19:11:42 OS - Spruenge im Text: zunaechst EnterStdMode - - Rev 1.94 22 Feb 1997 20:15:48 OS - eigenes Image fuer Button - - Rev 1.93 21 Feb 1997 17:03:00 OS - ImageButtons veraendert; Handler erweitert - - Rev 1.92 20 Feb 1997 16:46:16 OS - Navigation funktioniert - - Rev 1.91 19 Feb 1997 16:55:54 OS - dritter Button/Navigation - - Rev 1.90 05 Feb 1997 08:29:14 MA - chg: unn?tzes label entfernt - - Rev 1.89 30 Jan 1997 11:03:10 OS - UsrPrefs verdoppelt - - Rev 1.88 11 Dec 1996 08:42:18 OS - ClickType am Ruler auswerten -> gfs. Einzuege-TabPage statt Tabulator - - Rev 1.87 10 Dec 1996 19:07:06 MA - VertScrollbar - - Rev 1.86 11 Nov 1996 11:10:52 MA - ResMgr - - Rev 1.85 14 Oct 1996 09:02:02 OS - Readonly an den ViewOptions vor ApplyViewOptions einstellen - - Rev 1.84 07 Oct 1996 09:58:08 OS - Aktivierung der Lineale im _Create abhaengig von der Aktivierung der View - - Rev 1.83 23 Sep 1996 15:37:34 MA - fix: Zoomtype und Browser - - Rev 1.82 12 Sep 1996 17:00:32 OS - GetAnyCurRect() ersetzt GetCur*Rect - - Rev 1.81 28 Aug 1996 14:19:18 JP - ScrollBarBox: im FrameSet-Doc nicht das Sizeable-Flag setzen - - Rev 1.80 14 Aug 1996 15:15:30 OS - SetAuto fuer BrowseMode nicht nur fuer HScrollbar - - Rev 1.79 29 Jul 1996 15:47:14 MA - includes - - Rev 1.78 12 Jul 1996 14:44:22 OS - vert. Scrollbar geht auch im BrowseMode zum ScrollHdl - - Rev 1.77 05 Jul 1996 14:55:38 OS - Anzeige der akt. Seitennummer whrend des Scrollens in der nicht-Browse-View - - Rev 1.76 26 Jun 1996 15:02:04 OS - Aufruf von Dispatcher.Execute an 324 angepasst - - Rev 1.75 19 Jun 1996 12:30:04 OM - Umstellung auf 323 - - Rev 1.74 10 Jun 1996 17:55:50 MA - Breite+HScroll fuer Browser - - Rev 1.73 31 May 1996 07:52:04 OS - _CreateScrollbar: nach InvalidateBorder Pointer nochmal testen - - Rev 1.72 24 May 1996 09:20:20 OS - neu: CreatePageButtons - - Rev 1.71 09 May 1996 15:18:58 OS - HLineal ist immer existent und wird nur noch versteckt - - Rev 1.70 06 May 1996 17:00:36 MA - chg: Scrollbars fuer browse und ole richtig - - Rev 1.69 24 Apr 1996 15:02:12 OS - Umstellung UsrPref/ViewOption - -------------------------------------------------------------------------*/ - diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index a9fe1b26e0b2..8ee3264b0b1e 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -2,9 +2,9 @@ * * $RCSfile: viewport.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: os $ $Date: 2002-03-06 07:34:13 $ + * last change: $Author: os $ $Date: 2002-03-07 08:55:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -135,8 +135,10 @@ //Das SetVisArea der DocShell darf nicht vom InnerResizePixel gerufen werden. //Unsere Einstellungen muessen aber stattfinden. -#if SUPD<631 -#define SVX_ZOOM_PAGEWIDTH_NOBORDER 4 +#if SUPD<653 +#ifndef WB_RIGHT_ALIGNED +#define WB_RIGHT_ALIGNED ((WinBits)0x00008000) +#endif #endif static BOOL bProtectDocShellVisArea = FALSE; @@ -208,10 +210,9 @@ void SwView::InvalidateRulerPos() GetViewFrame()->GetBindings().Invalidate(aInval); - DBG_ASSERT(pHLineal, "warum ist das Lineal nicht da?") - pHLineal->ForceUpdate(); - if( pVLineal ) - pVLineal->ForceUpdate(); + DBG_ASSERT(pHRuler, "warum ist das Lineal nicht da?") + pHRuler->ForceUpdate(); + pVRuler->ForceUpdate(); } /*-------------------------------------------------------------------- @@ -924,18 +925,29 @@ void SwView::CalcVisArea( const Size &rOutPixel ) void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, FASTBOOL bInner ) { - if ( pVLineal ) - rToFill.Left() = pVLineal->GetSizePixel().Width(); + BOOL bRightVRuler = pWrtShell->GetViewOptions()->IsVRulerRight(); + if ( pVRuler->IsVisible() ) + { + long nWidth = pVRuler->GetSizePixel().Width(); + if(bRightVRuler) + rToFill.Right() = nWidth; + else + rToFill.Left() = nWidth; + } - DBG_ASSERT(pHLineal, "warum ist das Lineal nicht da?") - if ( pHLineal->IsVisible() ) - rToFill.Top() = pHLineal->GetSizePixel().Height(); + DBG_ASSERT(pHRuler, "warum ist das Lineal nicht da?") + if ( pHRuler->IsVisible() ) + rToFill.Top() = pHRuler->GetSizePixel().Height(); const StyleSettings &rSet = GetEditWin().GetSettings().GetStyleSettings(); const long nTmp = rSet.GetScrollBarSize(); if ( pVScrollbar && (pVScrollbar->IsVisible() || !pVScrollbar->IsAuto()) ) - rToFill.Right() = nTmp; - + { + if(bRightVRuler) + rToFill.Left() = nTmp; + else + rToFill.Right() = nTmp; + } if ( pHScrollbar && (pHScrollbar->IsVisible() || !pHScrollbar->IsAuto()) ) rToFill.Bottom() = nTmp; @@ -957,14 +969,16 @@ void ViewResizePixel( const Window &rRef, SvxRuler* pVLineal, SvxRuler* pHLineal, BOOL bIgnoreVisibility, - BOOL bWebView ) + BOOL bWebView, + BOOL bVRulerRight ) { // ViewResizePixel wird auch von der PreView benutzt!!! const BOOL bHLineal = pHLineal && pHLineal->IsVisible(); const long nHLinSzHeight = bHLineal ? pHLineal->GetSizePixel().Height() : 0; - const long nVLinSzWidth = pVLineal ? + const BOOL bVLineal = pVLineal && pVLineal->IsVisible(); + const long nVLinSzWidth = bVLineal ? pVLineal->GetSizePixel().Width() : 0; long nHBSzHeight2= pHScrollbar && (pHScrollbar->IsVisible() || !pHScrollbar->IsAuto()) ? rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0; @@ -973,18 +987,25 @@ void ViewResizePixel( const Window &rRef, long nVBSzWidth = pVScrollbar && (pVScrollbar->IsVisible() || !pVScrollbar->IsAuto()) ? rRef.GetSettings().GetStyleSettings().GetScrollBarSize() : 0; // Lineale anordnen - if ( pVLineal ) + if ( bVLineal ) { + WinBits nStyle = pVLineal->GetStyle()&~WB_RIGHT_ALIGNED; Point aPos( rOfst.X(), rOfst.Y()+nHLinSzHeight ); + if(bVRulerRight) + { + aPos.X() += rSize.Width() - nVLinSzWidth; + nStyle |= WB_RIGHT_ALIGNED; + } Size aSize( nVLinSzWidth, rEditSz.Height() ); + pVLineal->SetStyle(nStyle); pVLineal->SetPosSizePixel( aPos, aSize ); } // Lineal braucht ein Resize, sonst funktioniert es nicht im unischtbaren Zustand // if ( bHLineal ) - if ( pHLineal ) //MA: In der Seitenansicht gibt es das Lineal nicht! + if ( bHLineal ) //MA: In der Seitenansicht gibt es das Lineal nicht! { Size aSize( rSize.Width(), nHLinSzHeight ); - if ( nVBSzWidth ) + if ( nVBSzWidth && !bVRulerRight) aSize.Width() -= nVBSzWidth; if(!aSize.Height()) aSize.Height() = pHLineal->GetSizePixel().Height(); @@ -1001,6 +1022,11 @@ void ViewResizePixel( const Window &rRef, { Point aPos( rOfst.X(), rOfst.Y()+rSize.Height()-nHBSzHeight ); + if(bVRulerRight) + { + aPos.X() += nVBSzWidth; + } + Size aSize( rSize.Width(), nHBSzHeight2 ); if ( nVBSzWidth ) aSize.Width() -= nVBSzWidth; @@ -1012,6 +1038,16 @@ void ViewResizePixel( const Window &rRef, Point aPos( rOfst.X()+rSize.Width()-nVBSzWidth, rOfst.Y() ); Size aSize( nVBSzWidth, rSize.Height() ); + if(bVRulerRight) + { + aPos.X() = rOfst.X(); + if(bHLineal) + { + aPos.Y() += nHLinSzHeight; + aSize.Height() -= nHLinSzHeight; + } + } + Size aImgSz( nVBSzWidth, nVBSzWidth ); //#55949# wenn der Platz fuer Scrollbar und Page-Buttons zu klein wird, dann @@ -1044,6 +1080,7 @@ void ViewResizePixel( const Window &rRef, if( pHScrollbar ) { aScrollFillPos.X() = aPos.X(); + pScrollBarBox->SetPosSizePixel( aScrollFillPos, Size( nHBSzHeight, nVBSzWidth) ); } @@ -1055,11 +1092,8 @@ void SwView::ShowAtResize() { const FASTBOOL bBrowse = pWrtShell->IsBrowseMode(); bShowAtResize = FALSE; - if ( pVLineal ) - pVLineal->Show(); - DBG_ASSERT(pHLineal, "warum ist das Lineal nicht da?") if ( pWrtShell->GetViewOptions()->IsViewTabwin() ) - pHLineal->Show(); + pHRuler->Show(); if ( pHScrollbar && (!bBrowse || GetDocShell()->GetProtocol().IsInPlaceActive()) ) pHScrollbar->Show(); @@ -1091,23 +1125,21 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize ) ViewResizePixel( GetEditWin(), rOfst, aSz, aEditSz, TRUE, pVScrollbar, pHScrollbar, pPageUpBtn, pPageDownBtn, pNaviBtn, - pScrollFill, pVLineal, pHLineal, + pScrollFill, pVRuler, pHRuler, (!bBrowse || GetDocShell()->GetProtocol().IsInPlaceActive()), - 0 != PTR_CAST(SwWebView, this)); + 0 != PTR_CAST(SwWebView, this), + pWrtShell->GetViewOptions()->IsVRulerRight()); if ( bShowAtResize ) ShowAtResize(); - if( pHLineal->IsVisible() || pVLineal ) + if( pHRuler->IsVisible() || pVRuler->IsVisible() ) { const Fraction& rFrac = GetEditWin().GetMapMode().GetScaleX(); USHORT nZoom = USHORT(rFrac.GetNumerator() * 100L / rFrac.GetDenominator()); const Fraction aFrac( nZoom, 100 ); - if ( pVLineal ) - pVLineal->SetZoom( aFrac ); - DBG_ASSERT(pHLineal, "warum ist das Lineal nicht da?") - if ( pHLineal->IsVisible() ) - pHLineal->SetZoom( aFrac ); + pVRuler->SetZoom( aFrac ); + pHRuler->SetZoom( aFrac ); InvalidateRulerPos(); //Inhalt invalidieren. } //CursorStack zuruecksetzen, da die Cursorpositionen fuer PageUp/-Down @@ -1198,12 +1230,13 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) ViewResizePixel( GetEditWin(), rOfst, rSize, aEditSz, FALSE, pVScrollbar, pHScrollbar, pPageUpBtn, pPageDownBtn, pNaviBtn, - pScrollFill, pVLineal, pHLineal, !bBrowse, - 0 != PTR_CAST(SwWebView, this) ); + pScrollFill, pVRuler, pHRuler, !bBrowse, + 0 != PTR_CAST(SwWebView, this), + pWrtShell->GetViewOptions()->IsVRulerRight() ); if ( bShowAtResize ) ShowAtResize(); - if( pHLineal->IsVisible() || pVLineal ) + if( pHRuler->IsVisible() || pVRuler->IsVisible() ) InvalidateRulerPos(); //Inhalt invalidieren. //CursorStack zuruecksetzen, da die Cursorpositionen fuer PageUp/-Down diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index 4cb670c65ec0..9fa5f7e2a7ca 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -2,9 +2,9 @@ * * $RCSfile: viewtab.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: os $ $Date: 2002-02-27 09:06:00 $ + * last change: $Author: os $ $Date: 2002-03-07 08:55:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -937,6 +937,7 @@ void SwView::ExecTabWin( SfxRequest& rReq ) USHORT nWhich = GetPool().GetWhich(nSlot); SvxTabStopItem aTabStops( (const SvxTabStopItem&)rReq.GetArgs()-> Get( nWhich )); + aTabStops.SetWhich(RES_PARATR_TABSTOP); DEBUGTABSTOPS(aTabStops); const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)rSh.GetDefault(RES_PARATR_TABSTOP); @@ -1226,14 +1227,14 @@ void SwView::StateTabWin(SfxItemSet& rSet) const BOOL bFrmSelection = rSh.IsFrmSelected(); BOOL bBrowse = rSh.IsBrowseMode(); - WinBits nStyle = pHLineal->GetStyle(); + WinBits nStyle = pHRuler->GetStyle(); if(!(nStyle&WB_EXTRAFIELD) != bBrowse) { if(bBrowse) nStyle &= ~WB_EXTRAFIELD; else nStyle |= WB_EXTRAFIELD; - pHLineal->SetStyle(nStyle); + pHRuler->SetStyle(nStyle); } // PageOffset/Begrenzer @@ -1246,6 +1247,13 @@ void SwView::StateTabWin(SfxItemSet& rSet) const SvxFrameDirectionItem& rFrameDir = rDesc.GetMaster().GetFrmDir(); const BOOL bVerticalWriting = !bBrowse && (rFrameDir.GetValue() == FRMDIR_VERT_TOP_RIGHT || rFrameDir.GetValue() == FRMDIR_VERT_TOP_LEFT); + //enable tab stop display on the rulers depending on the writing direction + WinBits nRulerStyle = pHRuler->GetStyle() & ~WB_EXTRAFIELD; + pHRuler->SetStyle(bVerticalWriting ? nRulerStyle : nRulerStyle|WB_EXTRAFIELD); + nRulerStyle = pVRuler->GetStyle() & ~WB_EXTRAFIELD; + pVRuler->SetStyle(bVerticalWriting ? nRulerStyle|WB_EXTRAFIELD : nRulerStyle); + + SvxLRSpaceItem aPageLRSpace( rDesc.GetMaster().GetLRSpace() ); SwapPageMargin( rDesc, aPageLRSpace ); @@ -1380,11 +1388,10 @@ void SwView::StateTabWin(SfxItemSet& rSet) const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&) rSh.GetDefault(RES_PARATR_TABSTOP); - DBG_ASSERT(pHLineal, "warum ist das Lineal nicht da?") + DBG_ASSERT(pHRuler, "warum ist das Lineal nicht da?") long nDefTabDist = ::GetTabDist(rDefTabs); - pHLineal->SetDefTabDist( nDefTabDist ); - if(pVLineal) - pVLineal->SetDefTabDist( nDefTabDist ); + pHRuler->SetDefTabDist( nDefTabDist ); + pVRuler->SetDefTabDist( nDefTabDist ); ::lcl_EraseDefTabs(aTabStops); DEBUGTABSTOPS(aTabStops); rSet.Put(aTabStops, nWhich); |