[Libreoffice-commits] .: 2 commits - sw/inc sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Oct 11 06:43:55 PDT 2010
sw/inc/editsh.hxx | 4
sw/inc/pagepreviewlayout.hxx | 3
sw/inc/unotbl.hxx | 2
sw/source/core/doc/docbm.cxx | 4
sw/source/core/edit/editsh.cxx | 26 -
sw/source/core/edit/edtox.cxx | 19 -
sw/source/core/inc/MarkManager.hxx | 4
sw/source/core/unocore/unotbl.cxx | 11
sw/source/core/view/pagepreviewlayout.cxx | 6
sw/source/ui/inc/wrtsh.hxx | 3
sw/source/ui/uiview/pview.cxx | 488 ------------------------------
sw/source/ui/uiview/pview.src | 293 ------------------
sw/source/ui/uiview/view.hrc | 1
sw/source/ui/wrtsh/wrtsh2.cxx | 11
14 files changed, 7 insertions(+), 868 deletions(-)
New commits:
commit 5f10523f5e881b11001e91e06bff15734f9c1a1c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 11 12:47:51 2010 +0100
#i112508# remove more dead code
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index b5c4a23..2d7a87e 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 589e285..01d83af 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/unotbl.hxx b/sw/inc/unotbl.hxx
index ab6f6c6..d0b4f30 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/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 23ecd3f..4c3c50b 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/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index e3ebcbc..8ef9460 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 f4ceb4f..fe294c6 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -230,25 +230,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/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx
index c663844..c2abd94 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/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index e84a660..55fb77b 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 fdd2c86..8d7821f 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -1322,12 +1322,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/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 14b26c0..f7f423a 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/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index ac874a9..1874426 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 )
commit 056c3b80dd710700ccf07aa94611f6292fa790de
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 11 12:46:38 2010 +0100
#i114267# remove dead code
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 24362cc..e63de1e 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -205,8 +205,7 @@ SwPreViewZoomDlg::SwPreViewZoomDlg( SwPagePreViewWin& rParent ) :
Beschreibung:
--------------------------------------------------------------------*/
-
- SwPreViewZoomDlg::~SwPreViewZoomDlg() {}
+SwPreViewZoomDlg::~SwPreViewZoomDlg() {}
void SwPreViewZoomDlg::Apply()
@@ -216,491 +215,6 @@ void SwPreViewZoomDlg::Apply()
BYTE(aColEdit.GetValue()) );
}
-/* */
-/* -----------------20.08.98 15:25-------------------
- * Vorschau fuer den Seitendruck
- * --------------------------------------------------*/
-struct PrintSettingsStruct;
-class PrtPrvWindow : public Window
-{
- const PrintSettingsStruct& rSettings;
-
- virtual void Paint(const Rectangle&);
-public :
- PrtPrvWindow(Window* pParent, const ResId& rResId, const PrintSettingsStruct& rSett) :
- Window(pParent, rResId), rSettings(rSett){}
-};
-/*--------------------------------------------------------------------
- Beschreibung: Optionen fuer das Drucken der Preview
- --------------------------------------------------------------------*/
-struct PrintSettingsStruct
-{
- Size aPageMaxSize; // groesste Seite
- Size aPrtSize; // Papiergroesse
- Size aPrvPrtSize; // Groesse innerhalb der LRTB-Raender
- Size aGridSize; // Groesse fuer jede Seite, enthaelt je
- // die Haelfte von H- und V-Distance
-
- long nLeft;
- long nRight;
- long nTop;
- long nBottom;
- long nHori;
- long nVert;
-
- USHORT nRows;
- USHORT nCols;
-
- BOOL bPrinterLandscape; // Ausrichtung
-};
-
-class SwPreviewPrintOptionsDialog : public SvxStandardDialog
-{
- FixedLine aRowColFL;
- FixedText aRowsFT;
- NumericField aRowsNF;
- FixedText aColsFT;
- NumericField aColsNF;
-
- FixedLine aMarginFL;
- FixedText aLSpaceFT;
- MetricField aLSpaceMF;
- FixedText aRSpaceFT;
- MetricField aRSpaceMF;
- FixedText aTSpaceFT;
- MetricField aTSpaceMF;
- FixedText aBSpaceFT;
- MetricField aBSpaceMF;
- FixedLine aDistanceFL;
- FixedText aHSpaceFT;
- MetricField aHSpaceMF;
- FixedText aVSpaceFT;
- MetricField aVSpaceMF;
-
- RadioButton aLandscapeRB;
- RadioButton aPortraitRB;
- FixedLine aOrientationFL;
-
- PrtPrvWindow aPreviewWin;
-
- OKButton aOkBtn;
- CancelButton aCancelBtn;
- HelpButton aHelpBtn;
-
- PushButton aStandardPB;
-
- SwPagePreView& rPreView;
- SwPagePreViewWin& rParentWin;
- PrintSettingsStruct aSettings;
-/* Size aPageMaxSize;
- Size aPrtSize;
-
- BOOL bOrientation;
-*/
- BOOL bStandard;
-
- virtual void Apply();
- void FillControls(SwPagePreViewPrtData& rData);
-
- DECL_LINK( ModifyHdl, Edit* );
- DECL_LINK( StandardHdl, PushButton* );
-
-public:
- SwPreviewPrintOptionsDialog(SwPagePreViewWin& rParent, SwPagePreView& rView);
- ~SwPreviewPrintOptionsDialog();
-};
-
-/* -----------------19.08.98 13:35-------------------
- *
- * --------------------------------------------------*/
-SwPreviewPrintOptionsDialog::SwPreviewPrintOptionsDialog( SwPagePreViewWin& rParent, SwPagePreView& rView ) :
- SvxStandardDialog( &rParent, SW_RES(DLG_PAGEPREVIEW_PRINTOPTIONS) ),
- aRowColFL(this,SW_RES( FL_ROWCOL)),
- aRowsFT(this,SW_RES( FT_ROWS)),
- aRowsNF(this,SW_RES( NF_ROWS)),
- aColsFT(this,SW_RES( FT_COLS)),
- aColsNF(this,SW_RES( NF_COLS)),
- aMarginFL(this,SW_RES( FL_MARGINS)),
- aLSpaceFT(this,SW_RES( FT_LMARGIN)),
- aLSpaceMF(this,SW_RES( MF_LMARGIN)),
- aRSpaceFT(this,SW_RES( FT_RMARGIN)),
- aRSpaceMF(this,SW_RES( MF_RMARGIN)),
- aTSpaceFT(this,SW_RES( FT_TMARGIN)),
- aTSpaceMF(this,SW_RES( MF_TMARGIN)),
- aBSpaceFT(this,SW_RES( FT_BMARGIN)),
- aBSpaceMF(this,SW_RES( MF_BMARGIN)),
- aDistanceFL(this,SW_RES(FL_DISTANCE)),
- aHSpaceFT(this,SW_RES( FT_HMARGIN)),
- aHSpaceMF(this,SW_RES( MF_HMARGIN)),
- aVSpaceFT(this,SW_RES( FT_VMARGIN)),
- aVSpaceMF(this,SW_RES( MF_VMARGIN)),
- aLandscapeRB(this,SW_RES( RB_LANDSCAPE)),
- aPortraitRB(this,SW_RES( RB_PORTRAIT)),
- aOrientationFL(this,SW_RES( FL_ORIENTATION)),
- aPreviewWin(this,SW_RES( WIN_PREVIEW), aSettings),
- aOkBtn(this,SW_RES(BT_OK)),
- aCancelBtn(this,SW_RES(BT_CANCEL)),
- aHelpBtn(this,SW_RES(BT_HELP)),
- aStandardPB(this,SW_RES(PB_STANDARD)),
- rPreView(rView),
- rParentWin(rParent),
- bStandard(TRUE)
-{
- FreeResource();
- ViewShell& rViewSh = *rPreView.GetViewShell();
- // OD 18.12.2002 #103492#
- aSettings.aPageMaxSize = rViewSh.PagePreviewLayout()->GetMaxPageSize();
- SfxPrinter* pPrinter = rViewSh.getIDocumentDeviceAccess()->getPrinter( true );
- aSettings.aPrtSize = pPrinter->GetPaperSize();
- //#97682# make sure that no division by zero occurs
- if(!aSettings.aPrtSize.Width() || !aSettings.aPrtSize.Height())
- aSettings.aPrtSize = SvxPaperInfo::GetPaperSize(PAPER_A4);
- aSettings.bPrinterLandscape = pPrinter->GetOrientation() == ORIENTATION_LANDSCAPE;
-
-
- SwDocShell* pDocShell = rPreView.GetDocShell();
- const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(0 != PTR_CAST(SwWebDocShell, pDocShell));
- FieldUnit eFieldUnit = pUsrPref->GetMetric();
- ::SetFieldUnit( aLSpaceMF, eFieldUnit );
- ::SetFieldUnit( aRSpaceMF, eFieldUnit );
- ::SetFieldUnit( aTSpaceMF, eFieldUnit );
- ::SetFieldUnit( aBSpaceMF, eFieldUnit );
- ::SetFieldUnit( aHSpaceMF, eFieldUnit );
- ::SetFieldUnit( aVSpaceMF, eFieldUnit );
-
- SwDoc* pDoc = pDocShell->GetDoc();
- SwPagePreViewPrtData aData;
- if(pDoc->GetPreViewPrtData())
- {
- aData = *pDoc->GetPreViewPrtData();
- bStandard = FALSE;
- }
- else
- {
- // Orientation der PreviewData an den Drucker anpassen
- aData.SetLandscape(aSettings.bPrinterLandscape);
- aData.SetRow(rParent.GetRow());
- aData.SetCol(rParent.GetCol());
- }
- FillControls(aData);
-
- aLSpaceMF.SaveValue();
- aRSpaceMF.SaveValue();
- aTSpaceMF.SaveValue();
- aBSpaceMF.SaveValue();
- aHSpaceMF.SaveValue();
- aVSpaceMF.SaveValue();
- aRowsNF.SaveValue();
- aColsNF.SaveValue();
- aLandscapeRB.SaveValue();
- aPortraitRB.SaveValue();
-
- aStandardPB.SetClickHdl(LINK(this, SwPreviewPrintOptionsDialog, StandardHdl));
- Link aLk = LINK(this, SwPreviewPrintOptionsDialog, ModifyHdl);
- aLSpaceMF.SetUpHdl(aLk);
- aRSpaceMF.SetUpHdl(aLk);
- aTSpaceMF.SetUpHdl(aLk);
- aBSpaceMF.SetUpHdl(aLk);
- aHSpaceMF.SetUpHdl(aLk);
- aVSpaceMF.SetUpHdl(aLk);
- aRowsNF.SetUpHdl(aLk);
- aColsNF.SetUpHdl(aLk);
- aLSpaceMF.SetDownHdl(aLk);
- aRSpaceMF.SetDownHdl(aLk);
- aTSpaceMF.SetDownHdl(aLk);
- aBSpaceMF.SetDownHdl(aLk);
- aHSpaceMF.SetDownHdl(aLk);
- aVSpaceMF.SetDownHdl(aLk);
- aRowsNF.SetDownHdl(aLk);
- aColsNF.SetDownHdl(aLk);
- aLSpaceMF.SetLoseFocusHdl(aLk);
- aRSpaceMF.SetLoseFocusHdl(aLk);
- aTSpaceMF.SetLoseFocusHdl(aLk);
- aBSpaceMF.SetLoseFocusHdl(aLk);
- aHSpaceMF.SetLoseFocusHdl(aLk);
- aVSpaceMF.SetLoseFocusHdl(aLk);
- aRowsNF.SetLoseFocusHdl(aLk);
- aColsNF.SetLoseFocusHdl(aLk);
- aLandscapeRB.SetClickHdl(aLk);
- aPortraitRB.SetClickHdl(aLk);
-
- ModifyHdl(0);
- if(bStandard)
- StandardHdl(&aStandardPB);
-}
-
-
-/* -----------------19.08.98 13:36-------------------
- *
- * --------------------------------------------------*/
-SwPreviewPrintOptionsDialog::~SwPreviewPrintOptionsDialog()
-{
-}
-/* -----------------12.11.98 11:32-------------------
- *
- * --------------------------------------------------*/
-void SwPreviewPrintOptionsDialog::FillControls(SwPagePreViewPrtData& rData)
-{
- aLSpaceMF.SetValue(aLSpaceMF.Normalize(rData.GetLeftSpace() ), FUNIT_TWIP);
- aRSpaceMF.SetValue(aRSpaceMF.Normalize(rData.GetRightSpace() ), FUNIT_TWIP);
- aTSpaceMF.SetValue(aTSpaceMF.Normalize(rData.GetTopSpace() ), FUNIT_TWIP);
- aBSpaceMF.SetValue(aBSpaceMF.Normalize(rData.GetBottomSpace()), FUNIT_TWIP);
- aHSpaceMF.SetValue(aHSpaceMF.Normalize(rData.GetHorzSpace() ), FUNIT_TWIP);
- aVSpaceMF.SetValue(aVSpaceMF.Normalize(rData.GetVertSpace() ), FUNIT_TWIP);
- aRowsNF.SetValue(rData.GetRow());
- aColsNF.SetValue(rData.GetCol());
- aSettings.bPrinterLandscape ? aLandscapeRB.Check() : aPortraitRB.Check();
- // wenn Drucker und Einstellungen nicht uebereinstimmen, dann Seiten tauschen
- if( rData.GetLandscape() != aSettings.bPrinterLandscape )
- {
- Size aTmp(aSettings.aPrtSize.Height(), aSettings.aPrtSize.Width());
- aSettings.aPrtSize = aTmp;
- aSettings.bPrinterLandscape = !aSettings.bPrinterLandscape;
- // nochmal setzen, denn auch wenn nur die Default-Orientierung dem Drucker
- // angepasst wurde, sollen die Einstellungen gespeichert werden
- aSettings.bPrinterLandscape ? aLandscapeRB.Check() : aPortraitRB.Check();
- }
- aLandscapeRB.SaveValue();
- aPortraitRB.SaveValue();
-
- aSettings.nLeft = rData.GetLeftSpace() ;
- aSettings.nRight = rData.GetRightSpace() ;
- aSettings.nTop = rData.GetTopSpace() ;
- aSettings.nBottom = rData.GetBottomSpace();
- aSettings.nHori = rData.GetHorzSpace() ;
- aSettings.nVert = rData.GetVertSpace() ;
- aSettings.nRows = rData.GetRow() ;
- aSettings.nCols = rData.GetCol() ;
- aSettings.aPrvPrtSize = aSettings.aPrtSize ;
-}
-
-/* -----------------19.08.98 14:31-------------------
- *
- * --------------------------------------------------*/
-void SwPreviewPrintOptionsDialog::Apply()
-{
-
- SwDoc* pDoc = rPreView.GetDocShell()->GetDoc();
- if(bStandard)
- pDoc->SetPreViewPrtData(0);
- else if( aLSpaceMF.GetSavedValue() != aLSpaceMF.GetText() ||
- aRSpaceMF.GetSavedValue() != aRSpaceMF.GetText() ||
- aTSpaceMF.GetSavedValue() != aTSpaceMF.GetText() ||
- aBSpaceMF.GetSavedValue() != aBSpaceMF.GetText() ||
- aHSpaceMF.GetSavedValue() != aHSpaceMF.GetText() ||
- aVSpaceMF.GetSavedValue() != aVSpaceMF.GetText() ||
- aRowsNF.GetSavedValue() != aRowsNF.GetText() ||
- aColsNF.GetSavedValue() != aColsNF.GetText() ||
- aLandscapeRB.GetSavedValue() != aLandscapeRB.IsChecked() ||
- aPortraitRB.GetSavedValue() != aPortraitRB.IsChecked() )
- {
- SwPagePreViewPrtData aData;
- if(pDoc->GetPreViewPrtData())
- aData = *pDoc->GetPreViewPrtData();
- aData.SetLeftSpace( static_cast< ULONG >(aLSpaceMF.Denormalize(aLSpaceMF.GetValue(FUNIT_TWIP))) );
- aData.SetRightSpace( static_cast< ULONG >(aRSpaceMF.Denormalize(aRSpaceMF.GetValue(FUNIT_TWIP))) );
- aData.SetTopSpace( static_cast< ULONG >(aTSpaceMF.Denormalize(aTSpaceMF.GetValue(FUNIT_TWIP))) );
- aData.SetBottomSpace( static_cast< ULONG >(aBSpaceMF.Denormalize(aBSpaceMF.GetValue(FUNIT_TWIP))) );
-
- aData.SetHorzSpace( static_cast< ULONG >(aHSpaceMF.Denormalize(aHSpaceMF.GetValue(FUNIT_TWIP))) );
- aData.SetVertSpace( static_cast< ULONG >(aVSpaceMF.Denormalize(aVSpaceMF.GetValue(FUNIT_TWIP))) );
- aData.SetRow((BYTE)aRowsNF.GetValue());
- aData.SetCol((BYTE)aColsNF.GetValue());
- aData.SetLandscape(aLandscapeRB.IsChecked());
-
- ViewShell& rViewSh = *rPreView.GetViewShell();
- SfxPrinter* pPrinter = rViewSh.getIDocumentDeviceAccess()->getPrinter( true );
- if((pPrinter->GetOrientation() == ORIENTATION_LANDSCAPE)
- != aData.GetLandscape())
- pPrinter->SetOrientation(aData.GetLandscape() ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT);
-
-
- pDoc->SetPreViewPrtData(&aData);
-
- }
-}
-/* -----------------20.08.98 08:48-------------------
- *
- * --------------------------------------------------*/
-IMPL_LINK( SwPreviewPrintOptionsDialog, ModifyHdl, Edit*, pEdit )
-{
- if(bStandard && pEdit)
- {
- aLSpaceMF.SetUserValue(aLSpaceMF.GetValue());
- aRSpaceMF.SetUserValue(aRSpaceMF.GetValue());
- aTSpaceMF.SetUserValue(aTSpaceMF.GetValue());
- aBSpaceMF.SetUserValue(aBSpaceMF.GetValue());
- aHSpaceMF.SetUserValue(aHSpaceMF.GetValue());
- aVSpaceMF.SetUserValue(aVSpaceMF.GetValue());
- aRowsNF. SetUserValue(aRowsNF .GetValue());
- aColsNF. SetUserValue(aColsNF .GetValue());
-
- bStandard = FALSE;
- }
- BOOL bOrientChanged = aSettings.bPrinterLandscape != aLandscapeRB.IsChecked();;
- if(pEdit == &aLSpaceMF)
- aSettings.nLeft = static_cast< long >(aLSpaceMF.Denormalize(aLSpaceMF.GetValue(FUNIT_TWIP)));
- else if(pEdit == &aRSpaceMF)
- aSettings.nRight = static_cast< long >(aRSpaceMF.Denormalize(aRSpaceMF.GetValue(FUNIT_TWIP)));
- else if(pEdit == &aTSpaceMF)
- aSettings.nTop = static_cast< long >(aTSpaceMF.Denormalize(aTSpaceMF.GetValue(FUNIT_TWIP)));
- else if(pEdit == &aBSpaceMF)
- aSettings.nBottom = static_cast< long >(aBSpaceMF.Denormalize(aBSpaceMF.GetValue(FUNIT_TWIP)));
- else if(pEdit == &aHSpaceMF)
- aSettings.nHori = static_cast< long >(aHSpaceMF.Denormalize(aHSpaceMF.GetValue(FUNIT_TWIP)));
- else if(pEdit == &aVSpaceMF)
- aSettings.nVert = static_cast< long >(aVSpaceMF.Denormalize(aVSpaceMF.GetValue(FUNIT_TWIP)));
- else if(pEdit == &aRowsNF)
- aSettings.nRows = (USHORT)aRowsNF.GetValue();
- else if(pEdit == &aColsNF)
- aSettings.nCols = (USHORT)aColsNF.GetValue();
- else if(pEdit == (Edit*)&aLandscapeRB)
- aSettings.bPrinterLandscape = aLandscapeRB.IsChecked();
- else if(pEdit == (Edit*)&aPortraitRB)
- aSettings.bPrinterLandscape = aLandscapeRB.IsChecked();
-
- if(bOrientChanged)
- {
- Size aTmp(aSettings.aPrtSize.Height(), aSettings.aPrtSize.Width());
- aSettings.aPrtSize = aTmp;
- }
-
-
- aSettings.aPrvPrtSize = Size(aSettings.aPrtSize.Width() - aSettings.nRight - aSettings.nLeft,
- aSettings.aPrtSize.Height() - aSettings.nTop - aSettings.nBottom);
- aSettings.aGridSize = Size(aSettings.aPrvPrtSize.Width() / aSettings.nCols,
- aSettings.aPrvPrtSize.Height() / aSettings.nRows );
- // was fehlt noch: Orientation auswerten, minimalrand ausrechnen, Beispiel fuettern
-
-
- //am Ende Maximalwerte setzen
- long n20Percent = aSettings.aPrtSize.Width() / 5;
- aLSpaceMF.SetMax(aLSpaceMF.Normalize(aSettings.aPrtSize.Width() - aSettings.nRight - n20Percent), FUNIT_TWIP);
- aRSpaceMF.SetMax(aRSpaceMF.Normalize(aSettings.aPrtSize.Width() - aSettings.nLeft - n20Percent), FUNIT_TWIP);
- n20Percent = aSettings.aPrtSize.Height() / 5;
- aTSpaceMF.SetMax(aTSpaceMF.Normalize(aSettings.aPrtSize.Height() - aSettings.nBottom - n20Percent), FUNIT_TWIP);
- aBSpaceMF.SetMax(aBSpaceMF.Normalize(aSettings.aPrtSize.Height() - aSettings.nTop - n20Percent), FUNIT_TWIP);
-
- long n80Percent = aSettings.aPrvPrtSize.Width() * 4 / 5;
- aHSpaceMF.SetMax(aHSpaceMF.Normalize(n80Percent / aSettings.nRows), FUNIT_TWIP);
- n80Percent = aSettings.aPrvPrtSize.Height()* 4 / 5;
- aVSpaceMF.SetMax(aVSpaceMF.Normalize(n80Percent / aSettings.nCols), FUNIT_TWIP);
- aHSpaceMF.Enable(aSettings.nCols > 1);
- aVSpaceMF.Enable(aSettings.nRows > 1);
- aRowsNF.SetMin(1);// nur damit auch nach Standard wieder der Inhalt angezeigt wird
- aColsNF.SetMin(1);
-
-
- aPreviewWin.Invalidate();
- return 0;
-}
-/* -----------------28.08.98 14:59-------------------
- *
- * --------------------------------------------------*/
-IMPL_LINK( SwPreviewPrintOptionsDialog, StandardHdl, PushButton*, EMPTYARG )
-{
- SetUpdateMode(TRUE);
- SwPagePreViewPrtData aData;
- aData.SetRow(rParentWin.GetRow());
- aData.SetCol(rParentWin.GetCol());
- FillControls(aData);
- bStandard = TRUE;
- aLSpaceMF.SetText(aEmptyStr);
- aRSpaceMF.SetText(aEmptyStr);
- aTSpaceMF.SetText(aEmptyStr);
- aBSpaceMF.SetText(aEmptyStr);
- aHSpaceMF.SetText(aEmptyStr);
- aVSpaceMF.SetText(aEmptyStr);
- aPreviewWin.Invalidate();
- SetUpdateMode(FALSE);
- return 0;
-}
-/* -----------------20.08.98 15:28-------------------
- * Preview anzeigen
- * --------------------------------------------------*/
-void PrtPrvWindow::Paint(const Rectangle&)
-{
- Size aWinSize(GetOutputSizePixel());
- long nWidth = rSettings.aPrtSize.Width();
- long nHeight = rSettings.aPrtSize.Height();
- BOOL bHoriValid = (aWinSize.Width() * 100 / aWinSize.Height()) <
- (rSettings.aPrtSize.Width() * 100/ rSettings.aPrtSize.Height());
- Fraction aXScale( aWinSize.Width(), Max( nWidth , 1L ) );
- Fraction aYScale( aWinSize.Height(), Max( nHeight, 1L ) );
- MapMode aMapMode( GetMapMode() );
- aMapMode.SetScaleX( bHoriValid ? aXScale : aYScale);
- aMapMode.SetScaleY( bHoriValid ? aXScale : aYScale);
- SetMapMode( aMapMode );
-
- aWinSize = GetOutputSize();
-
- Point aOffset(0,0);
- if(bHoriValid)
- aOffset.Y() = (aWinSize.Height() - rSettings.aPrtSize.Height()) / 2;
- else
- aOffset.X() = (aWinSize.Width() - rSettings.aPrtSize.Width()) / 2;;
-
-
- BOOL bUseSystemColors = SvtAccessibilityOptions().GetIsForPagePreviews()
- && GetSettings().GetStyleSettings().GetHighContrastMode();
-
- //der weisse Seitenhintergrund
- Rectangle aRect(aOffset, rSettings.aPrtSize);
- if(bUseSystemColors)
- {
- SetFillColor( GetSettings().GetStyleSettings().GetWindowColor() );
- SetLineColor( SwViewOption::GetFontColor() );
- }
- else
- {
- SetFillColor( Color( COL_WHITE ) );
- SetLineColor(Color( COL_BLACK ) );
- }
-
- DrawRect(aRect);
-
- Point aTL(aOffset);
- aTL.X() += rSettings.nLeft;
- aTL.Y() += rSettings.nTop;
-
- Size aPrvPageSize((rSettings.aPrvPrtSize.Width() - (rSettings.nCols - 1) * rSettings.nHori) / rSettings.nCols,
- (rSettings.aPrvPrtSize.Height() - (rSettings.nRows - 1) * rSettings.nVert) / rSettings.nRows);
- // jetzt muss noch das unterschiedliche Groessenverhaeltnis berechnet werden, um es an
- // der richtigen Seite abzuziehen.
- //...
- long nSourceScale = rSettings.aPageMaxSize.Width() * 100 / rSettings.aPageMaxSize.Height();
- long nDestScale = aPrvPageSize.Width() * 100 / aPrvPageSize.Height() ;
- if(nSourceScale > nDestScale) // die Seite ist relativ breiter als das vorhandene Rechteck
- {
- aPrvPageSize.Height() = aPrvPageSize.Width() * 100 / nSourceScale;
- }
- else
- {
- aPrvPageSize.Width() = aPrvPageSize.Height() * nSourceScale / 100;
- }
-
- if(bUseSystemColors)
- SetFillColor( GetSettings().GetStyleSettings().GetWindowColor() );
- else
- SetFillColor( Color( COL_GRAY ) );
-
-
- aRect = Rectangle(aTL, aPrvPageSize);
- for(USHORT i = 0; i < rSettings.nRows; i++)
- {
- for(USHORT j = 0; j < rSettings.nCols; j++)
- {
- DrawRect(aRect);
- aRect.Move(aPrvPageSize.Width() + rSettings.nHori, 0);
- }
-
- aRect.Move( 0, aPrvPageSize.Height() + rSettings.nVert);
- aRect.SetPos(Point(aTL.X(), aRect.TopLeft().Y()));
- }
- //rSettings;
-}
-
-/* */
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
diff --git a/sw/source/ui/uiview/pview.src b/sw/source/ui/uiview/pview.src
index 57fb35d..4b97c83 100644
--- a/sw/source/ui/uiview/pview.src
+++ b/sw/source/ui/uiview/pview.src
@@ -29,272 +29,7 @@
#include "pview.hrc"
#include "helpid.h"
#include "cmdid.h"
-ModalDialog DLG_PAGEPREVIEW_PRINTOPTIONS
-{
- HelpID = HID_DLG_PRV_PRT_OPTIONS ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Moveable = TRUE ;
- Size = MAP_APPFONT ( 312 , 131 ) ;
- FixedLine FL_ROWCOL
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 150 , 8 ) ;
-
- Text [ en-US ] = "Distribution";
- };
- FixedText FT_ROWS
- {
- Pos = MAP_APPFONT ( 12 , 15 ) ;
- Size = MAP_APPFONT ( 30 , 10 ) ;
- Left = TRUE ;
- Text [ en-US ] = "Ro~ws";
- };
- NumericField NF_ROWS
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 45 , 14 ) ;
- Size = MAP_APPFONT ( 36 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = PVIEW_MIN_ROW ;
- Maximum = PVIEW_MAX_ROW ;
- Value = 1 ;
- First = PVIEW_MIN_COL ;
- Last = PVIEW_MAX_COL ;
- };
- FixedText FT_COLS
- {
- Pos = MAP_APPFONT ( 84 , 15 ) ;
- Size = MAP_APPFONT ( 30 , 10 ) ;
- Left = TRUE ;
- Text [ en-US ] = "~Columns";
- };
- NumericField NF_COLS
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 117 , 14 ) ;
- Size = MAP_APPFONT ( 36 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = PVIEW_MIN_COL ;
- Maximum = PVIEW_MAX_COL ;
- Value = 1 ;
- First = PVIEW_MIN_COL ;
- Last = PVIEW_MAX_COL ;
- };
- FixedLine FL_MARGINS
- {
- Pos = MAP_APPFONT ( 6 , 32 ) ;
- Size = MAP_APPFONT ( 150 , 8 ) ;
- Text [ en-US ] = "Margins";
- };
- FixedText FT_LMARGIN
- {
- Pos = MAP_APPFONT ( 12 , 44 ) ;
- Size = MAP_APPFONT ( 30 , 10 ) ;
- Left = TRUE ;
- Text [ en-US ] = "L~eft";
- };
- MetricField MF_LMARGIN
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 45 , 43 ) ;
- Size = MAP_APPFONT ( 36 , 12 ) ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- DecimalDigits = 1 ;
- Unit = FUNIT_CM ;
- SpinSize = 10 ;
- Minimum = 0 ;
- Maximum = 9999 ;
- First = 0 ;
- Last = 2000 ;
- };
- FixedText FT_RMARGIN
- {
- Pos = MAP_APPFONT ( 84 , 44 ) ;
- Size = MAP_APPFONT ( 30 , 10 ) ;
- Left = TRUE ;
- Text [ en-US ] = "~Right";
- };
- MetricField MF_RMARGIN
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 117 , 43 ) ;
- Size = MAP_APPFONT ( 36 , 12 ) ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- DecimalDigits = 1 ;
- Unit = FUNIT_CM ;
- SpinSize = 10 ;
- Minimum = 0 ;
- Maximum = 9999 ;
- First = 0 ;
- Last = 2000 ;
- };
- FixedText FT_TMARGIN
- {
- Pos = MAP_APPFONT ( 12 , 59 ) ;
- Size = MAP_APPFONT ( 30 , 10 ) ;
- Left = TRUE ;
- Text [ en-US ] = "~Top";
- };
- MetricField MF_TMARGIN
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 45 , 58 ) ;
- Size = MAP_APPFONT ( 36 , 12 ) ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- DecimalDigits = 1 ;
- Unit = FUNIT_CM ;
- SpinSize = 10 ;
- Minimum = 0 ;
- Maximum = 9999 ;
- First = 0 ;
- Last = 2000 ;
- };
- FixedText FT_BMARGIN
- {
- Pos = MAP_APPFONT ( 84 , 59 ) ;
- Size = MAP_APPFONT ( 30 , 10 ) ;
- Left = TRUE ;
- Text [ en-US ] = "~Bottom";
- };
- MetricField MF_BMARGIN
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 117 , 58 ) ;
- Size = MAP_APPFONT ( 36 , 12 ) ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- DecimalDigits = 1 ;
- Unit = FUNIT_CM ;
- SpinSize = 10 ;
- Minimum = 0 ;
- Maximum = 9999 ;
- First = 0 ;
- Last = 2000 ;
- };
- FixedLine FL_DISTANCE
- {
- Pos = MAP_APPFONT ( 6 , 76 ) ;
- Size = MAP_APPFONT ( 150 , 8 ) ;
-
- Text [ en-US ] = "Spacing";
- };
- FixedText FT_HMARGIN
- {
- Pos = MAP_APPFONT ( 12 , 88 ) ;
- Size = MAP_APPFONT ( 30 , 10 ) ;
- Left = TRUE ;
- Text [ en-US ] = "Hori~zontal";
- };
-
- MetricField MF_HMARGIN
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 45 , 87 ) ;
- Size = MAP_APPFONT ( 36 , 12 ) ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- DecimalDigits = 1 ;
- Unit = FUNIT_CM ;
- SpinSize = 10 ;
- Minimum = 0 ;
- Maximum = 9999 ;
- First = 0 ;
- Last = 2000 ;
- };
- FixedText FT_VMARGIN
- {
- Pos = MAP_APPFONT ( 84 , 88 ) ;
- Size = MAP_APPFONT ( 32 , 10 ) ;
- Left = TRUE ;
- Text [ en-US ] = "~Vertically";
- };
-
- MetricField MF_VMARGIN
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 117 , 87 ) ;
- Size = MAP_APPFONT ( 36 , 12 ) ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- DecimalDigits = 1 ;
- Unit = FUNIT_CM ;
- SpinSize = 10 ;
- Minimum = 0 ;
- Maximum = 9999 ;
- First = 0 ;
- Last = 2000 ;
- };
- FixedLine FL_ORIENTATION
- {
- Pos = MAP_APPFONT ( 6 , 102 ) ;
- Size = MAP_APPFONT ( 150 , 8 ) ;
- Text [ en-US ] = "Format";
- };
- RadioButton RB_LANDSCAPE
- {
- Pos = MAP_APPFONT ( 12 , 113 ) ;
- Size = MAP_APPFONT ( 60 , 12 ) ;
- TabStop = TRUE ;
- Group = TRUE ;
- Text [ en-US ] = "~Landscape";
- };
- RadioButton RB_PORTRAIT
- {
- Pos = MAP_APPFONT ( 84 , 113 ) ;
- Size = MAP_APPFONT ( 60 , 12 ) ;
- Text [ en-US ] = "P~ortrait";
- };
- Window WIN_PREVIEW
- {
- Pos = MAP_APPFONT ( 162 , 7 ) ;
- Size = MAP_APPFONT ( 90 , 113 ) ;
- };
-
- OKButton BT_OK
- {
- Pos = MAP_APPFONT ( 258 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BT_CANCEL
- {
- Pos = MAP_APPFONT ( 258 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BT_HELP
- {
- Pos = MAP_APPFONT ( 258 , 49 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- PushButton PB_STANDARD
- {
- Pos = MAP_APPFONT ( 258 , 66 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Default";
- };
- Text [ en-US ] = "Print Options";
-};
ModalDialog DLG_PAGEPREVIEW_ZOOM
{
HelpID = HID_PPREV_ZOOM ;
@@ -460,31 +195,3 @@ ToolBox RID_PVIEW_TOOLBOX
Scroll = TRUE ;
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sw/source/ui/uiview/view.hrc b/sw/source/ui/uiview/view.hrc
index a2b828b..e05b61e 100644
--- a/sw/source/ui/uiview/view.hrc
+++ b/sw/source/ui/uiview/view.hrc
@@ -77,7 +77,6 @@
#define DLG_SPECIAL_FORCED (RC_VIEW_BEGIN)
#define DLG_PAGEPREVIEW_ZOOM (RC_VIEW_BEGIN + 1)
-#define DLG_PAGEPREVIEW_PRINTOPTIONS (RC_VIEW_BEGIN + 2)
// Ueberlaufpruefung -----------------------------------------------------
More information about the Libreoffice-commits
mailing list