Anonymous avatar Anonymous committed b964f00

CWS-TOOLING: integrate CWS impress170
2009-04-28 10:31:12 +0200 wg r271308 : i101397
2009-04-14 17:56:43 +0200 af r270805 : #i100829# Removed line that became obsolete in last change.
2009-04-14 15:12:19 +0200 af r270782 : #i97199# Made accelerators in text attribute dialog unique.
2009-04-14 14:42:53 +0200 af r270775 : #i98364# Create regular task pane master previews even in high contrast mode.
2009-04-09 14:43:32 +0200 af r270708 : #i92792# Show icon instead of text and register resource for 'Table Design'.
2009-04-09 14:42:51 +0200 af r270707 : #i92792# Show icon instead of text and register resource for 'Table Design'.
2009-04-09 11:15:32 +0200 af r270683 : #i85921# Applied patch that adds direct activation of master mode to task pane context menu.
2009-04-08 15:12:54 +0200 af r270654 : #i94775# Passing snap line index from context menu to FuSnapLine.
2009-04-06 15:33:04 +0200 af r270555 : #i95371# Return early from MoveToTop() when the dispatcher is (not yet) available.
2009-04-06 13:15:42 +0200 af r270538 : #i97571# Fixed forwarding MouseButtonUp() calls to parent.
2009-04-03 16:10:08 +0200 af r270498 : #i100830# Adjusted the sizes of some rectangles displayed by the slide sorter.
2009-04-03 16:02:08 +0200 af r270496 : #i93086# Storing position of insertion indicator explicitly at SelectionManager.
2009-04-03 15:55:59 +0200 af r270493 : #i100829# Calling UpdatePageBorders() when the model is changed.

Comments (0)

Files changed (30)

officecfg/registry/data/org/openoffice/Office/Impress.xcu

             </node>
             <node oor:name="R2" oor:op="replace">
               <prop oor:name="URL">
+                <value>private:resource/taskpanel/TableDesign</value>
+              </prop>
+            </node>
+            <node oor:name="R3" oor:op="replace">
+              <prop oor:name="URL">
                 <value>private:resource/taskpanel/CustomAnimations</value>
               </prop>
             </node>
-            <node oor:name="R3" oor:op="replace">
+            <node oor:name="R4" oor:op="replace">
               <prop oor:name="URL">
                 <value>private:resource/taskpanel/SlideTransitions</value>
               </prop>

officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu

                 <prop oor:name="Label" oor:type="xs:string">
                     <value xml:lang="en-US">Table Design...</value>
                 </prop>
+				<prop oor:name="Properties" oor:type="xs:int">
+					<value>1</value>
+				</prop>
             </node>
             <node oor:name=".uno:SpellingDialog" oor:op="replace">
                 <prop oor:name="Label" oor:type="xs:string">
 #define SID_DISPLAY_MASTER_BACKGROUND       (SID_SD_START+436)
 #define SID_DISPLAY_MASTER_OBJECTS          (SID_SD_START+437)
 #define SID_INSERTPAGE_LAYOUT_MENU          (SID_SD_START+438)
+#define SID_TP_EDIT_MASTER					(SID_SD_START+439)
 
 // Add companion for the SID_HIDE_SLIDE (that is defined in svx)
 #define SID_SHOW_SLIDE                      (SID_SD_START+440)

sd/sdi/TaskPaneViewShell.sdi

 	GroupId = GID_VIEW;
 ]
 
+SfxVoidItem TaskPaneEditMaster SID_TP_EDIT_MASTER
+[
+	/* flags: */
+	AutoUpdate = TRUE,
+	Cachable = Cachable,
+	FastCall = FALSE,
+	HasCoreId = FALSE,
+	HasDialog = FALSE,
+	ReadOnlyDoc = FALSE,
+	Toggle = FALSE,
+	Container = FALSE,
+	RecordAbsolute = FALSE,
+	RecordPerSet;
+	Synchron;
+
+	Readonly = FALSE,
+
+	/* config: */
+	AccelConfig = FALSE,
+	MenuConfig = FALSE,
+	StatusBarConfig = FALSE,
+	ToolBoxConfig = FALSE,
+	GroupId = GID_VIEW;
+]
+
 SfxVoidItem TaskPaneInsertPage SID_INSERTPAGE_LAYOUT_MENU
 [
 	/* flags: */  
 		StateMethod = GetState ;
 	]
 
+    SID_TP_EDIT_MASTER
+	[
+		ExecMethod = Execute ;
+		StateMethod = GetState ;
+	]
+
     // The copy and paste slots are included here so that they later can be
     // disabled in order to remove them from context menus.
 	SID_CUT

sd/source/ui/animations/CustomAnimationCreateDialog.cxx

 
 void CategoryListBox::MouseButtonUp( const MouseEvent& rMEvt )
 {
+    ReleaseMouse();
 	if( rMEvt.IsLeft() && (rMEvt.GetClicks() == 2) )
 	{
-		ReleaseMouse();
 		if( maDoubleClickHdl.IsSet() )
 			maDoubleClickHdl.Call( this );
 	}
 	else
 	{
-		CategoryListBox::MouseButtonUp( rMEvt );
+		ListBox::MouseButtonUp( rMEvt );
 	}
 }
 

sd/source/ui/app/popup.src

 
 		SEPARATOR
 
+        MenuItem
+        {
+            Identifier = SID_TP_EDIT_MASTER;
+            HelpID = SID_TP_EDIT_MASTER;
+            Text[ en-US ] = "~Edit Master...";
+        };
+
 		MN_DELETE_MASTER
 
 		SEPARATOR

sd/source/ui/framework/factories/TaskPanelFactory.cxx

                 xCM->getConfigurationController(), UNO_QUERY_THROW);
             xCC->addResourceFactory(FrameworkHelper::msMasterPagesTaskPanelURL, this);
             xCC->addResourceFactory(FrameworkHelper::msLayoutTaskPanelURL, this);
