impress193: rebase m84

This commit is contained in:
Christian Lippka 2010-07-05 11:01:27 +02:00
commit 8dd01b984a
23 changed files with 281 additions and 1122 deletions

7
sd/inc/sdabstdlg.hxx Normal file → Executable file
View file

@ -153,12 +153,6 @@ public:
virtual void GetAttr( SfxItemSet& rOutAttrs ) = 0;
};
class AbstractSdPrintDlg : public VclAbstractDialog //add for SdPrintDlg
{
public:
virtual USHORT GetAttr() = 0;
};
class AbstractSdPresLayoutDlg : public VclAbstractDialog //add for SdPresLayoutDlg
{
public:
@ -206,7 +200,6 @@ public:
virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL ) = 0;
virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr ) = 0;
virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, List& rPageNames, List* pCSList ) = 0;
virtual AbstractSdPrintDlg* CreateSdPrintDlg( ::Window* pWindow ) = 0; //add for SdPrintDlg
virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0;
virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs) = 0;
virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView ) = 0;

View file

@ -60,6 +60,7 @@
#include <svx/unopage.hxx>
#include <editeng/flditem.hxx>
#include <svx/sdr/contact/displayinfo.hxx>
#include <svx/svditer.hxx>
#include <editeng/adjitem.hxx>
@ -364,7 +365,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
// #i105146# We want no content to be displayed for PK_HANDOUT,
// so just never set a page as content
pSdrObj = new SdrPageObj(0);
pSdrObj->SetResizeProtect(TRUE);
// pSdrObj->SetResizeProtect(TRUE);
}
break;
@ -2939,146 +2940,160 @@ void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout,
{
SdPage& rHandoutMaster = *rModel.GetMasterSdPage( 0, PK_HANDOUT );
Size aArea = rHandoutMaster.GetSize();
const long nGapW = 1000; // gap is 1cm
const long nGapH = 1000;
long nLeftBorder = rHandoutMaster.GetLftBorder();
long nRightBorder = rHandoutMaster.GetRgtBorder();
long nTopBorder = rHandoutMaster.GetUppBorder();
long nBottomBorder = rHandoutMaster.GetLwrBorder();
const long nHeaderFooterHeight = static_cast< long >( (aArea.Height() - nTopBorder - nLeftBorder) * 0.05 );
nTopBorder += nHeaderFooterHeight;
nBottomBorder += nHeaderFooterHeight;
long nX = nGapW + nLeftBorder;
long nY = nGapH + nTopBorder;
aArea.Width() -= nGapW * 2 + nLeftBorder + nRightBorder;
aArea.Height() -= nGapH * 2 + nTopBorder + nBottomBorder;
const bool bLandscape = aArea.Width() > aArea.Height();
static sal_uInt16 aOffsets[5][9] =
if( eLayout == AUTOLAYOUT_NONE )
{
{ 0, 1, 2, 3, 4, 5, 6, 7, 8 }, // AUTOLAYOUT_HANDOUT9, Portrait, Horizontal order
{ 0, 2, 4, 1, 3, 5, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT3, Landscape, Vertical
{ 0, 2, 1, 3, 0, 0, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT4, Landscape, Vertical
{ 0, 3, 1, 4, 2, 5, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT4, Portrait, Vertical
{ 0, 3, 6, 1, 4, 7, 2, 5, 8 }, // AUTOLAYOUT_HANDOUT9, Landscape, Vertical
};
sal_uInt16* pOffsets = aOffsets[0];
USHORT nColCnt = 0, nRowCnt = 0;
switch ( eLayout )
{
case AUTOLAYOUT_HANDOUT1:
nColCnt = 1; nRowCnt = 1;
break;
case AUTOLAYOUT_HANDOUT2:
if( bLandscape )
{
nColCnt = 2; nRowCnt = 1;
}
else
{
nColCnt = 1; nRowCnt = 2;
}
break;
case AUTOLAYOUT_HANDOUT3:
if( bLandscape )
{
nColCnt = 3; nRowCnt = 2;
}
else
{
nColCnt = 2; nRowCnt = 3;
}
pOffsets = aOffsets[ bLandscape ? 1 : 0 ];
break;
case AUTOLAYOUT_HANDOUT4:
nColCnt = 2; nRowCnt = 2;
pOffsets = aOffsets[ bHorizontal ? 0 : 2 ];
break;
case AUTOLAYOUT_HANDOUT6:
if( bLandscape )
{
nColCnt = 3; nRowCnt = 2;
}
else
{
nColCnt = 2; nRowCnt = 3;
}
if( !bHorizontal )
pOffsets = aOffsets[ bLandscape ? 1 : 3 ];
break;
default:
case AUTOLAYOUT_HANDOUT9:
nColCnt = 3; nRowCnt = 3;
if( !bHorizontal )
pOffsets = aOffsets[4];
break;
}
rAreas.resize( nColCnt * nRowCnt );
Size aPartArea, aSize;
aPartArea.Width() = ((aArea.Width() - ((nColCnt-1) * nGapW) ) / nColCnt);
aPartArea.Height() = ((aArea.Height() - ((nRowCnt-1) * nGapH) ) / nRowCnt);
SdrPage* pFirstPage = rModel.GetMasterSdPage(0, PK_STANDARD);
if ( pFirstPage )
{
// scale actual size into handout rect
double fScale = (double)aPartArea.Width() / (double)pFirstPage->GetWdt();
aSize.Height() = (long)(fScale * pFirstPage->GetHgt() );
if( aSize.Height() > aPartArea.Height() )
// use layout from handout master
SdrObjListIter aShapeIter (rHandoutMaster);
while (aShapeIter.IsMore())
{
fScale = (double)aPartArea.Height() / (double)pFirstPage->GetHgt();
aSize.Height() = aPartArea.Height();
aSize.Width() = (long)(fScale * pFirstPage->GetWdt());
SdrPageObj* pPageObj = dynamic_cast<SdrPageObj*>(aShapeIter.Next());
if (pPageObj)
rAreas.push_back( pPageObj->GetCurrentBoundRect() );
}
else
{
aSize.Width() = aPartArea.Width();
}
nX += (aPartArea.Width() - aSize.Width()) / 2;
nY += (aPartArea.Height()- aSize.Height())/ 2;
}
else
{
aSize = aPartArea;
}
Size aArea = rHandoutMaster.GetSize();
Point aPos( nX, nY );
const long nGapW = 1000; // gap is 1cm
const long nGapH = 1000;
const bool bRTL = rModel.GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB;
long nLeftBorder = rHandoutMaster.GetLftBorder();
long nRightBorder = rHandoutMaster.GetRgtBorder();
long nTopBorder = rHandoutMaster.GetUppBorder();
long nBottomBorder = rHandoutMaster.GetLwrBorder();
const long nOffsetX = (aPartArea.Width() + nGapW) * (bRTL ? -1 : 1);
const long nOffsetY = aPartArea.Height() + nGapH;
const long nStartX = bRTL ? nOffsetX*(1 - nColCnt) - nX : nX;
const long nHeaderFooterHeight = static_cast< long >( (aArea.Height() - nTopBorder - nLeftBorder) * 0.05 );
for(sal_uInt16 nRow = 0; nRow < nRowCnt; nRow++)
{
aPos.X() = nStartX;
for(sal_uInt16 nCol = 0; nCol < nColCnt; nCol++)
nTopBorder += nHeaderFooterHeight;
nBottomBorder += nHeaderFooterHeight;
long nX = nGapW + nLeftBorder;
long nY = nGapH + nTopBorder;
aArea.Width() -= nGapW * 2 + nLeftBorder + nRightBorder;
aArea.Height() -= nGapH * 2 + nTopBorder + nBottomBorder;
const bool bLandscape = aArea.Width() > aArea.Height();
static sal_uInt16 aOffsets[5][9] =
{
rAreas[*pOffsets++] = Rectangle(aPos, aSize);
aPos.X() += nOffsetX;
{ 0, 1, 2, 3, 4, 5, 6, 7, 8 }, // AUTOLAYOUT_HANDOUT9, Portrait, Horizontal order
{ 0, 2, 4, 1, 3, 5, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT3, Landscape, Vertical
{ 0, 2, 1, 3, 0, 0, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT4, Landscape, Vertical
{ 0, 3, 1, 4, 2, 5, 0, 0, 0 }, // AUTOLAYOUT_HANDOUT4, Portrait, Vertical
{ 0, 3, 6, 1, 4, 7, 2, 5, 8 }, // AUTOLAYOUT_HANDOUT9, Landscape, Vertical
};
sal_uInt16* pOffsets = aOffsets[0];
USHORT nColCnt = 0, nRowCnt = 0;
switch ( eLayout )
{
case AUTOLAYOUT_HANDOUT1:
nColCnt = 1; nRowCnt = 1;
break;
case AUTOLAYOUT_HANDOUT2:
if( bLandscape )
{
nColCnt = 2; nRowCnt = 1;
}
else
{
nColCnt = 1; nRowCnt = 2;
}
break;
case AUTOLAYOUT_HANDOUT3:
if( bLandscape )
{
nColCnt = 3; nRowCnt = 2;
}
else
{
nColCnt = 2; nRowCnt = 3;
}
pOffsets = aOffsets[ bLandscape ? 1 : 0 ];
break;
case AUTOLAYOUT_HANDOUT4:
nColCnt = 2; nRowCnt = 2;
pOffsets = aOffsets[ bHorizontal ? 0 : 2 ];
break;
case AUTOLAYOUT_HANDOUT6:
if( bLandscape )
{
nColCnt = 3; nRowCnt = 2;
}
else
{
nColCnt = 2; nRowCnt = 3;
}
if( !bHorizontal )
pOffsets = aOffsets[ bLandscape ? 1 : 3 ];
break;
default:
case AUTOLAYOUT_HANDOUT9:
nColCnt = 3; nRowCnt = 3;
if( !bHorizontal )
pOffsets = aOffsets[4];
break;
}
aPos.Y() += nOffsetY;
rAreas.resize( nColCnt * nRowCnt );
Size aPartArea, aSize;
aPartArea.Width() = ((aArea.Width() - ((nColCnt-1) * nGapW) ) / nColCnt);
aPartArea.Height() = ((aArea.Height() - ((nRowCnt-1) * nGapH) ) / nRowCnt);
SdrPage* pFirstPage = rModel.GetMasterSdPage(0, PK_STANDARD);
if ( pFirstPage )
{
// scale actual size into handout rect
double fScale = (double)aPartArea.Width() / (double)pFirstPage->GetWdt();
aSize.Height() = (long)(fScale * pFirstPage->GetHgt() );
if( aSize.Height() > aPartArea.Height() )
{
fScale = (double)aPartArea.Height() / (double)pFirstPage->GetHgt();
aSize.Height() = aPartArea.Height();
aSize.Width() = (long)(fScale * pFirstPage->GetWdt());
}
else
{
aSize.Width() = aPartArea.Width();
}
nX += (aPartArea.Width() - aSize.Width()) / 2;
nY += (aPartArea.Height()- aSize.Height())/ 2;
}
else
{
aSize = aPartArea;
}
Point aPos( nX, nY );
const bool bRTL = rModel.GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB;
const long nOffsetX = (aPartArea.Width() + nGapW) * (bRTL ? -1 : 1);
const long nOffsetY = aPartArea.Height() + nGapH;
const long nStartX = bRTL ? nOffsetX*(1 - nColCnt) - nX : nX;
for(sal_uInt16 nRow = 0; nRow < nRowCnt; nRow++)
{
aPos.X() = nStartX;
for(sal_uInt16 nCol = 0; nCol < nColCnt; nCol++)
{
rAreas[*pOffsets++] = Rectangle(aPos, aSize);
aPos.X() += nOffsetX;
}
aPos.Y() += nOffsetY;
}
}
}

View file

@ -255,25 +255,21 @@ Reference<XAccessibleStateSet> SAL_CALL
if (mxParent.is())
{
// SELECTABLE
// Unconditional states.
pStateSet->AddState(AccessibleStateType::SELECTABLE);
// SELECTED
if (mrSlideSorter.GetController().GetPageSelector().IsPageSelected(mnPageNumber))
pStateSet->AddState(AccessibleStateType::SELECTED);
// FOCUSABLE
pStateSet->AddState(AccessibleStateType::FOCUSABLE);
// FOCUSED
if (mrSlideSorter.GetController().GetFocusManager().GetFocusedPageIndex() == mnPageNumber)
if (mrSlideSorter.GetController().GetFocusManager().IsFocusShowing())
pStateSet->AddState(AccessibleStateType::FOCUSED);
pStateSet->AddState(AccessibleStateType::ENABLED);
pStateSet->AddState(AccessibleStateType::VISIBLE);
pStateSet->AddState(AccessibleStateType::SHOWING);
pStateSet->AddState(AccessibleStateType::ACTIVE);
pStateSet->AddState(AccessibleStateType::SENSITIVE);
// Conditional states.
if (mrSlideSorter.GetController().GetPageSelector().IsPageSelected(mnPageNumber))
pStateSet->AddState(AccessibleStateType::SELECTED);
if (mrSlideSorter.GetController().GetFocusManager().GetFocusedPageIndex() == mnPageNumber)
if (mrSlideSorter.GetController().GetFocusManager().IsFocusShowing())
pStateSet->AddState(AccessibleStateType::FOCUSED);
}
return pStateSet;

View file

@ -72,7 +72,6 @@ public:
::Window* pWindow);
~Implementation (void);
void UpdateVisibility (void);
void UpdateChildren (void);
void Clear (void);
sal_Int32 GetVisibleChildCount (void) const;
@ -85,6 +84,7 @@ public:
DECL_LINK(WindowEventListener, VclWindowEvent*);
DECL_LINK(SelectionChangeListener, void*);
DECL_LINK(FocusChangeListener, void*);
DECL_LINK(VisibilityChangeListener, void*);
private:
AccessibleSlideSorterView& mrAccessibleSlideSorter;
@ -789,7 +789,6 @@ AccessibleSlideSorterView::Implementation::Implementation (
{
ConnectListeners();
UpdateChildren();
UpdateVisibility();
}
@ -804,24 +803,27 @@ AccessibleSlideSorterView::Implementation::~Implementation (void)
void AccessibleSlideSorterView::Implementation::UpdateVisibility (void)
void AccessibleSlideSorterView::Implementation::UpdateChildren (void)
{
if (mbModelChangeLocked)
{
// Do nothing right now. When the flag is reset, this method is
// called again.
return;
}
::sd::slidesorter::view::SlideSorterView::PageRange aRange (
mrSlideSorter.GetView().GetVisiblePageRange());
mnFirstVisibleChild = aRange.first;
mnLastVisibleChild = aRange.second;
}
void AccessibleSlideSorterView::Implementation::UpdateChildren (void)
{
// Clear the list of accessible children and adapt its size. It is
// refilled on demand when later the children are requested.
// Release all children.
Clear();
// Create new children for the modified visible range.
maPageObjects.resize(mrSlideSorter.GetModel().GetPageCount());
UpdateVisibility();
for (sal_Int32 nIndex(mnFirstVisibleChild); nIndex<=mnLastVisibleChild; ++nIndex)
GetAccessibleChild(nIndex);
}
@ -834,6 +836,11 @@ void AccessibleSlideSorterView::Implementation::Clear (void)
for (iPageObject=maPageObjects.begin(); iPageObject!=iEnd; ++iPageObject)
if (*iPageObject != NULL)
{
mrAccessibleSlideSorter.FireAccessibleEvent(
AccessibleEventId::CHILD,
Any(Reference<XAccessible>(iPageObject->get())),
Any());
Reference<XComponent> xComponent (Reference<XWeak>(iPageObject->get()), UNO_QUERY);
if (xComponent.is())
xComponent->dispose();
@ -870,8 +877,6 @@ AccessibleSlideSorterObject* AccessibleSlideSorterView::Implementation::GetVisib
AccessibleSlideSorterObject* AccessibleSlideSorterView::Implementation::GetAccessibleChild (
sal_Int32 nIndex)
{
OSL_ASSERT(nIndex>=0 && (sal_uInt32)nIndex<maPageObjects.size());
AccessibleSlideSorterObject* pChild = NULL;
if (nIndex>=0 && (sal_uInt32)nIndex<maPageObjects.size())
@ -881,14 +886,26 @@ AccessibleSlideSorterObject* AccessibleSlideSorterView::Implementation::GetAcces
::sd::slidesorter::model::SharedPageDescriptor pDescriptor(
mrSlideSorter.GetModel().GetPageDescriptor(nIndex));
if (pDescriptor.get() != NULL)
{
maPageObjects[nIndex] = new AccessibleSlideSorterObject(
&mrAccessibleSlideSorter,
mrSlideSorter,
(pDescriptor->GetPage()->GetPageNum()-1)/2);
mrAccessibleSlideSorter.FireAccessibleEvent(
AccessibleEventId::CHILD,
Any(),
Any(Reference<XAccessible>(maPageObjects[nIndex].get())));
}
}
pChild = maPageObjects[nIndex].get();
}
else
{
OSL_ASSERT(nIndex>=0 && (sal_uInt32)nIndex<maPageObjects.size());
}
return pChild;
}
@ -909,9 +926,10 @@ void AccessibleSlideSorterView::Implementation::ConnectListeners (void)
mrSlideSorter.GetController().GetSelectionManager()->AddSelectionChangeListener(
LINK(this,AccessibleSlideSorterView::Implementation,SelectionChangeListener));
mrSlideSorter.GetController().GetFocusManager().AddFocusChangeListener(
LINK(this,AccessibleSlideSorterView::Implementation,FocusChangeListener));
mrSlideSorter.GetView().AddVisibilityChangeListener(
LINK(this,AccessibleSlideSorterView::Implementation,VisibilityChangeListener));
}
@ -921,9 +939,10 @@ void AccessibleSlideSorterView::Implementation::ReleaseListeners (void)
{
mrSlideSorter.GetController().GetFocusManager().RemoveFocusChangeListener(
LINK(this,AccessibleSlideSorterView::Implementation,FocusChangeListener));
mrSlideSorter.GetController().GetSelectionManager()->RemoveSelectionChangeListener(
LINK(this,AccessibleSlideSorterView::Implementation,SelectionChangeListener));
mrSlideSorter.GetView().RemoveVisibilityChangeListener(
LINK(this,AccessibleSlideSorterView::Implementation,VisibilityChangeListener));
if (mpWindow != NULL)
mpWindow->RemoveEventListener(
@ -951,14 +970,7 @@ void AccessibleSlideSorterView::Implementation::Notify (
switch (rSdrHint.GetKind())
{
case HINT_PAGEORDERCHG:
if ( ! mbModelChangeLocked)
{
UpdateChildren();
mrAccessibleSlideSorter.FireAccessibleEvent(
AccessibleEventId::INVALIDATE_ALL_CHILDREN,
Any(),
Any());
}
UpdateChildren();
break;
default:
break;
@ -976,10 +988,6 @@ void AccessibleSlideSorterView::Implementation::Notify (
case sd::ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_END:
mbModelChangeLocked = false;
UpdateChildren();
mrAccessibleSlideSorter.FireAccessibleEvent(
AccessibleEventId::INVALIDATE_ALL_CHILDREN,
Any(),
Any());
break;
default:
break;
@ -996,11 +1004,7 @@ IMPL_LINK(AccessibleSlideSorterView::Implementation, WindowEventListener, VclWin
{
case VCLEVENT_WINDOW_MOVE:
case VCLEVENT_WINDOW_RESIZE:
UpdateVisibility();
mrAccessibleSlideSorter.FireAccessibleEvent(
AccessibleEventId::INVALIDATE_ALL_CHILDREN,
Any(),
Any());
UpdateChildren();
break;
case VCLEVENT_WINDOW_GETFOCUS:
@ -1062,4 +1066,16 @@ IMPL_LINK(AccessibleSlideSorterView::Implementation, FocusChangeListener, void*,
}
IMPL_LINK(AccessibleSlideSorterView::Implementation, VisibilityChangeListener, void*, EMPTYARG )
{
UpdateChildren();
return 1;
}
} // end of namespace ::accessibility

View file

@ -273,7 +273,7 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, const
sSlotStr = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DuplicatePage" ) );
else
sSlotStr = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Undo" ) );
aSlotImage = ::GetImage( mxFrame, sSlotStr, FALSE, FALSE );
aSlotImage = ::GetImage( mxFrame, sSlotStr, FALSE, bHighContrast );
String sSlotTitle;
if( bInsertPage )

View file

@ -63,7 +63,6 @@ SRC1FILES =\
navigatr.src\
sdpreslt.src\
morphdlg.src\
printdlg.src\
dlgfield.src\
custsdlg.src\
brkdlg.src\
@ -71,8 +70,7 @@ SRC1FILES =\
dlgolbul.src \
LayerDialog.src \
PaneDockingWindow.src \
layeroptionsdlg.src \
printdialog.src
layeroptionsdlg.src
SLOFILES = \
$(SLO)$/inspagob.obj \
@ -102,7 +100,6 @@ SLOFILES = \
$(SLO)$/navigatr.obj \
$(SLO)$/sdpreslt.obj \
$(SLO)$/morphdlg.obj \
$(SLO)$/printdlg.obj \
$(SLO)$/dlgfield.obj \
$(SLO)$/custsdlg.obj \
$(SLO)$/brkdlg.obj \
@ -120,8 +117,7 @@ SLOFILES = \
$(SLO)$/sdabstdlg.obj \
$(SLO)$/PaneChildWindows.obj \
$(SLO)$/PaneDockingWindow.obj \
$(SLO)$/PaneShells.obj \
$(SLO)$/printdialog.obj
$(SLO)$/PaneShells.obj
LIB1TARGET= $(SLB)$/$(TARGET).lib
@ -147,8 +143,7 @@ LIB1OBJFILES= \
$(SLO)$/sdabstdlg.obj \
$(SLO)$/PaneChildWindows.obj \
$(SLO)$/PaneDockingWindow.obj \
$(SLO)$/PaneShells.obj \
$(SLO)$/printdialog.obj
$(SLO)$/PaneShells.obj
LIB2TARGET= $(SLB)$/sdui.lib
@ -173,7 +168,6 @@ LIB2OBJFILES= \
$(SLO)$/dlgolbul.obj \
$(SLO)$/paragr.obj \
$(SLO)$/present.obj \
$(SLO)$/printdlg.obj \
$(SLO)$/prltempl.obj \
$(SLO)$/sdpreslt.obj \
$(SLO)$/tabtempl.obj \

View file

@ -1,342 +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.
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
#include <boost/scoped_ptr.hpp>
#include "sdresid.hxx"
#include "printdialog.hxx"
#include "printdialog.hrc"
#include "optsitem.hxx"
#include "res_bmp.hrc"
class SdPrintDialogImpl : public ModalDialog
{
public:
SdPrintDialogImpl()
: ModalDialog( 0, SdResId( DLG_PRINTDIALOG ) )
{
}
virtual ~SdPrintDialogImpl()
{
FreeResource();
}
};
/**
aOptions.GetOptionsPrint().SetDraw( aCbxDraw.IsChecked() );
aOptions.GetOptionsPrint().SetNotes( aCbxNotes.IsChecked() );
aOptions.GetOptionsPrint().SetHandout( aCbxHandout.IsChecked() );
aOptions.GetOptionsPrint().SetOutline( aCbxOutline.IsChecked() );
aCbxDraw.Check( pPrintOpts->GetOptionsPrint().IsDraw() );
aCbxNotes.Check( pPrintOpts->GetOptionsPrint().IsNotes() );
aCbxHandout.Check( pPrintOpts->GetOptionsPrint().IsHandout() );
aCbxOutline.Check( pPrintOpts->GetOptionsPrint().IsOutline() );
only for impress!!
*/
SdPrintDialog* SdPrintDialog::Create( Window* pWindow, bool bImpress )
{
return new SdPrintDialog( pWindow, bImpress );
}
SdPrintDialog::SdPrintDialog( Window* pWindow, bool bImpress )
: PrintDialog( pWindow, false )
, mbImpress( bImpress )
{
if( bImpress )
{
mpControls.resize( PRINTDLG_CONTROLCOUNT );
boost::scoped_ptr< SdPrintDialogImpl > aImplDlg( new SdPrintDialogImpl() );
USHORT nChildCount = GetChildCount();
mpControls[FL_PRINTCONTENT-1].reset( new FixedLine( this, SdResId( FL_PRINTCONTENT ) ) );
mpControls[FT_CONTENT-1].reset( new FixedText( this, SdResId( FT_CONTENT ) ) );
mpControls[CB_CONTENT-1].reset( new ListBox( this, SdResId( CB_CONTENT ) ) );
mpControls[FT_SLIDESPERPAGE-1].reset( new FixedText( this, SdResId( FT_SLIDESPERPAGE ) ) );
mpControls[CB_SLIDESPERPAGE-1].reset( new ListBox( this, SdResId( CB_SLIDESPERPAGE ) ) );
mpControls[FT_ORDER-1].reset( new FixedText( this, SdResId( FT_ORDER ) ) );
mpControls[RBT_HORIZONTAL-1].reset( new RadioButton( this, SdResId( RBT_HORIZONTAL ) ) );
mpControls[RBT_VERTICAL-1].reset( new RadioButton( this, SdResId( RBT_VERTICAL ) ) );
mpControls[IMG_PREVIEW-1].reset( new FixedImage( this, SdResId( IMG_PREVIEW ) ) );
sal_Int32 nHeight = LogicToPixel( Size( 0, 71 ), MAP_APPFONT ).Height();
sal_Int32 nInsertY = nHeight;
Window* pNextControl = 0;
// find second fixed line
USHORT nChild = 0;
USHORT nFixedLine = 2;
while( nChildCount-- )
{
pNextControl = GetChild( nChild++ );
if( dynamic_cast< FixedLine* >( pNextControl ) )
{
if( --nFixedLine == 0 )
{
nInsertY = pNextControl->GetPosPixel().Y();
nChild--;
nChildCount++;
break;
}
}
}
// move lower controls down
std::vector< Window* > aLowerControls;
while( nChildCount-- )
{
Window* pControl = GetChild( nChild++ );
if( pControl )
{
Point aPos( pControl->GetPosPixel() );
aPos.Y() += nHeight;
pControl->SetPosPixel(aPos);
aLowerControls.push_back(pControl);
}
}
// positionate new controls
for( int i = 0; i < PRINTDLG_CONTROLCOUNT; i++ )
{
Control* pControl = mpControls[i].get();
if( pControl )
{
Point aPos( pControl->GetPosPixel() );
aPos.Y() += nInsertY;
pControl->SetPosPixel(aPos);
pControl->SetZOrder( pNextControl, WINDOW_ZORDER_BEFOR );
}
}
Size aDialogSize( GetSizePixel() );
aDialogSize.Height() += nHeight;
SetSizePixel( aDialogSize );
}
}
SdPrintDialog::~SdPrintDialog()
{
}
void SdPrintDialog::Init( const SdOptionsPrintItem* pPrintOpts )
{
if( mbImpress )
{
bool bDraw = true, bHandout = false, bNotes = false, bOutline = false;
sal_uInt16 nPagesPerHandout = 6;
bool bHandoutHorizontal = true;
if( pPrintOpts )
{
const SdOptionsPrint& rOpts = pPrintOpts->GetOptionsPrint();
bDraw = rOpts.IsDraw();
bHandout = rOpts.IsHandout();
bNotes = rOpts.IsNotes();
bOutline = rOpts.IsOutline();
nPagesPerHandout = rOpts.GetHandoutPages();
bHandoutHorizontal = rOpts.IsHandoutHorizontal();
}
sal_uInt16 nPos = 0;
if( !bDraw )
{
if( bHandout )
nPos = 1;
else if( bNotes )
nPos = 2;
else if( bOutline )
nPos = 3;
}
static_cast<ListBox*>( mpControls[CB_CONTENT-1].get() )->SelectEntryPos( nPos );
switch( nPagesPerHandout )
{
case 1: nPos = 0; break;
case 2: nPos = 1; break;
case 3: nPos = 2; break;
case 4: nPos = 3; break;
case 5:
case 6: nPos = 4; break;
default:nPos = 5; break;
}
static_cast<ListBox*>( mpControls[CB_SLIDESPERPAGE-1].get() )->SelectEntryPos( nPos );
static_cast<RadioButton*>( mpControls[RBT_HORIZONTAL-1].get() )->Check( bHandoutHorizontal == true ) ;
static_cast<RadioButton*>( mpControls[RBT_VERTICAL-1].get() )->Check( bHandoutHorizontal == false ) ;
LoadPreviewImages();
Image* pImage = mpPreviews[0].get();
if( pImage )
{
FixedImage* pPreviewImage = static_cast<FixedImage*>( mpControls[IMG_PREVIEW-1].get() );
Point aPos( pPreviewImage->GetPosPixel() );
pPreviewImage->SetSizePixel( pImage->GetSizePixel() );
aPos.X() -= pImage->GetSizePixel().Width();
pPreviewImage->SetPosPixel( aPos );
}
UpdateStates();
Link aLink( LINK(this,SdPrintDialog,UpdateStatesHdl) );
static_cast<ListBox*>( mpControls[CB_CONTENT-1].get() )->SetSelectHdl( aLink );
static_cast<ListBox*>( mpControls[CB_SLIDESPERPAGE-1].get() )->SetSelectHdl( aLink );
}
}
bool SdPrintDialog::Fill( SdOptionsPrintItem* pPrintOpts )
{
bool bChanges = false;
if( mbImpress && pPrintOpts )
{
SdOptionsPrint& rOpts = pPrintOpts->GetOptionsPrint();
BOOL bDraw = FALSE, bHandout = FALSE, bNotes = FALSE, bOutline = FALSE;
switch( static_cast<ListBox*>( mpControls[CB_CONTENT-1].get() )->GetSelectEntryPos() )
{
case 1: bHandout = TRUE; break;
case 2: bNotes = TRUE; break;
case 3: bOutline = TRUE; break;
default: bDraw = TRUE; break;
}
if( rOpts.IsDraw() != bDraw )
{
bChanges = true;
rOpts.SetDraw( bDraw );
}
if( rOpts.IsNotes() != bNotes )
{
bChanges = true;
rOpts.SetNotes( bNotes );
}
if( rOpts.IsHandout() != bHandout )
{
bChanges = true;
rOpts.SetHandout( bHandout );
}
if( rOpts.IsOutline() != bOutline )
{
bChanges = true;
rOpts.SetOutline( bOutline );
}
sal_uInt16 nSlidePerHandout = 6;
switch( static_cast<ListBox*>( mpControls[CB_SLIDESPERPAGE-1].get() )->GetSelectEntryPos() )
{
case 0: nSlidePerHandout = 1; break;
case 1: nSlidePerHandout = 2; break;
case 2: nSlidePerHandout = 3; break;
case 3: nSlidePerHandout = 4; break;
case 5: nSlidePerHandout = 9; break;
}
if( rOpts.GetHandoutPages() != nSlidePerHandout )
{
bChanges = true;
rOpts.SetHandoutPages( nSlidePerHandout );
}
const BOOL bHorizontal = static_cast<RadioButton*>( mpControls[RBT_HORIZONTAL-1].get() )->IsChecked();
if( rOpts.IsHandoutHorizontal() != bHorizontal )
{
bChanges = true;
rOpts.SetHandoutHorizontal( bHorizontal );
}
}
return bChanges;
}
static const sal_uInt16 PREVIEW_COUNT = 6;
void SdPrintDialog::UpdateStates()
{
const sal_uInt16 nSlidesPerPagePos = static_cast<ListBox*>( mpControls[CB_SLIDESPERPAGE-1].get() )->GetSelectEntryPos();
bool bHandout = static_cast<ListBox*>( mpControls[CB_CONTENT-1].get() )->GetSelectEntryPos() == 1;
bool bOrder = bHandout && ( nSlidesPerPagePos >= 3);
static_cast<Control*>( mpControls[FT_SLIDESPERPAGE-1].get() )->Enable( bHandout );
static_cast<Control*>( mpControls[CB_SLIDESPERPAGE-1].get() )->Enable( bHandout );
static_cast<Control*>( mpControls[FT_ORDER-1].get() )->Enable( bHandout && bOrder );
static_cast<Control*>( mpControls[RBT_HORIZONTAL-1].get() )->Enable( bHandout && bOrder );
static_cast<Control*>( mpControls[RBT_VERTICAL-1].get() )->Enable( bHandout && bOrder );
FixedImage* pPreviewImage = static_cast<FixedImage*>( mpControls[IMG_PREVIEW-1].get() );
if( pPreviewImage )
{
pPreviewImage->Show( bHandout );
if( bHandout )
{
if( nSlidesPerPagePos < PREVIEW_COUNT)
{
if( mpPreviews[nSlidesPerPagePos].get() )
pPreviewImage->SetModeImage( *mpPreviews[nSlidesPerPagePos].get(), BMP_COLOR_NORMAL );
if( mpPreviewsHC[nSlidesPerPagePos].get() )
pPreviewImage->SetModeImage( *mpPreviewsHC[nSlidesPerPagePos].get(), BMP_COLOR_HIGHCONTRAST );
}
}
}
}
IMPL_LINK( SdPrintDialog, UpdateStatesHdl, void*, EMPTYARG )
{
UpdateStates();
return 0;
}
void SdPrintDialog::LoadPreviewImages()
{
static const sal_uInt16 aResId[2*PREVIEW_COUNT] = { BMP_FOILH_01, BMP_FOILH_01_H, BMP_FOILH_02, BMP_FOILH_02_H, BMP_FOILH_03, BMP_FOILH_03_H, BMP_FOILH_04, BMP_FOILH_04_H, BMP_FOILH_06, BMP_FOILH_06_H, BMP_FOILH_09, BMP_FOILH_09_H };
mpPreviews.resize( PREVIEW_COUNT );
mpPreviewsHC.resize( PREVIEW_COUNT );
const sal_uInt16* pResId( aResId );
for( sal_uInt16 i = 0; i < PREVIEW_COUNT; i++ )
{
mpPreviews[i].reset( new Image( Bitmap( SdResId( *pResId++ ) ) ) );
mpPreviewsHC[i].reset( new Image( Bitmap( SdResId( *pResId++ ) ) ) );
}
}

View file

@ -1,38 +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.
*
************************************************************************/
#define DLG_PRINTDIALOG 1847
#define FL_PRINTCONTENT 1
#define FT_CONTENT 2
#define CB_CONTENT 3
#define FT_SLIDESPERPAGE 4
#define CB_SLIDESPERPAGE 5
#define FT_ORDER 6
#define RBT_HORIZONTAL 7
#define RBT_VERTICAL 8
#define IMG_PREVIEW 9
#define PRINTDLG_CONTROLCOUNT 9

View file

@ -1,130 +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.
*
************************************************************************/
#include "app.hrc"
#include "printdialog.hrc"
ModalDialog DLG_PRINTDIALOG
{
Size = MAP_APPFONT ( 260, 77 ) ;
FixedLine FL_PRINTCONTENT
{
Pos = MAP_APPFONT ( 6 , 0 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Print content" ;
};
FixedText FT_CONTENT
{
Pos = MAP_APPFONT ( 12 , 12 ) ;
Size = MAP_APPFONT ( 45 , 10 ) ;
Text [ en-US ] = "Content" ;
};
ListBox CB_CONTENT
{
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 10 ) ;
Size = MAP_APPFONT ( 108 , 80 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "Slides" ; > ;
< "Handouts" ; > ;
< "Notes" ; > ;
< "Outline" ; > ;
};
};
FixedText FT_SLIDESPERPAGE
{
Pos = MAP_APPFONT ( 12 , 30 ) ;
Size = MAP_APPFONT ( 45 , 8 ) ;
Text [ en-US ] = "Slides per page" ;
};
ListBox CB_SLIDESPERPAGE
{
Border = TRUE ;
Pos = MAP_APPFONT ( 60 , 28 ) ;
Size = MAP_APPFONT ( 24 , 80 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "1" ; > ;
< "2" ; > ;
< "3" ; > ;
< "4" ; > ;
< "6" ; > ;
< "9" ; > ;
};
};
FixedText FT_ORDER
{
Pos = MAP_APPFONT ( 12 , 47 ) ;
Size = MAP_APPFONT ( 45 , 8 ) ;
Text [ en-US ] = "Order" ;
};
RadioButton RBT_HORIZONTAL
{
Pos = MAP_APPFONT ( 60 , 45 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Horizontal" ;
};
RadioButton RBT_VERTICAL
{
Pos = MAP_APPFONT ( 60 , 58 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Vertical" ;
};
FixedImage IMG_PREVIEW
{
Pos = MAP_APPFONT ( 168 , 28 ) ;
};
};

View file

@ -1,88 +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.
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
#ifdef SD_DLLIMPLEMENTATION
#undef SD_DLLIMPLEMENTATION
#endif
#include "sdresid.hxx"
#include "printdlg.hxx"
#include "printdlg.hrc"
/*************************************************************************
|*
|* SdPrintDlg::SdPrintDlg()
|*
|* Beschreibung Dialog zum Einstellen von Printoptionen
|*
*************************************************************************/
SdPrintDlg::SdPrintDlg( Window* pWindow ) :
ModalDialog ( pWindow, SdResId( DLG_PRINT_WARNINGS ) ),
aFtInfo ( this, SdResId( FI_INFO ) ),
aRbtScale ( this, SdResId( RBT_SCALE ) ),
aRbtPoster ( this, SdResId( RBT_POSTER ) ),
aRbtCut ( this, SdResId( RBT_CUT ) ),
aGrpOptions ( this, SdResId( GRP_OPTIONS ) ),
aBtnOK ( this, SdResId( BTN_OK ) ),
aBtnCancel ( this, SdResId( BTN_CANCEL ) ),
aBtnHelp ( this, SdResId( BTN_HELP ) )
{
FreeResource();
aRbtScale.Check();
}
/*************************************************************************
|*
|* SdPrintDlg::GetAttr()
|*
|* Beschreibung Liefert eingestellte Option zurueck
|*
*************************************************************************/
USHORT SdPrintDlg::GetAttr()
{
USHORT nOption = 0;
if( aRbtScale.IsChecked() )
nOption = 1;
else if( aRbtPoster.IsChecked() )
nOption = 2;
else if( aRbtCut.IsChecked() )
nOption = 3;
return( nOption );
}

View file

@ -1,130 +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.
*
************************************************************************/
#include "printdlg.hrc"
ModalDialog DLG_PRINT_WARNINGS
{
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 212 , 87 ) ;
Moveable = TRUE ;
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 156 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 156 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 156 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
FixedLine GRP_OPTIONS
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 144 , 8 ) ;
Text [ en-US ] = "Print options" ;
};
RadioButton RBT_SCALE
{
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 129 , 12 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Fit page to print range" ;
};
RadioButton RBT_POSTER
{
Pos = MAP_APPFONT ( 12 , 54 ) ;
Size = MAP_APPFONT ( 130 , 12 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Print on multiple pages" ;
};
RadioButton RBT_CUT
{
Pos = MAP_APPFONT ( 12 , 66 ) ;
Size = MAP_APPFONT ( 127 , 12 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Trim" ;
};
FixedText FI_INFO
{
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 134 , 25 ) ;
/* ### ACHTUNG: Neuer Text in Resource? Die Seiteneinstellungen stimmen nicht mit dem Druckbereich überein.\nSie können folgende Optionen wählen : Die Seiteneinstellungen stimmen nicht mit dem Druckbereich ³berein.\nSie k÷nnen folgende Optionen wõhlen */
Text [ en-US ] = "The page settings do not match the print range.\nChoose one of the following options" ;
WordBreak = TRUE ;
};
Text [ en-US ] = "Warning Print Options" ;
};

16
sd/source/ui/dlg/sddlgfact.cxx Normal file → Executable file
View file

@ -51,7 +51,6 @@
#include "OutlineBulletDlg.hxx"
#include "paragr.hxx"
#include "present.hxx"
#include "printdlg.hxx"
#include "prltempl.hxx"
#include "sdpreslt.hxx"
#include "tabtempl.hxx"
@ -76,7 +75,6 @@ IMPL_ABSTDLG_BASE(AbstractSdInsertPasteDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractSdInsertPagesObjsDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractMorphDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractSdStartPresDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractSdPrintDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractSdPresLayoutDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractSfxDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSdVectorizeDlg_Impl);
@ -326,13 +324,6 @@ void AbstractSdStartPresDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
}
// AbstractSdStartPresDlg_Impl end
//AbstractSdPrintDlg_Impl begin
USHORT AbstractSdPrintDlg_Impl::GetAttr()
{
return pDlg->GetAttr();
}
// AbstractSdPrintDlg_Impl end
//AbstractSdPresLayoutDlg_Impl begin
void AbstractSdPresLayoutDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
{
@ -498,13 +489,6 @@ AbstractSdStartPresDlg * SdAbstractDialogFactory_Impl::CreateSdStartPresentatio
}
// add for SdStartPresentationDlg end
// add for SdPrintDlg begin
AbstractSdPrintDlg * SdAbstractDialogFactory_Impl::CreateSdPrintDlg( ::Window* pWindow )
{
return new AbstractSdPrintDlg_Impl( new SdPrintDlg( pWindow ) );
}
// add for SdPrintDlg end
// add for SdPresLayoutTemplateDlg begin
SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool )
{

9
sd/source/ui/dlg/sddlgfact.hxx Normal file → Executable file
View file

@ -209,14 +209,6 @@ class AbstractSdStartPresDlg_Impl : public AbstractSdStartPresDlg
virtual void GetAttr( SfxItemSet& rOutAttrs );
};
// add for SdPrintDlg
class SdPrintDlg;
class AbstractSdPrintDlg_Impl : public AbstractSdPrintDlg
{
DECL_ABSTDLG_BASE(AbstractSdPrintDlg_Impl,SdPrintDlg)
virtual USHORT GetAttr();
};
// add for SdPresLayoutDlg
class SdPresLayoutDlg;
class AbstractSdPresLayoutDlg_Impl : public AbstractSdPresLayoutDlg
@ -281,7 +273,6 @@ public:
virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL );
virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr );
virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, List& rPageNames, List* pCSList );
virtual AbstractSdPrintDlg* CreateSdPrintDlg( ::Window* pWindow ); //add for SdPrintDlg
virtual SfxAbstractTabDialog* CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool );
virtual AbstractSdPresLayoutDlg* CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs);
virtual SfxAbstractTabDialog* CreateSdTabTemplateDlg( ::Window* pParent, const SfxObjectShell* pDocShell, SfxStyleSheetBase& rStyleBase, SdrModel* pModel, SdrView* pView );

View file

@ -1,61 +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 _SD_PRINTDIALOG_HXX_
#define _SD_PRINTDIALOG_HXX_
#include <vcl/image.hxx>
#include <svtools/printdlg.hxx>
#include <boost/shared_ptr.hpp>
#include <vector>
class SdOptionsPrintItem;
class SdPrintDialog : public PrintDialog
{
public:
static SdPrintDialog* Create( Window* pWindow, bool bImpress );
virtual ~SdPrintDialog();
void Init( const SdOptionsPrintItem* pPrintOpts );
bool Fill( SdOptionsPrintItem* pPrintOpts );
private:
SdPrintDialog( Window* pWindow, bool bImpress );
void UpdateStates();
void LoadPreviewImages();
DECL_LINK( UpdateStatesHdl, void* );
std::vector< boost::shared_ptr< Control > > mpControls;
std::vector< boost::shared_ptr< Image > > mpPreviews;
std::vector< boost::shared_ptr< Image > > mpPreviewsHC;
bool mbImpress;
};
#endif // _SD_PRINTDIALOG_HXX_

View file

@ -1,36 +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.
*
************************************************************************/
#define DLG_PRINT_WARNINGS 828
#define FI_INFO 1
#define RBT_SCALE 1
#define RBT_POSTER 2
#define RBT_CUT 3
#define GRP_OPTIONS 1
#define BTN_OK 1
#define BTN_CANCEL 1
#define BTN_HELP 1

View file

@ -1,70 +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 _SD_PRINTDLG_HXX_
#define _SD_PRINTDLG_HXX_
#include <vcl/group.hxx>
#include <vcl/dialog.hxx>
#ifndef _SV_BUTTON_HXX //autogen
#include <vcl/button.hxx>
#endif
#include <svtools/stdctrl.hxx>
/*************************************************************************
|*
|* SdPrintDlg::SdPrintDlg()
|*
|* Beschreibung Dialog zum Einstellen von Printoptionen
|*
*************************************************************************/
class SdPrintDlg : public ModalDialog
{
private:
FixedInfo aFtInfo;
RadioButton aRbtScale;
RadioButton aRbtPoster;
RadioButton aRbtCut;
FixedLine aGrpOptions;
OKButton aBtnOK;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
public:
SdPrintDlg( Window* pWindow );
USHORT GetAttr();
};
#endif // _SD_PRINTDLG_HXX_

View file

@ -219,6 +219,21 @@ public:
*/
void AddSdrObject (SdrObject& rObject);
/** Add a listener that is called when the set of visible slides.
@param rListener
When this method is called multiple times for the same listener
the second and all following calls are ignored. Each listener
is added only once.
*/
void AddVisibilityChangeListener (const Link& rListener);
/** Remove a listener that is called when the set of visible slides changes.
@param rListener
It is save to pass a listener that was not added or has been
removed previously. Such calls are ignored.
*/
void RemoveVisibilityChangeListener (const Link& rListener);
protected:
virtual void Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint);
@ -253,6 +268,8 @@ private:
Orientation meOrientation;
::std::vector<Link> maVisibilityChangeListeners;
/** Adapt the coordinates of the given bounding box according to the
other parameters.
@param rModelPageObjectBoundingBox

View file

@ -70,10 +70,9 @@
#include <svx/sdr/contact/objectcontact.hxx>
#include <svx/sdrpagewindow.hxx>
#include <svl/itempool.hxx>
#ifndef _SFXITEMPOOL_HXX
#include <svl/itempool.hxx>
#endif
#include <boost/foreach.hpp>
using namespace std;
using namespace ::sd::slidesorter::model;
@ -420,12 +419,28 @@ void SlideSorterView::DeterminePageObjectVisibilities (void)
pContact = pDescriptor->GetViewObjectContact();
if (pDescriptor.get() != NULL)
pDescriptor->SetVisible (bIsVisible);
pDescriptor->SetVisible(bIsVisible);
}
}
mnFirstVisiblePageIndex = nFirstIndex;
mnLastVisiblePageIndex = nLastIndex;
if (mnFirstVisiblePageIndex != nFirstIndex
|| mnLastVisiblePageIndex != nLastIndex)
{
mnFirstVisiblePageIndex = nFirstIndex;
mnLastVisiblePageIndex = nLastIndex;
// Tell the listeners that the visibility of some objects has changed.
::std::vector<Link> aChangeListeners (maVisibilityChangeListeners);
for (::std::vector<Link>::const_iterator
iListener=aChangeListeners.begin(),
iEnd=aChangeListeners.end();
iListener!=iEnd;
++iListener)
{
iListener->Call(NULL);
}
}
}
}
@ -773,4 +788,34 @@ void SlideSorterView::AddSdrObject (SdrObject& rObject)
rObject.SetModel(&maPageModel);
}
void SlideSorterView::AddVisibilityChangeListener (const Link& rListener)
{
if (::std::find (
maVisibilityChangeListeners.begin(),
maVisibilityChangeListeners.end(),
rListener) == maVisibilityChangeListeners.end())
{
maVisibilityChangeListeners.push_back(rListener);
}
}
void SlideSorterView::RemoveVisibilityChangeListener(const Link&rListener)
{
maVisibilityChangeListeners.erase (
::std::find (
maVisibilityChangeListeners.begin(),
maVisibilityChangeListeners.end(),
rListener));
}
} } } // end of namespace ::sd::slidesorter::view

0
sd/source/ui/unoidl/UnoDocumentSettings.cxx Normal file → Executable file
View file

2
sd/source/ui/unoidl/sddetect.cxx Normal file → Executable file
View file

@ -167,7 +167,7 @@ SdFilterDetect::~SdFilterDetect()
}
else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) )
lDescriptor[nProperty].Value >>= xInteraction;
else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RapairPackage")) )
else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")) )
lDescriptor[nProperty].Value >>= bRepairPackage;
else if( lDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")) )
nIndexOfDocumentTitle = nProperty;

8
sd/source/ui/view/DocumentRenderer.cxx Normal file → Executable file
View file

@ -122,7 +122,7 @@ namespace {
sal_Int32 GetHandoutPageCount (void) const
{
sal_uInt32 nIndex = static_cast<sal_Int32>(mrProperties.getIntValue("SlidesPerPage", sal_Int32(4)));
sal_uInt32 nIndex = static_cast<sal_Int32>(mrProperties.getIntValue("SlidesPerPage", sal_Int32(0)));
if (nIndex<maSlidesPerPage.size())
return maSlidesPerPage[nIndex];
else if ( ! maSlidesPerPage.empty())
@ -464,7 +464,7 @@ namespace {
CreateChoice(_STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES_HELP),
OUString( RTL_CONSTASCII_USTRINGPARAM( "SlidesPerPage" ) ),
GetSlidesPerPageSequence(),
4,
0,
OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
aContentOpt
)
@ -672,7 +672,8 @@ namespace {
const Sequence<rtl::OUString> aChoice (
CreateChoice(_STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES));
maSlidesPerPage.clear();
for (sal_Int32 nIndex=0,nCount=aChoice.getLength(); nIndex<nCount; ++nIndex)
maSlidesPerPage.push_back(0); // first is using the default
for (sal_Int32 nIndex=1,nCount=aChoice.getLength(); nIndex<nCount; ++nIndex)
maSlidesPerPage.push_back(aChoice[nIndex].toInt32());
return aChoice;
}
@ -1528,6 +1529,7 @@ private:
AutoLayout eLayout = AUTOLAYOUT_HANDOUT6;
switch (nSlidesPerHandout)
{
case 0: eLayout = AUTOLAYOUT_NONE; break; // AUTOLAYOUT_HANDOUT1; break;
case 1: eLayout = AUTOLAYOUT_HANDOUT1; break;
case 2: eLayout = AUTOLAYOUT_HANDOUT2; break;
case 3: eLayout = AUTOLAYOUT_HANDOUT3; break;

1
sd/source/ui/view/DocumentRenderer.src Normal file → Executable file
View file

@ -72,6 +72,7 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS
{
ItemList [ en-US ] =
{
< "Default" ; > ;
< "1" ; > ;
< "2" ; > ;
< "3" ; > ;

View file

@ -230,7 +230,7 @@ SHL4OBJS += $(SLO)$/pchname.obj \
.ENDIF # "$(GUI)$(COM)" == "WNTMSC"
# $(ISDLIB) is build in SHL1TARGET
.IF "$(GUI)" == "UNX"
.IF "$(GUI)"=="UNX" || ("$(COM)"=="GCC" && "$(GUI)"=="WNT")
SHL4DEPN=$(SHL1TARGETN)
SHL5DEPN=$(SHL1TARGETN)
.ELSE