[Libreoffice-commits] core.git: framework/inc framework/source include/vcl vcl/source

2022-08-30 Thread Maxim Monastirsky (via logerrit)
 framework/inc/uielement/toolbarmanager.hxx|1 
 framework/source/uielement/toolbarmanager.cxx |9 -
 include/vcl/toolbox.hxx   |9 -
 vcl/source/window/builder.cxx |2 -
 vcl/source/window/toolbox.cxx |   40 --
 5 files changed, 61 deletions(-)

New commits:
commit 2958e4c92f15652c424765f02c87518011eb2406
Author: Maxim Monastirsky 
AuthorDate: Fri Jul 29 00:08:46 2022 +0300
Commit: Maxim Monastirsky 
CommitDate: Tue Aug 30 13:07:36 2022 +0200

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 

diff --git a/framework/inc/uielement/toolbarmanager.hxx 
b/framework/inc/uielement/toolbarmanager.hxx
index 162e14aca4e3..865a1b54d5b4 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -82,7 +82,6 @@ public:
 virtual void Clear() = 0;
 virtual void SetName(const OUString& rName) = 0;
 virtual void SetHelpId(const OString& rHelpId) = 0;
-virtual void TrackImageOrientation(const 
css::uno::Reference& rFrame) = 0;
 virtual bool WillUsePopupMode() = 0;
 virtual bool IsReallyVisible() = 0;
 virtual void SetIconSize(ToolBoxButtonSize eSize) = 0;
diff --git a/framework/source/uielement/toolbarmanager.cxx 
b/framework/source/uielement/toolbarmanager.cxx
index 86a6c161900d..d1251f96cb84 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -292,11 +292,6 @@ public:
 m_pToolBar->SetHelpId( rHelpId );
 }
 
-virtual void TrackImageOrientation(const 
css::uno::Reference& rFrame) override
-{
-m_pToolBar->TrackImageOrientation(rFrame);
-}
-
 virtual bool WillUsePopupMode() override
 {
 return m_pToolBar->WillUsePopupMode();
@@ -483,8 +478,6 @@ public:
 
 virtual void SetHelpId(const OString& /*rHelpId*/) override {}
 
-virtual void TrackImageOrientation(const 
css::uno::Reference&) override {}
-
 virtual bool WillUsePopupMode() override { return true; }
 
 virtual bool IsReallyVisible() override { return true; }
@@ -1669,8 +1662,6 @@ void ToolBarManager::RequestImages()
 ++pIter;
 ++i;
 }
-
-m_pImpl->TrackImageOrientation(m_xFrame);
 }
 
 void ToolBarManager::notifyRegisteredControllers( const OUString& 
aUIElementName, const OUString& aCommand )
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index f89cb335b541..055d82f1e722 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -34,8 +34,6 @@
 #include 
 
 namespace com::sun::star::frame { class XFrame; }
-namespace com::sun::star::frame { struct FeatureStateEvent; }
-template  class VclStatusListener;
 
 class Timer;
 struct ImplToolItem;
@@ -116,7 +114,6 @@ private:
 tools::LongmnBottomBorder;
 tools::LongmnLastResizeDY;
 tools::LongmnActivateCount;
-Degree10mnImagesRotationAngle;
 ToolBoxItemId   mnLastFocusItemId;
 ToolBoxItemId   mnHighItemId;
 ToolBoxItemId   mnCurItemId;
@@ -143,7 +140,6 @@ private:
 mbDragging:1,
 mbIsKeyEvent:1,
 mbChangingHighlight:1,
-mbImagesMirrored:1,
 mbLineSpacing:1,
 mbIsArranged:1;
 WindowAlign meAlign;
@@ -161,8 +157,6 @@ private:
 Link maMenuButtonHdl;
 Link maStateChangedHandler;
 Link maDataChangedHandler;
-/** StatusListener. Notifies about rotated images etc */
-rtl::Reference> mpStatusListener;
 
 public:
 using Window::ImplInit;
@@ -504,14 +498,11 @@ public:
 
 
 void SetToolbarLayoutMode( ToolBoxLayoutMode eLayout );
-void statusChanged(const css::frame::FeatureStateEvent& rEvent);
 
 void SetToolBoxTextPosition( ToolBoxTextPosition ePosition );
 
 void SetLineSpacing(bool b) { mbLineSpacing = b; }
 
-void TrackImageOrientation(const css::uno::Reference& 
rFrame);
-
 virtual void DumpAsPropertyTree(tools::JsonWriter&) override;
 };
 
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 VclBuilder::makeObject(vcl::Window 
*pParent, const OString &
 m_pParserState->m_aButtonMenuMaps.emplace_back(id, sMenu);
 setupFromActionName(static_cast(xWindow.get()), rMap, 
m_xFrame);
 }
-else if (xWindow->GetType() == WindowType::TOOLBOX)
-
static_cast(xWindow.get())->TrackImageOrientation(m_xFrame);
 }
 }
 
diff --git a/vcl/source/window/toolbox.cxx 

[Libreoffice-commits] core.git: framework/inc framework/source include/vcl vcl/source