+            xCC->addResourceFactory(FrameworkHelper::msTableDesignPanelURL, this);
             xCC->addResourceFactory(FrameworkHelper::msCustomAnimationTaskPanelURL, this);
             xCC->addResourceFactory(FrameworkHelper::msSlideTransitionTaskPanelURL, this);
         }
         {
             ePaneId = TaskPaneViewShell::PID_LAYOUT;
         }
+        else if (sResourceURL.equals(FrameworkHelper::msTableDesignPanelURL))
+        {
+            ePaneId = TaskPaneViewShell::PID_TABLE_DESIGN;
+        }
         else if (sResourceURL.equals(FrameworkHelper::msCustomAnimationTaskPanelURL))
         {
             ePaneId = TaskPaneViewShell::PID_CUSTOM_ANIMATION;

sd/source/ui/func/fusnapln.cxx

 #endif
 #include "sdenumdef.hxx"
 #include "sdresid.hxx"
-#include "sdabstdlg.hxx" 
+#include "sdabstdlg.hxx"
+#include "app.hrc"
 #include <svx/svdpagv.hxx>
 
 namespace sd {
 	USHORT	nHelpLine = 0;
 	BOOL	bCreateNew = TRUE;
 
+    // Get index of snap line or snap point from the request.
+    SFX_REQUEST_ARG (rReq, pHelpLineIndex, SfxUInt32Item, ID_VAL_INDEX, FALSE);
+    if (pHelpLineIndex != NULL)
+    {
+        nHelpLine = static_cast<USHORT>(pHelpLineIndex->GetValue());
+        // Reset the argument pointer to trigger the display of the dialog.
+        pArgs = NULL;
+    }
+    
 	if ( !pArgs )
 	{
-		SfxItemSet aNewAttr(mpViewShell->GetPool(), ATTR_SNAPLINE_START,
-												ATTR_SNAPLINE_END);
-		Point aLinePos = static_cast<DrawViewShell*>(mpViewShell)->GetMousePos();
-		static_cast<DrawViewShell*>(mpViewShell)->SetMousePosFreezed( FALSE );
-		BOOL bLineExist = FALSE;
+		SfxItemSet aNewAttr(mpViewShell->GetPool(), ATTR_SNAPLINE_START, ATTR_SNAPLINE_END);
+        bool bLineExist (false);
+        pPV = mpView->GetSdrPageView();
+		Point aLinePos;
+        
+        if (pHelpLineIndex == NULL)
+        {
+            // The index of the snap line is not provided as argument to the
+            // request.  Determine it from the mouse position.
+            
+            aLinePos = static_cast<DrawViewShell*>(mpViewShell)->GetMousePos();
+            static_cast<DrawViewShell*>(mpViewShell)->SetMousePosFreezed( FALSE );
 
-		pPV = mpView->GetSdrPageView();
 
-		if ( aLinePos.X() >= 0 )
-		{
-			aLinePos = mpWindow->PixelToLogic(aLinePos);
-			USHORT nHitLog = (USHORT) mpWindow->PixelToLogic(Size(HITPIX,0)).Width();
-			bLineExist = mpView->PickHelpLine(aLinePos, nHitLog, *mpWindow,
-											 nHelpLine, pPV);
-			if ( bLineExist )
-				aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos();
-			else
-				pPV = mpView->GetSdrPageView();
+            if ( aLinePos.X() >= 0 )
+            {
+                aLinePos = mpWindow->PixelToLogic(aLinePos);
+                USHORT nHitLog = (USHORT) mpWindow->PixelToLogic(Size(HITPIX,0)).Width();
+                bLineExist = mpView->PickHelpLine(aLinePos, nHitLog, *mpWindow, nHelpLine, pPV);
+                if ( bLineExist )
+                    aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos();
+                else
+                    pPV = mpView->GetSdrPageView();
 
-			pPV->LogicToPagePos(aLinePos);
-		}
-		else
-			aLinePos = Point(0,0);
-
+                pPV->LogicToPagePos(aLinePos);
+            }
+            else
+                aLinePos = Point(0,0);
+        }
+        else
+        {
+            OSL_ASSERT(pPV!=NULL);
+            aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos();
+            bLineExist = true;
+        }
 		aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_X, aLinePos.X()));
 		aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_Y, aLinePos.Y()));
 

sd/source/ui/inc/DrawViewShell.hxx

     */
     void StopSlideShow (bool bCloseFrame);
 
+    /** Show the context menu for snap lines and points.  Because snap lines
+        can not be selected the index of the snap line/point for which the
+        popup menu is opened has to be passed to the processing slot
+        handlers.  This can be done only by manually showing the popup menu.
+        @param rPageView
+            The page view is used to access the help lines.
+        @param nSnapLineIndex
+            Index of the snap line or snap point for which to show the
+            context menu.
+        @param rMouseLocation
+            The mouse location defines the location at which to display the
+            context menu.
+    */
+    void ShowSnapLineContextMenu (
+        SdrPageView& rPageView,
+        const USHORT nSnapLineIndex,
+        const Point& rMouseLocation);
+
 	using ViewShell::Notify;
 };
 

sd/source/ui/inc/PreviewRenderer.hxx

             When the actual preview can not be created for some reason, then
             this text is painted in an empty rectangle of the requested size
             instead.
