[Libreoffice-commits] core.git: 5 commits - icon-themes/breeze icon-themes/galaxy icon-themes/hicontrast icon-themes/sifr icon-themes/tango include/sfx2 include/svx include/vcl officecfg/registry sc/sdi sc/source sc/uiconfig sfx2/source svx/source vcl/source

Maxim Monastirsky momonasmon at gmail.com
Sun Sep 4 09:01:48 UTC 2016


 icon-themes/breeze/links.txt                                      |    2 
 icon-themes/galaxy/links.txt                                      |    2 
 icon-themes/hicontrast/links.txt                                  |    2 
 icon-themes/sifr/links.txt                                        |    2 
 icon-themes/tango/links.txt                                       |    2 
 include/sfx2/templatelocalview.hxx                                |    2 
 include/sfx2/thumbnailview.hxx                                    |    2 
 include/svx/tbcontrl.hxx                                          |    6 +-
 include/vcl/help.hxx                                              |    2 
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |   14 +++++
 sc/sdi/scalc.sdi                                                  |    2 
 sc/source/ui/view/formatsh.cxx                                    |   12 -----
 sc/uiconfig/scalc/toolbar/singlemode.xml                          |    2 
 sfx2/source/control/templatelocalview.cxx                         |   14 +++++
 sfx2/source/control/thumbnailview.cxx                             |   13 -----
 svx/source/tbxctrls/tbcontrl.cxx                                  |   24 +++-------
 vcl/source/app/help.cxx                                           |    3 -
 17 files changed, 59 insertions(+), 47 deletions(-)

New commits:
commit 0c3a9aa403c209e522dc5c32258c33381677c91e
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Sun Sep 4 02:55:34 2016 +0300

    tdf#101779 Multiline tooltips in template manager
    
    This time just set a flag to use Balloon style,
    instead of forcing extended tips.
    
    Change-Id: I170bbe4b1bb95aeb9fde00cbecc2bb46c9078e9d

diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index f139b26..e83e71c 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -139,6 +139,8 @@ public:
 
     virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
 
+    virtual void RequestHelp( const HelpEvent& rHEvt ) override;
+
     virtual void Command( const CommandEvent& rCEvt ) override;
 
     virtual void KeyInput( const KeyEvent& rKEvt ) override;
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index ca0b389..331c222 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -22,6 +22,7 @@
 #include <unotools/ucbstreamhelper.hxx>
 #include <unotools/moduleoptions.hxx>
 #include <vcl/builderfactory.hxx>
+#include <vcl/help.hxx>
 #include <vcl/pngread.hxx>
 #include <vcl/layout.hxx>
 
@@ -882,6 +883,19 @@ void TemplateLocalView::MouseButtonDown( const MouseEvent& rMEvt )
     ThumbnailView::MouseButtonDown(rMEvt);
 }
 
+void TemplateLocalView::RequestHelp( const HelpEvent& rHEvt )
+{
+    if ( rHEvt.GetMode() & HelpEventMode::QUICK )
+    {
+        Rectangle aRect( OutputToScreenPixel( GetPosPixel() ), GetSizePixel() );
+        Help::ShowQuickHelp( this, aRect, GetQuickHelpText(),
+                             QuickHelpFlags::CtrlText | QuickHelpFlags::TipStyleBalloon );
+        return;
+    }
+
+    ThumbnailView::RequestHelp( rHEvt );
+}
+
 void TemplateLocalView::Command( const CommandEvent& rCEvt )
 {
     if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )
commit 331d3a8b23cdbff0e1434aa5a553efdcc2c7c822
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Sun Sep 4 02:48:18 2016 +0300

    Related: tdf#101779 TipStyleBalloon for ShowQuickHelp too
    
    681294d55b6b4edcdef08982596cb4bcee32e635 converted
    TableDataWindow::RequestHelp to use ShowQuickHelp,
    but it wants to set TipStyleBalloon to be able to use
    line break. Also I want to do the same in the template
    manager dialog, in the following commit.
    
    Change-Id: Ie2569a5ab29620a5f4474dafd2309513c08bd7d2

