diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2022-07-29 00:08:46 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2022-08-30 13:07:36 +0200 |
commit | 2958e4c92f15652c424765f02c87518011eb2406 (patch) | |
tree | 788c66ebf5f6fee2921fbc1a4bab773645e7390a /vcl/source/window | |
parent | 1f6918b458e5edee8daa7c81675b30d50533249f (diff) |
tdf#149956 Remove previous vcl only solution
Change-Id: Id67b75856a230e175ccc6328ec0838c78589191b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139020
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/builder.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 40 |
2 files changed, 0 insertions, 42 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index f1a31674e19e..441680aec077 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -2155,8 +2155,6 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString & m_pParserState->m_aButtonMenuMaps.emplace_back(id, sMenu); setupFromActionName(static_cast<Button*>(xWindow.get()), rMap, m_xFrame); } - else if (xWindow->GetType() == WindowType::TOOLBOX) - static_cast<ToolBox*>(xWindow.get())->TrackImageOrientation(m_xFrame); } } diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 6223173c2d0b..37a4019942f4 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -18,7 +18,6 @@ */ #include <vcl/toolbox.hxx> -#include <vcl/commandinfoprovider.hxx> #include <vcl/event.hxx> #include <vcl/decoview.hxx> #include <vcl/toolkit/floatwin.hxx> @@ -29,13 +28,11 @@ #include <vcl/layout.hxx> #include <vcl/menu.hxx> #include <vcl/settings.hxx> -#include <vclstatuslistener.hxx> #include <vcl/ptrstyle.hxx> #include <bitmaps.hlst> #include <toolbarvalue.hxx> #include <tools/poly.hxx> -#include <svl/imageitm.hxx> #include <sal/log.hxx> #include <o3tl/string_view.hxx> #include <osl/diagnose.h> @@ -1102,15 +1099,6 @@ IMPL_LINK( ImplTBDragMgr, SelectHdl, Accelerator&, rAccel, void ) EndDragging(); } -void ToolBox::TrackImageOrientation(const css::uno::Reference<css::frame::XFrame>& rFrame) -{ - if (mpStatusListener.is()) - mpStatusListener->dispose(); - - mpStatusListener = new VclStatusListener<ToolBox>(this, rFrame, ".uno:ImageOrientation"); - mpStatusListener->startListening(); -} - void ToolBox::ImplInitToolBoxData() { // initialize variables @@ -1153,7 +1141,6 @@ void ToolBox::ImplInitToolBoxData() mbDragging = false; mbIsKeyEvent = false; mbChangingHighlight = false; - mbImagesMirrored = false; mbLineSpacing = false; mbIsArranged = false; meButtonType = ButtonType::SYMBOLONLY; @@ -1165,7 +1152,6 @@ void ToolBox::ImplInitToolBoxData() meTextPosition = ToolBoxTextPosition::Right; mnLastFocusItemId = ToolBoxItemId(0); mnActivateCount = 0; - mnImagesRotationAngle = 0_deg10; mpIdle.reset(new Idle("vcl::ToolBox maIdle update")); mpIdle->SetPriority( TaskPriority::RESIZE ); @@ -1329,9 +1315,6 @@ void ToolBox::dispose() delete pSVData->maCtrlData.mpTBDragMgr; pSVData->maCtrlData.mpTBDragMgr = nullptr; - if (mpStatusListener.is()) - mpStatusListener->dispose(); - mpFloatWin.clear(); mpIdle.reset(); @@ -3856,29 +3839,6 @@ void ToolBox::DataChanged( const DataChangedEvent& rDCEvt ) maDataChangedHandler.Call( &rDCEvt ); } -void ToolBox::statusChanged( const css::frame::FeatureStateEvent& Event ) -{ - // Update image mirroring/rotation - if ( Event.FeatureURL.Complete != ".uno:ImageOrientation" ) - return; - - SfxImageItem aItem( 1 ); - aItem.PutValue( Event.State, 0 ); - - mbImagesMirrored = aItem.IsMirrored(); - mnImagesRotationAngle = aItem.GetRotation(); - - // update image orientation - OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(mpStatusListener->getFrame())); - for (auto const& item : mpData->m_aItems) - { - if (vcl::CommandInfoProvider::IsMirrored(item.maCommandStr, aModuleName)) - SetItemImageMirrorMode(item.mnId, mbImagesMirrored); - if (vcl::CommandInfoProvider::IsRotated(item.maCommandStr, aModuleName)) - SetItemImageAngle(item.mnId, mnImagesRotationAngle); - } -} - void ToolBox::SetStyle(WinBits nNewStyle) { mnWinStyle = nNewStyle; |