+        @param bObeyHighContrastMode
+            When <FALSE/> then the high contrast mode of the application is
+            ignored and the preview is rendered in normal mode.  When
+            <TRUE/> and high contrast mode is active then the preview is
+            rendered in high contrast mode.
     */
     Image RenderPage (
         const SdPage* pPage, 
         const sal_Int32 nWidth,
-        const String& sSubstitutionText);
+        const String& sSubstitutionText,
+        const bool bObeyHighContrastMode = true);
 
     /** Render a page with the given pixel size.
         @param pPage
             When the actual preview can not be created for some reason, then
             this text is painted in an empty rectangle of the requested size
             instead.
+        @param bObeyHighContrastMode
+            When <FALSE/> then the high contrast mode of the application is
+            ignored and the preview is rendered in normal mode.  When
+            <TRUE/> and high contrast mode is active then the preview is
+            rendered in high contrast mode.
     */
     Image RenderPage (
         const SdPage* pPage, 
         const Size aPreviewPixelSize,
-        const String& sSubstitutionText);
+        const String& sSubstitutionText,
+        const bool bObeyHighContrastMode = true);
 
     /** Render an image that contains the given substitution text instead of a
         slide preview.
 
     bool Initialize (
         const SdPage* pPage,
-        const Size& rPixelSize);
+        const Size& rPixelSize,
+        const bool bObeyHighContrastMode);
     void Cleanup (void);
     void PaintPage (const SdPage* pPage);
     void PaintSubstitutionText (const String& rSubstitutionText);

sd/source/ui/slidesorter/controller/SlideSorterController.cxx

                 // When there is no selection, then we show the insertion
                 // indicator so that the user knows where a page insertion
                 // would take place.
-                mrView.GetOverlay().GetInsertionIndicatorOverlay()
-                    .SetPosition(
-                        pWindow->PixelToLogic(rEvent.GetMousePosPixel()));
+                mrView.GetOverlay().GetInsertionIndicatorOverlay().SetPosition(
+                    pWindow->PixelToLogic(rEvent.GetMousePosPixel()));
                 mrView.GetOverlay().GetInsertionIndicatorOverlay().Show();
             }
 
             mbIsContextMenuOpen = false;
             if (pPage == NULL)
             {
-                // Select slide before the insertion indicator before it is
-                // hidden, so that a pending slide insertion slot finds the
-                // right place to insert a new slide.
-                mpPageSelector->SelectPage(
-                    mrView.GetOverlay().GetInsertionIndicatorOverlay().GetInsertionPageIndex()-1);
+                // Remember the position of the insertion indicator before
+                // it is hidden, so that a pending slide insertion slot call
+                // finds the right place to insert a new slide.
+                GetSelectionManager()->SetInsertionPosition(
+                    mrView.GetOverlay().GetInsertionIndicatorOverlay().GetInsertionPageIndex());
                 mrView.GetOverlay().GetInsertionIndicatorOverlay().Hide();
             }
             bEventHasBeenHandled = true;

sd/source/ui/slidesorter/controller/SlsClipboard.cxx

     }
     else
     {
-        model::PageEnumeration aSelectedPages
-            (model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
-                mrSlideSorter.GetModel()));
-        // Initialize (for the case of an empty selection) with the position
-        // at the end of the document.
-        nInsertPosition = mrSlideSorter.GetModel().GetPageCount();
-        while (aSelectedPages.HasMoreElements())
-        {
-            nInsertPosition = aSelectedPages.GetNextElement()->GetPage()->GetPageNum();
-            // Convert *2+1 index to straight index ((n-1)/2) after the page
-            // (+1).
-            nInsertPosition = (nInsertPosition-1)/2 + 1;
-        }
+        nInsertPosition = mrController.GetSelectionManager()->GetInsertionPosition();
     }
 
     return nInsertPosition;

sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx

         {
             iListener->Call(NULL);
         }
+
+        // Reset the insertion position: until set again it is calculated from
+        // the current selection.
+        mnInsertionPosition = -1;
     }
 }
 
         view::SlideSorterView::BBT_INFO);
 }
 
+ 
+ 
+ 
+sal_Int32 SelectionManager::GetInsertionPosition (void) const
+{
+    sal_Int32 nInsertionPosition (mnInsertionPosition);
+    if (nInsertionPosition < 0)
+    {
+        model::PageEnumeration aSelectedPages
+            (model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
+                mrSlideSorter.GetModel()));
+        // Initialize (for the case of an empty selection) with the position
+        // at the end of the document.
+        nInsertionPosition = mrSlideSorter.GetModel().GetPageCount();
+        while (aSelectedPages.HasMoreElements())
+        {
+            const sal_Int32 nPosition (aSelectedPages.GetNextElement()->GetPage()->GetPageNum());
+            // Convert *2+1 index to straight index (n-1)/2 after the page
+            // (+1).
+            nInsertionPosition = (nPosition-1)/2 + 1;
+        }
+
+    }
+    return nInsertionPosition;
+}
+
+
+
+
+void SelectionManager::SetInsertionPosition (const sal_Int32 nInsertionPosition)
+{
+    if (nInsertionPosition < 0)
+        mnInsertionPosition = -1;
+    else if (nInsertionPosition > mrSlideSorter.GetModel().GetPageCount())
+    {
+        // Assert but then ignore invalid values.
+        OSL_ASSERT(nInsertionPosition<=mrSlideSorter.GetModel().GetPageCount());
+        return;
+    }
+    else
+        mnInsertionPosition = nInsertionPosition;
+}
+
 
 
 

sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx

     */
     void RemoveSelectionChangeListener (const Link& rListener);
 
+    /** Return the position where to insert pasted slides based on the
+        current selection.  When there is a selection then the insert
+        position is behind the last slide.  When the selection is empty then
+        most of the time the insert position is at the end of the document.
+        There is an exception right after the display of a popup-menu.  The
+        position of the associated insertion marker is stored here and reset
+        the next time the selection changes.
+    */
+    sal_Int32 GetInsertionPosition (void) const;
+
+    /** Store an insertion position temporarily.  It is reset when the
+        selection changes the next time.
+    */
+    void SetInsertionPosition (const sal_Int32 nInsertionPosition);
+
 private:
     SlideSorter& mrSlideSorter;
     SlideSorterController& mrController;
     */
     bool mbIsMakeSelectionVisiblePending;
 