diff --git a/include/vcl/help.hxx b/include/vcl/help.hxx
index 09eca5c..bd56413 100644
--- a/include/vcl/help.hxx
+++ b/include/vcl/help.hxx
@@ -43,7 +43,7 @@ enum class QuickHelpFlags
     CtrlText          = 0x0040,
 /// no delay when opening the quick help. Applies to ShowBallon and ShowQuickHelp
     NoDelay           = 0x0080,
-/// force balloon-style in ShowPopover
+/// force balloon-style in ShowPopover and ShowQuickHelp
     TipStyleBalloon   = 0x0100,
     NoEvadePointer    = 0x0200,
     BiDiRtl           = 0x0400,
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 7a8bbc8..63b5605 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -178,7 +178,8 @@ bool Help::ShowQuickHelp( vcl::Window* pParent,
                           const OUString& rLongHelpText,
                           QuickHelpFlags nStyle )
 {
-    ImplShowHelpWindow( pParent, HELPWINSTYLE_QUICK, nStyle,
+    sal_uInt16 nHelpWinStyle = ( nStyle & QuickHelpFlags::TipStyleBalloon ) ? HELPWINSTYLE_BALLOON : HELPWINSTYLE_QUICK;
+    ImplShowHelpWindow( pParent, nHelpWinStyle, nStyle,
                         rHelpText, rLongHelpText,
                         pParent->OutputToScreenPixel( pParent->GetPointerPosPixel() ), rScreenRect );
     return true;
commit d5081c16ac77971c9523405c4a10a10a628ce0da
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Sun Sep 4 02:06:28 2016 +0300

    tdf#101852 Revert "tdf#101779 Allow multiline tooltips in template manager"
    
    This reverts commit 2decee2ccd9a4167949843da0db99edaebe6acd8.

diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 13621cb..bd08a57 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -187,8 +187,6 @@ public:
 
     virtual void MouseMove(const MouseEvent& rMEvt) override;
 
-    virtual void RequestHelp(const HelpEvent& rHEvt) override;
-
     void AppendItem(ThumbnailViewItem *pItem);
 
     void RemoveItem(sal_uInt16 nItemId);
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index c0d4c37..a6a48e8 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -109,19 +109,6 @@ void ThumbnailView::MouseMove(const MouseEvent& rMEvt)
         SetQuickHelpText(aHelp);
 }
 
-void ThumbnailView::RequestHelp( const HelpEvent& rHEvt )
-{
-    if ( rHEvt.GetMode() & HelpEventMode::QUICK )
-    {
-        // Force balloon mode, to be able to use line break.
-        HelpEvent aNewEvent( rHEvt.GetMousePosPixel(), HelpEventMode::BALLOON );
-        Control::RequestHelp( aNewEvent );
-        return;
-    }
-
-    Control::RequestHelp( rHEvt );
-}
-
 void ThumbnailView::AppendItem(ThumbnailViewItem *pItem)
 {
     if (maFilterFunc(pItem))
commit 56205276698dc6633d8110f628339bb01ae1fcc3
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Fri Sep 2 16:25:54 2016 +0300

    Non-split currency button
    
    Change-Id: I002af2140dd372302509509baf8d5f400ed4341a

diff --git a/icon-themes/breeze/links.txt b/icon-themes/breeze/links.txt
index b97f2e2..67acc1c 100644
--- a/icon-themes/breeze/links.txt
+++ b/icon-themes/breeze/links.txt
@@ -649,6 +649,8 @@ cmd/lc_currencyfield.png cmd/lc_formattedfield.png
 cmd/sc_currencyfield.png cmd/sc_formattedfield.png
 cmd/lc_numberformatcurrency.png cmd/lc_formattedfield.png
 cmd/sc_numberformatcurrency.png cmd/sc_formattedfield.png
+cmd/lc_numberformatcurrencysimple.png cmd/lc_formattedfield.png
+cmd/sc_numberformatcurrencysimple.png cmd/sc_formattedfield.png
 
 # Fontwork
 cmd/lc_fontworkshapetype.png cmd/lc_fontwork.png
diff --git a/icon-themes/galaxy/links.txt b/icon-themes/galaxy/links.txt
index 0c66dda..3742652 100644
--- a/icon-themes/galaxy/links.txt
+++ b/icon-themes/galaxy/links.txt
@@ -2,6 +2,8 @@ cmd/lc_savesimple.png cmd/lc_save.png
 cmd/sc_savesimple.png cmd/sc_save.png
 cmd/lc_underlinesimple.png cmd/lc_underline.png
 cmd/sc_underlinesimple.png cmd/sc_underline.png
+cmd/lc_numberformatcurrencysimple.png cmd/lc_numberformatcurrency.png
+cmd/sc_numberformatcurrencysimple.png cmd/sc_numberformatcurrency.png
 cmd/lc_datastreamsplay.png avmedia/res/avl02049.png
 cmd/sc_datastreamsplay.png avmedia/res/av02049.png
 cmd/lc_datastreamsstop.png avmedia/res/avl02051.png
diff --git a/icon-themes/hicontrast/links.txt b/icon-themes/hicontrast/links.txt
index df0ec87..f5dd553 100644
--- a/icon-themes/hicontrast/links.txt
+++ b/icon-themes/hicontrast/links.txt
@@ -2,6 +2,8 @@ cmd/lc_savesimple.png cmd/lc_save.png
 cmd/sc_savesimple.png cmd/sc_save.png
 cmd/lc_underlinesimple.png cmd/lc_underline.png
 cmd/sc_underlinesimple.png cmd/sc_underline.png
+cmd/lc_numberformatcurrencysimple.png cmd/lc_numberformatcurrency.png
+cmd/sc_numberformatcurrencysimple.png cmd/sc_numberformatcurrency.png
 cmd/lc_anchormenu.png cmd/lc_toggleanchortype.png
 cmd/sc_anchormenu.png cmd/sc_toggleanchortype.png
 
diff --git a/icon-themes/sifr/links.txt b/icon-themes/sifr/links.txt
index 2424d04..80f8e01 100644
--- a/icon-themes/sifr/links.txt
+++ b/icon-themes/sifr/links.txt
@@ -96,6 +96,8 @@ cmd/sc_spellingandgrammardialog.png cmd/sc_spelling.png
 # Calc
 cmd/lc_numberformatcurrency.png cmd/lc_insertcurrencyfield.png
 cmd/sc_numberformatcurrency.png cmd/sc_insertcurrencyfield.png
+cmd/lc_numberformatcurrencysimple.png cmd/lc_insertcurrencyfield.png
+cmd/sc_numberformatcurrencysimple.png cmd/sc_insertcurrencyfield.png
 cmd/lc_linestyle.png cmd/lc_borderdialog.png
 cmd/sc_linestyle.png cmd/sc_borderdialog.png
 
diff --git a/icon-themes/tango/links.txt b/icon-themes/tango/links.txt
index 5e7ed99..8003f05 100644
--- a/icon-themes/tango/links.txt
+++ b/icon-themes/tango/links.txt
@@ -178,9 +178,11 @@ cmd/lc_numberformatdate.png cmd/lc_datefield.png
 cmd/sc_datefield.png cmd/sc_numberformatdate.png
 cmd/lc_insertcurrencyfield.png cmd/lc_currencyfield.png
 cmd/lc_numberformatcurrency.png cmd/lc_currencyfield.png
+cmd/lc_numberformatcurrencysimple.png cmd/lc_currencyfield.png
 cmd/sc_inserttimefield.png cmd/sc_timefield.png
 cmd/sc_insertcurrencyfield.png cmd/sc_currencyfield.png
 cmd/sc_numberformatcurrency.png cmd/sc_currencyfield.png
+cmd/sc_numberformatcurrencysimple.png cmd/sc_currencyfield.png
 sfx2/res/favourite_big.png cmd/lc_insertbookmark.png
 sfx2/res/favorite.png cmd/sc_insertbookmark.png
 cmd/lc_hyperlinkdialog.png cmd/lc_inserthyperlink.png
diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx
index 662a9fb..5e96b22 100644
--- a/include/svx/tbcontrl.hxx
+++ b/include/svx/tbcontrl.hxx
@@ -304,6 +304,10 @@ public:
     virtual ~SvxCurrencyToolBoxControl();
     virtual void Select( sal_uInt16 nSelectModifier ) override;
     virtual VclPtr<SfxPopupWindow> CreatePopupWindow() override;
+
+    // XInitialization
+    virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& rArguments )
+        throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) override;
 };
 
 
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index da6d836..11998fd 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1792,6 +1792,20 @@
           <value>1</value>
         </prop>
       </node>
