summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsd/source/core/sdpage.cxx12
-rwxr-xr-xsd/source/ui/dlg/PaneChildWindows.cxx34
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fupage.cxx10
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fupage.hxx3
-rwxr-xr-xsd/source/ui/slidesorter/controller/SlsSlotManager.cxx11
-rwxr-xr-xsd/source/ui/unoidl/unopage.cxx16
-rwxr-xr-xsd/source/ui/unoidl/unopage.hxx1
-rwxr-xr-xsd/source/ui/view/DocumentRenderer.cxx32
-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.cxx2
-rw-r--r--sd/uiconfig/sdraw/menubar/menubar.xml2
-rw-r--r--slideshow/source/engine/slide/layer.cxx4
15 files changed, 137 insertions, 27 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 76450cf76760..82a841a199c8 100755
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2105,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!" );
@@ -2220,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;
}
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/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/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/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/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 0689dc0e3851..1660c05a124f 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"
@@ -997,6 +999,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);
@@ -1051,7 +1056,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);
@@ -1068,6 +1081,13 @@ namespace {
msPageString,
maPageStringOffset);
+ if( xHandoutPage.is() ) try
+ {
+ xHandoutPage->setPropertyValue( sPageNumber, Any( static_cast<sal_Int16>(0) ) );
+ }
+ catch( Exception& )
+ {
+ }
rViewShell.SetPrintedHandoutPageNum(1);
// Restore outlines.
@@ -1081,7 +1101,8 @@ namespace {
pPathObj->SetMergedItem(XLineStyleItem(XLINE_SOLID));
}
}
- }
+
+ }
private:
const USHORT mnHandoutPageIndex;
@@ -1887,12 +1908,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/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 447f50ec2222..c1e1d9634844 100755
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -559,7 +559,7 @@ bool ViewOverlayManager::CreateTags()
SdPage* pPage = mrBase.GetMainViewShell()->getCurrentPage();
- if( pPage )
+ if( pPage && !pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) )
{
const std::list< SdrObject* >& rShapes = pPage->GetPresentationShapeList().getList();
diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml
index c03c6ce435cd..176f25cb06ff 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/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