+    /** The insertion position is only temporarily valid.  Negative values
+        indicate that the explicit insertion position is not valid.  In this
+        case GetInsertionPosition() calculates it from the current selection.
+    */
+    sal_Int32 mnInsertionPosition;
+
     /** Delete the given list of normal pages.  This method is a helper
         function for DeleteSelectedPages().
         @param rSelectedNormalPages
         const model::SharedPageDescriptor& rpFirst,
         const model::SharedPageDescriptor& rpLast,
         const SelectionHint eSelectionHint);
-
 };
 
 } } } // end of namespace ::sd::slidesorter::controller

sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx

 
 private:
     Point maPosition;
-    basegfx::B2DRange maBoundingBox;
-    basegfx::B2DPolyPolygon maShapes;
+    Point maTranslation;
+    Rectangle maBoundingBox;
+    ::std::vector<Rectangle> maShapes;
 };
 
 

sd/source/ui/slidesorter/view/SlideSorterView.cxx

     }
 }
 
+
+
+
 void SlideSorterView::LocalModelHasChanged(void)
 {
 	mbModelChangedWhileModifyEnabled = false;
 
     model::PageEnumeration aPageEnumeration (
         model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
+    UpdatePageBorders();
     while (aPageEnumeration.HasMoreElements())
     {
         SdrPageObj* pPageObject = aPageEnumeration.GetNextElement()->GetPageObject();
         maModelBorder = PageObjectViewObjectContact::CalculatePageModelBorder (
             pWindow,
             mrModel.GetPageCount());
-                
+
         // Depending on values in the global properties the border has to be
         // extended a little bit.
         ::boost::shared_ptr<controller::Properties> pProperties(

sd/source/ui/slidesorter/view/SlsLayouter.cxx

 
         // Adapt the layout of the given output device to the new layout of
         // page objects.  The zoom factor is set so that the page objects in
-        // one row fill the screen.
+        // one column fill the screen.
         Fraction aScaleFactor (nTargetHeight, nPagePixelHeight);
         SetZoom (aMapMode.GetScaleX() * aScaleFactor, pDevice);
 

sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx

 using namespace ::sdr::contact;
 using namespace ::sd::slidesorter::model;
 
+using drawinglayer::primitive2d::Primitive2DReference;
+using drawinglayer::primitive2d::Primitive2DSequence;
 
 namespace sd { namespace slidesorter { namespace view {
 
 
 protected:
 	// method which is to be used to implement the local decomposition of a 2D primitive.
-	virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
+	virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
 
 public:
 	// constructor and destructor
 	DeclPrimitrive2DIDBlock()
 };
 
-drawinglayer::primitive2d::Primitive2DSequence SdPageObjectPageBitmapPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
+Primitive2DSequence SdPageObjectPageBitmapPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
 {
 	// add bitmap primitive
     // to avoid scaling, use the Bitmap pixel size as primitive size
 	aBitmapTransform.set(1L, 2L, getPageObjectRange().getMinY());
 
     // add a BitmapPrimitive2D to the result
-	const drawinglayer::primitive2d::Primitive2DReference xReference(
+	const Primitive2DReference xReference(
 		new drawinglayer::primitive2d::BitmapPrimitive2D(getBitmapEx(), aBitmapTransform));
-	return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+	return Primitive2DSequence(&xReference, 1);
 }
 
 SdPageObjectPageBitmapPrimitive::SdPageObjectPageBitmapPrimitive(
 
 protected:
 	// method which is to be used to implement the local decomposition of a 2D primitive.
-	virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
+	virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
 
 public:
 	// constructor and destructor
 const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorOffset(1);
 const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorThickness(3);
 
-drawinglayer::primitive2d::Primitive2DSequence SdPageObjectSelectPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
+Primitive2DSequence SdPageObjectSelectPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
 {
-	drawinglayer::primitive2d::Primitive2DSequence xRetval(2);
+	Primitive2DSequence xRetval(2);
 
 	// since old Width/Height calculations always added a single pixel value,
 	// it is necessary to create a inner range which is one display unit less
 	basegfx::B2DRange aDiscreteOuterRange(aAdaptedInnerRange);
 	aDiscreteOuterRange.grow(mnSelectionIndicatorOffset * aDiscretePixel.getX());
 
-	// remeber inner border. Make it one bigger in top left since polygons
+	// Remember inner border. Make it one bigger in top left since polygons
 	// do not paint their lower-right corners. Since this is the inner polygon,
 	// the top-left corders are the ones to grow here
 	const basegfx::B2DRange aDiscreteInnerRange(
-		aDiscreteOuterRange.getMinimum() + aDiscretePixel, aDiscreteOuterRange.getMaximum());
+		aDiscreteOuterRange.getMinimum() + aDiscretePixel,
+        aDiscreteOuterRange.getMaximum() - aDiscretePixel);
 
 	// grow by line width
 	aDiscreteOuterRange.grow((mnSelectionIndicatorThickness - 1) * aDiscretePixel.getX());
 	static bool bTestWithBrightColors(false);
 	const basegfx::BColor aFrameColor(bTestWithBrightColors ? basegfx::BColor(0,1,0) : Application::GetSettings().GetStyleSettings().GetMenuHighlightColor().getBColor());
 
-	xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(
+	xRetval[0] = Primitive2DReference(
 		new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(aFramePolyPolygon, aFrameColor));
 
 	// add aRoundedOuterPolygon again as non-filled line polygon to get the roundungs
 	// painted correctly
-	xRetval[1] = drawinglayer::primitive2d::Primitive2DReference(
+	xRetval[1] = Primitive2DReference(
 		new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aRoundedOuterPolygon, aFrameColor));
 
 	return xRetval;
 {
 protected:
 	// method which is to be used to implement the local decomposition of a 2D primitive.
-	virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
+	virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
 
 public:
 	// constructor and destructor
 	DeclPrimitrive2DIDBlock()
 };
 
-drawinglayer::primitive2d::Primitive2DSequence SdPageObjectBorderPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
+Primitive2DSequence SdPageObjectBorderPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
 {
 	// since old Width/Height calculations always added a single pixel value,
 	// it is necessary to create a inner range which is one display unit less
 	const svtools::ColorConfig aColorConfig;
 	const basegfx::BColor aBorderColor(bTestWithBrightColors ? basegfx::BColor(1,0,0) : Color(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor).getBColor());
     
-	const drawinglayer::primitive2d::Primitive2DReference xReference(
+	const Primitive2DReference xReference(
 		new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(basegfx::tools::createPolygonFromRect(aAdaptedInnerRange), aBorderColor));
-	return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+	return Primitive2DSequence(&xReference, 1);
 }
 
 SdPageObjectBorderPrimitive::SdPageObjectBorderPrimitive(const basegfx::B2DRange& rRange)
 
 protected:
 	// method which is to be used to implement the local decomposition of a 2D primitive.
-	virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
+	virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
 
 public:
 	// constructor and destructor
 
 const sal_Int32 SdPageObjectFocusPrimitive::mnFocusIndicatorOffset(2);
 
-drawinglayer::primitive2d::Primitive2DSequence SdPageObjectFocusPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
+Primitive2DSequence SdPageObjectFocusPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
 {
-	drawinglayer::primitive2d::Primitive2DSequence xRetval(2);
+	Primitive2DSequence xRetval(2);
 
 	// since old Width/Height calculations always added a single pixel value,
 	// it is necessary to create a inner range which is one display unit less
     const basegfx::B2DPolygon aIndicatorPolygon(basegfx::tools::createPolygonFromRect(aFocusIndicatorRange));
 
     // white rectangle
-    xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(
+    xRetval[0] = Primitive2DReference(
 	    new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aIndicatorPolygon, Color(COL_WHITE).getBColor()));
 
     // dotted black rectangle with same geometry
     const drawinglayer::attribute::LineAttribute aLineAttribute(Color(COL_BLACK).getBColor());
     const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(aDotDashArray, 2.0 * aDiscretePixel.getX());
 
-    xRetval[1] = drawinglayer::primitive2d::Primitive2DReference(
+    xRetval[1] = Primitive2DReference(
 	    new drawinglayer::primitive2d::PolygonStrokePrimitive2D(aIndicatorPolygon, aLineAttribute, aStrokeAttribute));
 
 	return xRetval;
 	Size								maPageNumberAreaModelSize;
 
 	// bitfield
-	unsigned							mbShowFadeEffectIcon : 1;
-	unsigned							mbExcluded : 1;
+	bool mbShowFadeEffectIcon : 1;
+	bool mbExcluded : 1;
 
     // private helpers
 	const BitmapEx& getFadeEffectIconBitmap() const;
 
 protected:
 	// method which is to be used to implement the local decomposition of a 2D primitive.
-	virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
+	virtual Primitive2DSequence createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
 
 public:
 	// constructor and destructor
 	return *mpFadeEffectIconBitmap;
 }
 
-drawinglayer::primitive2d::Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
+Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::createLocalDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
 {
 	const xub_StrLen nTextLength(getPageName().Len());
     const sal_uInt32 nCount(
         (getExcluded() ? 2 : 0)                 // PageNumber crossed out
         );
     sal_uInt32 nInsert(0);
-	drawinglayer::primitive2d::Primitive2DSequence xRetval(nCount);
+	Primitive2DSequence xRetval(nCount);
 
     // since old Width/Height calculations always added a single pixel value,
     // it is necessary to create a inner range which is one display unit less
 	    aBitmapTransform.set(0L, 2L, aAdaptedInnerRange.getMinX());
 	    aBitmapTransform.set(1L, 2L, aAdaptedInnerRange.getMaxY() + ((mnFadeEffectIndicatorOffset + 1) * aDiscretePixel.getX()));
 
-        xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(
+        xRetval[nInsert++] = Primitive2DReference(
 		    new drawinglayer::primitive2d::BitmapPrimitive2D(getFadeEffectIconBitmap(), aBitmapTransform));
     }
 
 		aTextMatrix.set(1L, 2L, fStartY);
 
 		// create Text primitive and add to target
-        xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
+        xRetval[nInsert++] = Primitive2DReference(new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
 			aTextMatrix, aPageName, 0, aPageName.Len(), aDXArray, aFontAttributes, aLocale, aFontColor));
 	}
 
 		aTextMatrix.set(1L, 2L, fStartY);
 
 		// create Text primitive
-        xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
+        xRetval[nInsert++] = Primitive2DReference(new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
 			aTextMatrix, aPageNumber, 0, nNumberLen, aDXArray, aFontAttributes, aLocale, aFontColor));
 
 		if(getExcluded())
 			aStrikethrough.append(aNumberRange.getMinimum());
 			aStrikethrough.append(aNumberRange.getMaximum());
 
-			xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
+			xRetval[nInsert++] = Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
 				basegfx::tools::createPolygonFromRect(aNumberRange), aActiveColor));
 
-            xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
+            xRetval[nInsert++] = Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
 				aStrikethrough, aActiveColor));
 		}
 	}
 // This method will replace the whole painting mechanism. Task is no longer to paint stuff to an OutDev,
 // but to provide the necessary geometrical information using primitives.
 
-drawinglayer::primitive2d::Primitive2DSequence PageObjectViewObjectContact::createPrimitive2DSequence(const sdr::contact::DisplayInfo& rDisplayInfo) const
+Primitive2DSequence PageObjectViewObjectContact::createPrimitive2DSequence(const sdr::contact::DisplayInfo& rDisplayInfo) const
 {
     // OutputDevice* pDevice = rDisplayInfo.GetDIOutputDevice();
     OutputDevice* pDevice = GetObjectContact().TryToGetOutputDevice();
 			(bCreateSelected ? 1 : 0)		// create selected
     		);
 		sal_uInt32 nInsert(0);
-		drawinglayer::primitive2d::Primitive2DSequence xRetval(nCount);
+		Primitive2DSequence xRetval(nCount);
 
 		if(bCreateBitmap)
 		{
 			// add selection indicator if used
-			xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new SdPageObjectPageBitmapPrimitive(aInnerRange, aBitmapEx));
+			xRetval[nInsert++] = Primitive2DReference(new SdPageObjectPageBitmapPrimitive(aInnerRange, aBitmapEx));
 		}
 
 		if(true)
 		{
     		// add border (always)
-	    	xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new SdPageObjectBorderPrimitive(aInnerRange));
+	    	xRetval[nInsert++] = Primitive2DReference(new SdPageObjectBorderPrimitive(aInnerRange));
         }
 
 		if(true)
 		{
 			// add fade effext, page name and number if used
-			xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new SdPageObjectFadeNameNumberPrimitive(
+			xRetval[nInsert++] = Primitive2DReference(new SdPageObjectFadeNameNumberPrimitive(
 			    aInnerRange,
 			    aPageName,
 			    nPageNumber,
 		if(bCreateSelected)
 		{
 			// add selection indicator if used
-			xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new SdPageObjectSelectPrimitive(aInnerRange));
+			xRetval[nInsert++] = Primitive2DReference(new SdPageObjectSelectPrimitive(aInnerRange));
 		}
 
 		if(bCreateFocused)
 		{
 			// add focus indicator if used
-			xRetval[nInsert++] = drawinglayer::primitive2d::Primitive2DReference(new SdPageObjectFocusPrimitive(aInnerRange));
+			xRetval[nInsert++] = Primitive2DReference(new SdPageObjectFocusPrimitive(aInnerRange));
 		}
 
 		return xRetval;

sd/source/ui/slidesorter/view/SlsViewOverlay.cxx

 
 #include <basegfx/range/b2drectangle.hxx>
 #include <basegfx/range/b2drange.hxx>
+#include <basegfx/range/b2irange.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/polygon/b2dpolygontools.hxx>
     EnsureRegistration();
 
     maPosition = rPosition;
-
+    maTranslation = Point(0,0);
+    
     maShapes.clear();
     while (rSelection.HasMoreElements())
 	{
         const Rectangle aBox (rSelection.GetNextElement()->GetPageObject()->GetCurrentBoundRect());
-        basegfx::B2DRectangle aB2DBox(
-            aBox.Left(),
-            aBox.Top(),
-            aBox.Right(),
-            aBox.Bottom());
-        maShapes.append(basegfx::tools::createPolygonFromRect(aB2DBox), 4);
+        maShapes.push_back(aBox);
+        maBoundingBox.Union(aBox);
 	}
-    maBoundingBox = basegfx::tools::getRange(maShapes);
 
-    setVisible(maShapes.count() > 0);
+    setVisible(maShapes.size() > 0);
     // The selection indicator may have been visible already so call
     // objectChange() to enforce an update.
     objectChange();
 void SubstitutionOverlay::Clear (void)
 {
     maShapes.clear();
-    maBoundingBox = basegfx::B2DRange();
+    maBoundingBox.SetEmpty();
     setVisible(false);
 }
 
 
 void SubstitutionOverlay::Move (const Point& rOffset)
 {
-    basegfx::B2DHomMatrix aTranslation;
-    aTranslation.translate(rOffset.X(), rOffset.Y());
-    maShapes.transform(aTranslation);
-    maBoundingBox.transform(aTranslation);
+    maTranslation += rOffset;
+    maBoundingBox.Move(rOffset.X(), rOffset.Y());
     
     maPosition += rOffset;
     
 {
     if (getOverlayManager() != NULL)
     {
-        const sal_uInt32 nOldStripeLength (getOverlayManager()->getStripeLengthPixel());
-        getOverlayManager()->setStripeLengthPixel(gnSubstitutionStripeLength);
+        const sal_uInt32 nSavedStripeLength (getOverlayManager()->getStripeLengthPixel());
     
-        const sal_uInt32 nCount (maShapes.count());
-        for (sal_uInt32 nIndex=0; nIndex<nCount; ++nIndex)
-            ImpDrawPolygonStriped(rOutputDevice, maShapes.getB2DPolygon(nIndex));
+        for (::std::vector<Rectangle>::const_iterator
+                 iBox (maShapes.begin()),
+                 iEnd (maShapes.end());
+             iBox!=iEnd;
+             ++iBox)
+        {
+            // Reduce width and height by one pixel to make the box the same
+            // size as the frame of the page object.
+            Rectangle aScreenBox (rOutputDevice.LogicToPixel(*iBox));
+            aScreenBox.Right() -= 1;
+            aScreenBox.Bottom() -= 1;
+
+            // Add accumulated translation.
+            Rectangle aBox (rOutputDevice.PixelToLogic(aScreenBox));
+            aBox.Move(maTranslation.X(), maTranslation.Y());
+
+            ImpDrawPolygonStriped(rOutputDevice,
+                basegfx::tools::createPolygonFromRect(
+                    basegfx::B2DRange(
+                        basegfx::B2IRange(aBox.Left(), aBox.Top(), aBox.Right(),aBox.Bottom()))));
+        }
     
-        getOverlayManager()->setStripeLengthPixel(nOldStripeLength);
+        getOverlayManager()->setStripeLengthPixel(nSavedStripeLength);
     }
 }
 
 {
     (void)rOutputDevice;
 
-    maBaseRange = maBoundingBox;
+    maBaseRange = basegfx::B2DRange(
+        basegfx::B2IRange(
+            maBoundingBox.Left(),
+            maBoundingBox.Top(),
+            maBoundingBox.Right(),
+            maBoundingBox.Bottom()));
 }
 
 
         const Color aColor (rOutputDevice.GetSettings().GetStyleSettings().GetFontColor());
         rOutputDevice.SetLineColor(aColor);
         rOutputDevice.SetFillColor(aColor);
-        rOutputDevice.DrawRect (maBoundingBox);
+
+        // Reduce width of indicator by one pixel to be of the same width as
+        // the page objects.
+        Rectangle aBox (rOutputDevice.LogicToPixel(maBoundingBox));
+        aBox.Right() -= 1;
+        rOutputDevice.DrawRect(rOutputDevice.PixelToLogic(aBox));
     }
 
     rOutputDevice.SetFillColor(aFillColor);

sd/source/ui/toolpanel/controls/AllMasterPagesSelector.cxx

 
 #include "AllMasterPagesSelector.hxx"
 #include "PreviewValueSet.hxx"
-
+#include "app.hrc"
 #include "MasterPageContainer.hxx"
 #include "MasterPageDescriptor.hxx"
 #include <tools/link.hxx>
 
 
 
-} } } // end of namespace ::sd::toolpanel::controls
+void AllMasterPagesSelector::GetState (SfxItemSet& rItemSet)
+{
+    MasterPagesSelector::GetState(rItemSet);
+
+	if (rItemSet.GetItemState(SID_TP_EDIT_MASTER) == SFX_ITEM_AVAILABLE)
+        rItemSet.DisableItem(SID_TP_EDIT_MASTER);
+}
+
+
+
+
+} } } // end of namespace ::sd::toolpanel::control

sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx

     */
     virtual void Fill (ItemList& rItemList);
 
