summaryrefslogtreecommitdiff
path: root/sw/source/ui/uiview
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uiview')
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx17
-rw-r--r--sw/source/ui/uiview/makefile.mk7
-rw-r--r--sw/source/ui/uiview/pview.cxx108
-rw-r--r--sw/source/ui/uiview/pview.hrc5
-rw-r--r--sw/source/ui/uiview/pview.src10
-rw-r--r--sw/source/ui/uiview/scroll.cxx5
-rw-r--r--sw/source/ui/uiview/srcview.cxx193
-rw-r--r--sw/source/ui/uiview/swcli.cxx5
-rw-r--r--sw/source/ui/uiview/uivwimp.cxx5
-rw-r--r--sw/source/ui/uiview/view.cxx105
-rw-r--r--sw/source/ui/uiview/view.hrc5
-rw-r--r--sw/source/ui/uiview/view.src5
-rw-r--r--sw/source/ui/uiview/view0.cxx15
-rw-r--r--sw/source/ui/uiview/view1.cxx5
-rw-r--r--sw/source/ui/uiview/view2.cxx51
-rw-r--r--sw/source/ui/uiview/viewcoll.cxx5
-rw-r--r--sw/source/ui/uiview/viewdlg.cxx7
-rw-r--r--sw/source/ui/uiview/viewdlg2.cxx5
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx23
-rw-r--r--sw/source/ui/uiview/viewfunc.hxx5
-rw-r--r--sw/source/ui/uiview/viewling.cxx190
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx15
-rw-r--r--sw/source/ui/uiview/viewport.cxx17
-rw-r--r--sw/source/ui/uiview/viewprt.cxx313
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx9
-rw-r--r--sw/source/ui/uiview/viewstat.cxx15
-rw-r--r--sw/source/ui/uiview/viewtab.cxx21
27 files changed, 395 insertions, 771 deletions
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index ca3817ef1834..3c77dc41d4d6 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: formatclipboard.cxx,v $
- * $Revision: 1.13 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -51,19 +48,19 @@
// header for class SdrView
#include <svx/svdview.hxx>
//SvxBrushItem
-#include <svx/brshitem.hxx>
-#include <svx/shaditem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/shaditem.hxx>
#include <frmatr.hxx>
// header for class SvxBoxInfoItem
-#include <svx/boxitem.hxx>
+#include <editeng/boxitem.hxx>
// header for class SvxFmtBreakItem
-#include <svx/brkitem.hxx>
+#include <editeng/brkitem.hxx>
// header for class SwFmtLayoutSplit
#include <fmtlsplt.hxx>
// header for class SvxFmtKeepItem
-#include <svx/keepitem.hxx>
+#include <editeng/keepitem.hxx>
// header for class SvxFrameDirectionItem
-#include <svx/frmdiritem.hxx>
+#include <editeng/frmdiritem.hxx>
#include <paratr.hxx>
#include <fmtpdsc.hxx>
#include <fmtrowsplt.hxx>
diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk
index 2aa5e12e2631..d06bb58a7dab 100644
--- a/sw/source/ui/uiview/makefile.mk
+++ b/sw/source/ui/uiview/makefile.mk
@@ -2,14 +2,10 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2008 by Sun Microsystems, Inc.
+# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.12 $
-#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
@@ -54,6 +50,7 @@ EXCEPTIONSFILES= \
$(SLO)$/uivwimp.obj \
$(SLO)$/view.obj \
$(SLO)$/view2.obj \
+ $(SLO)$/viewprt.obj \
$(SLO)$/viewling.obj \
$(SLO)$/viewmdi.obj \
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 3e8ce79ae2fb..f94387fcf623 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pview.cxx,v $
- * $Revision: 1.70 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -45,15 +42,15 @@
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
#include <sfx2/printer.hxx>
+#include <sfx2/progress.hxx>
#include <sfx2/app.hxx>
-#include <sfx2/topfrm.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
#include <vcl/msgbox.hxx>
#include <svx/stddlg.hxx>
-#include <svx/paperinf.hxx>
-#include <svx/srchitem.hxx>
+#include <editeng/paperinf.hxx>
+#include <svl/srchitem.hxx>
#include <svx/svdview.hxx>
#include <svx/dlgutil.hxx>
#include <svx/zoomslideritem.hxx>
@@ -130,8 +127,7 @@ SFX_IMPL_INTERFACE(SwPagePreView, SfxViewShell, SW_RES(RID_PVIEW_TOOLBOX))
TYPEINIT1(SwPagePreView,SfxViewShell)
-#define SWVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST|SFX_VIEW_OPTIMIZE_EACH| \
- SFX_VIEW_CAN_PRINT|SFX_VIEW_HAS_PRINTOPTIONS )
+#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT|SFX_VIEW_HAS_PRINTOPTIONS )
#define MIN_PREVIEW_ZOOM 25
#define MAX_PREVIEW_ZOOM 600
@@ -1520,12 +1516,6 @@ MOVEPAGE:
rReq.SetSlot( FN_PRINT_PAGEPREVIEW );
return;
}
- case FN_PREVIEW_PRINT_OPTIONS :
- {
- SwPreviewPrintOptionsDialog aDlg(aViewWin, *this);
- aDlg.Execute();
- }
- break;
case SID_PRINTDOCDIRECT:
case SID_PRINTDOC:
::SetAppPrintOptions( aViewWin.GetViewShell(), FALSE );
@@ -1574,7 +1564,8 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
ASSERT(nWhich, leeres Set);
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
//#106746# zoom has to be disabled if Accessibility support is switched on
- BOOL bZoomEnabled = !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
+ // MT 2010/01, see #110498#
+ BOOL bZoomEnabled = TRUE; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
while(nWhich)
{
@@ -1788,7 +1779,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
// OD 09.01.2003 #i6467# - adjust view shell option to the same as for print
SwPrtOptions aPrintOptions( GetViewFrame()->GetObjectShell()->GetTitle(0) );
- SwView::MakeOptions( 0, aPrintOptions, 0, 0, false, 0, 0 );
+ aPrintOptions.MakeOptions( false );
GetViewShell()->AdjustOptionsForPagePreview( aPrintOptions );
IDocumentSettingAccess* pIDSA = pESh->getIDocumentSettingAccess();
@@ -1824,7 +1815,7 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
pPageUpBtn(0),
pPageDownBtn(0),
pScrollFill(new ScrollBarBox( &pViewFrame->GetWindow(),
- pViewFrame->GetFrame()->GetParentFrame() ? 0 : WB_SIZEABLE )),
+ pViewFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
mnPageCount( 0 ),
// OD 09.01.2003 #106334#
mbResetFormDesignMode( false ),
@@ -1909,15 +1900,13 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
delete pPageDownBtn;
/* SfxObjectShell* pDocSh = GetDocShell();
- TypeId aType = TYPE( SfxTopViewFrame );
-
- for( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocSh, aType );
- pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh, aType ) )
+ for( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocSh );
+ pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh ) )
if( pFrame != GetViewFrame() )
{
// es gibt noch eine weitere Sicht auf unser Dokument, also
// aktiviere dieses
- pFrame->GetFrame()->Appear();
+ pFrame->GetFrame().Appear();
break;
}
*/}
@@ -2094,8 +2083,11 @@ void SwPagePreView::OuterResizePixel( const Point &rOfst, const Size &rSize )
//Aufruf der DocSzChgd-Methode der Scrollbars ist noetig, da vom maximalen
//Scrollrange immer die halbe Hoehe der VisArea abgezogen wird.
- if ( pVScrollbar )
- ScrollDocSzChg();
+ if ( pVScrollbar &&
+ aTmpSize.Width() > 0 && aTmpSize.Height() > 0 )
+ {
+ ScrollDocSzChg();
+ }
}
/*--------------------------------------------------------------------
@@ -2416,72 +2408,6 @@ void SwPagePreView::ScrollDocSzChg()
// alles zum Thema Drucken
-USHORT SwPagePreView::Print( SfxProgress &rProgress, BOOL bIsAPI, PrintDialog *pDlg )
-{
- ViewShell* pSh = aViewWin.GetViewShell();
- SfxPrinter* pPrinter = GetPrinter();
- if( !pPrinter || !pPrinter->InitJob( &aViewWin,
- pSh->HasDrawView() && !bIsAPI && pSh->GetDrawView()->GetModel()->HasTransparentObjects() ))
- return ERRCODE_IO_ABORT;
-
- SwWait aWait( *GetDocShell(), TRUE );
-
- USHORT nRowCol = ( aViewWin.GetRow() << 8 ) +
- aViewWin.GetCol(); // Zeilen / DoppelSeiten
-
- {
- // die Felder aktualisieren
- // ACHTUNG: hochcasten auf die EditShell, um die SS zu nutzen.
- // In den Methoden wird auf die akt. Shell abgefragt!
- SwEditShell* pESh = (SwEditShell*)pSh;
- SwDocStat aDocStat;
- BOOL bIsModified = pESh->IsModified();
-
- pESh->StartAllAction();
- pESh->UpdateDocStat( aDocStat );
- pSh->UpdateFlds();
- pESh->EndAllAction();
-
- if( !bIsModified )
- pESh->ResetModified();
- }
-
- // Druckauftrag starten
- SfxObjectShell *pObjShell = GetViewFrame()->GetObjectShell();
- SwPrtOptions aOpts( pObjShell->GetTitle(0) );
-
- BOOL bPrtPros;
- BOOL bPrtPros_RTL;
- SwView::MakeOptions( pDlg, aOpts, &bPrtPros, &bPrtPros_RTL, FALSE, GetPrinter(), GetDocShell()->GetDoc()->getPrintData() );
-
- if( bNormalPrint )
- {
- if( bPrtPros )
- pSh->PrintProspect( aOpts, rProgress, bPrtPros_RTL );
- else
- pSh->Prt( aOpts, &rProgress );
- }
- else
- {
- const SwPagePreViewPrtData* pPPVPD = pSh->GetDoc()->GetPreViewPrtData();
- if( pPPVPD && pPPVPD->GetCol() && pPPVPD->GetRow() )
- {
- // Zeilen / Seiten
- nRowCol = ( pPPVPD->GetRow() << 8 ) + pPPVPD->GetCol();
- }
- else
- pPPVPD = 0;
- pSh->PrintPreViewPage( aOpts, nRowCol, rProgress, pPPVPD );
- }
-
- return 0; // OK
-}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
SfxPrinter* SwPagePreView::GetPrinter( BOOL bCreate )
{
return aViewWin.GetViewShell()->getIDocumentDeviceAccess()->getPrinter( bCreate );
diff --git a/sw/source/ui/uiview/pview.hrc b/sw/source/ui/uiview/pview.hrc
index e9750930c8be..3724789431ed 100644
--- a/sw/source/ui/uiview/pview.hrc
+++ b/sw/source/ui/uiview/pview.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pview.hrc,v $
- * $Revision: 1.4 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src
index a213c8df80e7..53f672dbdb60 100644
--- a/sw/source/ui/uiview/pview.src
+++ b/sw/source/ui/uiview/pview.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: pview.src,v $
- * $Revision: 1.35 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -453,11 +450,6 @@ ToolBox RID_PVIEW_TOOLBOX
Identifier = FN_PRINT_PAGEPREVIEW ;
HelpID = FN_PRINT_PAGEPREVIEW ;
};
- ToolBoxItem
- {
- Identifier = FN_PREVIEW_PRINT_OPTIONS ;
- HelpID = FN_PREVIEW_PRINT_OPTIONS ;
- };
ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
ToolBoxItem
{
diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx
index 6449671b9b4e..c8ecc2d92607 100644
--- a/sw/source/ui/uiview/scroll.cxx
+++ b/sw/source/ui/uiview/scroll.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: scroll.cxx,v $
- * $Revision: 1.10 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index 716164348aa8..abd392b490dc 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: srcview.cxx,v $
- * $Revision: 1.59 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -54,8 +51,8 @@
#include <svtools/transfer.hxx>
#include <svl/svtools.hrc>
#include <svtools/svtdata.hxx>
-
-#include <svx/htmlcfg.hxx>
+#include <svx/svxids.hrc>
+#include <svtools/htmlcfg.hxx>
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/viewfrm.hxx>
@@ -65,12 +62,12 @@
#include <sfx2/request.hxx>
#include <sfx2/prnmon.hxx>
#include <sfx2/docfile.hxx>
-#include <svx/fhgtitem.hxx>
+#include <editeng/fhgtitem.hxx>
#include <svx/srchdlg.hxx>
-#include <svx/srchitem.hxx>
-#include <svx/fontitem.hxx>
-#include <svx/flstitem.hxx>
-#include "svx/unolingu.hxx"
+#include <svl/srchitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/flstitem.hxx>
+#include "editeng/unolingu.hxx"
#include <sfx2/sfxhtml.hxx>
#include <swtypes.hxx>
#include <swmodule.hxx>
@@ -116,9 +113,7 @@ using ::rtl::OUString;
using ::com::sun::star::util::SearchOptions;
-#define SWSRCVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST| \
- SFX_VIEW_OBJECTSIZE_EMBEDDED| \
- SFX_VIEW_CAN_PRINT|\
+#define SWSRCVIEWFLAGS ( SFX_VIEW_CAN_PRINT|\
SFX_VIEW_NO_NEWWINDOW )
#define SRC_SEARCHOPTIONS (0xFFFF & ~(SEARCH_OPTIONS_FORMAT|SEARCH_OPTIONS_FAMILIES|SEARCH_OPTIONS_SEARCH_ALL))
@@ -154,23 +149,23 @@ TYPEINIT1(SwSrcView, SfxViewShell)
--------------------------------------------------*/
-void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const String& rTitle )
+void lcl_PrintHeader( OutputDevice &rOutDev, USHORT nPages, USHORT nCurPage, const String& rTitle )
{
short nLeftMargin = LMARGPRN;
- Size aSz = pPrinter->GetOutputSize();
+ Size aSz = rOutDev.GetOutputSize();
short nBorder = BORDERPRN;
- Color aOldFillColor( pPrinter->GetFillColor() );
- Font aOldFont( pPrinter->GetFont() );
+ Color aOldFillColor( rOutDev.GetFillColor() );
+ Font aOldFont( rOutDev.GetFont() );
- pPrinter->SetFillColor( Color(COL_TRANSPARENT) );
+ rOutDev.SetFillColor( Color(COL_TRANSPARENT) );
Font aFont( aOldFont );
aFont.SetWeight( WEIGHT_BOLD );
aFont.SetAlign( ALIGN_BOTTOM );
- pPrinter->SetFont( aFont );
+ rOutDev.SetFont( aFont );
- long nFontHeight = pPrinter->GetTextHeight();
+ long nFontHeight = rOutDev.GetTextHeight();
// 1.Border => Strich, 2+3 Border = Freiraum.
long nYTop = TMARGPRN-3*nBorder-nFontHeight;
@@ -178,34 +173,34 @@ void lcl_PrintHeader( Printer* pPrinter, USHORT nPages, USHORT nCurPage, const S
long nXLeft = nLeftMargin-nBorder;
long nXRight = aSz.Width()-RMARGPRN+nBorder;
- pPrinter->DrawRect( Rectangle(
+ rOutDev.DrawRect( Rectangle(
Point( nXLeft, nYTop ),
Size( nXRight-nXLeft, aSz.Height() - nYTop - BMARGPRN + nBorder ) ) );
long nY = TMARGPRN-2*nBorder;
Point aPos( nLeftMargin, nY );
- pPrinter->DrawText( aPos, rTitle );
+ rOutDev.DrawText( aPos, rTitle );
if ( nPages != 1 )
{
aFont.SetWeight( WEIGHT_NORMAL );
- pPrinter->SetFont( aFont );
+ rOutDev.SetFont( aFont );
String aPageStr( C2S(" [") );
aPageStr += String( SW_RES( STR_PAGE ) );
aPageStr += ' ';
aPageStr += String::CreateFromInt32( nCurPage );
aPageStr += ']';
- aPos.X() += pPrinter->GetTextWidth( rTitle );
- pPrinter->DrawText( aPos, aPageStr );
+ aPos.X() += rOutDev.GetTextWidth( rTitle );
+ rOutDev.DrawText( aPos, aPageStr );
}
nY = TMARGPRN-nBorder;
- pPrinter->DrawLine( Point( nXLeft, nY ), Point( nXRight, nY ) );
+ rOutDev.DrawLine( Point( nXLeft, nY ), Point( nXRight, nY ) );
- pPrinter->SetFont( aOldFont );
- pPrinter->SetFillColor( aOldFillColor );
+ rOutDev.SetFont( aOldFont );
+ rOutDev.SetFillColor( aOldFillColor );
}
/* -----------------13.11.2003 16:24-----------------
@@ -736,16 +731,13 @@ USHORT SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem,
return nFound;
}
-/*-----------------02.07.97 09:29-------------------
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
---------------------------------------------------*/
USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
{
SwDocShell* pDocSh = GetDocShell();
- SfxPrinter* pOld = pDocSh->GetDoc()->getPrinter( false );
- if ( pOld && pOld->IsPrinting() )
- return SFX_PRINTERROR_BUSY;
-
if ( (SFX_PRINTER_JOBSETUP | SFX_PRINTER_PRINTER) & nDiffFlags )
{
pDocSh->GetDoc()->setPrinter( pNew, true, true );
@@ -768,109 +760,88 @@ USHORT SwSrcView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
Beschreibung:
--------------------------------------------------------------------*/
-ErrCode SwSrcView::DoPrint( SfxPrinter *pPrinter, PrintDialog *pDlg, BOOL bSilent, BOOL bIsAPI )
+SfxPrinter* SwSrcView::GetPrinter( BOOL bCreate )
{
- SfxPrintProgress *pProgress = new SfxPrintProgress( this, !bSilent );
- SfxPrinter *pDocPrinter = GetPrinter(TRUE);
- if ( !pPrinter )
- pPrinter = pDocPrinter;
- else if ( pDocPrinter != pPrinter )
- {
- pProgress->RestoreOnEndPrint( pDocPrinter->Clone() );
- SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
- }
- pProgress->SetWaitMode(FALSE);
+ return GetDocShell()->GetDoc()->getPrinter( bCreate );
+}
- // Drucker starten
- PreparePrint( pDlg );
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+sal_Int32 SwSrcView::PrintSource(
+ OutputDevice *pOutDev,
+ sal_Int32 nPage,
+ bool bCalcNumPagesOnly )
+{
+ if (!pOutDev || nPage <= 0)
+ return 0;
- SfxViewShell::Print(*pProgress, bIsAPI, pDlg ); //???
+ //! this a lgorithm for printing the n-th page is very poor since it
+ //! needs to go over the text of all previous pages to get to the correct one.
+ //! But since HTML source code is expected to be just a small number of pages
+ //! even this poor algorithm should be enough...
- MapMode eOldMapMode( pPrinter->GetMapMode() );
- Font aOldFont( pPrinter->Printer::GetFont() );
+ pOutDev->Push();
TextEngine* pTextEngine = aEditWin.GetTextEngine();
- pPrinter->SetMapMode(MAP_100TH_MM);
- Font aFont(aEditWin.GetOutWin()->GetFont());
- Size aSize(aFont.GetSize());
- aSize = aEditWin.GetOutWin()->PixelToLogic(aSize, MAP_100TH_MM);
- aFont.SetSize(aSize);
- aFont.SetColor(COL_BLACK);
- pPrinter->SetFont( aFont );
+ pOutDev->SetMapMode( MAP_100TH_MM );
+ Font aFont( aEditWin.GetOutWin()->GetFont() );
+ Size aSize( aFont.GetSize() );
+ aSize = aEditWin.GetOutWin()->PixelToLogic( aSize, MAP_100TH_MM );
+ aFont.SetSize( aSize );
+ aFont.SetColor( COL_BLACK );
+ pOutDev->SetFont( aFont );
String aTitle( GetViewFrame()->GetWindow().GetText() );
- USHORT nLineHeight = (USHORT) pPrinter->GetTextHeight(); // etwas mehr.
+ USHORT nLineHeight = (USHORT) pOutDev->GetTextHeight(); // etwas mehr.
USHORT nParaSpace = 10;
- Size aPaperSz = pPrinter->GetOutputSize();
- aPaperSz.Width() -= (LMARGPRN+RMARGPRN);
- aPaperSz.Height() -= (TMARGPRN+BMARGPRN);
+ Size aPaperSz = pOutDev->GetOutputSize();
+ aPaperSz.Width() -= (LMARGPRN + RMARGPRN);
+ aPaperSz.Height() -= (TMARGPRN + BMARGPRN);
// nLinepPage stimmt nicht, wenn Zeilen umgebrochen werden muessen...
- USHORT nLinespPage = (USHORT) (aPaperSz.Height()/nLineHeight);
- USHORT nCharspLine = (USHORT) (aPaperSz.Width() / pPrinter->GetTextWidth( 'X' ));
+ USHORT nLinespPage = (USHORT) (aPaperSz.Height() / nLineHeight);
+ USHORT nCharspLine = (USHORT) (aPaperSz.Width() / pOutDev->GetTextWidth( 'X' ));
USHORT nParas = static_cast< USHORT >( pTextEngine->GetParagraphCount() );
- USHORT nPages = (USHORT) (nParas/nLinespPage+1 );
+ USHORT nPages = (USHORT) (nParas / nLinespPage + 1 );
USHORT nCurPage = 1;
- BOOL bStartJob = pPrinter->StartJob( aTitle );
- if( bStartJob )
+ // Header drucken...
+ if (!bCalcNumPagesOnly && nPage == nCurPage)
+ lcl_PrintHeader( *pOutDev, nPages, nCurPage, aTitle );
+ const Point aStartPos( LMARGPRN, TMARGPRN );
+ Point aPos( aStartPos );
+ for ( USHORT nPara = 0; nPara < nParas; ++nPara )
{
- pPrinter->StartPage();
- // Header drucken...
- lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle );
- Point aPos( LMARGPRN, TMARGPRN );
- for ( USHORT nPara = 0; nPara < nParas; nPara++ )
+ String aLine( pTextEngine->GetText( nPara ) );
+ lcl_ConvertTabsToSpaces( aLine );
+ USHORT nLines = aLine.Len() / nCharspLine + 1;
+ for ( USHORT nLine = 0; nLine < nLines; ++nLine )
{
- String aLine( pTextEngine->GetText( nPara ) );
- lcl_ConvertTabsToSpaces( aLine );
- USHORT nLines = aLine.Len()/nCharspLine+1;
- for ( USHORT nLine = 0; nLine < nLines; nLine++ )
+ String aTmpLine( aLine, nLine * nCharspLine, nCharspLine );
+ aPos.Y() += nLineHeight;
+ if ( aPos.Y() > ( aPaperSz.Height() + TMARGPRN - nLineHeight/2 ) )
{
- String aTmpLine( aLine, nLine*nCharspLine, nCharspLine );
- aPos.Y() += nLineHeight;
- if ( aPos.Y() > ( aPaperSz.Height()+TMARGPRN ) )
- {
- nCurPage++;
- pPrinter->EndPage();
- pPrinter->StartPage();
- lcl_PrintHeader( pPrinter, nPages, nCurPage, aTitle );
- aPos = Point( LMARGPRN, TMARGPRN+nLineHeight );
- }
- pPrinter->DrawText( aPos, aTmpLine );
+ ++nCurPage;
+ if (!bCalcNumPagesOnly && nPage == nCurPage)
+ lcl_PrintHeader( *pOutDev, nPages, nCurPage, aTitle );
+ aPos = aStartPos;
}
- aPos.Y() += nParaSpace;
+ if (!bCalcNumPagesOnly && nPage == nCurPage)
+ pOutDev->DrawText( aPos, aTmpLine );
}
- pPrinter->EndPage();
+ aPos.Y() += nParaSpace;
}
- pPrinter->SetFont( aOldFont );
- pPrinter->SetMapMode( eOldMapMode );
-
- if ( !bStartJob )
- {
- // Printer konnte nicht gestartet werden
- delete pProgress;
- return ERRCODE_IO_ABORT;
- }
+ pOutDev->Pop();
- pProgress->Stop();
- pProgress->DeleteOnEndPrint();
- pPrinter->EndJob();
- return pPrinter->GetError();
+ DBG_ASSERT( bCalcNumPagesOnly || nPage <= nCurPage, "page number out of range" );
+ return nCurPage;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
-SfxPrinter* SwSrcView::GetPrinter( BOOL bCreate )
-{
- return GetDocShell()->GetDoc()->getPrinter( bCreate );
-}
/*--------------------------------------------------------------------
Beschreibung:
diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx
index f895e6108995..6da603c893b3 100644
--- a/sw/source/ui/uiview/swcli.cxx
+++ b/sw/source/ui/uiview/swcli.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: swcli.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index 4154139f6ee1..20dc6035dc36 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: uivwimp.cxx,v $
- * $Revision: 1.25 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index d823f2e6c63b..23e6a44012e4 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view.cxx,v $
- * $Revision: 1.112.94.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,7 +30,6 @@
#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
-
#include <stdlib.h>
#include <hintids.hxx>
#include <rtl/logfile.hxx>
@@ -51,7 +47,7 @@
#include <sfx2/printer.hxx>
#include <sfx2/app.hxx>
#include <svx/ruler.hxx>
-#include <svx/protitem.hxx>
+#include <editeng/protitem.hxx>
#include <svx/fmshell.hxx>
#include <svx/extrusionbar.hxx>
#include <svx/fontworkbar.hxx>
@@ -100,7 +96,7 @@
#include <prtopt.hxx>
#include <swprtopt.hxx>
#include <linguistic/lngprops.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
//#include <sfx2/app.hxx>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/scanner/ScannerContext.hpp>
@@ -131,14 +127,9 @@ using ::rtl::OUStringBuffer;
extern sal_Bool bNoInterrupt; // in mainwn.cxx
-#define SWVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST| \
- SFX_VIEW_OBJECTSIZE_EMBEDDED| \
- SFX_VIEW_CAN_PRINT| \
+#define SWVIEWFLAGS ( SFX_VIEW_CAN_PRINT| \
SFX_VIEW_HAS_PRINTOPTIONS)
-//MA 06. Nov. 95: Each raus in Absprache mit MI wg. Bug 21523
-// SFX_VIEW_OPTIMIZE_EACH|
-
/*--------------------------------------------------------------------
Beschreibung: Statics
--------------------------------------------------------------------*/
@@ -178,7 +169,7 @@ inline SfxDispatcher &SwView::GetDispatcher()
void SwView::ImpSetVerb( int nSelType )
{
sal_Bool bResetVerbs = bVerbsActive;
- if ( !GetViewFrame()->GetFrame()->IsInPlace() &&
+ if ( !GetViewFrame()->GetFrame().IsInPlace() &&
(nsSelectionType::SEL_OLE|nsSelectionType::SEL_GRF) & nSelType )
{
if ( !pWrtShell->IsSelObjProtected(FLYPROTECT_CONTENT) )
@@ -760,7 +751,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
pFormShell(0),
pHScrollbar(0),
pVScrollbar(0),
- pScrollFill(new ScrollBarBox( &_pFrame->GetWindow(), _pFrame->GetFrame()->GetParentFrame() ? 0 : WB_SIZEABLE )),
+ pScrollFill(new ScrollBarBox( &_pFrame->GetWindow(), _pFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
pHRuler( new SvxRuler(&GetViewFrame()->GetWindow(), pEditWin,
SVXRULER_SUPPORT_TABS |
SVXRULER_SUPPORT_PARAGRAPH_MARGINS |
@@ -932,10 +923,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
if( SFX_CREATE_MODE_EMBEDDED != pDocSh->GetCreateMode() )
aBrwsBorder = GetMargin();
- if( _pFrame->GetFrameType() & SFXFRAME_INTERNAL )
- pWrtShell->SetFrameView( aBrwsBorder );
- else
- pWrtShell->SetBrowseBorder( aBrwsBorder );
+ pWrtShell->SetBrowseBorder( aBrwsBorder );
// Im CTOR duerfen keine Shell wechsel erfolgen, die muessen ueber
// den Timer "zwischen gespeichert" werden. Sonst raeumt der SFX
@@ -947,7 +935,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
pVRuler->SetActive( sal_True );
SfxViewFrame* pViewFrame = GetViewFrame();
- if( pViewFrame->GetFrame()->GetParentFrame())
+ if( pViewFrame->GetFrame().GetParentFrame())
{
aUsrPref.SetViewHRuler(sal_False);
aUsrPref.SetViewVRuler(sal_False);
@@ -1006,13 +994,6 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() );
pWrtShell->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions());
- if( UseObjectSize() )
- {
- //Damit der Sfx _rechtzeitig weiss_, wie gross die sheet::Border sind.
- SvBorder aTmp;
- CalcAndSetBorderPixel( aTmp, sal_True );
- }
-
if( pWrtShell->GetDoc()->IsUpdateExpFld() )
{
SET_CURR_SHELL( pWrtShell );
@@ -1061,10 +1042,10 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
/*uno::Reference< awt::XWindow > aTmpRef;
- _pFrame->GetFrame()->GetFrameInterface()->setComponent( aTmpRef,
+ _pFrame->GetFrame().GetFrameInterface()->setComponent( aTmpRef,
pViewImpl->GetUNOObject_Impl());*/
- uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame()->GetFrameInterface();
+ uno::Reference< frame::XFrame > xFrame = pVFrame->GetFrame().GetFrameInterface();
uno::Reference< frame::XFrame > xBeamerFrame = xFrame->findFrame(
OUString::createFromAscii("_beamer"), frame::FrameSearchFlag::CHILDREN);
@@ -1626,7 +1607,7 @@ void SwView::ShowCursor( FASTBOOL bOn )
ErrCode SwView::DoVerb( long nVerb )
{
- if ( !GetViewFrame()->GetFrame()->IsInPlace() )
+ if ( !GetViewFrame()->GetFrame().IsInPlace() )
{
SwWrtShell &rSh = GetWrtShell();
const int nSel = rSh.GetSelectionType();
@@ -1920,53 +1901,6 @@ void SwView::NotifyDBChanged()
Beschreibung: Drucken
--------------------------------------------------------------------*/
-void SwView::MakeOptions( PrintDialog* pDlg, SwPrtOptions& rOpts,
- BOOL* pPrtProspect, BOOL* pPrtProspect_RTL, BOOL bWeb, SfxPrinter* pPrt, SwPrintData* pData )
-{
- SwAddPrinterItem* pAddPrinterAttr;
- if( pPrt && SFX_ITEM_SET == pPrt->GetOptions().GetItemState(
- FN_PARAM_ADDPRINTER, FALSE, (const SfxPoolItem**)&pAddPrinterAttr ))
- {
- pData = pAddPrinterAttr;
- }
- else if(!pData)
- {
- pData = SW_MOD()->GetPrtOptions(bWeb);
- }
- rOpts = *pData;
- if( pPrtProspect )
- *pPrtProspect = pData->bPrintProspect;
- if( pPrtProspect_RTL )
- *pPrtProspect_RTL = pData->bPrintProspect_RTL;
- rOpts.aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
- rOpts.aMulti.SelectAll( FALSE );
- rOpts.nCopyCount = 1;
- rOpts.bCollate = FALSE;
- rOpts.bPrintSelection = FALSE;
- rOpts.bJobStartet = FALSE;
-
- if ( pDlg )
- {
- rOpts.nCopyCount = pDlg->GetCopyCount();
- rOpts.bCollate = pDlg->IsCollateChecked();
- if ( pDlg->GetCheckedRange() == PRINTDIALOG_SELECTION )
- {
- rOpts.aMulti.SelectAll();
- rOpts.bPrintSelection = TRUE;
- }
- else if ( PRINTDIALOG_ALL == pDlg->GetCheckedRange() )
- rOpts.aMulti.SelectAll();
- else
- {
- rOpts.aMulti = MultiSelection( pDlg->GetRangeText() );
- rOpts.aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
- }
- }
- else
- rOpts.aMulti.SelectAll();
- rOpts.aMulti.Select( 0, FALSE );
-}
-
/* -----------------------------28.10.02 13:25--------------------------------
---------------------------------------------------------------------------*/
@@ -1995,3 +1929,20 @@ void SwView::AddTransferable(SwTransferable& rTransferable)
{
GetViewImpl()->AddTransferable(rTransferable);
}
+
+/* --------------------------------------------------*/
+
+void SwPrtOptions::MakeOptions( BOOL bWeb )
+{
+ *this = *SW_MOD()->GetPrtOptions(bWeb);
+
+ nCopyCount = 1;
+ bCollate = FALSE;
+ bPrintSelection = FALSE;
+ bJobStartet = FALSE;
+
+ aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
+ aMulti.SelectAll();
+ aMulti.Select( 0, FALSE );
+}
+
diff --git a/sw/source/ui/uiview/view.hrc b/sw/source/ui/uiview/view.hrc
index 2c6d31277f0e..8697a7e4ed63 100644
--- a/sw/source/ui/uiview/view.hrc
+++ b/sw/source/ui/uiview/view.hrc
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view.hrc,v $
- * $Revision: 1.5.240.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src
index beb4f423ba28..7c47fe6ef208 100644
--- a/sw/source/ui/uiview/view.src
+++ b/sw/source/ui/uiview/view.src
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view.src,v $
- * $Revision: 1.52.110.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 2d0b7f340f51..52f94324437c 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view0.cxx,v $
- * $Revision: 1.29 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -36,7 +33,7 @@
#include "hintids.hxx"
#include <vcl/graph.hxx>
#include <svx/galbrws.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <SwSpellDialogChildWindow.hxx>
#include <svl/eitem.hxx>
#include <unotools/linguprops.hxx>
@@ -48,6 +45,8 @@
#include <svl/whiter.hxx>
#include <svx/srchdlg.hxx>
#include <sfx2/templdlg.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/bindings.hxx>
#include <uivwimp.hxx>
#include <avmedia/mediaplayer.hxx>
#include <swmodule.hxx>
@@ -554,3 +553,9 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
rReq.Done();
}
+IMPL_LINK( SwView, HtmlOptionsHdl, void*, EMPTYARG )
+{
+ // Invalidierung, falls blinkender Text erlaubt/verboten wurde
+ GetViewFrame()->GetBindings().Invalidate(SID_DRAW_TEXT_MARQUEE);
+ return 0;
+}
diff --git a/sw/source/ui/uiview/view1.cxx b/sw/source/ui/uiview/view1.cxx
index 56ad1703996e..208a9c27ebdc 100644
--- a/sw/source/ui/uiview/view1.cxx
+++ b/sw/source/ui/uiview/view1.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view1.cxx,v $
- * $Revision: 1.15 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 33acb232821a..a38956cc5d68 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: view2.cxx,v $
- * $Revision: 1.90 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -33,25 +30,15 @@
#include <com/sun/star/util/SearchOptions.hpp>
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
-
-// #ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
-// #include <com/sun/star/lang/Locale.hpp>
-// #endif
-// #ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
-// #include <com/sun/star/ui/dialogs/XFilePicker.hpp>
-// #endif
+#include <svtools/filter.hxx>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
-
#define _SVSTDARR_STRINGSSORTDTOR
#include <svl/svstdarr.hxx>
#include <svl/aeitem.hxx>
-// #ifndef _FILTER_HXX
-// #include <svtools/filter.hxx>
-// #endif
#include <SwStyleNameMapper.hxx>
#include <docary.hxx>
#include <hintids.hxx>
@@ -65,38 +52,30 @@
#include <sfx2/sfxdlg.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/sfxhelp.hxx>
-#include <svx/langitem.hxx>
+#include <editeng/langitem.hxx>
#include <svx/viewlayoutitem.hxx>
#include <svx/zoomslideritem.hxx>
#include <svx/htmlmode.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#ifndef _WRKWIN_HXX //autogen
#include <vcl/wrkwin.hxx>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/impgrf.hxx>
+#include <editeng/lrspitem.hxx>
#include <svtools/txtcmp.hxx>
-#include "svx/unolingu.hxx"
+#include "editeng/unolingu.hxx"
#include <vcl/msgbox.hxx>
-#include <svx/tstpitem.hxx>
+#include <editeng/tstpitem.hxx>
#include <sfx2/event.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/fcontnr.hxx>
-#include <svx/sizeitem.hxx>
+#include <editeng/sizeitem.hxx>
#include <sfx2/dispatch.hxx>
-#include <sfx2/topfrm.hxx>
#include <svl/whiter.hxx>
#include <svl/ptitem.hxx>
-#include <svx/linkmgr.hxx>
-#ifndef __RSC //autogen
+#include <sfx2/linkmgr.hxx>
#include <tools/errinf.hxx>
-#endif
#include <tools/urlobj.hxx>
#include <svx/svdview.hxx>
#include <swtypes.hxx>
@@ -148,10 +127,6 @@
#include <PostItMgr.hxx>
#include <postit.hxx>
-// #ifndef _FRMMGR_HXX
-// #include <frmmgr.hxx>
-// #endif
-
#include <ndtxt.hxx> //#outline level,added by zhaojianwei
#include <comphelper/processfactory.hxx>
@@ -245,8 +220,8 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
else
{
if( !pFlt )
- pFlt = ::GetGrfFilter();
- nRes = ::LoadGraphic( rPath, rFilter, aGrf, pFlt /*, nFilter*/ );
+ pFlt = GraphicFilter::GetGraphicFilter();
+ nRes = GraphicFilter::LoadGraphic( rPath, rFilter, aGrf, pFlt /*, nFilter*/ );
}
if( GRFILTER_OK == nRes )
@@ -437,11 +412,11 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
rSh.StartUndo(UNDO_INSERT, &aRewriter);
- int nError = InsertGraphic( aFileName, aFilterName, bAsLink, ::GetGrfFilter() );
+ int nError = InsertGraphic( aFileName, aFilterName, bAsLink, GraphicFilter::GetGraphicFilter() );
// Format ist ungleich Current Filter, jetzt mit auto. detection
if( nError == GRFILTER_FORMATERROR )
- nError = InsertGraphic( aFileName, aEmptyStr, bAsLink, ::GetGrfFilter() );
+ nError = InsertGraphic( aFileName, aEmptyStr, bAsLink, GraphicFilter::GetGraphicFilter() );
if ( rSh.IsFrmSelected() )
{
SwFrmFmt* pFmt = pDoc->FindFrmFmtByName( sGraphicFormat );
@@ -1052,7 +1027,7 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
if(bQuery)
{
SfxViewFrame* pTmpFrame = GetViewFrame();
- SfxHelp::OpenHelpAgent( pTmpFrame->GetFrame(), HID_MAIL_MERGE_SELECT );
+ SfxHelp::OpenHelpAgent( &pTmpFrame->GetFrame(), HID_MAIL_MERGE_SELECT );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractMailMergeCreateFromDlg* pDlg = pFact->CreateMailMergeCreateFromDlg( DLG_MERGE_CREATE,
diff --git a/sw/source/ui/uiview/viewcoll.cxx b/sw/source/ui/uiview/viewcoll.cxx
index 92937b2f1746..e5f9350277ee 100644
--- a/sw/source/ui/uiview/viewcoll.cxx
+++ b/sw/source/ui/uiview/viewcoll.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewcoll.cxx,v $
- * $Revision: 1.7 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/viewdlg.cxx b/sw/source/ui/uiview/viewdlg.cxx
index 04370478c796..8c19c454b6ac 100644
--- a/sw/source/ui/uiview/viewdlg.cxx
+++ b/sw/source/ui/uiview/viewdlg.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewdlg.cxx,v $
- * $Revision: 1.8 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,7 +32,7 @@
#include "hintids.hxx"
#include <sfx2/viewfrm.hxx>
-#include <svx/tstpitem.hxx>
+#include <editeng/tstpitem.hxx>
#include <svl/stritem.hxx>
#include <sfx2/request.hxx>
diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx
index f0796240a4d1..bbff2271e9fa 100644
--- a/sw/source/ui/uiview/viewdlg2.cxx
+++ b/sw/source/ui/uiview/viewdlg2.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewdlg2.cxx,v $
- * $Revision: 1.14 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index 328b5a3d06ca..7e35ca0049df 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewdraw.cxx,v $
- * $Revision: 1.40 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,22 +35,22 @@
#include <svx/svdobj.hxx>
#include <svx/svdview.hxx>
#include <svx/svdpage.hxx>
-#include <svx/editview.hxx>
-#include <svx/editeng.hxx>
-#include <svx/outliner.hxx>
+#include <editeng/editview.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/outliner.hxx>
#include <svx/fmview.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <sfx2/viewfrm.hxx>
#include <doc.hxx>
-#include <svx/langitem.hxx>
+#include <editeng/langitem.hxx>
#include <linguistic/lngprops.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <svx/fontworkbar.hxx>
#include <svx/fontworkgallery.hxx>
-#include <svx/eeitem.hxx>
+#include <editeng/eeitem.hxx>
#include <svx/svdogrp.hxx>
#include <svx/svdetc.hxx>
-#include <svx/editstat.hxx>
+#include <editeng/editstat.hxx>
#include <sfx2/request.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/printer.hxx>
@@ -174,7 +171,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
// TODO: unmark all other
pWrtShell->EnterStdMode();
- pWrtShell->SwFEShell::Insert( *pObj, 0, 0, &aStartPos );
+ pWrtShell->SwFEShell::InsertDrawObj( *pObj, aStartPos );
}
}
}
@@ -221,7 +218,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
aSize = Size( 2835, 2835 );
pWrtShell->EnterStdMode();
- pWrtShell->SwFEShell::Insert( *pObj, 0, 0, &aPos );
+ pWrtShell->SwFEShell::InsertDrawObj( *pObj, aPos );
rReq.Ignore ();
}
}
diff --git a/sw/source/ui/uiview/viewfunc.hxx b/sw/source/ui/uiview/viewfunc.hxx
index 1d50156a1790..f04db152ec2f 100644
--- a/sw/source/ui/uiview/viewfunc.hxx
+++ b/sw/source/ui/uiview/viewfunc.hxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewfunc.hxx,v $
- * $Revision: 1.9 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 09014ea3afcf..04414b5d83db 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewling.cxx,v $
- * $Revision: 1.38 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -52,25 +49,19 @@
#include <sfx2/request.hxx>
#include <svx/dlgutil.hxx>
#include <svx/dialmgr.hxx>
-#include <svx/langitem.hxx>
+#include <editeng/langitem.hxx>
#include <svx/svxerr.hxx>
-#include <svx/unolingu.hxx>
-#include <svx/thesdlg.hxx>
-#include <svx/SpellPortions.hxx>
+#include <editeng/unolingu.hxx>
+#include <svx/svxdlg.hxx>
+#include <editeng/SpellPortions.hxx>
#include <swmodule.hxx>
#include <swwait.hxx>
#include <initui.hxx> // fuer SpellPointer
#include <uitool.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
-#ifndef _BASESH_HXX
#include <basesh.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx> // CheckSpellChanges
-#endif
#include <viewopt.hxx> // Viewoptions
#include <swundo.hxx> // fuer Undo-Ids
#include <hyp.hxx> // Trennung
@@ -79,19 +70,11 @@
#include <edtwin.hxx>
#include <crsskip.hxx>
#include <ndtxt.hxx>
-
-#ifndef _CMDID_H
+#include <vcl/lstbox.hxx>
#include <cmdid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc> // STR_MULT_INTERACT_SPELL_WARN
-#endif
-#ifndef _VIEW_HRC
#include <view.hrc>
-#endif
#include <hhcwrp.hxx>
#include <com/sun/star/frame/XStorable.hpp>
@@ -112,11 +95,15 @@
#include <cppuhelper/bootstrap.hxx>
#include "stmenu.hxx" // PopupMenu for smarttags
#include <svx/dialogs.hrc>
-
+#include <svtools/langtab.hxx>
#include <unomid.h>
+#include <IMark.hxx>
+#include <xmloff/odffields.hxx>
#include <memory>
+#include <editeng/editerr.hxx>
+using namespace sw::mark;
using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
@@ -418,7 +405,7 @@ IMPL_LINK( SwView, SpellError, LanguageType *, pLang )
while( pWrtShell->ActionPend() );
}
LanguageType eLang = pLang ? *pLang : LANGUAGE_NONE;
- String aErr(::GetLanguageString( eLang ) );
+ String aErr(SvtLanguageTable::GetLanguageString( eLang ) );
SwEditWin &rEditWin = GetEditWin();
#if OSL_DEBUG_LEVEL > 1
@@ -614,7 +601,7 @@ void SwView::StartThesaurus()
pWrtShell->GetSelTxt() : pWrtShell->GetCurWord();
Reference< XThesaurus > xThes( ::GetThesaurus() );
- SvxThesaurusDialog *pDlg = NULL;
+ AbstractThesaurusDialog *pDlg = NULL;
if ( !xThes.is() || !xThes->hasLocale( SvxCreateLocale( eLang ) ) )
{
@@ -625,7 +612,8 @@ void SwView::StartThesaurus()
// create dialog
{ //Scope for SwWait-Object
SwWait aWait( *GetDocShell(), sal_True );
- pDlg = new SvxThesaurusDialog( &GetEditWin(),
+ SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+ pDlg = pFact->CreateThesaurusDialog( &GetEditWin(),
xThes, aTmp, eLang );
}
@@ -651,12 +639,12 @@ void SwView::StartThesaurus()
else
aWinTop.Y() = aBtmPos.Y();
- Size aSz = pDlg->GetSizePixel();
+ Size aSz = pDlg->GetWindow()->GetSizePixel();
if ( aWinBtm.Y() - aWinTop.Y() > aSz.Height() )
{
aWinTop.X() = ( aWinTop.X() + aWinBtm.X() - aSz.Width() ) / 2;
aWinTop.Y() = ( aWinTop.Y() + aWinBtm.Y() - aSz.Height() ) / 2;
- pDlg->SetPosPixel( aWinTop );
+ pDlg->GetWindow()->SetPosPixel( aWinTop );
}
}
@@ -842,10 +830,9 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
else
{
SfxViewFrame *pSfxViewFrame = GetViewFrame();
- SfxFrame *pSfxFrame = pSfxViewFrame? pSfxViewFrame->GetFrame() : 0;
uno::Reference< frame::XFrame > xFrame;
- if (pSfxFrame)
- xFrame = pSfxFrame->GetFrameInterface();
+ if ( pSfxViewFrame )
+ xFrame = pSfxViewFrame->GetFrame().GetFrameInterface();
com::sun::star::util::URL aURL;
uno::Reference< frame::XDispatchProvider > xDispatchProvider( xFrame, UNO_QUERY );
uno::Reference< lang::XMultiServiceFactory > xMgr( utl::getProcessServiceFactory(), uno::UNO_QUERY );
@@ -931,3 +918,142 @@ sal_Bool SwView::ExecSmartTagPopup( const Point& rPt )
return bRet;
}
+
+
+class SwFieldPopup : public PopupMenu
+{
+public:
+ SwFieldPopup() {
+ InsertItem(1, ::rtl::OUString::createFromAscii("Hello"));
+ }
+};
+
+class SwFieldListBox : public ListBox
+{
+public:
+ SwFieldListBox(Window* pParent) : ListBox(pParent /*, WB_DROPDOWN*/) {
+ }
+
+ void *GetImplWin() {
+ return NULL; //FIXME!!!
+// return mpImplWin;
+ }
+
+protected:
+ virtual void LoseFocus() {
+// printf("ListBox: lose focus!!\n");
+ ListBox::LoseFocus();
+ }
+
+ virtual void Select() {
+// printf("SELECT!!! IsTravelSelect=%i\n", IsTravelSelect());
+ ListBox::Select();
+ }
+};
+
+class SwFieldDialog : public Dialog
+{
+private:
+ SwFieldListBox aListBox;
+ Edit aText;
+ int selection;
+
+ DECL_LINK( MyListBoxHandler, ListBox * );
+
+public:
+ SwFieldDialog(Window* parent, IFieldmark *fieldBM) : Dialog(parent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ), aListBox(this), aText(this, WB_RIGHT | WB_READONLY), selection(-1) {
+
+ assert(fieldBM!=NULL);
+ if (fieldBM!=NULL) {
+ const IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters();
+ IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY));
+ if(pListEntries != pParameters->end())
+ {
+ Sequence< ::rtl::OUString> vListEntries;
+ pListEntries->second >>= vListEntries;
+ for( ::rtl::OUString* pCurrent = vListEntries.getArray();
+ pCurrent != vListEntries.getArray() + vListEntries.getLength();
+ ++pCurrent)
+ {
+ aListBox.InsertEntry(*pCurrent);
+ }
+ }
+ }
+ Size lbSize=aListBox.GetOptimalSize(WINDOWSIZE_PREFERRED);
+ lbSize.Width()+=50;
+ lbSize.Height()+=20;
+ aListBox.SetSizePixel(lbSize);
+ aListBox.SetSelectHdl( LINK( this, SwFieldDialog, MyListBoxHandler ) );
+ aListBox.Show();
+ aText.SetText(rtl::OUString::createFromAscii("Cancel"));
+ Size tSize=aText.GetOptimalSize(WINDOWSIZE_PREFERRED);
+ aText.SetSizePixel(Size(lbSize.Width(), tSize.Height()));
+ aText.SetPosPixel(Point(0, lbSize.Height()));
+ aText.Show();
+ SetSizePixel(Size(lbSize.Width(), lbSize.Height()+tSize.Height()));
+// SetSizePixel(Size(200, 200));
+ }
+
+ int getSelection() {
+ return selection;
+ }
+protected:
+ /*
+ virtual void LoseFocus() {
+ printf("lose focus!!\n");
+ Dialog::LoseFocus();
+ printf("close:\n");
+ EndDialog(8);
+ }
+ */
+
+ virtual long PreNotify( NotifyEvent& rNEvt ) {
+ if (rNEvt.GetType() == EVENT_LOSEFOCUS && aListBox.GetImplWin()==rNEvt.GetWindow()) {
+ EndDialog(8);
+ return 1;
+ }
+ if (rNEvt.GetType() == EVENT_KEYINPUT) {
+// printf("PreNotify::KEYINPUT\n");
+ }
+ return Dialog::PreNotify(rNEvt);
+ }
+};
+
+IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox )
+{
+// printf("### DROP DOWN SELECT... IsTravelSelect=%i\n", pBox->IsTravelSelect());
+ if (pBox->IsTravelSelect()) {
+ return 0;
+ } else {
+ this->selection=pBox->GetSelectEntryPos();
+ EndDialog(9); //@TODO have meaningfull returns...
+ return 1;
+ }
+}
+
+
+BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
+{
+ sal_Bool bRet = sal_False;
+ const sal_Bool bOldViewLock = pWrtShell->IsViewLocked();
+ pWrtShell->LockView( sal_True );
+ pWrtShell->Push();
+
+ bRet=sal_True;
+ const Point aPixPos = GetEditWin().LogicToPixel( rPt );
+
+ SwFieldDialog aFldDlg(pEditWin, fieldBM);
+ aFldDlg.SetPosPixel(pEditWin->OutputToScreenPixel(aPixPos));
+
+ /*short ret=*/aFldDlg.Execute();
+ sal_Int32 selection=aFldDlg.getSelection();
+ if (selection>=0) {
+ (*fieldBM->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)] = makeAny(selection);
+ }
+
+ pWrtShell->Pop( sal_False );
+ pWrtShell->LockView( bOldViewLock );
+
+ return bRet;
+}
+
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 702c0790012f..d3c5d54d8743 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewmdi.cxx,v $
- * $Revision: 1.24.140.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -39,8 +36,8 @@
#include <vcl/svapp.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/ruler.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/srchitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <svl/srchitem.hxx>
#include <sfx2/request.hxx>
#include <swmodule.hxx>
#ifndef _VIEW_HXX
@@ -181,7 +178,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
nFac = Max( long( MINZOOM ), nFac );
SwViewOption aOpt( *pOpt );
- if ( !GetViewFrame()->GetFrame()->IsInPlace() )
+ if ( !GetViewFrame()->GetFrame().IsInPlace() )
{
//MasterUsrPrefs updaten UND DANACH die ViewOptions der aktuellen
//View updaten.
@@ -264,7 +261,7 @@ void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
ACT_KONTEXT(pWrtShell);
- if ( !GetViewFrame()->GetFrame()->IsInPlace() && !bViewOnly )
+ if ( !GetViewFrame()->GetFrame().IsInPlace() && !bViewOnly )
{
const BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
SwMasterUsrPref *pUsrPref = (SwMasterUsrPref*)SW_MOD()->GetUsrPref(bWeb);
@@ -350,7 +347,7 @@ void SwView::CreatePageButtons(BOOL bShow)
pPageUpBtn->SetHelpId(HID_SCRL_PAGEUP);
pPageDownBtn = new SwHlpImageButton(pMDI, SW_RES( BTN_PAGEDOWN ), FALSE );
pPageDownBtn->SetHelpId(HID_SCRL_PAGEDOWN);
- Reference< XFrame > xFrame = GetViewFrame()->GetFrame()->GetFrameInterface();
+ Reference< XFrame > xFrame = GetViewFrame()->GetFrame().GetFrameInterface();
pNaviBtn = new SwNaviImageButton(pMDI, xFrame );
pNaviBtn->SetHelpId(HID_SCRL_NAVI);
Link aLk( LINK( this, SwView, BtnPage ) );
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 1cc886f5d204..b343619f2ea8 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewport.cxx,v $
- * $Revision: 1.47 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -35,8 +32,8 @@
#include "hintids.hxx"
#include <vcl/help.hxx>
#include <svx/ruler.hxx>
-#include <svx/paperinf.hxx>
-#include <svx/lrspitem.hxx>
+#include <editeng/paperinf.hxx>
+#include <editeng/lrspitem.hxx>
#include <sfx2/bindings.hxx>
#ifndef _VIEW_HXX
#include <view.hxx>
@@ -224,7 +221,7 @@ aDocSz = rSz;
SetVisArea( aNewVisArea, FALSE );
if ( UpdateScrollbars() && !bInOuterResizePixel && !bInInnerResizePixel &&
- !GetViewFrame()->GetFrame()->IsInPlace())
+ !GetViewFrame()->GetFrame().IsInPlace())
OuterResizePixel( Point(),
GetViewFrame()->GetWindow().GetOutputSizePixel() );
}
@@ -358,7 +355,7 @@ void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar )
void SwView::CheckVisArea()
{
pHScrollbar->SetAuto( pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
- !GetViewFrame()->GetFrame()->IsInPlace() );
+ !GetViewFrame()->GetFrame().IsInPlace() );
if ( IsDocumentBorder() )
{
if ( aVisArea.Left() != DOCUMENTBORDER ||
@@ -735,7 +732,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
{
// JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE,
// so we dont must do it agin.
-// if(!GetViewFrame()->GetFrame()->IsInPlace())
+// if(!GetViewFrame()->GetFrame().IsInPlace())
// S F X_BINDINGS().Update(FN_STAT_PAGE);
//QuickHelp:
@@ -1056,7 +1053,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
Size aSz( rSize );
SvBorder aBorder;
CalcAndSetBorderPixel( aBorder, TRUE );
- if ( GetViewFrame()->GetFrame()->IsInPlace() )
+ if ( GetViewFrame()->GetFrame().IsInPlace() )
{
Size aViewSize( aSz );
Point aViewPos( rOfst );
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index c53f6efbc3fc..8721f425eb8d 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewprt.cxx,v $
- * $Revision: 1.42 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -47,13 +44,15 @@
#endif
#include <sfx2/request.hxx>
+#include <sfx2/progress.hxx>
#include <sfx2/app.hxx>
#include <svl/flagitem.hxx>
#include <vcl/msgbox.hxx>
+#include <vcl/oldprintadaptor.hxx>
#include <svtools/printdlg.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/prnmon.hxx>
-#include <svx/paperinf.hxx>
+#include <editeng/paperinf.hxx>
#include <sfx2/dispatch.hxx>
#include <unotools/misccfg.hxx>
#include <svx/prtqry.hxx>
@@ -62,7 +61,7 @@
#include <svl/stritem.hxx>
#include <svl/intitem.hxx>
#include <svl/flagitem.hxx>
-#include <svx/linkmgr.hxx>
+#include <sfx2/linkmgr.hxx>
#include <modcfg.hxx>
#include <edtwin.hxx>
@@ -175,287 +174,6 @@ USHORT __EXPORT SwView::SetPrinter(SfxPrinter* pNew, USHORT nDiffFlags, bool )
}
/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-ErrCode SwView::DoPrint( SfxPrinter *pPrinter, PrintDialog *pDlg, BOOL bSilent, BOOL bIsAPI )
-{
- // First test
- SwWrtShell* pSh = &GetWrtShell();
- SwNewDBMgr* pMgr = pSh->GetNewDBMgr();
-
- int bPrintSelection = -1;
- USHORT nMergeType = pMgr->GetMergeType();
- if( DBMGR_MERGE_MAILMERGE != nMergeType &&
- DBMGR_MERGE_DOCUMENTS != nMergeType &&
- !pDlg &&
- !bIsAPI && ( pSh->IsSelection() || pSh->IsFrmSelected() ||
- pSh->IsObjSelected() ) )
- {
- short nBtn = SvxPrtQryBox(&GetEditWin()).Execute();
- if( RET_CANCEL == nBtn )
- return ERRCODE_IO_ABORT;
-
- if( RET_OK == nBtn )
- bPrintSelection = 1;
- else
- bPrintSelection = 0;
- }
-
-// Der PrintProgress stellt Handler am Printer der ViewShell ein.
-// Das kann natuerlich erste nach dem evtl. Umschalten des Druckers korrekt
-// funktionieren. #55210#
-// SfxPrintProgress *pProgress = new SfxPrintProgress( this, !bSilent );
- SfxPrintProgress *pProgress = 0;
- SfxPrinter *pDocPrinter = GetPrinter(TRUE);
- if ( !pPrinter )
- pPrinter = pDocPrinter;
- else if ( pDocPrinter != pPrinter )
- {
- //Da der Doc-Drucker beim SetPrinter geloescht wird,
- // muss man ihn vorher clonen
- SfxPrinter* pClone = pDocPrinter->Clone();
- SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
- pProgress = new SfxPrintProgress( this, !bSilent );
- pProgress->RestoreOnEndPrint( pClone );
- }
- if(!pProgress)
- pProgress = new SfxPrintProgress( this, !bSilent );
- pProgress->SetWaitMode(FALSE);
-
- BOOL bStartJob = pPrinter->InitJob( &GetEditWin(),
- !bIsAPI && pSh->HasDrawView() && pSh->GetDrawView()->GetModel()->HasTransparentObjects());
- if( bStartJob )
- {
- // Drucker starten
- PreparePrint( pDlg );
- SfxObjectShell *pObjShell = GetViewFrame()->GetObjectShell();
- //#i82625# GetTitle( 0 ) doesn't work for 'embedded' documents like forms or reports
- String sDocumentTitle( pObjShell->GetTitle(SFX_TITLE_APINAME));
- SwPrtOptions aOpts( sDocumentTitle );
- BOOL bWeb = 0 != PTR_CAST(SwWebView, this);
- nMergeType = pMgr->GetMergeType();
-
- BOOL bPrtPros;
- BOOL bPrtPros_RTL;
- SwView::MakeOptions( pDlg, aOpts, &bPrtPros, &bPrtPros_RTL, bWeb, GetPrinter(),
- pSh->getIDocumentDeviceAccess()->getPrintData() );
-
- //set the appropriate view options to print
- //on silent mode the field commands have to be switched off always
- //on default print the user is asked what to do
- const SwViewOption* pCurrentViewOptions = pSh->GetViewOptions();
- bool bSwitchOff_IsFldName = pCurrentViewOptions->IsFldName() && pSh->IsAnyFieldInDoc();
-
- if(!bSilent && bSwitchOff_IsFldName)
- {
- QueryBox aBox( &GetEditWin(), SW_RES( DLG_PRT_FIELDNAME ) );
- USHORT nRet = aBox.Execute();
- if( RET_CANCEL == nRet)
- {
- delete pProgress;
- return ERRCODE_IO_ABORT;
- }
- // disable field commands
- if( RET_NO != nRet )
- {
- bSwitchOff_IsFldName = false;
- }
- }
- bool bApplyViewOptions = bSwitchOff_IsFldName;
- //switch off display of hidden characters if on and hidden characters are in use
- const sal_Bool bOldShowHiddenChar = pCurrentViewOptions->IsShowHiddenChar();
- const sal_Bool bOldMetaChars = pCurrentViewOptions->IsViewMetaChars();
- if( bOldShowHiddenChar != aOpts.IsPrintHiddenText()
- && pSh->GetDoc()->ContainsHiddenChars())
- bApplyViewOptions |= true;
- //switch off display of hidden paragraphs if on and hidden paragraphs are in use
- const sal_Bool bOldShowHiddenPara = pCurrentViewOptions->IsShowHiddenPara();
- if( aOpts.IsPrintHiddenText() != bOldShowHiddenPara )
- {
- const SwFieldType* pFldType = pSh->GetDoc()->GetSysFldType(RES_HIDDENPARAFLD);
- if( pFldType && pFldType->GetDepends())
- bApplyViewOptions |= true;
- }
- const sal_Bool bOldShowHiddenField = pCurrentViewOptions->IsShowHiddenField();
- if( aOpts.IsPrintHiddenText() != bOldShowHiddenField )
- {
- const SwFieldType* pFldType = pSh->GetDoc()->GetSysFldType(RES_HIDDENTXTFLD);
- if( pFldType || pFldType->GetDepends())
- bApplyViewOptions |= true;
- }
-
- SwViewOption* pOrgViewOption = 0;
- bApplyViewOptions |= !aOpts.IsPrintTextPlaceholder();
- if(bApplyViewOptions)
- {
- pOrgViewOption = new SwViewOption(*pSh->GetViewOptions());
- if(bSwitchOff_IsFldName)
- pOrgViewOption->SetFldName(aOpts.IsPrintHiddenText());
-
- pOrgViewOption->SetShowHiddenChar(aOpts.IsPrintHiddenText());
- pOrgViewOption->SetViewMetaChars(sal_True);
- pOrgViewOption->SetShowHiddenPara(aOpts.IsPrintHiddenText());
- pOrgViewOption->SetShowHiddenField(aOpts.IsPrintHiddenText());
- pOrgViewOption->SetShowPlaceHolderFields( aOpts.bPrintTextPlaceholder );
-
- SW_MOD()->ApplyUsrPref(*pOrgViewOption, this, VIEWOPT_DEST_VIEW_ONLY );
- }
-
- if( nMergeType == DBMGR_MERGE_MAILMERGE ||
- DBMGR_MERGE_DOCUMENTS == nMergeType )
- {
- if(DBMGR_MERGE_DOCUMENTS == nMergeType)
- bStartJob = pMgr->MergePrintDocuments( *this, aOpts, *pProgress, bIsAPI );
- else
- bStartJob = pMgr->MergePrint( *this, aOpts, *pProgress, bIsAPI );
- }
- else
- {
- const BOOL bLockedView = pSh->IsViewLocked();
- pSh->LockView( TRUE );
-
- //BrowseView abschalten und die View gegen alle Paints locken.
- BOOL bBrowse = pSh->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
- SfxAllItemSet aSet( SFX_APP()->GetPool() );
- SfxBoolItem aBrowse( SID_BROWSER_MODE, FALSE );
- if ( bBrowse )
- {
- if ( pSh->GetWin() )
- pSh->GetWin()->Update();
- pSh->LockPaint();
- aSet.Put( aBrowse, aBrowse.Which() );
- SfxRequest aReq( SID_BROWSER_MODE, 0, aSet );
- GetDocShell()->Execute( aReq );
- }
-
- // die Felder aktualisieren
- BOOL bIsModified = pSh->IsModified();
- pSh->StartAllAction();
- SwDocStat aDocStat;
- pSh->UpdateDocStat( aDocStat );
- pSh->EndAllTblBoxEdit();
- pSh->ViewShell::UpdateFlds(TRUE);
- if( pSh->IsCrsrInTbl() )
- {
- pSh->ClearTblBoxCntnt();
- pSh->SaveTblBoxCntnt();
- }
- pSh->EndAllAction();
-
- if( !bIsModified )
- pSh->ResetModified();
-
- if( -1 != bPrintSelection )
- aOpts.bPrintSelection = 0 != bPrintSelection;
-
- uno::Sequence< beans::PropertyValue> aViewProperties(18);
- beans::PropertyValue* pViewProperties = aViewProperties.getArray();
- pViewProperties[1].Name = C2U("PrintGraphics");
- pViewProperties[1].Value <<= (sal_Bool)aOpts.IsPrintGraphic();
- pViewProperties[2].Name = C2U("PrintTables");
- pViewProperties[2].Value <<= (sal_Bool)aOpts.IsPrintTable();
- pViewProperties[3].Name = C2U("PrintDrawings");
- pViewProperties[3].Value <<= (sal_Bool)aOpts.IsPrintDraw();
- pViewProperties[4].Name = C2U("PrintLeftPages");
- pViewProperties[4].Value <<= (sal_Bool)aOpts.IsPrintLeftPage();
- pViewProperties[5].Name = C2U("PrintRightPages");
- pViewProperties[5].Value <<= (sal_Bool)aOpts.IsPrintRightPage();
- pViewProperties[6].Name = C2U("PrintControls");
- pViewProperties[6].Value <<= (sal_Bool)aOpts.IsPrintControl();
- pViewProperties[7].Name = C2U("PrintReversed");
- pViewProperties[7].Value <<= (sal_Bool)aOpts.IsPrintReverse();
- pViewProperties[8].Name = C2U("PrintPaperFromSetup");
- pViewProperties[8].Value <<= (sal_Bool)aOpts.IsPaperFromSetup();
- pViewProperties[9].Name = C2U("PrintFaxName");
- pViewProperties[9].Value <<= aOpts.GetFaxName();
- pViewProperties[10].Name = C2U("PrintAnnotationMode");
- pViewProperties[10].Value <<= (text::NotePrintMode) aOpts.GetPrintPostIts();
- pViewProperties[11].Name = C2U("PrintProspect");
- pViewProperties[11].Value <<= (sal_Bool)aOpts.IsPrintProspect();
- pViewProperties[12].Name = C2U("PrintPageBackground");
- pViewProperties[12].Value <<= (sal_Bool)aOpts.IsPrintPageBackground();
- pViewProperties[13].Name = C2U("PrintBlackFonts");
- pViewProperties[13].Value <<= (sal_Bool)aOpts.IsPrintBlackFont();
- pViewProperties[0].Name = C2U("IsSinglePrintJob");
- pViewProperties[0].Value <<= (sal_Bool)aOpts.IsPrintSingleJobs();
- pViewProperties[14].Name = C2U("Selection");
- pViewProperties[14].Value <<= (sal_Bool)aOpts.bPrintSelection;
- pViewProperties[15].Name = C2U("PrintEmptyPages");
- pViewProperties[15].Value <<= (sal_Bool)aOpts.bPrintEmptyPages;
- pViewProperties[16].Name = C2U("PrintHiddenText");
- pViewProperties[16].Value <<= (sal_Bool)aOpts.bPrintHiddenText;
- pViewProperties[17].Name = C2U("PrintTextPlaceholder");
- pViewProperties[17].Value <<= (sal_Bool)aOpts.bPrintTextPlaceholder;
- SetAdditionalPrintOptions(aViewProperties);
-
- SfxViewShell::Print(*pProgress, bIsAPI );
- if ( !pProgress->IsAborted() )
- {
- if( bPrtPros )
- {
- bStartJob = pPrinter->StartJob( aOpts.GetJobName() );
- if( bStartJob )
- pSh->PrintProspect( aOpts, *pProgress, bPrtPros_RTL );
- }
- else
- bStartJob = pSh->Prt( aOpts, pProgress );
-
- if ( bBrowse )
- {
- aBrowse.SetValue( TRUE );
- aSet.Put( aBrowse, aBrowse.Which() );
- SfxRequest aReq( SID_BROWSER_MODE, 0, aSet );
- GetDocShell()->Execute( aReq );
- pSh->UnlockPaint();
- }
- }
- else
- bStartJob = FALSE;
-
- pSh->LockView( bLockedView );
- }
- if(pOrgViewOption)
- {
- if(bSwitchOff_IsFldName)
- pOrgViewOption->SetFldName(TRUE);
- pOrgViewOption->SetShowHiddenChar(bOldShowHiddenChar);
- pOrgViewOption->SetViewMetaChars(bOldMetaChars);
- pOrgViewOption->SetShowHiddenField(bOldShowHiddenField);
- pOrgViewOption->SetShowHiddenPara(bOldShowHiddenPara);
- //must to be set to sal_True anyway
- pOrgViewOption->SetShowPlaceHolderFields( sal_True );
- SW_MOD()->ApplyUsrPref(*pOrgViewOption, this, VIEWOPT_DEST_VIEW_ONLY );
- delete pOrgViewOption;
- }
- }
-
- if( !bStartJob )
- {
- // Printer konnte nicht gestartet werden
- delete pProgress;
- return pPrinter->GetError();
- }
-
- pProgress->Stop();
- if ( pPrinter->IsJobActive() )
- {
- pProgress->DeleteOnEndPrint();
- pPrinter->EndJob();
- return pPrinter->GetError();
- }
- else
- {
- // the next call might destroy pPrinter (in case it is not the usual document printer); so get the error before
- ULONG nError = pPrinter->GetError();
- pProgress->DeleteOnEndPrint();
- return nError;
- }
-}
-
-
-
-/*--------------------------------------------------------------------
Beschreibung: TabPage fuer applikationsspezifische Druckoptionen
--------------------------------------------------------------------*/
@@ -549,6 +267,7 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
rReq.RemoveItem(FN_QRY_MERGE);
BOOL bFromMerge = pPrintFromMergeItem ? pPrintFromMergeItem->GetValue() : FALSE;
SwMiscConfig aMiscConfig;
+ bool bPrintSelection = false;
if(!bSilent && !bFromMerge &&
SW_MOD()->GetModuleConfig()->IsAskForMailMerge() && pSh->IsAnyDatabaseFieldInDoc())
{
@@ -563,12 +282,29 @@ void __EXPORT SwView::ExecutePrint(SfxRequest& rReq)
return;
}
}
+ else if( rReq.GetSlot() == SID_PRINTDOCDIRECT && ! bSilent )
+ {
+ if( /*!bIsAPI && */
+ ( pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected() ) )
+ {
+ short nBtn = SvxPrtQryBox(&GetEditWin()).Execute();
+ if( RET_CANCEL == nBtn )
+ return;;
+
+ if( RET_OK == nBtn )
+ bPrintSelection = true;
+ }
+ }
+
//#i61455# if master documentes are printed silently without loaded links then update the links now
if( bSilent && pSh->IsGlobalDoc() && !pSh->IsGlblDocSaveLinks() )
{
pSh->GetLinkManager().UpdateAllLinks( sal_False, sal_False, sal_False, 0 );
}
- SfxViewShell::ExecuteSlot( rReq, SfxViewShell::GetInterface() );
+ SfxRequest aReq( rReq );
+ SfxBoolItem aBool(SID_SELECTION, bPrintSelection);
+ aReq.AppendItem( aBool );
+ SfxViewShell::ExecuteSlot( aReq, SfxViewShell::GetInterface() );
return;
}
default:
@@ -637,4 +373,3 @@ void SetAppPrintOptions( ViewShell* pSh, BOOL bWeb )
}
}
-
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index d55975eaa190..b12fc6280cc9 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewsrch.cxx,v $
- * $Revision: 1.32 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -46,12 +43,12 @@
#endif
#include <svl/itempool.hxx>
#include <svl/eitem.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <sfx2/request.hxx>
#include <svx/srchdlg.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/wrkwin.hxx>
-#include "svx/unolingu.hxx"
+#include "editeng/unolingu.hxx"
#include <swmodule.hxx>
#include <swwait.hxx>
#include <workctrl.hxx>
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index 3824f5f10723..23415b630252 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewstat.cxx,v $
- * $Revision: 1.42 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -41,12 +38,12 @@
#include <sfx2/objitem.hxx>
#include <svl/imageitm.hxx>
#include <svl/languageoptions.hxx>
-#include <svx/protitem.hxx>
-#include <svx/linkmgr.hxx>
-#include <svx/langitem.hxx>
-#include <svx/brshitem.hxx>
+#include <editeng/protitem.hxx>
+#include <sfx2/linkmgr.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/brshitem.hxx>
#include <svx/htmlmode.hxx>
-#include <svx/unolingu.hxx>
+#include <editeng/unolingu.hxx>
#include <sfx2/msgpool.hxx>
#include <swmodule.hxx>
#include <tox.hxx>
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 316156d0112d..7088347480a8 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -2,13 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: viewtab.cxx,v $
- * $Revision: 1.44 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -38,16 +35,16 @@
#include "uitool.hxx"
#include <sfx2/app.hxx>
#include <svx/rulritem.hxx>
-#include <svx/tstpitem.hxx>
+#include <editeng/tstpitem.hxx>
#include <sfx2/request.hxx>
-#include <svx/lrspitem.hxx>
-#include <svx/ulspitem.hxx>
-#include <svx/boxitem.hxx>
-#include <svx/frmdiritem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/frmdiritem.hxx>
#include <svl/eitem.hxx>
#include <svl/whiter.hxx>
#include <svx/ruler.hxx>
-#include <svx/protitem.hxx>
+#include <editeng/protitem.hxx>
#include <svl/rectitem.hxx>
#include <sfx2/bindings.hxx>
#include <fmtfsize.hxx>
@@ -347,7 +344,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(aSize.GetWidthPercent())
{
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtWidth = aRect.Width();
aSize.SetWidthPercent(BYTE((nPageWidth - aLongLR.GetLeft() - aLongLR.GetRight()) * 100 /nPrtWidth));
}
@@ -472,7 +469,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
if(aSize.GetHeightPercent())
{
SwRect aRect;
- rSh.CalcBoundRect(aRect, FLY_IN_CNTNT);
+ rSh.CalcBoundRect(aRect, FLY_AS_CHAR);
long nPrtHeight = aRect.Height();
aSize.SetHeightPercent(BYTE(nHeight * 100 /nPrtHeight));
}