summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/inc/view.hxx6
-rw-r--r--starmath/source/view.cxx8
2 files changed, 9 insertions, 5 deletions
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 555beca74c2d..45df0f425574 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -53,9 +53,6 @@ private:
DECL_LINK(ScrollHdl, weld::ScrolledWindow&, void);
- void SetGraphicMapMode(const MapMode& rNewMapMode);
- MapMode GetGraphicMapMode() const;
-
public:
explicit SmGraphicWindow(SmViewShell& rShell);
virtual void dispose() override;
@@ -74,6 +71,9 @@ public:
virtual void Resize() override;
void ShowContextMenu(const CommandEvent& rCEvt);
+ void SetGraphicMapMode(const MapMode& rNewMapMode);
+ MapMode GetGraphicMapMode() const;
+
SmGraphicWidget& GetGraphicWidget()
{
return *mxGraphic;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 71dd3bc53946..39676971a93f 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1100,8 +1100,12 @@ void SmViewShell::InnerResizePixel(const Point &rOfs, const Size &rSize, bool)
if ( !aObjSize.IsEmpty() )
{
Size aProvidedSize = GetWindow()->PixelToLogic(rSize, MapMode(MapUnit::Map100thMM));
- SfxViewShell::SetZoomFactor( Fraction( aProvidedSize.Width(), aObjSize.Width() ),
- Fraction( aProvidedSize.Height(), aObjSize.Height() ) );
+ Fraction aZoomX(aProvidedSize.Width(), aObjSize.Width());
+ Fraction aZoomY(aProvidedSize.Height(), aObjSize.Height());
+ MapMode aMap(mxGraphicWindow->GetGraphicMapMode());
+ aMap.SetScaleX(aZoomX);
+ aMap.SetScaleY(aZoomY);
+ mxGraphicWindow->SetGraphicMapMode(aMap);
}
SetBorderPixel( SvBorder() );