+      <node oor:name=".uno:NumberFormatCurrencySimple" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">Format as Currency</value>
+        </prop>
+        <prop oor:name="TooltipLabel" oor:type="xs:string">
+          <value xml:lang="en-US">Currency</value>
+        </prop>
+        <prop oor:name="TargetURL" oor:type="xs:string">
+          <value>.uno:NumberFormatCurrency</value>
+        </prop>
+        <prop oor:name="Properties" oor:type="xs:int">
+          <value>1</value>
+        </prop>
+      </node>
       <node oor:name=".uno:NumberFormatPercent" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">Format as Percent</value>
diff --git a/sc/uiconfig/scalc/toolbar/singlemode.xml b/sc/uiconfig/scalc/toolbar/singlemode.xml
index df58727..afee24d 100644
--- a/sc/uiconfig/scalc/toolbar/singlemode.xml
+++ b/sc/uiconfig/scalc/toolbar/singlemode.xml
@@ -33,7 +33,7 @@
  <toolbar:toolbaritem xlink:href=".uno:SpellDialog" toolbar:visible="false"/>
  <toolbar:toolbarseparator/>
  <toolbar:toolbaritem xlink:href=".uno:NumberFormatStandard" toolbar:visible="false"/>
- <toolbar:toolbaritem xlink:href=".uno:NumberFormatCurrency"/>
+ <toolbar:toolbaritem xlink:href=".uno:NumberFormatCurrencySimple"/>
  <toolbar:toolbaritem xlink:href=".uno:NumberFormatPercent"/>
  <toolbar:toolbaritem xlink:href=".uno:NumberFormatDecimal"/>
  <toolbar:toolbarseparator/>
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 2670db9..9434567 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2998,11 +2998,18 @@ SvxCurrencyToolBoxControl::SvxCurrencyToolBoxControl( sal_uInt16 nSlotId, sal_uI
     m_eLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ),
     m_nFormatKey( NUMBERFORMAT_ENTRY_NOT_FOUND )
 {
-    rBox.SetItemBits( nId, rBox.GetItemBits( nId ) | ToolBoxItemBits::DROPDOWN );
 }
 
 SvxCurrencyToolBoxControl::~SvxCurrencyToolBoxControl() {}
 
