summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-07-01 17:30:37 +0200
committerThomas Lange [tl] <tl@openoffice.org>2010-07-01 17:30:37 +0200
commit90aab534621364e284623d3af98fe68fe506442c (patch)
treeef54a379f53f4005ce589a09ef931af362fa4fc1 /sd
parente639921d24254e2496849d7393edcda81589a096 (diff)
parent4adb61dc6bb380ff31e145e6a77c92c0b26b42bd (diff)
cws tl81: merge with DEV300_m84
Diffstat (limited to 'sd')
-rwxr-xr-x[-rw-r--r--]sd/inc/sdabstdlg.hxx7
-rwxr-xr-xsd/source/core/sdpage.cxx239
-rwxr-xr-x[-rw-r--r--]sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/accessibility/AccessibleSlideSorterView.cxx82
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx2
-rwxr-xr-xsd/source/ui/dlg/makefile.mk12
-rw-r--r--sd/source/ui/dlg/printdialog.cxx342
-rw-r--r--sd/source/ui/dlg/printdialog.hrc38
-rw-r--r--sd/source/ui/dlg/printdialog.src130
-rw-r--r--sd/source/ui/dlg/printdlg.cxx88
-rw-r--r--sd/source/ui/dlg/printdlg.src130
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/sddlgfact.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/sddlgfact.hxx9
-rw-r--r--sd/source/ui/inc/printdialog.hxx61
-rw-r--r--sd/source/ui/inc/printdlg.hrc36
-rw-r--r--sd/source/ui/inc/printdlg.hxx70
-rwxr-xr-xsd/source/ui/inc/view/viewoverlaymanager.hxx5
-rwxr-xr-xsd/source/ui/slidesorter/inc/view/SlideSorterView.hxx17
-rwxr-xr-xsd/source/ui/slidesorter/view/SlideSorterView.cxx57
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/UnoDocumentSettings.cxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/sddetect.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/DocumentRenderer.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/DocumentRenderer.src1
-rwxr-xr-xsd/source/ui/view/viewoverlaymanager.cxx60
-rwxr-xr-xsd/util/makefile.mk2
25 files changed, 299 insertions, 1135 deletions
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index e9ae8df1a192..f265314fa6e9 100644..100755
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -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;
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 248a844a768d..76450cf76760 100755
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -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;
+ if( eLayout == AUTOLAYOUT_NONE )
+ {
+ // use layout from handout master
+ SdrObjListIter aShapeIter (rHandoutMaster);
+ while (aShapeIter.IsMore())
+ {
+ SdrPageObj* pPageObj = dynamic_cast<SdrPageObj*>(aShapeIter.Next());
+ if (pPageObj)
+ rAreas.push_back( pPageObj->GetCurrentBoundRect() );
+ }
+ }
+ else
+ {
+ Size aArea = rHandoutMaster.GetSize();
- long nLeftBorder = rHandoutMaster.GetLftBorder();
- long nRightBorder = rHandoutMaster.GetRgtBorder();
- long nTopBorder = rHandoutMaster.GetUppBorder();
- long nBottomBorder = rHandoutMaster.GetLwrBorder();
+ const long nGapW = 1000; // gap is 1cm
+ const long nGapH = 1000;
- const long nHeaderFooterHeight = static_cast< long >( (aArea.Height() - nTopBorder - nLeftBorder) * 0.05 );
+ long nLeftBorder = rHandoutMaster.GetLftBorder();
+ long nRightBorder = rHandoutMaster.GetRgtBorder();
+ long nTopBorder = rHandoutMaster.GetUppBorder();
+ long nBottomBorder = rHandoutMaster.GetLwrBorder();
- nTopBorder += nHeaderFooterHeight;
- nBottomBorder += nHeaderFooterHeight;
+ const long nHeaderFooterHeight = static_cast< long >( (aArea.Height() - nTopBorder - nLeftBorder) * 0.05 );
- long nX = nGapW + nLeftBorder;
- long nY = nGapH + nTopBorder;
+ nTopBorder += nHeaderFooterHeight;
+ nBottomBorder += nHeaderFooterHeight;
- aArea.Width() -= nGapW * 2 + nLeftBorder + nRightBorder;
- aArea.Height() -= nGapH * 2 + nTopBorder + nBottomBorder;
+ long nX = nGapW + nLeftBorder;
+ long nY = nGapH + nTopBorder;
- const bool bLandscape = aArea.Width() > aArea.Height();
+ aArea.Width() -= nGapW * 2 + nLeftBorder + nRightBorder;
+ aArea.Height() -= nGapH * 2 + nTopBorder + nBottomBorder;
- static sal_uInt16 aOffsets[5][9] =
- {
- { 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
- };
+ const bool bLandscape = aArea.Width() > aArea.Height();
- sal_uInt16* pOffsets = aOffsets[0];
- USHORT nColCnt = 0, nRowCnt = 0;
- switch ( eLayout )
- {
- case AUTOLAYOUT_HANDOUT1:
- nColCnt = 1; nRowCnt = 1;
- break;
+ static sal_uInt16 aOffsets[5][9] =
+ {
+ { 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
+ };
- case AUTOLAYOUT_HANDOUT2:
- if( bLandscape )
- {
- nColCnt = 2; nRowCnt = 1;
- }
- else
- {
- nColCnt = 1; nRowCnt = 2;
- }
- break;
+ sal_uInt16* pOffsets = aOffsets[0];
+ USHORT nColCnt = 0, nRowCnt = 0;
+ switch ( eLayout )
+ {
+ case AUTOLAYOUT_HANDOUT1:
+ nColCnt = 1; nRowCnt = 1;
+ break;
- case AUTOLAYOUT_HANDOUT3:
- if( bLandscape )
- {
- nColCnt = 3; nRowCnt = 2;
- }
- else
- {
- nColCnt = 2; nRowCnt = 3;
- }
- pOffsets = aOffsets[ bLandscape ? 1 : 0 ];
- break;
+ case AUTOLAYOUT_HANDOUT2:
+ if( bLandscape )
+ {
+ nColCnt = 2; nRowCnt = 1;
+ }
+ else
+ {
+ nColCnt = 1; nRowCnt = 2;
+ }
+ break;
- case AUTOLAYOUT_HANDOUT4:
- nColCnt = 2; nRowCnt = 2;
- pOffsets = aOffsets[ bHorizontal ? 0 : 2 ];
- break;
+ case AUTOLAYOUT_HANDOUT3:
+ if( bLandscape )
+ {
+ nColCnt = 3; nRowCnt = 2;
+ }
+ else
+ {
+ nColCnt = 2; nRowCnt = 3;
+ }
+ pOffsets = aOffsets[ bLandscape ? 1 : 0 ];
+ break;
- case AUTOLAYOUT_HANDOUT6:
- if( bLandscape )
- {
- nColCnt = 3; nRowCnt = 2;
- }
- else
- {
- nColCnt = 2; nRowCnt = 3;
- }
- if( !bHorizontal )
- pOffsets = aOffsets[ bLandscape ? 1 : 3 ];
- break;
+ case AUTOLAYOUT_HANDOUT4:
+ nColCnt = 2; nRowCnt = 2;
+ pOffsets = aOffsets[ bHorizontal ? 0 : 2 ];
+ break;
- default:
- case AUTOLAYOUT_HANDOUT9:
- nColCnt = 3; nRowCnt = 3;
+ case AUTOLAYOUT_HANDOUT6:
+ if( bLandscape )
+ {
+ nColCnt = 3; nRowCnt = 2;
+ }
+ else
+ {
+ nColCnt = 2; nRowCnt = 3;
+ }
+ if( !bHorizontal )
+ pOffsets = aOffsets[ bLandscape ? 1 : 3 ];
+ break;
- if( !bHorizontal )
- pOffsets = aOffsets[4];
- break;
- }
+ default:
+ case AUTOLAYOUT_HANDOUT9:
+ nColCnt = 3; nRowCnt = 3;
- rAreas.resize( nColCnt * nRowCnt );
+ if( !bHorizontal )
+ pOffsets = aOffsets[4];
+ break;
+ }
- Size aPartArea, aSize;
- aPartArea.Width() = ((aArea.Width() - ((nColCnt-1) * nGapW) ) / nColCnt);
- aPartArea.Height() = ((aArea.Height() - ((nRowCnt-1) * nGapH) ) / nRowCnt);
+ rAreas.resize( nColCnt * nRowCnt );
- SdrPage* pFirstPage = rModel.GetMasterSdPage(0, PK_STANDARD);
- if ( pFirstPage )
- {
- // scale actual size into handout rect
- double fScale = (double)aPartArea.Width() / (double)pFirstPage->GetWdt();
+ Size aPartArea, aSize;
+ aPartArea.Width() = ((aArea.Width() - ((nColCnt-1) * nGapW) ) / nColCnt);
+ aPartArea.Height() = ((aArea.Height() - ((nRowCnt-1) * nGapH) ) / nRowCnt);
- aSize.Height() = (long)(fScale * pFirstPage->GetHgt() );
- if( aSize.Height() > aPartArea.Height() )
+ SdrPage* pFirstPage = rModel.GetMasterSdPage(0, PK_STANDARD);
+ if ( pFirstPage )
{
- fScale = (double)aPartArea.Height() / (double)pFirstPage->GetHgt();
- aSize.Height() = aPartArea.Height();
- aSize.Width() = (long)(fScale * pFirstPage->GetWdt());
+ // 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.Width() = aPartArea.Width();
+ aSize = aPartArea;
}
- nX += (aPartArea.Width() - aSize.Width()) / 2;
- nY += (aPartArea.Height()- aSize.Height())/ 2;
- }
- else
- {
- aSize = aPartArea;
- }
+ Point aPos( nX, nY );
- Point aPos( nX, nY );
+ const bool bRTL = rModel.GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB;
- 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;
- 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++)
+ for(sal_uInt16 nRow = 0; nRow < nRowCnt; nRow++)
{
- rAreas[*pOffsets++] = Rectangle(aPos, aSize);
- aPos.X() += nOffsetX;
- }
+ aPos.X() = nStartX;
+ for(sal_uInt16 nCol = 0; nCol < nColCnt; nCol++)
+ {
+ rAreas[*pOffsets++] = Rectangle(aPos, aSize);
+ aPos.X() += nOffsetX;
+ }
- aPos.Y() += nOffsetY;
+ aPos.Y() += nOffsetY;
+ }
}
}
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
index 1f5e99d69f58..ae1f6f633edc 100644..100755
--- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
@@ -255,25 +255,21 @@ Reference<XAccessibleStateSet> SAL_CALL
if (mxParent.is())
{
- // SELECTABLE
+ // Unconditional states.
pStateSet->AddState(AccessibleStateType::SELECTABLE);
+ pStateSet->AddState(AccessibleStateType::FOCUSABLE);
+ pStateSet->AddState(AccessibleStateType::ENABLED);
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+ pStateSet->AddState(AccessibleStateType::SHOWING);
+ pStateSet->AddState(AccessibleStateType::ACTIVE);
+ pStateSet->AddState(AccessibleStateType::SENSITIVE);
- // SELECTED
+ // Conditional states.
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);
}
return pStateSet;
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index 10596bd5f793..6f3508d731a8 100644..100755
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -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
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 489f6e489386..1a9201af6555 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -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 )
diff --git a/sd/source/ui/dlg/makefile.mk b/sd/source/ui/dlg/makefile.mk
index de3cff7b903d..ef763dc87f5f 100755
--- a/sd/source/ui/dlg/makefile.mk
+++ b/sd/source/ui/dlg/makefile.mk
@@ -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 \
diff --git a/sd/source/ui/dlg/printdialog.cxx b/sd/source/ui/dlg/printdialog.cxx
deleted file mode 100644
index 3e02a18c2af7..000000000000
--- a/sd/source/ui/dlg/printdialog.cxx
+++ /dev/null
@@ -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++ ) ) ) );
- }
-}
-
diff --git a/sd/source/ui/dlg/printdialog.hrc b/sd/source/ui/dlg/printdialog.hrc
deleted file mode 100644
index 702dc3898b18..000000000000
--- a/sd/source/ui/dlg/printdialog.hrc
+++ /dev/null
@@ -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
diff --git a/sd/source/ui/dlg/printdialog.src b/sd/source/ui/dlg/printdialog.src
deleted file mode 100644
index be014c588b55..000000000000
--- a/sd/source/ui/dlg/printdialog.src
+++ /dev/null
@@ -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 ) ;
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sd/source/ui/dlg/printdlg.cxx b/sd/source/ui/dlg/printdlg.cxx
deleted file mode 100644
index cc20e0f67a84..000000000000
--- a/sd/source/ui/dlg/printdlg.cxx
+++ /dev/null
@@ -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 );
-}
-
-
-
-
diff --git a/sd/source/ui/dlg/printdlg.src b/sd/source/ui/dlg/printdlg.src
deleted file mode 100644
index 45121e72f3ff..000000000000
--- a/sd/source/ui/dlg/printdlg.src
+++ /dev/null
@@ -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" ;
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 468b55f56c8a..aa0bb5ce9f27 100644..100755
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -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 )
{
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 44f5b0813a04..fa5e53ebac54 100644..100755
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -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 );
diff --git a/sd/source/ui/inc/printdialog.hxx b/sd/source/ui/inc/printdialog.hxx
deleted file mode 100644
index de9791e22660..000000000000
--- a/sd/source/ui/inc/printdialog.hxx
+++ /dev/null
@@ -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_
-
diff --git a/sd/source/ui/inc/printdlg.hrc b/sd/source/ui/inc/printdlg.hrc
deleted file mode 100644
index 196724143b22..000000000000
--- a/sd/source/ui/inc/printdlg.hrc
+++ /dev/null
@@ -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
-
diff --git a/sd/source/ui/inc/printdlg.hxx b/sd/source/ui/inc/printdlg.hxx
deleted file mode 100644
index 2795bccc2160..000000000000
--- a/sd/source/ui/inc/printdlg.hxx
+++ /dev/null
@@ -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_
-
diff --git a/sd/source/ui/inc/view/viewoverlaymanager.hxx b/sd/source/ui/inc/view/viewoverlaymanager.hxx
index 0693d1faea7a..9b56267ff327 100755
--- a/sd/source/ui/inc/view/viewoverlaymanager.hxx
+++ b/sd/source/ui/inc/view/viewoverlaymanager.hxx
@@ -59,12 +59,7 @@ public:
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
- static BitmapEx maLargeButtonImages[BMP_PLACEHOLDER_LARGE_END - BMP_PLACEHOLDER_LARGE_START];
- static BitmapEx maSmallButtonImages[BMP_PLACEHOLDER_SMALL_END - BMP_PLACEHOLDER_SMALL_START];
-
private:
- void UpdateImages();
-
ViewShellBase& mrBase;
ULONG mnUpdateTagsEvent;
diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
index 6c16a154ecfd..2ef520b1df89 100755
--- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
@@ -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
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 47ce907be637..d2c2310329a6 100755
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -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
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index ed47e57b2130..ed47e57b2130 100644..100755
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx
index 90767a332609..9f268dec0cfa 100644..100755
--- a/sd/source/ui/unoidl/sddetect.cxx
+++ b/sd/source/ui/unoidl/sddetect.cxx
@@ -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;
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index a23d8b2ad908..0689dc0e3851 100644..100755
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -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;
diff --git a/sd/source/ui/view/DocumentRenderer.src b/sd/source/ui/view/DocumentRenderer.src
index 6419cb5c4e90..abd82ea0d397 100644..100755
--- a/sd/source/ui/view/DocumentRenderer.src
+++ b/sd/source/ui/view/DocumentRenderer.src
@@ -72,6 +72,7 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS
{
ItemList [ en-US ] =
{
+ < "Default" ; > ;
< "1" ; > ;
< "2" ; > ;
< "3" ; > ;
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index ab165eea600b..447f50ec2222 100755
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -45,6 +45,7 @@
#include <vcl/help.hxx>
#include <vcl/imagerepository.hxx>
+#include <vcl/lazydelete.hxx>
#include <svx/sdrpagewindow.hxx>
#include <svx/sdrpaintwindow.hxx>
@@ -79,9 +80,6 @@ class ImageButtonHdl;
// --------------------------------------------------------------------
-BitmapEx ViewOverlayManager::maSmallButtonImages[BMP_PLACEHOLDER_SMALL_END - BMP_PLACEHOLDER_SMALL_START];
-BitmapEx ViewOverlayManager::maLargeButtonImages[BMP_PLACEHOLDER_LARGE_END - BMP_PLACEHOLDER_LARGE_START];
-
static USHORT gButtonSlots[] = { SID_INSERT_TABLE, SID_INSERT_DIAGRAM, SID_INSERT_GRAPHIC, SID_INSERT_AVMEDIA };
static USHORT gButtonToolTips[] = { STR_INSERT_TABLE, STR_INSERT_CHART, STR_INSERT_PICTURE, STR_INSERT_MOVIE };
@@ -97,6 +95,32 @@ static BitmapEx loadImageResource( USHORT nId )
// --------------------------------------------------------------------
+static BitmapEx* getButtonImage( int index, bool large )
+{
+ static vcl::DeleteOnDeinit< BitmapEx > gSmallButtonImages[BMP_PLACEHOLDER_SMALL_END - BMP_PLACEHOLDER_SMALL_START] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ static vcl::DeleteOnDeinit< BitmapEx > gLargeButtonImages[BMP_PLACEHOLDER_LARGE_END - BMP_PLACEHOLDER_LARGE_START] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ if( !gSmallButtonImages[0].get() )
+ {
+ for( sal_uInt16 i = 0; i < (BMP_PLACEHOLDER_SMALL_END-BMP_PLACEHOLDER_SMALL_START); i++ )
+ {
+ gSmallButtonImages[i].set( new BitmapEx( loadImageResource( BMP_PLACEHOLDER_SMALL_START + i ) ) );
+ gLargeButtonImages[i].set( new BitmapEx( loadImageResource( BMP_PLACEHOLDER_LARGE_START + i ) ) );
+ }
+ }
+
+ if( large )
+ {
+ return gLargeButtonImages[index].get();
+ }
+ else
+ {
+ return gSmallButtonImages[index].get();
+ }
+}
+
+// --------------------------------------------------------------------
+
const sal_uInt32 SMART_TAG_HDL_NUM = SAL_MAX_UINT32;
class ChangePlaceholderTag : public SmartTag
@@ -374,20 +398,20 @@ BitmapEx ChangePlaceholderTag::createOverlayImage( int nHighlight )
Size aShapeSizePix = pDev->LogicToPixel(rSnapRect.GetSize());
long nShapeSizePix = std::min(aShapeSizePix.Width(),aShapeSizePix.Height());
- BitmapEx* pImages = (nShapeSizePix > 250) ? &ViewOverlayManager::maLargeButtonImages[0] : &ViewOverlayManager::maSmallButtonImages[0];
+ bool bLarge = nShapeSizePix > 250;
- Size aSize( pImages->GetSizePixel() );
+ Size aSize( getButtonImage( 0, bLarge )->GetSizePixel() );
aRet.SetSizePixel( Size( aSize.Width() << 1, aSize.Height() << 1 ) );
const Rectangle aRectSrc( Point( 0, 0 ), aSize );
- aRet = pImages[(nHighlight == 0) ? 4 : 0];
+ aRet = *(getButtonImage((nHighlight == 0) ? 4 : 0, bLarge));
aRet.Expand( aSize.Width(), aSize.Height(), NULL, TRUE );
- aRet.CopyPixel( Rectangle( Point( aSize.Width(), 0 ), aSize ), aRectSrc, &pImages[(nHighlight == 1) ? 5 : 1] );
- aRet.CopyPixel( Rectangle( Point( 0, aSize.Height() ), aSize ), aRectSrc, &pImages[(nHighlight == 2) ? 6 : 2] );
- aRet.CopyPixel( Rectangle( Point( aSize.Width(), aSize.Height() ), aSize ), aRectSrc, &pImages[(nHighlight == 3) ? 7 : 3] );
+ aRet.CopyPixel( Rectangle( Point( aSize.Width(), 0 ), aSize ), aRectSrc, getButtonImage((nHighlight == 1) ? 5 : 1, bLarge) );
+ aRet.CopyPixel( Rectangle( Point( 0, aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 2) ? 6 : 2, bLarge) );
+ aRet.CopyPixel( Rectangle( Point( aSize.Width(), aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 3) ? 7 : 3, bLarge) );
}
return aRet;
@@ -411,9 +435,9 @@ void ChangePlaceholderTag::addCustomHandles( SdrHdlList& rHandlerList )
if( 50 > nShapeSizePix )
return;
- BitmapEx* pImages = (nShapeSizePix > 250) ? &ViewOverlayManager::maLargeButtonImages[0] : &ViewOverlayManager::maSmallButtonImages[0];
+ bool bLarge = nShapeSizePix > 250;
- Size aButtonSize( pDev->PixelToLogic(pImages[0].GetSizePixel()) );
+ Size aButtonSize( pDev->PixelToLogic( getButtonImage(0, bLarge )->GetSizePixel()) );
const int nColumns = 2;
const int nRows = 2;
@@ -490,17 +514,6 @@ ViewOverlayManager::~ViewOverlayManager()
// --------------------------------------------------------------------
-void ViewOverlayManager::UpdateImages()
-{
- for( sal_uInt16 i = 0; i < (BMP_PLACEHOLDER_SMALL_END-BMP_PLACEHOLDER_SMALL_START); i++ )
- {
- maSmallButtonImages[i] = loadImageResource( BMP_PLACEHOLDER_SMALL_START + i );
- maLargeButtonImages[i] = loadImageResource( BMP_PLACEHOLDER_LARGE_START + i );
- }
-}
-
-// --------------------------------------------------------------------
-
void ViewOverlayManager::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
@@ -548,9 +561,6 @@ bool ViewOverlayManager::CreateTags()
if( pPage )
{
- if( !maSmallButtonImages[0] )
- UpdateImages();
-
const std::list< SdrObject* >& rShapes = pPage->GetPresentationShapeList().getList();
for( std::list< SdrObject* >::const_iterator iter( rShapes.begin() ); iter != rShapes.end(); iter++ )
diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk
index 8f56a0d47f7f..088057e90ce0 100755
--- a/sd/util/makefile.mk
+++ b/sd/util/makefile.mk
@@ -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