+    virtual void GetState (SfxItemSet& rItemSet);
+
 protected:
     virtual void NotifyContainerChangeEvent (const MasterPageContainerChangeEvent& rEvent);
 

sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx

 #include "CurrentMasterPagesSelector.hxx"
 #include "PreviewValueSet.hxx"
 #include "ViewShellBase.hxx"
+#include "DrawViewShell.hxx"
 #include "drawdoc.hxx"
 #include "sdpage.hxx"
 #include "MasterPageContainer.hxx"
 void CurrentMasterPagesSelector::GetState (SfxItemSet& rItemSet)
 {
     // Disable the SID_DELTE_MASTER slot when there is only one master page.
-    if (mrDocument.GetMasterPageUserCount(GetSelectedMasterPage()) > 0)
+    if (rItemSet.GetItemState(SID_DELETE_MASTER_PAGE) == SFX_ITEM_AVAILABLE
+        && mrDocument.GetMasterPageUserCount(GetSelectedMasterPage()) > 0)
     {
         rItemSet.DisableItem(SID_DELETE_MASTER_PAGE);
     }
 
+    ::boost::shared_ptr<DrawViewShell> pDrawViewShell (
+        ::boost::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell()));
+	if (rItemSet.GetItemState(SID_TP_EDIT_MASTER) == SFX_ITEM_AVAILABLE
+        && pDrawViewShell
+        && pDrawViewShell->GetEditMode() == EM_MASTERPAGE)
+    {
+        rItemSet.DisableItem (SID_TP_EDIT_MASTER);
+    }
+
     MasterPagesSelector::GetState(rItemSet);
 }
 

sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx

         aPreview = rRenderer.RenderPage(
             pPage,
             nWidth,
-            String::CreateFromAscii(""));
+            String::CreateFromAscii(""),
+            false);
     }
 
     return aPreview;

sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx

 #include "strings.hrc"
 #include "showview.hxx"
 #include "DrawViewShell.hxx"
+#include "DrawController.hxx"
 #include "SlideSorterViewShell.hxx"
 #include "PreviewValueSet.hxx"
 #include "ViewShellBase.hxx"
             break;
         }
 
+        case SID_TP_EDIT_MASTER:
+        {
+            using namespace ::com::sun::star;
+            uno::Reference<drawing::XDrawPage> xSelectedMaster (
+                GetSelectedMasterPage()->getUnoPage(), uno::UNO_QUERY);
+            SfxViewFrame* pViewFrame = mrBase.GetViewFrame();
+            if (pViewFrame != NULL && xSelectedMaster.is())
+            {
+                SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
+                if (pDispatcher != NULL)
+                {
+                    USHORT nIndex = mpPageSet->GetSelectItemId();
+                    pDispatcher->Execute(SID_MASTERPAGE, SFX_CALLMODE_SYNCHRON);
+                    mpPageSet->SelectItem (nIndex);
+                    mrBase.GetDrawController().setCurrentPage(xSelectedMaster);
+                }
+            }
+            break;
+        }
+
         case SID_CUT:
         case SID_COPY:
         case SID_PASTE:

sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx

 #include "MasterPageObserver.hxx"
 #include "sdpage.hxx"
 #include "drawdoc.hxx"
+#include "app.hrc"
 #include <vcl/bitmap.hxx>
 #include <tools/color.hxx>
 
     }
 }
 
+
+
+
+void RecentMasterPagesSelector::GetState (SfxItemSet& rItemSet)
+{
+    MasterPagesSelector::GetState (rItemSet);
+    if (rItemSet.GetItemState(SID_TP_EDIT_MASTER) == SFX_ITEM_AVAILABLE)
+        rItemSet.DisableItem (SID_TP_EDIT_MASTER);
+}
+
+
+
+
 } } } // end of namespace ::sd::toolpanel::controls

sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.hxx

 
     virtual void LateInit (void);
 
+    virtual void GetState (SfxItemSet& rItemSet);
+
 protected:
     DECL_LINK(MasterPageListListener, void*);
     virtual void Fill (ItemList& rItemList);

sd/source/ui/tools/PreviewRenderer.cxx

 Image PreviewRenderer::RenderPage (
     const SdPage* pPage, 
     const sal_Int32 nWidth,
-    const String& rSubstitutionText)
+    const String& rSubstitutionText,
+    const bool bObeyHighContrastMode)
 {
     if (pPage != NULL)
     {
         const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0);
         const sal_Int32 nHeight (sal::static_int_cast<sal_Int32>(
             (nWidth - 2*nFrameWidth) / nAspectRatio + 2*nFrameWidth + 0.5));
-        return RenderPage (pPage, Size(nWidth,nHeight), rSubstitutionText);
+        return RenderPage (pPage, Size(nWidth,nHeight), rSubstitutionText, bObeyHighContrastMode);
     }
     else
         return Image();
 Image PreviewRenderer::RenderPage (
     const SdPage* pPage, 
     Size aPixelSize,
-    const String& rSubstitutionText)
+    const String& rSubstitutionText,
+    const bool bObeyHighContrastMode)
 {
     Image aPreview;
 
     {
         try
         {
-            if (Initialize (pPage, aPixelSize))
+            if (Initialize (pPage, aPixelSize, bObeyHighContrastMode))
             {
                 PaintPage (pPage);
                 PaintSubstitutionText (rSubstitutionText);
 
 bool PreviewRenderer::Initialize (
     const SdPage* pPage,
-    const Size& rPixelSize)
+    const Size& rPixelSize,
+    const bool bObeyHighContrastMode)
 {
     bool bSuccess = false;
     do
             break;
 
         // Adjust contrast mode.
-        bool bUseContrast = Application::GetSettings().GetStyleSettings().
-            GetHighContrastMode();
+        bool bUseContrast (bObeyHighContrastMode
+            && Application::GetSettings().GetStyleSettings().GetHighContrastMode());
         mpPreviewDevice->SetDrawMode (bUseContrast 
             ? ViewShell::OUTPUT_DRAWMODE_CONTRAST 
             : ViewShell::OUTPUT_DRAWMODE_COLOR);

sd/source/ui/view/ViewShellManager.cxx

 #include <hash_map>
 
 #undef VERBOSE
-//#define VERBOSE 2
+#define VERBOSE 2
 
 namespace sd {
 
 {
     ::osl::MutexGuard aGuard (maMutex);
 
+    // Check that we have access to a dispatcher.  If not, then we are
+    // (probably) called while the view shell is still being created or
+    // initialized.  Without dispatcher we can not rebuild the shell stack
+    // to move the requested shell to the top.  So return right away instead
+    // of making a mess without being able to clean up afterwards.
+    if (mrBase.GetDispatcher() == NULL)
+        return;
+
     ActiveShellList::iterator iShell (::std::find_if (
         maActiveViewShells.begin(),
         maActiveViewShells.end(),

sd/source/ui/view/drviews4.cxx

 #include "drawdoc.hxx"
 #include "Window.hxx"
 #include "fupoor.hxx"
+#include "fusnapln.hxx"
 #include "app.hxx"
 #include "Ruler.hxx"
 #include "sdresid.hxx"
     if ( !IsInputLocked() )
 	{
 		const bool bNativeShow (SlideShow::IsRunning(GetViewShellBase()));
-        
+
         if( rCEvt.GetCommand() == COMMAND_PASTESELECTION && !bNativeShow )
         {
 			TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSelection( GetActiveWindow() ) );
 			if ( mpDrawView->PickHelpLine( aMPos, nHitLog, *GetActiveWindow(), nHelpLine, pPV) )
 			{
 				nSdResId = RID_DRAW_SNAPOBJECT_POPUP;
-				mbMousePosFreezed = TRUE;
+                ShowSnapLineContextMenu(*pPV, nHelpLine, rCEvt.GetMousePosPixel());
+                return;
 			}
 			// Klebepunkt unter dem Mauszeiger markiert?
 			else if( mpDrawView->PickGluePoint( aMPos, pObj, nPickId, pPV ) &&
 }
 
 
+
+
+void DrawViewShell::ShowSnapLineContextMenu (
+    SdrPageView& rPageView,
+    const USHORT nSnapLineIndex,
+    const Point& rMouseLocation)
+{
+    const SdrHelpLine& rHelpLine (rPageView.GetHelpLines()[nSnapLineIndex]);
+    ::boost::scoped_ptr<PopupMenu> pMenu (new PopupMenu ());
+
+    if (rHelpLine.GetKind() == SDRHELPLINE_POINT)
+    {
+        pMenu->InsertItem(
+            SID_SET_SNAPITEM,
+            String(SdResId(STR_POPUP_EDIT_SNAPPOINT)));
+        pMenu->InsertSeparator();
+        pMenu->InsertItem(
+            SID_DELETE_SNAPITEM,
+            String(SdResId(STR_POPUP_DELETE_SNAPPOINT)));
+    }
+    else
+    {
+        pMenu->InsertItem(
+            SID_SET_SNAPITEM,
+            String(SdResId(STR_POPUP_EDIT_SNAPLINE)));
+        pMenu->InsertSeparator();
+        pMenu->InsertItem(
+            SID_DELETE_SNAPITEM,
+            String(SdResId(STR_POPUP_DELETE_SNAPLINE)));
+    }
+
+    pMenu->RemoveDisabledEntries(FALSE, FALSE);
+
+    const USHORT nResult = pMenu->Execute(
+        GetActiveWindow(),
+        Rectangle(rMouseLocation, Size(10,10)),
+        POPUPMENU_EXECUTE_DOWN);
+    switch (nResult)
+    {
+        case SID_SET_SNAPITEM:
+        {
+            SfxUInt32Item aHelpLineItem (ID_VAL_INDEX, nSnapLineIndex);
+            const SfxPoolItem* aArguments[] = {&aHelpLineItem, NULL};
+            GetViewFrame()->GetDispatcher()->Execute(
+                SID_SET_SNAPITEM,
+                SFX_CALLMODE_SLOT,
+                aArguments);
+        }
+        break;
+
+        case SID_DELETE_SNAPITEM:
+        {
+            rPageView.DeleteHelpLine(nSnapLineIndex);
+        }
+        break;
+
+        default:
+            break;
+    }
+}
+
+
+
+
 #ifdef _MSC_VER
 #pragma optimize ( "", on )
 #endif

testautomation/graphics/optional/includes/global/g_tools.inc

 Westlich.Select 32
 Kontext "ExtrasOptionenDlg"
 ExtrasOptionenDlg.OK
+sleep 1
   '------------------------
   try
      ExtrasThesaurusDraw							'/// Thesaurus with only 1 word ///'
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.