summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-11-01 17:05:03 +0100
committerVladimir Glazunov <vg@openoffice.org>2010-11-01 17:05:03 +0100
commitde31797d644e96938062ceb4c69c1cc2a89c7090 (patch)
treea9928207bafc2c05ff1f25246993b47479657eb8
parent7c398ce0645d0988835d7817a5ccca5490d05788 (diff)
parent49ed223a54deeeb5a3dc467d2a5adcbdc0724d08 (diff)
CWS-TOOLING: integrate CWS sw34refactor1
-rw-r--r--sw/inc/dbmgr.hxx1
-rw-r--r--sw/inc/editsh.hxx4
-rw-r--r--sw/inc/pagepreviewlayout.hxx3
-rw-r--r--[-rwxr-xr-x]sw/inc/printdata.hxx32
-rw-r--r--sw/inc/swprtopt.hxx102
-rw-r--r--sw/inc/unotbl.hxx2
-rw-r--r--[-rwxr-xr-x]sw/inc/unotxdoc.hxx3
-rw-r--r--[-rwxr-xr-x]sw/inc/viewsh.hxx16
-rw-r--r--sw/qa/complex/writer/LoadSaveTest.java254
-rw-r--r--sw/source/core/doc/doc.cxx1
-rw-r--r--sw/source/core/doc/docbm.cxx4
-rw-r--r--sw/source/core/doc/doccorr.cxx215
-rw-r--r--sw/source/core/doc/docnew.cxx4
-rw-r--r--sw/source/core/doc/notxtfrm.cxx4
-rw-r--r--sw/source/core/docnode/ndtbl.cxx14
-rw-r--r--sw/source/core/edit/editsh.cxx26
-rw-r--r--sw/source/core/edit/edtox.cxx19
-rw-r--r--sw/source/core/frmedt/fecopy.cxx11
-rw-r--r--sw/source/core/inc/MarkManager.hxx4
-rw-r--r--sw/source/core/inc/cellfrm.hxx7
-rw-r--r--sw/source/core/inc/flyfrm.hxx7
-rw-r--r--sw/source/core/inc/frame.hxx10
-rw-r--r--sw/source/core/inc/layfrm.hxx9
-rw-r--r--sw/source/core/inc/mvsave.hxx24
-rw-r--r--sw/source/core/inc/notxtfrm.hxx7
-rw-r--r--sw/source/core/inc/rootfrm.hxx10
-rw-r--r--sw/source/core/inc/tabfrm.hxx9
-rw-r--r--sw/source/core/inc/txtfrm.hxx8
-rw-r--r--sw/source/core/inc/viewimp.hxx13
-rw-r--r--sw/source/core/layout/paintfrm.cxx28
-rw-r--r--sw/source/core/layout/unusedf.cxx4
-rw-r--r--sw/source/core/text/frmpaint.cxx6
-rw-r--r--sw/source/core/unocore/unotbl.cxx11
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx6
-rw-r--r--sw/source/core/view/printdata.cxx18
-rw-r--r--sw/source/core/view/vdraw.cxx8
-rw-r--r--sw/source/core/view/viewpg.cxx10
-rw-r--r--sw/source/core/view/vprint.cxx145
-rw-r--r--[-rwxr-xr-x]sw/source/ui/app/docsh.cxx4
-rw-r--r--[-rwxr-xr-x]sw/source/ui/config/optpage.cxx26
-rw-r--r--sw/source/ui/config/prtopt.cxx3
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx3
-rw-r--r--sw/source/ui/inc/unotxvw.hxx2
-rw-r--r--sw/source/ui/inc/view.hxx1
-rw-r--r--sw/source/ui/inc/wrtsh.hxx3
-rw-r--r--[-rwxr-xr-x]sw/source/ui/uiview/pview.cxx22
-rw-r--r--sw/source/ui/uiview/view.cxx21
-rw-r--r--sw/source/ui/uiview/viewprt.cxx1
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx14
-rw-r--r--sw/source/ui/uno/unotxvw.cxx2
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx11
51 files changed, 470 insertions, 702 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index d044f5e80fa6..fd2f694f5e3f 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -73,7 +73,6 @@ struct SwDBFormatData
class SwView;
class SwWrtShell;
-class SwPrtOptions;
class SfxProgress;
class ListBox;
class Button;
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 9dc09103606e..85201ff9b5b9 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -201,7 +201,6 @@ public:
// change text to Upper/Lower/Hiragana/Katagana/...
void TransliterateText( sal_uInt32 nType );
- void TransliterateText( const String& rModuleName );
// count words in current selection
void CountWords( SwDocStat& rStat ) const;
@@ -416,9 +415,6 @@ public:
const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const;
void InsertTOXType(const SwTOXType& rTyp);
- // new field stuff
- BOOL UpdateField(sw::mark::IFieldmark &fieldBM);
-
//AutoMark file
const String& GetTOIAutoMarkURL() const;
void SetTOIAutoMarkURL(const String& rSet);
diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx
index 589e2850b1ab..01d83afae52e 100644
--- a/sw/inc/pagepreviewlayout.hxx
+++ b/sw/inc/pagepreviewlayout.hxx
@@ -558,9 +558,6 @@ public:
sal_uInt16 GetColOfPage( sal_uInt16 _nPageNum ) const;
// OD 18.12.2002 #103492#
- Size GetMaxPageSize() const;
-
- // OD 18.12.2002 #103492#
Size GetPrevwDocSize() const;
/** get size of a preview page by its physical page number
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index f76ac65e747a..02df0280cdbf 100755..100644
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _SW_PRINTDATA_HXX
-#define _SW_PRINTDATA_HXX
+#ifndef SW_PRINTDATA_HXX
+#define SW_PRINTDATA_HXX
#include <sal/types.h>
@@ -45,7 +45,6 @@ class _SetGetExpFlds;
class SwViewOption;
class OutputDevice;
class SwViewOptionAdjust_Impl;
-class SwPrtOptions;
class SwWrtShell;
class SfxViewShell;
@@ -248,7 +247,7 @@ class SwRenderData
// the view options to be applied for printing
SwViewOptionAdjust_Impl * m_pViewOptionAdjust;
- SwPrtOptions * m_pPrtOptions;
+ SwPrintData * m_pPrtOptions;
public:
@@ -269,14 +268,14 @@ public:
bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; }
bool NeedNewViewOptionAdjust( const SwWrtShell& ) const;
void ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions );
- void ViewOptionAdjust( const SwPrtOptions *pPrtOptions );
+ void ViewOptionAdjust( SwPrintData const*const pPrtOptions );
void ViewOptionAdjustStop();
bool HasSwPrtOptions() const { return m_pPrtOptions != 0; }
- void SetSwPrtOptions( SwPrtOptions * pOpt ) { m_pPrtOptions = pOpt; }
- const SwPrtOptions * GetSwPrtOptions() const { return m_pPrtOptions; }
- SwPrtOptions & GetSwPrtOptionsRef() { return *m_pPrtOptions; }
- void MakeSwPrtOptions( SwPrtOptions &rOptions, const SwDocShell *pDocShell,
+ void SetSwPrtOptions(SwPrintData *const pOpt) { m_pPrtOptions = pOpt; }
+ SwPrintData const* GetSwPrtOptions() const { return m_pPrtOptions; }
+ SwPrintData & GetSwPrtOptionsRef() { return *m_pPrtOptions; }
+ void MakeSwPrtOptions( SwPrintData & rOptions, const SwDocShell *pDocShell,
const SwPrintUIOptions *pOpt, const SwRenderData *pData, bool bIsPDFExport );
@@ -320,4 +319,17 @@ public:
////////////////////////////////////////////////////////////
-#endif //_SW_PRINTDATA_HXX
+// last remnants of swprtopt.hxx:
+
+#define POSTITS_NONE 0
+#define POSTITS_ONLY 1
+#define POSTITS_ENDDOC 2
+#define POSTITS_ENDPAGE 3
+
+namespace sw {
+
+void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb);
+
+} // namespace sw
+
+#endif // SW_PRINTDATA_HXX
diff --git a/sw/inc/swprtopt.hxx b/sw/inc/swprtopt.hxx
deleted file mode 100644
index 626c74d88feb..000000000000
--- a/sw/inc/swprtopt.hxx
+++ /dev/null
@@ -1,102 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SWPRTOPT_HXX
-#define _SWPRTOPT_HXX
-
-#include <tools/multisel.hxx>
-#include <printdata.hxx>
-
-#include <set>
-#include <map>
-#include <vector>
-#include <utility>
-
-#define POSTITS_NONE 0
-#define POSTITS_ONLY 1
-#define POSTITS_ENDDOC 2
-#define POSTITS_ENDPAGE 3
-
-
-class PrintDialog;
-class SfxPrinter;
-
-
-////////////////////////////////////////////////////////////
-
-
-class SwPrtOptions : public SwPrintData
-{
- USHORT nJobNo;
- String sJobName;
-
-public:
- MultiSelection aMulti;
- Point aOffset;
- ULONG nMergeCnt; // Anzahl der Serienbriefe
- ULONG nMergeAct; // Aktueller Serienbriefnr.
- USHORT nCopyCount;
-
- BOOL bCollate,
- bPrintSelection, // Markierung drucken
- bJobStartet;
-
- SwPrtOptions( const String& rJobName ) :
- nJobNo( 1 ),
- sJobName( rJobName ),
- aOffset( Point(0,0) ),
- nMergeCnt( 0 ),
- nMergeAct( 0 ),
- bCollate(FALSE),
- bPrintSelection (FALSE),
- bJobStartet(FALSE)
- {}
-
- const String& MakeNextJobName(); // steht in vprint.cxx
- const String& GetJobName() const { return sJobName; }
-
-#if defined(TCPP)
- // seit neuestem (SV 223) kann der keinen mehr generieren
- inline SwPrtOptions(const SwPrtOptions& rNew) {*this = rNew;}
-#endif
-
-
- SwPrtOptions& operator=(const SwPrintData& rData)
- {
- SwPrintData::operator=(rData);
- return *this;
- }
-
- // get print options
- void MakeOptions( BOOL bWeb );
-};
-
-
-////////////////////////////////////////////////////////////
-
-#endif //_SWPRTOPT_HXX
-
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index 372b55ca9193..3121a6420a69 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -421,8 +421,6 @@ public:
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
-
- static SwXTextTable* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef );
};
/* -----------------27.04.98 16:41-------------------
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index b50d5b0a1b76..2869415d3978 100755..100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -129,7 +129,6 @@ class SfxViewFrame;
class SwPrintUIOptions;
class SwPrintData;
class SwRenderData;
-class SwPrtOptions;
class SwWrtShell;
@@ -606,7 +605,7 @@ public:
SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewOption &rViewOptions );
~SwViewOptionAdjust_Impl();
- void AdjustViewOptions( const SwPrtOptions *pPrtOptions );
+ void AdjustViewOptions( SwPrintData const*const pPrtOptions );
bool checkShell( const SwWrtShell& rCompare ) const
{ return &rCompare == &m_rShell; }
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 6c7011d78bb4..480876904d59 100755..100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -24,8 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _VIEWSH_HXX
-#define _VIEWSH_HXX
+#ifndef SW_VIEWSH_HXX
+#define SW_VIEWSH_HXX
+
#include <com/sun/star/embed/XClassifiedObject.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <tools/rtti.hxx>
@@ -67,7 +68,6 @@ class SfxItemPool;
class SfxViewShell;
class SwViewOption;
class SwViewImp;
-class SwPrtOptions;
class SwPrintData;
class SwPagePreViewPrtData;
class Window;
@@ -357,7 +357,8 @@ public:
// printing of one page.
// bIsPDFExport == true is: do PDF Export (no printing!)
- sal_Bool PrintOrPDFExport( OutputDevice *pOutDev, const SwPrtOptions &rPrintData,
+ sal_Bool PrintOrPDFExport( OutputDevice *pOutDev,
+ SwPrintData const& rPrintData,
sal_Int32 nRenderer /* offset in vector of pages to print */ );
// printing of one brochure page
@@ -368,8 +369,7 @@ public:
static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
OutputDevice* pOleOut, const Rectangle& rRect );
- // creates temporary doc with selected text for PDF export
- SwDoc * CreatePrtDoc( SfxObjectShellRef& );
+ /// fill temporary doc with selected text for Print or PDF export
SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
//Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten.
@@ -467,7 +467,7 @@ public:
input parameter - constant reference to print options, to which the
view option will be adjusted.
*/
- void AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions );
+ void AdjustOptionsForPagePreview( SwPrintData const& rPrintOptions );
sal_Bool IsViewLocked() const { return bViewLocked; }
void LockView( sal_Bool b ) { bViewLocked = b; }
@@ -633,4 +633,4 @@ inline const SfxItemPool& ViewShell::GetAttrPool() const
-#endif //_VIEWSH_HXX
+#endif // SW_VIEWSH_HXX
diff --git a/sw/qa/complex/writer/LoadSaveTest.java b/sw/qa/complex/writer/LoadSaveTest.java
new file mode 100644
index 000000000000..a1600488c7bc
--- /dev/null
+++ b/sw/qa/complex/writer/LoadSaveTest.java
@@ -0,0 +1,254 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+package complex.writer;
+
+import complexlib.ComplexTestCase;
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.XComponentContext;
+import com.sun.star.lang.WrappedTargetException;
+import com.sun.star.lang.WrappedTargetRuntimeException;
+import com.sun.star.lang.EventObject;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.lang.XComponent;
+import com.sun.star.lang.XServiceInfo;
+import com.sun.star.beans.XPropertySet;
+import com.sun.star.beans.PropertyValue;
+import com.sun.star.beans.Pair;
+import com.sun.star.util.XCloseable;
+import com.sun.star.frame.XStorable;
+import com.sun.star.document.DocumentEvent;
+import com.sun.star.document.XDocumentEventBroadcaster;
+import com.sun.star.document.XDocumentEventListener;
+import com.sun.star.text.XTextDocument;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.File;
+
+/**
+ * a small program to load documents from one directory (recursively)
+ * and store them in another, implemented as a complex test.
+ */
+public class LoadSaveTest extends ComplexTestCase
+{
+ private XMultiServiceFactory m_xMSF = null;
+ private XComponentContext m_xContext = null;
+ private XDocumentEventBroadcaster m_xGEB = null;
+ private String m_TmpDir = null;
+
+ private String m_fileURL = "file://";
+ // these should be parameters or something?
+ private String m_SourceDir = "FIXME";
+ private String m_TargetDir = "/tmp/out";
+
+ public String[] getTestMethodNames() {
+ return new String[] { "testLoadStore" };
+ }
+
+ public void before() throws Exception
+ {
+ m_xMSF = (XMultiServiceFactory) param.getMSF();
+ XPropertySet xPropertySet = (XPropertySet)
+ UnoRuntime.queryInterface(XPropertySet.class, m_xMSF);
+ Object defaultCtx = xPropertySet.getPropertyValue("DefaultContext");
+ m_xContext = (XComponentContext)
+ UnoRuntime.queryInterface(XComponentContext.class, defaultCtx);
+ assure("could not get component context.", m_xContext != null);
+ Object oGEB = m_xMSF.createInstance(
+ "com.sun.star.frame.GlobalEventBroadcaster");
+ m_xGEB = (XDocumentEventBroadcaster)
+ UnoRuntime.queryInterface(XDocumentEventBroadcaster.class, oGEB);
+ assure("could not get global event broadcaster.", m_xGEB != null);
+ m_TmpDir = util.utils.getOfficeTemp/*Dir*/(m_xMSF);
+ log.println("tempdir: " + m_TmpDir);
+ log.println("sourcedir: " + m_SourceDir);
+ log.println("targetdir: " + m_TargetDir);
+ }
+
+ /*
+ public void after()
+ {
+ }
+ */
+
+ public void testLoadStore() throws Exception
+ {
+ Pair<List<String>, List<String>> dirsFiles =
+ getDirAndFileNames(m_SourceDir);
+ makeDirs(m_TargetDir, dirsFiles.First);
+ for (String fileName : dirsFiles.Second)
+ {
+ try {
+ testDoc(fileName);
+ } catch (Exception e) {
+ report(e);
+ }
+ }
+ }
+
+ public void testDoc(String fileName) throws Exception
+ {
+ XComponent xDoc = null;
+ EventListener xListener = new EventListener();
+ try {
+ m_xGEB.addDocumentEventListener(xListener);
+
+ log.println("Loading document: " + fileName + " ...");
+
+ PropertyValue[] loadProps = new PropertyValue[1];
+ loadProps[0] = new PropertyValue();
+ loadProps[0].Name = "ReadOnly";
+ loadProps[0].Value = new Boolean(true);
+
+ String sourceFile = m_fileURL + m_SourceDir + fileName;
+
+ xDoc = util.DesktopTools.loadDoc(m_xMSF, sourceFile, loadProps);
+
+ log.println("... done");
+
+ {
+ // apparently OnLayoutFinished is not sent for every doc???
+ // 10 seconds is evidently not enough for large documents
+ int time = 0;
+ while (!xListener.IsLayoutFinished() && (time < 30000)) {
+ Thread.sleep(100);
+ time += 100;
+ }
+ if (time >= 30000) {
+ log.println("timeout: no OnLayoutFinished received!");
+ }
+ }
+
+ log.println("Storing document: " + fileName + " ...");
+
+ XStorable xStor = (XStorable) UnoRuntime.queryInterface(
+ XStorable.class, xDoc);
+
+ String targetFile = m_fileURL + m_TargetDir + fileName;
+
+ xStor.storeToURL(targetFile, new PropertyValue[0]);
+
+ log.println("... done");
+
+ } finally {
+ if (xDoc != null) {
+ util.DesktopTools.closeDoc(xDoc);
+ }
+ if (xListener != null) {
+ m_xGEB.removeDocumentEventListener(xListener);
+ }
+ }
+ }
+
+ class EventListener implements XDocumentEventListener
+ {
+ boolean m_isLayoutFinished = false;
+ boolean IsLayoutFinished() { return m_isLayoutFinished; }
+ public void documentEventOccured(DocumentEvent Event)
+ {
+// log.println("event: " + Event.EventName);
+ if ("OnLayoutFinished".equals(Event.EventName))
+ {
+ // we only have one doc at any time, so no need to check
+ m_isLayoutFinished = true;
+// log.println("received OnLayoutFinished");
+ }
+ }
+ public void disposing(EventObject Event) { }
+ }
+
+ void report2(Exception e)
+ {
+ if (e instanceof WrappedTargetException)
+ {
+ log.println("Cause:");
+ Exception cause = (Exception)
+ (((WrappedTargetException)e).TargetException);
+ log.println(cause.toString());
+ report2(cause);
+ } else if (e instanceof WrappedTargetRuntimeException) {
+ log.println("Cause:");
+ Exception cause = (Exception)
+ (((WrappedTargetRuntimeException)e).TargetException);
+ log.println(cause.toString());
+ report2(cause);
+ }
+ }
+
+ void report(Exception e) {
+ log.println("Exception occurred:");
+ log.println(e.toString());
+ e.printStackTrace((java.io.PrintWriter) log);
+ report2(e);
+// failed();
+ }
+
+ Pair<List<String>, List<String>> getDirAndFileNames(String dir)
+ {
+ List<String> dirs = new ArrayList<String>();
+ List<String> files = new ArrayList<String>();
+ File root = new File(dir);
+ getDirAndFileNames(root, "", dirs, files);
+ return new Pair<List<String>, List<String>>(dirs, files);
+ }
+
+ void getDirAndFileNames(File file, String relPath,
+ List<String> dirs, List<String> files)
+ {
+ assure("does not exist: " + relPath, file.exists());
+ if (file.isDirectory()) {
+ dirs.add(relPath);
+ File[] subfiles = file.listFiles();
+ for (File subfile : subfiles)
+ {
+ String subfileName =
+ relPath + File.separator + subfile.getName();
+ getDirAndFileNames(subfile, subfileName, dirs, files);
+ }
+ }
+ else if (file.isFile()) {
+ if (file.getName().endsWith(".odt")) {
+ files.add(relPath);
+ }
+ }
+ }
+
+ void makeDirs(String target, List<String> dirs) throws Exception
+ {
+ for (String dir : dirs) {
+ File f = new File(target + dir);
+ if (!f.exists()) {
+ if (!f.mkdir()) {
+ throw new Exception("cannot mkdir: " + target + dir);
+ }
+ }
+ }
+ }
+}
+
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index c71c21cccd6c..d4de8d35a87e 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -100,7 +100,6 @@
#include <fldupde.hxx>
#include <swbaslnk.hxx>
#include <printdata.hxx>
-#include <swprtopt.hxx>
#include <cmdid.h> // fuer den dflt - Printer in SetJob
#include <statstr.hrc> // StatLine-String
#include <comcore.hrc>
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 0080694722ba..587c846667f4 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -305,7 +305,7 @@ namespace sw { namespace mark
MarkManager::MarkManager(SwDoc& rDoc)
: m_pDoc(&rDoc)
{ }
-
+#if OSL_DEBUG_LEVEL > 1
void MarkManager::dumpFieldmarks( ) const
{
const_iterator_t pIt = m_vFieldmarks.begin();
@@ -316,7 +316,7 @@ namespace sw { namespace mark
::rtl::OUStringToOString(str, RTL_TEXTENCODING_UTF8).getStr());
}
}
-
+#endif
::sw::mark::IMark* MarkManager::makeMark(const SwPaM& rPaM,
const ::rtl::OUString& rName,
const IDocumentMarkAccess::MarkType eType)
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index e567a52085be..0520a9b5c81c 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -73,9 +73,9 @@
namespace
{
- // find the relevant section in which the SwUnoCrsr may wander. returns NULL if
- // no restrictions apply
- const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode )
+ // find the relevant section in which the SwUnoCrsr may wander.
+ // returns NULL if no restrictions apply
+ static const SwStartNode* lcl_FindUnoCrsrSection( const SwNode& rNode )
{
const SwStartNode* pStartNode = rNode.StartOfSectionNode();
while( ( pStartNode != NULL ) &&
@@ -86,45 +86,28 @@ namespace
return pStartNode;
}
- static inline void lcl_PaMCorrAbs1(SwPaM * pPam,
- SwNode const * const pOldNode,
- const SwPosition& rNewPos,
- const xub_StrLen nOffset)
- {
- for(int nb = 0; nb < 2; ++nb)
- if(&((pPam)->GetBound(BOOL(nb)).nNode.GetNode()) == pOldNode)
- {
- (pPam)->GetBound(BOOL(nb)) = rNewPos;
- (pPam)->GetBound(BOOL(nb)).nContent += nOffset;
- }
- };
-
- static inline bool lcl_PaMCorrAbs2(SwPaM* pPam,
- const SwPosition& rNewPos,
- ULONG nSttNode,
- ULONG nEndNode)
+ static inline bool lcl_PosCorrAbs(SwPosition & rPos,
+ const SwPosition& rStart,
+ const SwPosition& rEnd,
+ const SwPosition& rNewPos)
{
- bool bRet = false;
-
- for(int nb = 0; nb < 2; ++nb)
- if((pPam)->GetBound(BOOL(nb)).nNode >= nSttNode &&
- (pPam)->GetBound(BOOL(nb)).nNode <= nEndNode)
- {
- (pPam)->GetBound(BOOL(nb)) = rNewPos;
- bRet = true;
- }
- return bRet;
+ if ((rStart <= rPos) && (rPos <= rEnd))
+ {
+ rPos = rNewPos;
+ return true;
+ }
+ return false;
};
- static inline void lcl_PaMCorrAbs3(SwPaM * pPam,
+ static inline bool lcl_PaMCorrAbs(SwPaM & rPam,
const SwPosition& rStart,
const SwPosition& rEnd,
const SwPosition& rNewPos)
{
- for(int nb = 0; nb < 2; ++nb)
- if(rStart <= (pPam)->GetBound(BOOL(nb)) &&
- (pPam)->GetBound(BOOL(nb)) <= rEnd )
- (pPam)->GetBound(BOOL(nb)) = rNewPos;
+ bool bRet = false;
+ bRet |= lcl_PosCorrAbs(rPam.GetBound(true ), rStart, rEnd, rNewPos);
+ bRet |= lcl_PosCorrAbs(rPam.GetBound(false), rStart, rEnd, rNewPos);
+ return bRet;
};
static inline void lcl_PaMCorrRel1(SwPaM * pPam,
@@ -143,119 +126,69 @@ namespace
}
}
-void PaMCorrAbs( const SwNodeIndex &rOldNode,
- const SwPosition &rNewPos,
- const xub_StrLen nOffset)
-{
- const SwNode* pOldNode = &rOldNode.GetNode();
- const SwPosition aNewPos( rNewPos );
- const SwDoc* pDoc = pOldNode->GetDoc();
- SwCrsrShell* pShell = pDoc->GetEditShell();
-
- if( pShell )
- {
- FOREACHSHELL_START( pShell )
- SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
- if( _pStkCrsr )
- do {
- lcl_PaMCorrAbs1( _pStkCrsr, pOldNode, aNewPos, nOffset );
- } while ( (_pStkCrsr != 0 ) &&
- ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) );
-
- FOREACHPAM_START( PCURSH->_GetCrsr() )
- lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset );
- FOREACHPAM_END()
-
- if( PCURSH->IsTableMode() )
- lcl_PaMCorrAbs1( PCURSH->GetTblCrs(), pOldNode, aNewPos, nOffset );
-
- FOREACHSHELL_END( pShell )
- }
-
- {
- SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
- {
- FOREACHPAM_START( rTbl[ n ] )
- lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset );
- FOREACHPAM_END()
-
- SwUnoTableCrsr* pUnoTblCrsr =
- dynamic_cast<SwUnoTableCrsr*>(rTbl[ n ]);
- if( pUnoTblCrsr )
- {
- FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
- lcl_PaMCorrAbs1( PCURCRSR, pOldNode, aNewPos, nOffset );
- FOREACHPAM_END()
- }
- }
- }
-}
-
-void PaMCorrAbs( const SwNodeIndex &rStartNode,
- const SwNodeIndex &rEndNode,
- const SwPosition &rNewPos )
+void PaMCorrAbs( const SwPaM& rRange,
+ const SwPosition& rNewPos )
{
- const ULONG nSttNode = rStartNode.GetIndex();
- const ULONG nEndNode = rEndNode.GetIndex();
- const SwPosition aNewPos( rNewPos );
- SwDoc* pDoc = rStartNode.GetNode().GetDoc();
+ SwPosition const aStart( *rRange.Start() );
+ SwPosition const aEnd( *rRange.End() );
+ SwPosition const aNewPos( rNewPos );
+ SwDoc *const pDoc = aStart.nNode.GetNode().GetDoc();
+ SwCrsrShell *const pShell = pDoc->GetEditShell();
- SwCrsrShell* pShell = pDoc->GetEditShell();
if( pShell )
{
FOREACHSHELL_START( pShell )
SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
if( _pStkCrsr )
do {
- lcl_PaMCorrAbs2( _pStkCrsr, aNewPos, nSttNode, nEndNode );
+ lcl_PaMCorrAbs( *_pStkCrsr, aStart, aEnd, aNewPos );
} while ( (_pStkCrsr != 0 ) &&
((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) );
FOREACHPAM_START( PCURSH->_GetCrsr() )
- lcl_PaMCorrAbs2( PCURCRSR, aNewPos, nSttNode, nEndNode );
+ lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos );
FOREACHPAM_END()
if( PCURSH->IsTableMode() )
- lcl_PaMCorrAbs2( PCURSH->GetTblCrs(), aNewPos, nSttNode, nEndNode );
+ lcl_PaMCorrAbs( *PCURSH->GetTblCrs(), aStart, aEnd, aNewPos );
FOREACHSHELL_END( pShell )
}
-
{
- SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
+ SwUnoCrsrTbl& rTbl = const_cast<SwUnoCrsrTbl&>(pDoc->GetUnoCrsrTbl());
+
for( USHORT n = 0; n < rTbl.Count(); ++n )
{
- bool bChange = false;
+ SwUnoCrsr *const pUnoCursor = rTbl[ n ];
- SwUnoCrsr* pUnoCursor = rTbl[ n ];
+ bool bChange = false; // has the UNO cursor been corrected?
// determine whether the UNO cursor will leave it's designated
// section
- bool bLeaveSection =
+ bool const bLeaveSection =
pUnoCursor->IsRemainInSection() &&
( lcl_FindUnoCrsrSection( aNewPos.nNode.GetNode() ) !=
lcl_FindUnoCrsrSection(
pUnoCursor->GetPoint()->nNode.GetNode() ) );
FOREACHPAM_START( pUnoCursor )
- bChange |= lcl_PaMCorrAbs2(PCURCRSR, aNewPos, nSttNode, nEndNode);
+ bChange |= lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos );
FOREACHPAM_END()
- SwUnoTableCrsr* pUnoTblCrsr =
- dynamic_cast<SwUnoTableCrsr*>(pUnoCursor);
+ SwUnoTableCrsr *const pUnoTblCrsr =
+ dynamic_cast<SwUnoTableCrsr *>(rTbl[ n ]);
if( pUnoTblCrsr )
{
FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
bChange |=
- lcl_PaMCorrAbs2( PCURCRSR, aNewPos, nSttNode, nEndNode );
+ lcl_PaMCorrAbs( *PCURCRSR, aStart, aEnd, aNewPos );
FOREACHPAM_END()
}
// if a UNO cursor leaves its designated section, we must inform
// (and invalidate) said cursor
- if( bChange && bLeaveSection )
+ if (bChange && bLeaveSection)
{
// the UNO cursor has left its section. We need to notify it!
SwMsgPoolItem aHint( RES_UNOCURSOR_LEAVES_SECTION );
@@ -265,72 +198,31 @@ void PaMCorrAbs( const SwNodeIndex &rStartNode,
}
}
-
-void PaMCorrAbs( const SwPaM& rRange,
- const SwPosition& rNewPos )
-{
- SwPosition aStart( *rRange.Start() );
- SwPosition aEnd( *rRange.End() );
- SwPosition aNewPos( rNewPos );
- SwDoc* pDoc = aStart.nNode.GetNode().GetDoc();
- SwCrsrShell* pShell = pDoc->GetEditShell();
-
- if( pShell )
- {
- FOREACHSHELL_START( pShell )
- SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
- if( _pStkCrsr )
- do {
- lcl_PaMCorrAbs3( _pStkCrsr, aStart, aEnd, aNewPos );
- } while ( (_pStkCrsr != 0 ) &&
- ((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != PCURSH->GetStkCrsr()) );
-
- FOREACHPAM_START( PCURSH->_GetCrsr() )
- lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos );
- FOREACHPAM_END()
-
- if( PCURSH->IsTableMode() )
- lcl_PaMCorrAbs3( PCURSH->GetTblCrs(), aStart, aEnd, aNewPos );
-
- FOREACHSHELL_END( pShell )
- }
- {
- SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
- for( USHORT n = 0; n < rTbl.Count(); ++n )
- {
- FOREACHPAM_START( rTbl[ n ] )
- lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos );
- FOREACHPAM_END()
-
- SwUnoTableCrsr* pUnoTblCrsr =
- dynamic_cast<SwUnoTableCrsr*>(rTbl[ n ]);
- if( pUnoTblCrsr )
- {
- FOREACHPAM_START( &pUnoTblCrsr->GetSelRing() )
- lcl_PaMCorrAbs3( PCURCRSR, aStart, aEnd, aNewPos );
- FOREACHPAM_END()
- }
- }
- }
-}
-
void SwDoc::CorrAbs(const SwNodeIndex& rOldNode,
const SwPosition& rNewPos,
const xub_StrLen nOffset,
BOOL bMoveCrsr)
{
+ SwCntntNode *const pCntntNode( rOldNode.GetNode().GetCntntNode() );
+ SwPaM const aPam(rOldNode, 0,
+ rOldNode, (pCntntNode) ? pCntntNode->Len() : 0);
+ SwPosition aNewPos(rNewPos);
+ aNewPos.nContent += nOffset;
+
getIDocumentMarkAccess()->correctMarksAbsolute(rOldNode, rNewPos, nOffset);
- { // fix readlines
+ { // fix redlines
SwRedlineTbl& rTbl = *pRedlineTbl;
for( USHORT n = 0; n < rTbl.Count(); ++n )
{
// is on position ??
- lcl_PaMCorrAbs1( rTbl[ n ], &rOldNode.GetNode(), SwPosition(rNewPos), nOffset );
+ lcl_PaMCorrAbs(*rTbl[ n ], *aPam.Start(), *aPam.End(), aNewPos);
}
}
if(bMoveCrsr)
- ::PaMCorrAbs(rOldNode, rNewPos, nOffset);
+ {
+ ::PaMCorrAbs(aPam, aNewPos);
+ }
}
void SwDoc::CorrAbs(const SwPaM& rRange,
@@ -352,12 +244,15 @@ void SwDoc::CorrAbs(const SwNodeIndex& rStartNode,
const SwPosition& rNewPos,
BOOL bMoveCrsr)
{
- SwPosition aNewPos(rNewPos);
-
_DelBookmarks(rStartNode, rEndNode);
if(bMoveCrsr)
- ::PaMCorrAbs(rStartNode, rEndNode, rNewPos);
+ {
+ SwCntntNode *const pCntntNode( rEndNode.GetNode().GetCntntNode() );
+ SwPaM const aPam(rStartNode, 0,
+ rEndNode, (pCntntNode) ? pCntntNode->Len() : 0);
+ ::PaMCorrAbs(aPam, rNewPos);
+ }
}
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 1b3d5fe6eb55..ebd93bbfd692 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -835,8 +835,8 @@ void SwDoc::ClearDoc()
pFirstNd->SetAttr( SwFmtPageDesc( pDummyPgDsc ));
SwPosition aPos( *pFirstNd, SwIndex( pFirstNd ));
- ::PaMCorrAbs( aSttIdx, SwNodeIndex( GetNodes().GetEndOfContent() ),
- aPos );
+ SwPaM const tmpPaM(aSttIdx, SwNodeIndex(GetNodes().GetEndOfContent()));
+ ::PaMCorrAbs(tmpPaM, aPos);
}
GetNodes().Delete( aSttIdx,
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index bb10e9c1941b..e967e7f33fa8 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -71,9 +71,7 @@
#include <poolfmt.hxx>
#include <mdiexp.hxx>
#include <swwait.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <accessibilityoptions.hxx>
#include <com/sun/star/embed/EmbedMisc.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
@@ -266,7 +264,7 @@ void lcl_ClearArea( const SwFrm &rFrm,
|*
*************************************************************************/
-void SwNoTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const
+void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
if ( Frm().IsEmpty() )
return;
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index f0683ae700a5..588ef88f7740 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -2126,9 +2126,10 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
*aSavePaM.GetMark() = SwPosition( *pTblNd );
aSavePaM.Move( fnMoveBackward, fnGoNode );
}
- ::PaMCorrAbs( SwNodeIndex( *pTblNd ),
- SwNodeIndex( *pTblNd->EndOfSectionNode() ),
- *aSavePaM.GetMark() );
+ {
+ SwPaM const tmpPaM(*pTblNd, *pTblNd->EndOfSectionNode());
+ ::PaMCorrAbs(tmpPaM, *aSavePaM.GetMark());
+ }
// harte SeitenUmbrueche am nachfolgenden Node verschieben
BOOL bSavePageBreak = FALSE, bSavePageDesc = FALSE;
@@ -2182,9 +2183,10 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
*aSavePaM.GetMark() = SwPosition( *pTblNd );
aSavePaM.Move( fnMoveBackward, fnGoNode );
}
- ::PaMCorrAbs( SwNodeIndex( *pTblNd ),
- SwNodeIndex( *pTblNd->EndOfSectionNode() ),
- *aSavePaM.GetMark() );
+ {
+ SwPaM const tmpPaM(*pTblNd, *pTblNd->EndOfSectionNode());
+ ::PaMCorrAbs(tmpPaM, *aSavePaM.GetMark());
+ }
// harte SeitenUmbrueche am nachfolgenden Node verschieben
SwCntntNode* pNextNd = GetNodes()[ pTblNd->EndOfSectionIndex()+1 ]->GetCntntNode();
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 32ab9fa07e94..7a143a2d29d9 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -1184,32 +1184,6 @@ void SwEditShell::TransliterateText( sal_uInt32 nType )
EndAllAction();
}
-void SwEditShell::TransliterateText( const String& rModuleName )
-{
- utl::TransliterationWrapper aTrans(::comphelper::getProcessServiceFactory(), 0 );
- aTrans.loadModuleByImplName( rModuleName, LANGUAGE_SYSTEM );
- StartAllAction();
- SET_CURR_SHELL( this );
-
- SwPaM* pCrsr = GetCrsr();
- if( pCrsr->GetNext() != pCrsr )
- {
- GetDoc()->StartUndo(UNDO_EMPTY, NULL);
- FOREACHPAM_START( this )
-
- if( PCURCRSR->HasMark() )
- GetDoc()->TransliterateText( *PCURCRSR, aTrans );
-
- FOREACHPAM_END()
- GetDoc()->EndUndo(UNDO_EMPTY, NULL);
- }
- else
- GetDoc()->TransliterateText( *pCrsr, aTrans );
-
- EndAllAction();
-}
-
-
void SwEditShell::CountWords( SwDocStat& rStat ) const
{
FOREACHPAM_START( this )
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 230e45f71079..b1188588fe4d 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -234,25 +234,6 @@ BOOL SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet )
return bRet;
}
-BOOL SwEditShell::UpdateField( sw::mark::IFieldmark &fieldBM)
-{
-// SwDocShell* pDocSh = pDoc->GetDocShell();
- //@TODO implement me...; add undo etc...
- if ( pDoc && fieldBM.IsExpanded( ) ) {
- SwPosition aSttPos = fieldBM.GetMarkStart( );
- aSttPos.nContent++;
-
- SwPosition aEndPos = fieldBM.GetMarkEnd( );
- aEndPos.nContent--;
-
- SwPaM aPaM( aSttPos, aEndPos );
- pDoc->DeleteRange(aPaM);
- pDoc->InsertString(aPaM, String::CreateFromAscii("Implement me ;-)") );
- }
- return TRUE;
-}
-
-
/*--------------------------------------------------------------------
Beschreibung: Aktuelles Verzeichnis vor oder in dem der Cursor
steht
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 9fe5c9a22204..79a2b64433d9 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -885,9 +885,8 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx );
SwPosition aPos( aNdIdx, SwIndex( pCNd, 0 ));
// #i59539: Don't remove all redline
- ::PaMCorrAbs( SwNodeIndex( *pDestNd ),
- SwNodeIndex( *pDestNd->EndOfSectionNode() ),
- aPos );
+ SwPaM const tmpPaM(*pDestNd, *pDestNd->EndOfSectionNode());
+ ::PaMCorrAbs(tmpPaM, aPos);
}
bRet = GetDoc()->InsCopyOfTbl( aDestPos, aBoxes, &pSrcNd->GetTable(),
@@ -902,7 +901,11 @@ BOOL SwFEShell::Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames )
SwCntntNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx );
SwPosition aPos( aNdIdx, SwIndex( pCNd, 0 ));
// #i59539: Don't remove all redline
- ::PaMCorrAbs( PCURCRSR->GetPoint()->nNode, aPos );
+ SwNode & rNode(PCURCRSR->GetPoint()->nNode.GetNode());
+ SwCntntNode *const pCntntNode( rNode.GetCntntNode() );
+ SwPaM const tmpPam(rNode, 0,
+ rNode, (pCntntNode) ? pCntntNode->Len() : 0);
+ ::PaMCorrAbs(tmpPam, aPos);
}
break; // aus der "while"-Schleife heraus
diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx
index 1a5cd1724050..5b03672f461f 100644
--- a/sw/source/core/inc/MarkManager.hxx
+++ b/sw/source/core/inc/MarkManager.hxx
@@ -39,9 +39,9 @@ namespace sw { namespace mark
{
public:
MarkManager(/*[in/out]*/ SwDoc& rDoc);
-
+#if OSL_DEBUG_LEVEL > 1
void dumpFieldmarks( ) const;
-
+#endif
// IDocumentMarkAccess
virtual ::sw::mark::IMark* makeMark(const SwPaM& rPaM, const ::rtl::OUString& rName, IDocumentMarkAccess::MarkType eMark);
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index fb479fc86549..8b45aa5e2d8d 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _CELLFRM_HXX
-#define _CELLFRM_HXX
+#ifndef SW_CELLFRM_HXX
+#define SW_CELLFRM_HXX
#include <tools/mempool.hxx>
@@ -48,7 +48,8 @@ public:
virtual BOOL GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* = 0 ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual void CheckDirection( BOOL bVert );
// --> OD 2010-02-17 #i103961#
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index cadac60cb8ca..8e84ecf3c976 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _FLYFRM_HXX
-#define _FLYFRM_HXX
+#ifndef SW_FLYFRM_HXX
+#define SW_FLYFRM_HXX
#include "layfrm.hxx"
@@ -158,7 +158,8 @@ public:
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// erfrage vom Client Informationen
virtual BOOL GetInfo( SfxPoolItem& ) const;
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual Size ChgSize( const Size& aNewSize );
virtual BOOL GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index e1560a230d7a..9837f3fe3e55 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -24,8 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _FRAME_HXX
-#define _FRAME_HXX
+#ifndef SW_FRAME_HXX
+#define SW_FRAME_HXX
+
#include <svl/svarray.hxx>
#include "swtypes.hxx" // fuer SwTwips
#include "swrect.hxx"
@@ -53,7 +54,7 @@ class SvxBrushItem;
class SwSelectionList;
struct SwPosition;
struct SwCrsrMoveState;
-class SwPrtOptions;
+class SwPrintData;
// --> OD 2004-07-06 #i28701#
class SwSortedObjs;
@@ -822,7 +823,8 @@ public:
SwCrsrMoveState* = 0 ) const;
virtual BOOL GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0 ) const;
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
// der "kurze Dienstweg" zwischen den Frames und der Formatierung.
// Wer den void* falsch Casted ist selbst schuld!
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index 28216e326b41..d48bbf3f3e42 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _LAYFRM_HXX
-#define _LAYFRM_HXX
+#ifndef SW_LAYFRM_HXX
+#define SW_LAYFRM_HXX
#include "frame.hxx"
@@ -105,7 +105,8 @@ public:
SwLayoutFrm( SwFrmFmt* );
~SwLayoutFrm();
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
const SwFrm *Lower() const { return pLower; }
SwFrm *Lower() { return pLower; }
const SwCntntFrm *ContainsCntnt() const;
@@ -206,4 +207,4 @@ inline SwFrm* SwLayoutFrm::GetLastLower()
return const_cast<SwFrm*>(static_cast<const SwLayoutFrm*>(this)->GetLastLower());
}
-#endif //_LAYFRM_HXX
+#endif // SW_LAYFRM_HXX
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index ca98a089969d..67434e14928a 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -24,14 +24,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _MVSAVE_HXX
-#define _MVSAVE_HXX
-
+#ifndef SW_MVSAVE_HXX
+#define SW_MVSAVE_HXX
#include <tools/string.hxx>
-#ifndef _KEYCOD_HXX //autogen
#include <vcl/keycod.hxx>
-#endif
#include <svl/svarray.hxx>
#include <IDocumentMarkAccess.hxx>
#include <vector>
@@ -150,25 +147,10 @@ public:
// Crsr verschieben kann
// die Funktionen rufen nicht die SwDoc::Corr - Methoden!
- // Setzt alle PaMs an OldPos auf NewPos + Offset
-void PaMCorrAbs( const SwPosition &rOldPos,
- const SwPosition &rNewPos,
- const xub_StrLen nOffset = 0 );
-
- // Setzt alle PaMs in OldNode auf NewPos + Offset
-void PaMCorrAbs( const SwNodeIndex &rOldNode,
- const SwPosition &rNewPos,
- const xub_StrLen nOffset = 0 );
-
// Setzt alle PaMs im Bereich vom Range nach NewPos
void PaMCorrAbs( const SwPaM& rRange,
const SwPosition& rNewPos );
- // Setzt alle PaMs im Bereich von [StartNode, EndNode] nach NewPos
-void PaMCorrAbs( const SwNodeIndex &rStartNode,
- const SwNodeIndex &rEndNode,
- const SwPosition &rNewPos );
-
// Setzt alle PaMs in OldNode auf relative Pos
void PaMCorrRel( const SwNodeIndex &rOldNode,
const SwPosition &rNewPos,
@@ -227,5 +209,5 @@ public:
};
-#endif // _MVSAVE_HXX
+#endif // SW_MVSAVE_HXX
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index 7782a6b90d98..d5fae730fd61 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _NOTXTFRM_HXX
-#define _NOTXTFRM_HXX
+#ifndef SW_NOTXTFRM_HXX
+#define SW_NOTXTFRM_HXX
#include <cntfrm.hxx>
@@ -56,7 +56,8 @@ public:
~SwNoTxtFrm();
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
- virtual void Paint(const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual BOOL GetCharRect( SwRect &, const SwPosition&,
SwCrsrMoveState* = 0) const;
BOOL GetCrsrOfst(SwPosition* pPos, Point& aPoint,
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index ee894a0ef539..f43a2362ee98 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -24,8 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _ROOTFRM_HXX
-#define _ROOTFRM_HXX
+#ifndef SW_ROOTFRM_HXX
+#define SW_ROOTFRM_HXX
+
#include "layfrm.hxx"
class SwCntntFrm;
@@ -197,7 +198,8 @@ public:
virtual BOOL GetCrsrOfst( SwPosition *, Point&,
SwCrsrMoveState* = 0 ) const;
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
#ifdef DBG_UTIL
@@ -365,5 +367,5 @@ inline void SwRootFrm::SetVirtPageNum( const BOOL bOf) const
((SwRootFrm*)this)->bIsVirtPageNum = bOf;
}
-#endif //_ROOTFRM_HXX
+#endif // SW_ROOTFRM_HXX
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 3f55c6bdf0ec..c12685ab3058 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -24,8 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _TABFRM_HXX
-#define _TABFRM_HXX
+#ifndef SW_TABFRM_HXX
+#define SW_TABFRM_HXX
#include <tools/mempool.hxx>
#include "layfrm.hxx"
@@ -129,7 +129,8 @@ public:
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual BOOL GetInfo( SfxPoolItem &rHnt ) const;
- virtual void Paint( const SwRect&, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual void CheckDirection( BOOL bVert );
virtual void Cut();
@@ -230,4 +231,4 @@ inline SwTabFrm *SwTabFrm::GetFollow()
return (SwTabFrm*)SwFlowFrm::GetFollow();
}
-#endif //_TABFRM_HXX
+#endif // SW_TABFRM_HXX
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 5a8783df261b..0e7db85e64ac 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -24,8 +24,9 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _TXTFRM_HXX
-#define _TXTFRM_HXX
+#ifndef SW_TXTFRM_HXX
+#define SW_TXTFRM_HXX
+
#include <tools/mempool.hxx>
#include <tools/string.hxx>
#include "cntfrm.hxx"
@@ -292,7 +293,8 @@ public:
void PaintExtraData( const SwRect & rRect ) const; //Seitennummer usw.
SwRect Paint();
- virtual void Paint( const SwRect &, const SwPrtOptions *pPrintData = NULL ) const;
+ virtual void Paint( SwRect const&,
+ SwPrintData const*const pPrintData = NULL ) const;
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual sal_Bool GetInfo( SfxPoolItem & ) const;
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index 0f89b3b75663..6d48f11812c1 100644
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -24,8 +24,10 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _VIEWIMP_HXX
-#define _VIEWIMP_HXX
+#ifndef SW_VIEWIMP_HXX
+#define SW_VIEWIMP_HXX
+
+#include <vector>
#include <vcl/timer.hxx>
#include <tools/color.hxx>
@@ -53,10 +55,9 @@ struct SdrPaintProcRec;
class SwAccessibleMap;
class SdrObject;
class Fraction;
-class SwPrtOptions;
+class SwPrintData;
class SwPagePreviewLayout;
struct PrevwPage;
-#include <vector>
class SwTxtFrm;
class SwViewImp
@@ -215,7 +216,7 @@ public:
// and <heaven>.
// OD 25.06.2003 #108784# - correct type of 1st parameter
void PaintLayer( const SdrLayerID _nLayerID,
- const SwPrtOptions *pPrintData,
+ SwPrintData const*const pPrintData,
const SwRect& _rRect,
const Color* _pPageBackgrdColor = 0,
const bool _bIsPageRightToLeft = false ) const;
@@ -360,5 +361,5 @@ inline void SwViewImp::AddAccessibleObj( const SdrObject *pObj )
SwRect aEmptyRect;
MoveAccessible( 0, pObj, aEmptyRect );
}
-#endif //_VIEWIMP_HXX
+#endif // SW_VIEWIMP_HXX
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 09fc6b00e03d..9f518285bd30 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -30,12 +30,7 @@
#include <com/sun/star/text/HoriOrientation.hpp>
-
-#include <hintids.hxx>
-
-#ifndef _SOUND_HXX //autogen
#include <vcl/sound.hxx>
-#endif
#include <tools/poly.hxx>
#define _SVSTDARR_LONGS
#include <svl/svstdarr.hxx>
@@ -49,19 +44,15 @@
// --> collapsing borders FME 2005-05-27 #i29550#
#include <svx/framelink.hxx>
// <--
-#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
-#endif
#include <svx/svdpagv.hxx>
-#include <tgrditem.hxx>
-
+#include <hintids.hxx>
+#include <tgrditem.hxx>
#include <fmtsrnd.hxx>
#include <fmtclds.hxx>
#include <tools/shl.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <swmodule.hxx>
#include <rootfrm.hxx>
#include <pagefrm.hxx>
@@ -89,15 +80,11 @@
#include <ptqueue.hxx>
#include <noteurl.hxx>
#include <virtoutp.hxx>
-#ifndef _LINEINFO_HXX
#include <lineinfo.hxx>
-#endif
#include <dbg_lay.hxx>
#include <accessibilityoptions.hxx>
// OD 20.12.2002 #94627#
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
// OD 28.02.2003 #b4779636#, #107692#
#include <swtable.hxx>
// OD 02.07.2003 #108784#
@@ -2735,7 +2722,8 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori )
|*
|*************************************************************************/
-void SwRootFrm::Paint( const SwRect& rRect, const SwPrtOptions *pPrintData ) const
+void
+SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
{
ASSERT( Lower() && Lower()->IsPageFrm(), "Lower der Root keine Seite." );
@@ -3185,7 +3173,7 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
}
}
-void SwLayoutFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
ViewShell *pSh = GetShell();
@@ -3473,7 +3461,7 @@ BOOL SwFlyFrm::IsPaint( SdrObject *pObj, const ViewShell *pSh )
/*************************************************************************
|* SwCellFrm::Paint( const SwRect& ) const
|*************************************************************************/
-void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwCellFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
if ( GetLayoutRowSpan() >= 1 )
SwLayoutFrm::Paint( rRect );
@@ -3492,7 +3480,7 @@ void SwCellFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
void MA_FASTCALL lcl_PaintLowerBorders( const SwLayoutFrm *pLay,
const SwRect &rRect, const SwPageFrm *pPage );
-void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
//wegen der Ueberlappung von Rahmen und Zeichenobjekten muessen die
//Flys ihre Umrandung (und die der Innenliegenden) direkt ausgeben.
@@ -3727,7 +3715,7 @@ void SwFlyFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */
|*
|*************************************************************************/
-void SwTabFrm::Paint( const SwRect& rRect, const SwPrtOptions* /* pPrintData */ ) const
+void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
if ( pGlobalShell->GetViewOptions()->IsTable() )
{
diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx
index ea01592741ec..4b9a9417480a 100644
--- a/sw/source/core/layout/unusedf.cxx
+++ b/sw/source/core/layout/unusedf.cxx
@@ -28,8 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "rootfrm.hxx"
#include "cntfrm.hxx"
#include "flyfrm.hxx"
@@ -41,7 +39,7 @@ void SwFrm::Format( const SwBorderAttrs * )
ASSERT( FALSE, "Format() der Basisklasse gerufen." );
}
-void SwFrm::Paint(const SwRect &, const SwPrtOptions * ) const
+void SwFrm::Paint(SwRect const&, SwPrintData const*const) const
{
ASSERT( FALSE, "Paint() der Basisklasse gerufen." );
}
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 443900e1942c..9babcdde2b79 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -38,12 +38,8 @@
#include <tgrditem.hxx>
#include <paratr.hxx>
-#ifndef _FMTLINE_HXX
#include <fmtline.hxx>
-#endif
-#ifndef _LINEINFO_HXX
#include <lineinfo.hxx>
-#endif
#include <charfmt.hxx>
#include <pagefrm.hxx>
#include <viewsh.hxx> // ViewShell
@@ -596,7 +592,7 @@ sal_Bool SwTxtFrm::PaintEmpty( const SwRect &rRect, sal_Bool bCheck ) const
* SwTxtFrm::Paint()
*************************************************************************/
-void SwTxtFrm::Paint( const SwRect &rRect, const SwPrtOptions * /*pPrintData*/ ) const
+void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
{
ResetRepaint();
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index fdc382ad99d9..5669ec8e6b99 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2285,17 +2285,6 @@ void SwTableProperties_Impl::ApplyTblAttr(const SwTable& rTbl, SwDoc& rDoc)
rDoc.SetAttr( aSet, *rTbl.GetFrmFmt() );
}
}
-/* -----------------------------11.07.00 12:14--------------------------------
-
- ---------------------------------------------------------------------------*/
-SwXTextTable* SwXTextTable::GetImplementation(uno::Reference< XInterface> xRef )
-{
- uno::Reference<lang::XUnoTunnel> xTunnel( xRef, uno::UNO_QUERY);
- if(xTunnel.is())
- return reinterpret_cast< SwXTextTable * >(
- sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething(SwXTextTable::getUnoTunnelId()) ));
- return 0;
-}
/* -----------------------------10.03.00 18:02--------------------------------
---------------------------------------------------------------------------*/
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index 001d958bc523..6897e6065db0 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -1450,12 +1450,6 @@ sal_uInt16 SwPagePreviewLayout::GetColOfPage( sal_uInt16 _nPageNum ) const
return nCol;
}
-Size SwPagePreviewLayout::GetMaxPageSize() const
-{
- ASSERT( PreviewLayoutValid(), "PagePreviewLayout not valid" );
- return maMaxPageSize;
-}
-
Size SwPagePreviewLayout::GetPrevwDocSize() const
{
ASSERT( PreviewLayoutValid(), "PagePreviewLayout not valid" );
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index d6cbf11b8731..b54922a1b8e7 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -40,7 +40,6 @@
#include <wdocsh.hxx>
#include <viewsh.hxx>
#include <docfld.hxx>
-#include <swprtopt.hxx>
#include <svl/languageoptions.hxx>
#include <toolkit/awt/vclxdevice.hxx>
@@ -127,7 +126,7 @@ void SwRenderData::ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &r
}
-void SwRenderData::ViewOptionAdjust( const SwPrtOptions *pPrtOptions )
+void SwRenderData::ViewOptionAdjust(SwPrintData const*const pPrtOptions)
{
m_pViewOptionAdjust->AdjustViewOptions( pPrtOptions );
}
@@ -144,7 +143,7 @@ void SwRenderData::ViewOptionAdjustStop()
void SwRenderData::MakeSwPrtOptions(
- SwPrtOptions &rOptions,
+ SwPrintData & rOptions,
const SwDocShell *pDocShell,
const SwPrintUIOptions *pOpt,
const SwRenderData *pData,
@@ -156,7 +155,7 @@ void SwRenderData::MakeSwPrtOptions(
// get default print options
const TypeId aSwWebDocShellTypeId = TYPE(SwWebDocShell);
BOOL bWeb = pDocShell->IsA( aSwWebDocShellTypeId );
- rOptions.MakeOptions( bWeb );
+ ::sw::InitPrintOptionsFromApplication(rOptions, bWeb);
// get print options to use from provided properties
rOptions.bPrintGraphic = pOpt->IsPrintGraphics();
@@ -183,17 +182,6 @@ void SwRenderData::MakeSwPrtOptions(
//! function will destroy the pointers
rOptions.SetPrintUIOptions( pOpt );
rOptions.SetRenderData( pData );
-
- // rOptions.aMulti is not used anymore in the XRenderable API
- // Thus we set it to a dummy value here.
- rOptions.aMulti = MultiSelection( Range( 1, 1 ) );
-
- //! Note: Since for PDF export of (multi-)selection a temporary
- //! document is created that contains only the selects parts,
- //! and thus that document is to printed in whole the,
- //! rOptions.bPrintSelection parameter will be false.
- if (bIsPDFExport)
- rOptions.bPrintSelection = FALSE;
}
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 1aa7c91a4c69..4c1f045f79be 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -52,7 +52,7 @@
#include "viewimp.hxx"
#include "dflyobj.hxx"
#include "viewopt.hxx"
-#include "swprtopt.hxx"
+#include "printdata.hxx"
#include "dcontact.hxx"
#include "dview.hxx"
#include "flyfrm.hxx"
@@ -179,7 +179,7 @@ void SwViewImp::UnlockPaint()
// outliner of the draw view for painting layers <hell> and <heaven>.
// OD 25.06.2003 #108784# - correct type of 1st parameter
void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
- const SwPrtOptions * _pPrintData,
+ SwPrintData const*const pPrintData,
const SwRect& ,
const Color* _pPageBackgrdColor,
const bool _bIsPageRightToLeft ) const
@@ -226,11 +226,11 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
}
pOutDev->Push( PUSH_LINECOLOR ); // #114231#
- if (_pPrintData)
+ if (pPrintData)
{
// hide drawings but not form controls (form controls are handled elsewhere)
SdrView &rSdrView = const_cast< SdrView & >(GetPageView()->GetView());
- rSdrView.setHideDraw( !_pPrintData->IsPrintDraw() );
+ rSdrView.setHideDraw( !pPrintData->IsPrintDraw() );
}
GetPageView()->DrawLayer(_nLayerID, pOutDev);
pOutDev->Pop();
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index fcb702a7112a..1119fc55d2a2 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -41,19 +41,15 @@
#include <rootfrm.hxx>
#include <viewimp.hxx>
#include <viewopt.hxx>
-#include <swprtopt.hxx> // SwPrtOptions
+#include <printdata.hxx>
#include <fldbas.hxx>
#include <ptqueue.hxx>
#include <swregion.hxx>
#include <hints.hxx>
#include <fntcache.hxx>
-#ifndef _STATSTR_HRC
#include <statstr.hrc> // Text fuer SfxProgress
-#endif
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentDeviceAccess.hxx>
@@ -77,7 +73,7 @@ void ViewShell::ShowPreViewSelection( sal_uInt16 nSelPage )
OD 09.01.2003 #i6467#
*/
-void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions )
+void ViewShell::AdjustOptionsForPagePreview(SwPrintData const& rPrintOptions)
{
if ( !IsPreView() )
{
@@ -85,7 +81,7 @@ void ViewShell::AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions
return;
}
- PrepareForPrint( _rPrintOptions );
+ PrepareForPrint( rPrintOptions );
return;
}
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 876bcc1ff46b..83e0289e6082 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -71,7 +71,7 @@
#include <docufld.hxx> // PostItFld /-Type
#include <shellres.hxx>
#include <viewopt.hxx>
-#include <swprtopt.hxx> // SwPrtOptions
+#include <printdata.hxx> // SwPrintData
#include <pagedesc.hxx>
#include <poolfmt.hxx> // fuer RES_POOLPAGE_JAKET
#include <mdiexp.hxx> // Ansteuern der Statusleiste
@@ -369,107 +369,6 @@ void ViewShell::CalcPagesForPrint( USHORT nMax )
/******************************************************************************/
-SwDoc * ViewShell::CreatePrtDoc( SfxObjectShellRef &rDocShellRef)
-{
- ASSERT( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
- SwFEShell* pFESh = (SwFEShell*)this;
- // Wir bauen uns ein neues Dokument
- SwDoc *pPrtDoc = new SwDoc;
- pPrtDoc->acquire();
- pPrtDoc->SetRefForDocShell( (SfxObjectShellRef*)&(long&)rDocShellRef );
- pPrtDoc->LockExpFlds();
-
- const SfxPoolItem* pCpyItem;
- const SfxItemPool& rPool = GetAttrPool();
- for( USHORT nWh = POOLATTR_BEGIN; nWh < POOLATTR_END; ++nWh )
- if( 0 != ( pCpyItem = rPool.GetPoolDefaultItem( nWh ) ) )
- pPrtDoc->GetAttrPool().SetPoolDefaultItem( *pCpyItem );
-
- // JP 29.07.99 - Bug 67951 - set all Styles from the SourceDoc into
- // the PrintDoc - will be replaced!
- pPrtDoc->ReplaceStyles( *GetDoc() );
-
- SwShellCrsr *pActCrsr = pFESh->_GetCrsr();
- SwShellCrsr *pFirstCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetNext());
- if( !pActCrsr->HasMark() ) // bei Multiselektion kann der aktuelle Cursor leer sein
- {
- pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev());
- }
-
- Point aSelPoint;
- if( pFESh->IsTableMode() )
- {
- SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr();
-
- const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode();
- const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0;
- if( pCntntFrm )
- {
- SwRect aCharRect;
- SwCrsrMoveState aTmpState( MV_NONE );
- pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState );
- aSelPoint = Point( aCharRect.Left(), aCharRect.Top() );
- }
- }
- else
- {
- aSelPoint = pFirstCrsr->GetSttPos();
- }
-
- const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint );
- ASSERT( pPage, "no page found!" );
-
- // get page descriptor - fall back to the first one if pPage could not be found
- const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName(
- pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 );
-
- if( !pFESh->IsTableMode() && pActCrsr->HasMark() )
- { // Am letzten Absatz die Absatzattribute richten:
- SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
- SwTxtNode* pTxtNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx )->GetTxtNode();
- SwCntntNode *pLastNd =
- pActCrsr->GetCntntNode( (*pActCrsr->GetMark()) <= (*pActCrsr->GetPoint()) );
- // Hier werden die Absatzattribute des ersten Absatzes uebertragen
- if( pLastNd && pLastNd->IsTxtNode() )
- ((SwTxtNode*)pLastNd)->CopyCollFmt( *pTxtNd );
- }
-
- // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
-// if( aDocShellRef.Is() )
-// SwDataExchange::InitOle( aDocShellRef, pPrtDoc );
- // und fuellen es mit dem selektierten Bereich
- pFESh->Copy( pPrtDoc );
-
- //Jetzt noch am ersten Absatz die Seitenvorlage setzen
- {
- SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
- SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); // gehe zum 1. ContentNode
- if( pFESh->IsTableMode() )
- {
- SwTableNode* pTNd = pCNd->FindTableNode();
- if( pTNd )
- pTNd->GetTable().GetFrmFmt()->SetFmtAttr( SwFmtPageDesc( pPageDesc ) );
- }
- else
- {
- pCNd->SetAttr( SwFmtPageDesc( pPageDesc ) );
- if( pFirstCrsr->HasMark() )
- {
- SwTxtNode *pTxtNd = pCNd->GetTxtNode();
- if( pTxtNd )
- {
- SwCntntNode *pFirstNd =
- pFirstCrsr->GetCntntNode( (*pFirstCrsr->GetMark()) > (*pFirstCrsr->GetPoint()) );
- // Hier werden die Absatzattribute des ersten Absatzes uebertragen
- if( pFirstNd && pFirstNd->IsTxtNode() )
- ((SwTxtNode*)pFirstNd)->CopyCollFmt( *pTxtNd );
- }
- }
- }
- }
- return pPrtDoc;
-}
-
SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
{
ASSERT( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
@@ -582,7 +481,7 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
sal_Bool ViewShell::PrintOrPDFExport(
OutputDevice *pOutDev,
- const SwPrtOptions &rPrintData,
+ SwPrintData const& rPrintData,
sal_Int32 nRenderer /* the index in the vector of pages to be printed */ )
{
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -608,31 +507,14 @@ sal_Bool ViewShell::PrintOrPDFExport(
//!! (h?ngt mit OLE Objekten im Dokument zusammen.)
SfxObjectShellRef aDocShellRef;
- //! Note: Since for PDF export of (multi-)selection a temporary
- //! document is created that contains only the selects parts,
- //! and thus that document is to printed in whole the,
- //! rPrintData.bPrintSelection parameter will be false.
- BOOL bSelection = rPrintData.bPrintSelection;
-
- // PDF export for (multi-)selection has already generated a temporary document
- // with the selected text. (see XRenderable implementation in unotxdoc.cxx)
- // Thus we like to go in the 'else' part here in that case.
- // Is is implemented this way because PDF export calls this Prt function
+ // Print/PDF export for (multi-)selection has already generated a
+ // temporary document with the selected text.
+ // (see XRenderable implementation in unotxdoc.cxx)
+ // It is implemented this way because PDF export calls this Prt function
// once per page and we do not like to always have the temporary document
- // to be created that often here in the 'then' part.
- if ( bSelection )
- {
- pOutDevDoc = CreatePrtDoc( aDocShellRef );
-
- // eine ViewShell darauf
- pShell = new ViewShell( *pOutDevDoc, 0, pOpt, pOutDev );
- pOutDevDoc->SetRefForDocShell( 0 );
- }
- else
- {
- pOutDevDoc = GetDoc();
- pShell = new ViewShell( *this, 0, pOutDev );
- }
+ // to be created that often here.
+ pOutDevDoc = GetDoc();
+ pShell = new ViewShell( *this, 0, pOutDev );
SdrView *pDrawView = pShell->GetDrawView();
if (pDrawView)
@@ -682,6 +564,8 @@ sal_Bool ViewShell::PrintOrPDFExport(
rPrintData.GetRenderData().m_pPostItShell : pShell;
::SetSwVisArea( pViewSh2, pStPage->Frm() );
+// FIXME disabled because rPrintData.aOffset is always (0,0)
+#if 0
// wenn wir einen Umschlag drucken wird ein Offset beachtet
if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET )
{
@@ -691,6 +575,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
aTmp.SetOrigin( aNewOrigin );
pOutDev->SetMapMode( aTmp );
}
+#endif
pShell->InitPrt( pOutDev );
@@ -705,12 +590,6 @@ sal_Bool ViewShell::PrintOrPDFExport(
delete pShell;
- if (bSelection )
- {
- if ( !pOutDevDoc->release() )
- delete pOutDevDoc;
- }
-
// restore settings of OutputDevice (should be done always now since the
// output device is now provided by a call from outside the Writer)
pOutDev->Pop();
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index c7ee43255f3b..d01af0213156 100755..100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -65,7 +65,7 @@
#include <fmtfld.hxx>
#include <node.hxx>
#include <swwait.hxx>
-#include <swprtopt.hxx>
+#include <printdata.hxx>
#include <frmatr.hxx>
#include <view.hxx> // fuer die aktuelle Sicht
#include <edtwin.hxx>
@@ -895,7 +895,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
pDev->SetLineColor();
pDev->SetBackground();
BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, this);
- SwPrtOptions aOpts( aEmptyStr );
+ SwPrintData aOpts;
ViewShell::PrtOle2( pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect );
pDev->Pop();
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 921d2a652002..81448870d925 100755..100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -27,20 +27,16 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#ifdef SW_DLLIMPLEMENTATION
#undef SW_DLLIMPLEMENTATION
#endif
-
#include <hintids.hxx>
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
#include <vcl/svapp.hxx>
-#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
-#endif
#include <svl/cjkoptions.hxx>
#include <svtools/ctrltool.hxx>
#include <svl/eitem.hxx>
@@ -55,15 +51,9 @@
#include <fmtcol.hxx>
#include <charatr.hxx>
#include <swtypes.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
#include <IDocumentDeviceAccess.hxx>
-#endif
#include <swmodule.hxx>
#include <wrtsh.hxx>
#include <uitool.hxx>
@@ -72,27 +62,15 @@
#include <uiitems.hxx>
#include <initui.hxx>
#include <optpage.hxx>
-#include <swprtopt.hxx>
-#ifndef _MODCFG_HXX
+#include <printdata.hxx>
#include <modcfg.hxx>
-#endif
-#ifndef _SRCVIEW_HXX
#include <srcview.hxx>
-#endif
#include <crstate.hxx>
#include <viewopt.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _CONFIG_HRC
#include <config.hrc>
-#endif
-#ifndef _REDLOPT_HRC
#include <redlopt.hrc>
-#endif
-#ifndef _OPTDLG_HRC
#include <optdlg.hrc>
-#endif
#include <svx/strarray.hxx>
#include <svl/slstitm.hxx>
#include <sfx2/request.hxx>
diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx
index a07c2c154696..d81c743604db 100644
--- a/sw/source/ui/config/prtopt.cxx
+++ b/sw/source/ui/config/prtopt.cxx
@@ -28,16 +28,15 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <unotools/configmgr.hxx>
#include <prtopt.hxx>
-#include <swprtopt.hxx>
#include <tools/debug.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <unomid.h>
+
using namespace utl;
using rtl::OUString;
using namespace com::sun::star::uno;
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index cf894f8728c4..349a419e1c35 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -62,10 +62,8 @@
#include <unotools/tempfile.hxx>
#include <unotools/pathoptions.hxx>
#include <svl/urihelper.hxx>
-#ifndef _SVSTDARR_HXX
#define _SVSTDARR_STRINGSDTOR
#include <svl/svstdarr.hxx>
-#endif
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <svl/stritem.hxx>
@@ -86,7 +84,6 @@
#include <swundo.hxx>
#include <flddat.hxx>
#include <modcfg.hxx>
-#include <swprtopt.hxx>
#include <shellio.hxx>
#include <dbui.hxx>
#include <dbmgr.hxx>
diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx
index 91cf8823e124..4990df84f43b 100644
--- a/sw/source/ui/inc/unotxvw.hxx
+++ b/sw/source/ui/inc/unotxvw.hxx
@@ -156,7 +156,7 @@ public:
void Invalidate();
// temporary document used for PDF export of selections/multi-selections
- SfxObjectShellRef BuildTmpSelectionDoc( SfxObjectShellRef& );
+ SfxObjectShellRef BuildTmpSelectionDoc();
};
/* -----------------17.09.98 12:52-------------------
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index a21dc8cfb30e..78817eec874c 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -83,7 +83,6 @@ class CommandEvent;
class InsCaptionOpt;
class SvGlobalName;
class SvtAccessibilityOptions;
-class SwPrtOptions;
class SwTransferable;
class SwMailMergeConfigItem;
class SwTxtNode; // #i23726#
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 2fce41b1a972..20d057ecf05a 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -320,9 +320,6 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
BOOL UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
- // new fields
- BOOL UpdateField( sw::mark::IFieldmark &fieldBM);
-
// Numerierung und Bullets
/**
Turns on numbering or bullets.
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 2319be573e25..669d3eb446b8 100755..100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -28,8 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include <sfx2/objface.hxx>
#include <vcl/timer.hxx>
#include <vcl/field.hxx>
@@ -54,10 +52,7 @@
#include <svx/svdview.hxx>
#include <svx/dlgutil.hxx>
#include <svx/zoomslideritem.hxx>
-#ifndef _SVX_SVXIDS_HRC //autogen
#include <svx/svxids.hrc>
-#endif
-
#include <swwait.hxx>
#include <globdoc.hxx>
@@ -73,27 +68,16 @@
#include <view.hxx>
#include <textsh.hxx>
#include <scroll.hxx>
-#include <swprtopt.hxx>
+#include <prtopt.hxx>
#include <docstat.hxx>
#include <usrpref.hxx>
#include <viewfunc.hxx>
-
-#ifndef _HELPID_H
#include <helpid.h>
-#endif
-#ifndef _CMDID_H
#include <cmdid.h>
-#endif
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _POPUP_HRC
#include <popup.hrc>
-#endif
-#ifndef _PVIEW_HRC
#include <pview.hrc>
-#endif
#define SwPagePreView
#include <sfx2/msg.hxx>
@@ -105,6 +89,7 @@
#include <svx/dialogs.hrc>
#include <vos/mutex.hxx>
+
using namespace ::com::sun::star;
@@ -1292,8 +1277,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
GetViewShell()->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions());
// OD 09.01.2003 #i6467# - adjust view shell option to the same as for print
- SwPrtOptions aPrintOptions( GetViewFrame()->GetObjectShell()->GetTitle(0) );
- aPrintOptions.MakeOptions( false );
+ SwPrintData const aPrintOptions = *SW_MOD()->GetPrtOptions(false);
GetViewShell()->AdjustOptionsForPagePreview( aPrintOptions );
IDocumentSettingAccess* pIDSA = pESh->getIDocumentSettingAccess();
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 15c94782883f..b1fd76c63aff 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -94,7 +94,6 @@
#include <frmui.hrc>
#include <cfgitems.hxx>
#include <prtopt.hxx>
-#include <swprtopt.hxx>
#include <linguistic/lngprops.hxx>
#include <editeng/unolingu.hxx>
//#include <sfx2/app.hxx>
@@ -1912,8 +1911,7 @@ SfxObjectShellRef & SwView::GetOrCreateTmpSelectionDoc()
if (!rxTmpDoc.Is())
{
SwXTextView *pImpl = GetViewImpl()->GetUNOObject_Impl();
- rxTmpDoc = pImpl->BuildTmpSelectionDoc(
- GetViewImpl()->GetEmbeddedObjRef() );
+ rxTmpDoc = pImpl->BuildTmpSelectionDoc();
}
return rxTmpDoc;
}
@@ -1927,17 +1925,12 @@ void SwView::AddTransferable(SwTransferable& rTransferable)
/* --------------------------------------------------*/
-void SwPrtOptions::MakeOptions( BOOL bWeb )
-{
- *this = *SW_MOD()->GetPrtOptions(bWeb);
-
- nCopyCount = 1;
- bCollate = FALSE;
- bPrintSelection = FALSE;
- bJobStartet = FALSE;
+namespace sw {
- aMulti.SetTotalRange( Range( 0, RANGE_MAX ) );
- aMulti.SelectAll();
- aMulti.Select( 0, FALSE );
+void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb)
+{
+ o_rData = *SW_MOD()->GetPrtOptions(bWeb);
}
+} // namespace sw
+
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index 8721f425eb8d..7ddc594dd223 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -70,7 +70,6 @@
#include <docsh.hxx>
#include <viewopt.hxx>
#include <prtopt.hxx>
-#include <swprtopt.hxx>
#include <fontcfg.hxx>
#include <cfgitems.hxx>
#include <dbmgr.hxx>
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 2bacca54776d..c9c80599541d 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -47,7 +47,7 @@
#include <srcview.hxx>
#include <viewsh.hxx>
#include <pvprtdat.hxx>
-#include <swprtopt.hxx>
+#include <printdata.hxx>
#include <svl/stritem.hxx>
#include <unotxdoc.hxx>
#include <svl/numuno.hxx>
@@ -2716,14 +2716,15 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
m_pRenderData->ViewOptionAdjustStart( *pWrtShell, *pWrtShell->GetViewOptions() );
}
- m_pRenderData->SetSwPrtOptions( new SwPrtOptions( C2U( bIsPDFExport ? "PDF export" : "Printing" ) ) );
+ m_pRenderData->SetSwPrtOptions( new SwPrintData );
m_pRenderData->MakeSwPrtOptions( m_pRenderData->GetSwPrtOptionsRef(), pRenderDocShell,
m_pPrintUIOptions, m_pRenderData, bIsPDFExport );
if (pView->IsA(aSwViewTypeId))
{
// PDF export should not make use of the SwPrtOptions
- const SwPrtOptions *pPrtOptions = bIsPDFExport? NULL : m_pRenderData->GetSwPrtOptions();
+ const SwPrintData *pPrtOptions = (bIsPDFExport)
+ ? NULL : m_pRenderData->GetSwPrtOptions();
m_pRenderData->ViewOptionAdjust( pPrtOptions );
}
@@ -3087,7 +3088,8 @@ void SAL_CALL SwXTextDocument::render(
}
// <--
- const SwPrtOptions &rSwPrtOptions = *m_pRenderData->GetSwPrtOptions();
+ SwPrintData const& rSwPrtOptions =
+ *m_pRenderData->GetSwPrtOptions();
if (bPrintProspect)
pVwSh->PrintProspect( pOut, rSwPrtOptions, nRenderer );
else // normal printing and PDF export
@@ -4110,8 +4112,8 @@ SwViewOptionAdjust_Impl::~SwViewOptionAdjust_Impl()
}
-void SwViewOptionAdjust_Impl::AdjustViewOptions(
- const SwPrtOptions *pPrtOptions )
+void
+SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions)
{
// to avoid unnecessary reformatting the view options related to the content
// below should only change if necessary, that is if respective content is present
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index df068ad0673d..c03935464abf 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -903,7 +903,7 @@ void SAL_CALL SwXTextView::setRubyList(
/*-- 29.12.02 15:45:29---------------------------------------------------
-----------------------------------------------------------------------*/
-SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc( SfxObjectShellRef& /*rRef*/ )
+SfxObjectShellRef SwXTextView::BuildTmpSelectionDoc()
{
SwWrtShell& rOldSh = m_pView->GetWrtShell();
SfxPrinter *pPrt = rOldSh.getIDocumentDeviceAccess()->getPrinter( false );
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index 17af61be8bad..0e51cd4c756c 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -239,15 +239,8 @@ BOOL SwWrtShell::UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet)
return bResult;
}
-BOOL SwWrtShell::UpdateField( sw::mark::IFieldmark &fieldBM )
-{
- return SwEditShell::UpdateField(fieldBM);
-}
-
-
-
- // ein Klick aus das angegebene Feld. Der Cursor steht auf diesem.
- // Fuehre die vor definierten Aktionen aus.
+// handler for click on the field given as parameter.
+// the cursor is positioned on the field.
void SwWrtShell::ClickToField( const SwField& rFld )