2015-12-08 Thread Samuel Mehrbrodt
 framework/inc/uielement/toolbarmanager.hxx|   13 --
 framework/source/uielement/toolbarmanager.cxx |  145 --
 include/vcl/commandinfoprovider.hxx   |4 
 include/vcl/toolbox.hxx   |   13 +-
 include/vcl/vclstatuslistener.hxx |5 
 vcl/source/helper/commandinfoprovider.cxx |   36 ++
 vcl/source/window/toolbox.cxx |   32 -
 vcl/source/window/toolbox2.cxx|   11 +
 8 files changed, 92 insertions(+), 167 deletions(-)

New commits:
commit ac97f32307feb488c86d6fa962258fe79320d31b
Author: Samuel Mehrbrodt 
Date:   Fri Dec 4 17:05:11 2015 +0100

Move icon rotation/flip handling from ToolbarManager to vcl's Toolbar

This enables rotatad/flipped icons in the Sidebar and other non-toolbar 
places (tdf#85767)

Change-Id: I034394ae6f9b8d91ef5a376a43eda587098f064e
Reviewed-on: https://gerrit.libreoffice.org/20403
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/framework/inc/uielement/toolbarmanager.hxx 
b/framework/inc/uielement/toolbarmanager.hxx
index 43d285b..f99c385 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -61,7 +61,6 @@ namespace framework
 
 typedef ::cppu::WeakImplHelper<
css::frame::XFrameActionListener,
-   css::frame::XStatusListener,
css::lang::XComponent,
css::ui::XUIConfigurationListener
 > ToolbarManager_Base;
@@ -80,9 +79,6 @@ class ToolBarManager : public ToolbarManager_Base
 // XFrameActionListener
 virtual void SAL_CALL frameAction( const css::frame::FrameActionEvent& 
Action ) throw ( css::uno::RuntimeException, std::exception ) override;
 
-// XStatusListener
-virtual void SAL_CALL statusChanged( const 
css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException, 
std::exception ) override;
-
 // XEventListener
 virtual void SAL_CALL disposing( const css::lang::EventObject& Source 
) throw ( css::uno::RuntimeException, std::exception ) override;
 
@@ -145,8 +141,6 @@ class ToolBarManager : public ToolbarManager_Base
 void UpdateController( css::uno::Reference< 
css::frame::XToolbarController > xController);
 //end
 void AddFrameActionListener();
-void AddImageOrientationListener();
-void UpdateImageOrientation();
 void ImplClearPopupMenu( ToolBox *pToolBar );
 void RequestImages();
 ToolBoxItemBits ConvertStyleToToolboxItemBits( sal_Int32 nStyle );
@@ -167,11 +161,7 @@ class ToolBarManager : public ToolbarManager_Base
  m_bSmallSymbols : 1,
  m_bAddedToTaskPaneList : 1,
  m_bFrameActionRegistered : 1,
- m_bUpdateControllers : 1,
- m_bImageOrientationRegistered : 1,
- m_bImageMirrored : 1;
-
-long m_lImageRotation;
+ m_bUpdateControllers : 1;
 
 VclPtr  
m_pToolBar;
 
@@ -188,7 +178,6 @@ class ToolBarManager : public ToolbarManager_Base
 css::uno::Reference< css::frame::XUIControllerFactory >  
m_xToolbarControllerFactory;
 css::uno::Reference< css::ui::XImageManager >
m_xModuleImageManager;
 css::uno::Reference< css::ui::XImageManager >
m_xDocImageManager;
-css::uno::Reference< css::lang::XComponent > 
m_xImageOrientationListener;
 css::uno::Reference< css::ui::XUIConfigurationManager >  
m_xUICfgMgr;
 css::uno::Reference< css::ui::XUIConfigurationManager >  
m_xDocUICfgMgr;
 
diff --git a/framework/source/uielement/toolbarmanager.cxx 
b/framework/source/uielement/toolbarmanager.cxx
index 1a0abc6..25eda26 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -55,8 +55,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -98,39 +96,6 @@ static const char HELPID_PREFIX_TESTTOOL[] = ".HelpId:";
 
 static const sal_uInt16 STARTID_CUSTOMIZE_POPUPMENU = 1000;
 
-class ImageOrientationListener : public svt::FrameStatusListener
-{
-public:
-ImageOrientationListener( const Reference< XStatusListener >& 
rReceiver,
-  const Reference< XComponentContext >& 
rxContext,
-  const Reference< XFrame >& rFrame );
-virtual ~ImageOrientationListener();
-
-virtual void SAL_CALL statusChanged( const 
css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException, 
std::exception ) override;
-
-private:
-Reference< XStatusListener > m_xReceiver;
-};
-
-ImageOrientationListener::ImageOrientationListener(
-const Reference< XStatusListener >& rReceiver,
-const 

[Libreoffice-commits] core.git: framework/inc framework/source include/vcl vcl/source

2015-11-17 Thread Samuel Mehrbrodt
 framework/inc/helper/mischelper.hxx |8 --
 framework/inc/uielement/statusbarmanager.hxx|1 
 framework/source/fwi/helper/mischelper.cxx  |   71 
 framework/source/uielement/macrosmenucontroller.cxx |9 --
 framework/source/uielement/menubarmanager.cxx   |7 -
 framework/source/uielement/statusbarmanager.cxx |8 --
 include/vcl/commandinfoprovider.hxx |8 ++
 vcl/source/helper/commandinfoprovider.cxx   |   26 ++-
 8 files changed, 39 insertions(+), 99 deletions(-)

New commits:
commit 81ff7cfddb8e6786529f0a878007e9d399d4908a
Author: Samuel Mehrbrodt 
Date:   Tue Nov 17 12:08:30 2015 +0100

tdf#95845 Add methods for menu labels to CommandInfoProvider

Change-Id: Ibf6a26940ec194f540255584776f8ebcefbb94ae

diff --git a/framework/inc/helper/mischelper.hxx 
b/framework/inc/helper/mischelper.hxx
index 4f5cf40..6be2306 100644
--- a/framework/inc/helper/mischelper.hxx
+++ b/framework/inc/helper/mischelper.hxx
@@ -121,14 +121,6 @@ public:
 css::uno::Reference< css::linguistic2::XLanguageGuessing >  GetGuesser() 
const;
 };
 
-FWI_DLLPUBLIC OUString RetrieveLabelFromCommand( const OUString& aCmdURL
-,const css::uno::Reference< css::uno::XComponentContext >&
_xContext
-,css::uno::Reference< css::container::XNameAccess >&
_xUICommandLabels
-,const css::uno::Reference< css::frame::XFrame >& _xFrame
-,OUString& _rModuleIdentifier
-,bool& _rIni
-,const sal_Char* _pName);
-
 FWI_DLLPUBLIC void FillLangItems( std::set< OUString > ,
 const css::uno::Reference< css::frame::XFrame > ,
 const LanguageGuessingHelper & rLangGuessHelper,
diff --git a/framework/inc/uielement/statusbarmanager.hxx 
b/framework/inc/uielement/statusbarmanager.hxx
index 1bef72c..a80fea3 100644
--- a/framework/inc/uielement/statusbarmanager.hxx
+++ b/framework/inc/uielement/statusbarmanager.hxx
@@ -89,7 +89,6 @@ class StatusBarManager : public ::cppu::WeakImplHelper<
 DECL_LINK_TYPED(DoubleClick, StatusBar*, void);
 
 void RemoveControllers();
-OUString RetrieveLabelFromCommand( const OUString& aCmdURL );
 void CreateControllers();
 void UpdateControllers();
 void AddFrameActionListener();
diff --git a/framework/source/fwi/helper/mischelper.cxx 
b/framework/source/fwi/helper/mischelper.cxx
index 7201de0..f8a1f75 100644
--- a/framework/source/fwi/helper/mischelper.cxx
+++ b/framework/source/fwi/helper/mischelper.cxx
@@ -59,77 +59,6 @@ uno::Reference< linguistic2::XLanguageGuessing > 
LanguageGuessingHelper::GetGues
 return m_xLanguageGuesser;
 }
 
-OUString RetrieveLabelFromCommand(
-const OUString& aCmdURL,
-const uno::Reference< uno::XComponentContext >& _xContext,
-uno::Reference< container::XNameAccess >& _xUICommandLabels,
-const uno::Reference< frame::XFrame >& _xFrame,
-OUString& _rModuleIdentifier,
-bool& _rIni,
-const sal_Char* _pName)
-{
-OUString aLabel;
-
-// Retrieve popup menu labels
-if ( !_xUICommandLabels.is() )
-{
-  try
-{
-if ( !_rIni )
-{
-_rIni = true;
-Reference< XModuleManager2 > xModuleManager = 
ModuleManager::create( _xContext );
-
-try
-{
-_rModuleIdentifier = xModuleManager->identify( _xFrame );
-}
-catch( const Exception& )
-{
-}
-}
-
-Reference< XNameAccess > xNameAccess = 
frame::theUICommandDescription::get( _xContext );
-xNameAccess->getByName( _rModuleIdentifier ) >>= _xUICommandLabels;
-}
-catch ( const Exception& )
-{
-}
-}
-
-if ( _xUICommandLabels.is() )
-{
-try
-{
-if ( !aCmdURL.isEmpty() )
-{
-OUString aStr;
-Sequence< PropertyValue > aPropSeq;
-if( _xUICommandLabels->hasByName( aCmdURL ) )
-{
-if ( _xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq )
-{
-for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
-{
-if ( aPropSeq[i].Name.equalsAscii( 
_pName/*"Label"*/ ))
-{
-aPropSeq[i].Value >>= aStr;
-break;
-}
-}
-}
-}
-aLabel = aStr;
-}
-}
-catch ( const css::uno::Exception& )
-{
-}
-}
-
-return aLabel;
-}
-
 void FillLangItems( std::set< OUString > ,
 const uno::Reference< frame::XFrame > & rxFrame,
 const LanguageGuessingHelper &