+void SvxCurrencyToolBoxControl::initialize( const css::uno::Sequence< css::uno::Any >& rArguments )
+    throw ( css::uno::Exception, css::uno::RuntimeException, std::exception )
+{
+    SfxToolBoxControl::initialize(rArguments);
+    if (GetToolBox().GetItemCommand(GetId()) == m_aCommandURL)
+        GetToolBox().SetItemBits(GetId(), ToolBoxItemBits::DROPDOWN | GetToolBox().GetItemBits(GetId()));
+}
+
 VclPtr<SfxPopupWindow> SvxCurrencyToolBoxControl::CreatePopupWindow()
 {
     VclPtr<SvxCurrencyList_Impl> xCurrencyWin =
commit 3317b1f7eec887f4ed1303ef0ab8b43acd200f60
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Fri Sep 2 14:39:04 2016 +0300

    Restore the toggle state of the currency button
    
    Change-Id: Ibe7d8b183038c4a925282ccab1b637342a714712

diff --git a/include/svx/tbcontrl.hxx b/include/svx/tbcontrl.hxx
index 34e5563..662a9fb 100644
--- a/include/svx/tbcontrl.hxx
+++ b/include/svx/tbcontrl.hxx
@@ -304,8 +304,6 @@ public:
     virtual ~SvxCurrencyToolBoxControl();
     virtual void Select( sal_uInt16 nSelectModifier ) override;
     virtual VclPtr<SfxPopupWindow> CreatePopupWindow() override;
-    virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
-                              const SfxPoolItem* pState) override;
 };
 
 
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 77add5a..c371c28 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -3773,7 +3773,7 @@ SfxVoidItem NumberFormatCurrency SID_NUMBER_CURRENCY
     Container = FALSE,
     RecordAbsolute = FALSE,
     RecordPerSet;
