summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]sd/inc/sdabstdlg.hxx7
-rwxr-xr-xsd/source/core/sdpage.cxx251
-rwxr-xr-x[-rw-r--r--]sd/source/filter/html/pubdlg.cxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx2
-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/PaneChildWindows.cxx34
-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
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fupage.cxx10
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/futext.cxx13
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fupage.hxx3
-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/controller/SlsSlotManager.cxx11
-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-xsd/source/ui/unoidl/unopage.cxx16
-rwxr-xr-xsd/source/ui/unoidl/unopage.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/DocumentRenderer.cxx45
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/DocumentRenderer.src1
-rwxr-xr-xsd/source/ui/view/Outliner.cxx4
-rwxr-xr-xsd/source/ui/view/drtxtob.cxx30
-rwxr-xr-xsd/source/ui/view/drviews1.cxx1
-rwxr-xr-xsd/source/ui/view/drviews7.cxx2
-rwxr-xr-xsd/source/ui/view/viewoverlaymanager.cxx62
-rw-r--r--[-rwxr-xr-x]sd/uiconfig/sdraw/menubar/menubar.xml2
-rwxr-xr-xsd/util/makefile.mk2
-rw-r--r--slideshow/source/engine/shapes/shapeimporter.cxx3
-rw-r--r--slideshow/source/engine/slide/layer.cxx4
41 files changed, 454 insertions, 1168 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..82a841a199c8 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;
@@ -2104,7 +2105,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
}
}
-SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj, PresObjKind eObjKind, bool bVertical, Rectangle aRect )
+SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj, PresObjKind& eObjKind, bool bVertical, Rectangle aRect )
{
SdDrawDocument* pModel = static_cast< SdDrawDocument* >( rPage.GetModel() );
DBG_ASSERT( pModel, "sd::convertPresentationObjectImpl(), no model on page!" );
@@ -2219,6 +2220,16 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
SdrObject::Free( pSourceObj );
}
}
+ else if((eObjKind == PRESOBJ_OUTLINE) && (pSourceObj->GetObjIdentifier() != OBJ_OUTLINETEXT) )
+ {
+ switch( pSourceObj->GetObjIdentifier() )
+ {
+ case OBJ_TABLE: eObjKind = PRESOBJ_TABLE; break;
+ case OBJ_MEDIA: eObjKind = PRESOBJ_MEDIA; break;
+ case OBJ_GRAF: eObjKind = PRESOBJ_GRAPHIC; break;
+ case OBJ_OLE2: eObjKind = PRESOBJ_OBJECT; break;
+ }
+ }
return pNewObj;
}
@@ -2939,146 +2950,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/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 55e141f8d4cb..8079238bc1dc 100644..100755
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -51,6 +51,7 @@
#include <svl/eitem.hxx>
#include <svtools/colrdlg.hxx>
#include <editeng/colritem.hxx>
+#include <tools/urlobj.hxx>
#include <tools/list.hxx>
#include <sdiocmpt.hxx>
#include <sfx2/docfile.hxx>
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index 6862634df9a0..97ec7b3ddee1 100644..100755
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -48,7 +48,7 @@ namespace accessibility
mrWindow( rViewWindow ),
mpOutliner( &rOutliner ),
mpOutlinerView( &rOutlView ),
- mTextForwarder( rOutliner, NULL ),
+ mTextForwarder( rOutliner, 0 ),
mViewForwarder( rOutlView )
{
// register as listener - need to broadcast state change messages
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/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx
index 6a6d515822f8..181fc8433c22 100755
--- a/sd/source/ui/dlg/PaneChildWindows.cxx
+++ b/sd/source/ui/dlg/PaneChildWindows.cxx
@@ -45,6 +45,9 @@
namespace sd {
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::drawing::framework::XResourceId;
+
SFX_IMPL_DOCKINGWINDOW(LeftPaneImpressChildWindow, SID_LEFT_PANE_IMPRESS)
SFX_IMPL_DOCKINGWINDOW(LeftPaneDrawChildWindow, SID_LEFT_PANE_DRAW)
SFX_IMPL_DOCKINGWINDOW( ToolPanelChildWindow, SID_TASKPANE)
@@ -151,6 +154,25 @@ ToolPanelChildWindow::ToolPanelChildWindow( ::Window* i_pParentWindow, USHORT i_
}
//----------------------------------------------------------------------------------------------------------------------
+struct DelayedToolPanelActivation
+{
+ DelayedToolPanelActivation( ToolPanelChildWindow& i_rToolPanelWindow, const ::rtl::OUString& i_rPanelURL )
+ :m_rToolPanelWindow( i_rToolPanelWindow )
+ ,m_sPanelURL( i_rPanelURL )
+ {
+ }
+
+ void operator() (bool)
+ {
+ m_rToolPanelWindow.ActivateToolPanel( m_sPanelURL );
+ }
+
+private:
+ ToolPanelChildWindow& m_rToolPanelWindow;
+ const ::rtl::OUString m_sPanelURL;
+};
+
+//----------------------------------------------------------------------------------------------------------------------
void ToolPanelChildWindow::ActivateToolPanel( const ::rtl::OUString& i_rPanelURL )
{
SfxDockingWindow* pDockingWindow = dynamic_cast< SfxDockingWindow* >( GetWindow() );
@@ -170,8 +192,16 @@ void ToolPanelChildWindow::ActivateToolPanel( const ::rtl::OUString& i_rPanelURL
// extensions, too. As long as this is not the case, we need to take the direct way ...
::boost::shared_ptr< ViewShell > pViewShell = pFrameworkHelper->GetViewShell( framework::FrameworkHelper::msRightPaneURL );
toolpanel::ToolPanelViewShell* pToolPanelViewShell = dynamic_cast< toolpanel::ToolPanelViewShell* >( pViewShell.get() );
- ENSURE_OR_RETURN_VOID( pToolPanelViewShell != NULL, "ToolPanelChildWindow::ActivateToolPanel: no tool panel view shell access!" );
- pToolPanelViewShell->ActivatePanel( i_rPanelURL );
+ if ( pToolPanelViewShell )
+ {
+ pToolPanelViewShell->ActivatePanel( i_rPanelURL );
+ }
+ else
+ {
+ Reference< XResourceId > xTaskPaneResource = pFrameworkHelper->RequestView(
+ framework::FrameworkHelper::msTaskPaneURL, framework::FrameworkHelper::msRightPaneURL );
+ pFrameworkHelper->RunOnResourceActivation( xTaskPaneResource, DelayedToolPanelActivation( *this, i_rPanelURL ) );
+ }
}
}
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/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 9fb0007cc72c..3dea67412fac 100644..100755
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -449,6 +449,16 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
}
+ // if background filling is set to master pages then clear from page set
+ if( mbMasterPage || bSetToAllPages )
+ {
+ for( USHORT nWhich = XATTR_FILL_FIRST; nWhich <= XATTR_FILL_LAST; nWhich++ )
+ {
+ pTempSet->ClearItem( nWhich );
+ }
+ pTempSet->Put(XFillStyleItem(XFILL_NONE));
+ }
+
const SfxPoolItem *pItem;
if( SFX_ITEM_SET == pTempSet->GetItemState( EE_PARA_WRITINGDIR, sal_False, &pItem ) )
{
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 2fd808dcda3e..2f3111665692 100644..100755
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -400,10 +400,17 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
// do the EndTextEdit first, it will delete the handles and force a
// recreation. This will make aVEvt.pHdl to point to a deleted handle,
// thus it is necessary to reset it and to get it again.
- ::Outliner* pOutl = mpView->GetTextEditOutliner();
- if (mxTextObj.is() && (mxTextObj->GetOutlinerParaObject() ||
- (pOutl && pOutl->GetText(pOutl->GetParagraph( 0 )).Len() != 0)))
+ // #i112855#
+ // cl: I'm not sure why we checked here also for mxTextObj->GetOutlinerParaObjet
+ // this caused SdrEndTextEdit() to be called also when not in text editing and
+ // this does not make sense and caused troubles. (see issue 112855)
+
+// ::Outliner* pOutl = mpView->GetTextEditOutliner();
+//
+// if (mxTextObj.is() && (mxTextObj->GetOutlinerParaObject() ||
+// (pOutl && pOutl->GetText(pOutl->GetParagraph( 0 )).Len() != 0)))
+ if( mpView->IsTextEdit() )
{
mpView->SdrEndTextEdit();
diff --git a/sd/source/ui/inc/fupage.hxx b/sd/source/ui/inc/fupage.hxx
index 6752e0421806..a0cd7b4d2e0a 100644..100755
--- a/sd/source/ui/inc/fupage.hxx
+++ b/sd/source/ui/inc/fupage.hxx
@@ -50,7 +50,6 @@ class FuPage
virtual void Deactivate(); // Function deaktivieren
const SfxItemSet* ExecuteDialog( Window* pParent );
- void ApplyItemSet( const SfxItemSet* pArgs );
protected:
virtual ~FuPage (void);
@@ -63,6 +62,8 @@ private:
SdDrawDocument* pDoc,
SfxRequest& rReq );
+ void ApplyItemSet( const SfxItemSet* pArgs );
+
SfxRequest& mrReq;
const SfxItemSet* mpArgs;
SdBackgroundObjUndoAction* mpBackgroundObjUndoAction;
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/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 6c1123abc031..e571a765bdad 100755
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -614,6 +614,17 @@ void SlotManager::GetMenuState ( SfxItemSet& rSet)
break;
}
}
+
+ PageKind ePageKind = mrSlideSorter.GetModel().GetPageType();
+ if( (eEditMode == EM_MASTERPAGE) && (ePageKind != PK_HANDOUT ) )
+ {
+ rSet.DisableItem(SID_ASSIGN_LAYOUT);
+ }
+
+ if( (eEditMode == EM_MASTERPAGE) || (ePageKind==PK_NOTES) )
+ {
+ rSet.DisableItem(SID_INSERTPAGE);
+ }
}
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/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 379344667a0c..fb356087245a 100755
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -382,6 +382,7 @@ SdGenericDrawPage::SdGenericDrawPage( SdXImpressDocument* _pModel, SdPage* pInPa
SdUnoSearchReplaceShape(this),
mpModel ( _pModel ),
mpSdrModel(0),
+ mnTempPageNumber(0),
mpPropSet ( _pSet ),
mbIsImpressDocument(false)
{
@@ -924,9 +925,18 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
break;
}
+ case WID_PAGE_NUMBER:
+ if( (GetPage()->GetPageKind() == PK_HANDOUT) && !GetPage()->IsMasterPage() )
+ {
+ if( !(aValue >>= mnTempPageNumber) )
+ throw lang::IllegalArgumentException();
+
+ break;
+ }
+ throw beans::PropertyVetoException();
+
case WID_PAGE_LDBITMAP:
case WID_PAGE_LDNAME:
- case WID_PAGE_NUMBER:
case WID_PAGE_ISDARK:
throw beans::PropertyVetoException();
@@ -1053,9 +1063,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
}
else
{
- // for pages with number 0 (Handout Master, Handout page)
- // return 0
- aAny <<= (sal_Int16)0;
+ aAny <<= mnTempPageNumber;
}
}
break;
diff --git a/sd/source/ui/unoidl/unopage.hxx b/sd/source/ui/unoidl/unopage.hxx
index 5d525b0f0f04..e3fda70c0f11 100755
--- a/sd/source/ui/unoidl/unopage.hxx
+++ b/sd/source/ui/unoidl/unopage.hxx
@@ -74,6 +74,7 @@ class SdGenericDrawPage : public SvxFmDrawPage,
private:
SdXImpressDocument* mpModel;
SdrModel* mpSdrModel;
+ sal_Int16 mnTempPageNumber; // for printing handouts
protected:
friend class SdXImpressDocument;
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index a23d8b2ad908..b28e7dc496a9 100644..100755
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -27,6 +27,8 @@
#include "precompiled_sd.hxx"
+#include <com/sun/star/beans/XPropertySet.hpp>
+
#include "DocumentRenderer.hxx"
#include "DocumentRenderer.hrc"
@@ -122,7 +124,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,8 +466,9 @@ namespace {
CreateChoice(_STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES_HELP),
OUString( RTL_CONSTASCII_USTRINGPARAM( "SlidesPerPage" ) ),
GetSlidesPerPageSequence(),
- 4,
+ 0,
OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ Sequence< sal_Bool >(),
aContentOpt
)
);
@@ -479,6 +482,7 @@ namespace {
CreateChoice(_STR_IMPRESS_PRINT_UI_ORDER_CHOICES),
0,
OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ Sequence< sal_Bool >(),
aSlidesPerPageOpt )
);
}
@@ -554,6 +558,7 @@ namespace {
CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES),
0,
OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ),
+ Sequence< sal_Bool >(),
aPageOptionsOpt
)
);
@@ -569,6 +574,7 @@ namespace {
CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW),
0,
OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ),
+ Sequence< sal_Bool >(),
aPageOptionsOpt
)
);
@@ -600,6 +606,7 @@ namespace {
CreateChoice(_STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST),
0,
OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ Sequence< sal_Bool >(),
aIncludeOpt
)
);
@@ -672,7 +679,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;
}
@@ -996,6 +1004,9 @@ namespace {
{
SdPage& rHandoutPage (*rDocument.GetSdPage(0, PK_HANDOUT));
+ Reference< com::sun::star::beans::XPropertySet > xHandoutPage( rHandoutPage.getUnoPage(), UNO_QUERY );
+ const rtl::OUString sPageNumber( RTL_CONSTASCII_USTRINGPARAM( "Number" ) );
+
// Collect the page objects of the handout master.
std::vector<SdrPageObj*> aHandoutPageObjects;
SdrObjListIter aShapeIter (rHandoutPage);
@@ -1050,7 +1061,15 @@ namespace {
}
}
- rViewShell.SetPrintedHandoutPageNum(mnHandoutPageIndex + 1);
+ if( xHandoutPage.is() ) try
+ {
+ xHandoutPage->setPropertyValue( sPageNumber, Any( static_cast<sal_Int16>(mnHandoutPageIndex) ) );
+ }
+ catch( Exception& )
+ {
+ }
+ rViewShell.SetPrintedHandoutPageNum( mnHandoutPageIndex + 1 );
+
MapMode aMap (rPrinter.GetMapMode());
rPrinter.SetMapMode(maMap);
@@ -1067,6 +1086,13 @@ namespace {
msPageString,
maPageStringOffset);
+ if( xHandoutPage.is() ) try
+ {
+ xHandoutPage->setPropertyValue( sPageNumber, Any( static_cast<sal_Int16>(0) ) );
+ }
+ catch( Exception& )
+ {
+ }
rViewShell.SetPrintedHandoutPageNum(1);
// Restore outlines.
@@ -1080,7 +1106,8 @@ namespace {
pPathObj->SetMergedItem(XLineStyleItem(XLINE_SOLID));
}
}
- }
+
+ }
private:
const USHORT mnHandoutPageIndex;
@@ -1528,6 +1555,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;
@@ -1885,12 +1913,17 @@ private:
++nShapeCount;
}
+ const USHORT nPageCount = mrBase.GetDocument()->GetSdPageCount(PK_STANDARD);
+ const USHORT nHandoutPageCount = nShapeCount ? (nPageCount + nShapeCount - 1) / nShapeCount : 0;
+ pViewShell->SetPrintedHandoutPageCount( nHandoutPageCount );
+ mrBase.GetDocument()->setHandoutPageCount( nHandoutPageCount );
+
// Distribute pages to handout pages.
::std::vector<USHORT> aPageIndices;
std::vector<SdPage*> aPagesVector;
for (USHORT
nIndex=0,
- nCount=mrBase.GetDocument()->GetSdPageCount(PK_STANDARD),
+ nCount= nPageCount,
nHandoutPageIndex=0;
nIndex <= nCount;
++nIndex)
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/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 356c03b82387..7c94e7b27b07 100755
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -942,7 +942,9 @@ void Outliner::RestoreStartPosition (void)
else if (mpViewShell->ISA(OutlineViewShell))
{
// Set cursor to its old position.
- GetView(0)->SetSelection (maStartSelection);
+ OutlinerView* pView = GetView(0);
+ if (pView != NULL)
+ pView->SetSelection (maStartSelection);
}
}
}
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 8b88be3682e3..9eb0a3b2ff8c 100755
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -384,19 +384,25 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
case SID_THES:
{
- EditView & rEditView = mpView->GetTextEditOutlinerView()->GetEditView();;
- String aStatusVal;
- LanguageType nLang = LANGUAGE_NONE;
- bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, rEditView );
- rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
-
- // disable "Thesaurus" context menu entry if there is nothing to look up
- lang::Locale aLocale( SvxCreateLocale( nLang ) );
- uno::Reference< linguistic2::XThesaurus > xThes( LinguMgr::GetThesaurus() );
- if (!bIsLookUpWord ||
- !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
+ if( mpView && mpView->GetTextEditOutlinerView() )
+ {
+ EditView & rEditView = mpView->GetTextEditOutlinerView()->GetEditView();;
+ String aStatusVal;
+ LanguageType nLang = LANGUAGE_NONE;
+ bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, rEditView );
+ rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
+
+ // disable "Thesaurus" context menu entry if there is nothing to look up
+ lang::Locale aLocale( SvxCreateLocale( nLang ) );
+ uno::Reference< linguistic2::XThesaurus > xThes( LinguMgr::GetThesaurus() );
+ if (!bIsLookUpWord ||
+ !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
+ rSet.DisableItem( SID_THES );
+ }
+ else
+ {
rSet.DisableItem( SID_THES );
-
+ }
//! avoid puting the same item as SfxBoolItem at the end of this function
nSlotId = 0;
}
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 98d0b7551705..5fbd400d7520 100755
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -1244,6 +1244,7 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
rBindings.Invalidate(SID_DELETE_MASTER_PAGE, TRUE, FALSE);
rBindings.Invalidate(SID_DELETE_PAGE, TRUE, FALSE);
rBindings.Invalidate(SID_ASSIGN_LAYOUT,TRUE,FALSE);
+ rBindings.Invalidate(SID_INSERTPAGE,TRUE,FALSE);
UpdatePreview( mpActualPage );
mpDrawView->AdjustMarkHdl();
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index e853d3944ce0..5166c392292c 100755
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -301,7 +301,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
SdPage* pPage = dynamic_cast< SdPage* >( pPageView->GetPage() );
- if( pPage )
+ if( pPage && !pPage->IsMasterPage() )
{
rSet.Put( SfxUInt32Item( SID_ASSIGN_LAYOUT, static_cast< sal_uInt32 >(pPage->GetAutoLayout()) ) );
bDisable = false;
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index ab165eea600b..c1e1d9634844 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);
@@ -546,11 +559,8 @@ bool ViewOverlayManager::CreateTags()
SdPage* pPage = mrBase.GetMainViewShell()->getCurrentPage();
- if( pPage )
+ if( pPage && !pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) )
{
- 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/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml
index c03c6ce435cd..176f25cb06ff 100755..100644
--- a/sd/uiconfig/sdraw/menubar/menubar.xml
+++ b/sd/uiconfig/sdraw/menubar/menubar.xml
@@ -213,7 +213,7 @@
<menu:menupopup>
<menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
<menu:menuitem menu:id=".uno:ChineseConversion"/>
- <menu:menuitem menu:id=".uno:Thesaurus"/>
+ <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
<menu:menuitem menu:id=".uno:Hyphenation"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:MoreDictionaries"/>
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
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index f793dfed7e7e..1c90e45943d1 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -513,12 +513,11 @@ void ShapeImporter::importPolygons(uno::Reference<beans::XPropertySet> const& xP
::basegfx::B2DPolygon aPoly;
basegfx::B2DPoint aPoint;
- for( sal_Int32 nCurrPoly=0; nCurrPoly<pOuterSequence->getLength(); ++nCurrPoly )
+ for( sal_Int32 nCurrPoly=0; nCurrPoly<pOuterSequence->getLength(); ++nCurrPoly, ++pInnerSequence )
{
aPoint.setX((*pInnerSequence).X);
aPoint.setY((*pInnerSequence).Y);
aPoly.append( aPoint );
- *pInnerSequence++;
}
UnoViewVector::const_iterator aIter=(mrContext.mrViewContainer).begin();
UnoViewVector::const_iterator aEnd=(mrContext.mrViewContainer).end();
diff --git a/slideshow/source/engine/slide/layer.cxx b/slideshow/source/engine/slide/layer.cxx
index be67b220962e..65f52f3b823f 100644
--- a/slideshow/source/engine/slide/layer.cxx
+++ b/slideshow/source/engine/slide/layer.cxx
@@ -36,6 +36,8 @@
#include <basegfx/range/b2dpolyrange.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
#include "layer.hxx"
@@ -288,6 +290,8 @@ namespace slideshow
// clipping, and render each shape that intersects with
// the calculated update area
::basegfx::B2DPolyPolygon aClip( maUpdateAreas.solveCrossovers() );
+ aClip = ::basegfx::tools::stripNeutralPolygons(aClip);
+ aClip = ::basegfx::tools::stripDispensablePolygons(aClip, false);
// actually, if there happen to be shapes with zero
// update area in the maUpdateAreas vector, the