-    SlotType = SfxUInt32Item
+    SlotType = SfxBoolItem
 
     AccelConfig = TRUE,
     MenuConfig = TRUE,
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 2fcce12..8794ba1 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2584,17 +2584,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
                 }
                 break;
             case SID_NUMBER_CURRENCY:
-                {
-                    const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
-                    if( SfxItemState::DONTCARE != rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) )
-                    {
-                        sal_uInt32 nNumberFormat = static_cast<const SfxUInt32Item&>(
-                                                   rAttrSet.Get( ATTR_VALUE_FORMAT ) ).GetValue();
-                        rSet.Put( SfxUInt32Item( nWhich, nNumberFormat ) );
-                    }
-                    else
-                        rSet.InvalidateItem( nWhich );
-                }
+                rSet.Put( SfxBoolItem(nWhich, (nType & css::util::NumberFormat::CURRENCY)) );
                 break;
             case SID_NUMBER_SCIENTIFIC:
                 rSet.Put( SfxBoolItem(nWhich, (nType & css::util::NumberFormat::SCIENTIFIC)) );
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 757a15b..2670db9 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -119,7 +119,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxFontNameToolBoxControl, SvxFontItem );
 SFX_IMPL_TOOLBOX_CONTROL( SvxFrameToolBoxControl, SvxBoxItem );
 SFX_IMPL_TOOLBOX_CONTROL( SvxFrameLineStyleToolBoxControl, SvxLineItem );
 SFX_IMPL_TOOLBOX_CONTROL( SvxSimpleUndoRedoController, SfxStringItem );
-SFX_IMPL_TOOLBOX_CONTROL( SvxCurrencyToolBoxControl, SfxUInt32Item );
+SFX_IMPL_TOOLBOX_CONTROL( SvxCurrencyToolBoxControl, SfxBoolItem );
 
 class SvxStyleBox_Impl : public ComboBox
 {
@@ -3058,19 +3058,6 @@ void SvxCurrencyToolBoxControl::Select( sal_uInt16 nSelectModifier )
                                  aArgs );
 }
 
-void SvxCurrencyToolBoxControl::StateChanged(
-    sal_uInt16, SfxItemState eState, const SfxPoolItem* )
-{
-    sal_uInt16                  nId     = GetId();
-    ToolBox&                    rTbx    = GetToolBox();
-
-    rTbx.EnableItem( nId, SfxItemState::DISABLED != eState );
-    rTbx.SetItemState( nId, (SfxItemState::DONTCARE == eState)
-                            ? TRISTATE_INDET
-                            : TRISTATE_FALSE );
-}
-
-
 static void lcl_CalcSizeValueSet( vcl::Window &rWin, ValueSet &rValueSet, const Size &aItemSize )
 {
     Size aSize = rValueSet.CalcWindowSizePixel( aItemSize );


More information about the Libreoffice-commits mailing list