summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/inc/classes/resource.hrc1
-rw-r--r--framework/source/classes/resource.src5
-rw-r--r--framework/source/uielement/langselectionstatusbarcontroller.cxx1
-rw-r--r--include/svx/dialogs.hrc6
-rw-r--r--svx/source/stbctrls/stbctrls.src20
-rw-r--r--svx/source/stbctrls/zoomctrl.cxx1
-rw-r--r--svx/source/stbctrls/zoomsliderctrl.cxx24
-rw-r--r--sw/AllLangResTarget_sw.mk1
-rw-r--r--sw/inc/rcid.hrc13
-rw-r--r--sw/source/uibase/inc/utlui.hrc24
-rw-r--r--sw/source/uibase/inc/viewlayoutctrl.hxx1
-rw-r--r--sw/source/uibase/uiview/view2.cxx7
-rw-r--r--sw/source/uibase/utlui/bookctrl.cxx10
-rw-r--r--sw/source/uibase/utlui/statusbar.src43
-rw-r--r--sw/source/uibase/utlui/tmplctrl.cxx6
-rw-r--r--sw/source/uibase/utlui/viewlayoutctrl.cxx28
-rw-r--r--sw/source/uibase/utlui/wordcountctrl.cxx4
17 files changed, 174 insertions, 21 deletions
diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc
index 9c02511bc3cd..a74b314d3aa7 100644
--- a/framework/inc/classes/resource.hrc
+++ b/framework/inc/classes/resource.hrc
@@ -50,6 +50,7 @@
#define STR_RESET_TO_DEFAULT_LANGUAGE (RID_STR_START+22)
#define STR_CLEAR_RECENT_FILES (RID_STR_START+23)
#define STR_CLEAR_RECENT_FILES_HELP (RID_STR_START+24)
+#define STR_LANGSTATUS_HINT (RID_STR_START+25)
#define POPUPMENU_TOOLBAR_QUICKCUSTOMIZATION (RID_MENU_START+0)
diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src
index 1f4f5df0a911..841122047e2a 100644
--- a/framework/source/classes/resource.src
+++ b/framework/source/classes/resource.src
@@ -190,4 +190,9 @@ String STR_SET_LANGUAGE_FOR_ALL_TEXT
Text [ en-US ] = "Set Language for all Text" ;
};
+String STR_LANGSTATUS_HINT
+{
+ Text [ en-US ] = "Text Language. Right-click to set selection or paragraph language" ;
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx
index f043c1d8dd5a..004e43cce43b 100644
--- a/framework/source/uielement/langselectionstatusbarcontroller.cxx
+++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx
@@ -146,6 +146,7 @@ throw (css::uno::Exception, css::uno::RuntimeException, std::exception)
if ( m_xStatusbarItem.is() )
{
m_xStatusbarItem->setText( FWK_RESSTR(STR_LANGSTATUS_MULTIPLE_LANGUAGES) );
+ m_xStatusbarItem->setQuickHelpText(FWK_RESSTR(STR_LANGSTATUS_HINT));
}
}
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 067298f294c8..495cae86c2f4 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -1045,9 +1045,13 @@
#define RID_SVXSTR_RECOVERY_INPROGRESS (RID_SVX_START + 1288)
#define RID_SVXSTR_RECOVERYONLY_FINISH_DESCR (RID_SVX_START + 1289)
#define RID_SVXSTR_RECOVERYONLY_FINISH (RID_SVX_START + 1290)
+#define RID_SVXSTR_ZOOMTOOL_HINT (RID_SVX_START + 1291)
+#define RID_SVXSTR_ZOOM (RID_SVX_START + 1292)
+#define RID_SVXSTR_ZOOM_IN (RID_SVX_START + 1293)
+#define RID_SVXSTR_ZOOM_OUT (RID_SVX_START + 1294)
// !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!!
-#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1291)
+#define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1295)
// if we have _a_lot_ time, we should group the resource ids by type, instead
// of grouping them by semantics. The reason is that resource ids have to be
diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src
index a9e98a7c775c..3a997bc060fc 100644
--- a/svx/source/stbctrls/stbctrls.src
+++ b/svx/source/stbctrls/stbctrls.src
@@ -121,6 +121,26 @@ String RID_SVXSTR_FIT_SLIDE
Text [ en-US ] = "Fit slide to current window.";
};
+String RID_SVXSTR_ZOOMTOOL_HINT
+{
+ Text [ en-US ] = "Zoom level. Click for dialog box and right-click for zoom list";
+};
+
+String RID_SVXSTR_ZOOM
+{
+ Text [ en-US ] = "Adjust zoom level";
+};
+
+String RID_SVXSTR_ZOOM_IN
+{
+ Text [ en-US ] = "Zoom in";
+};
+
+String RID_SVXSTR_ZOOM_OUT
+{
+ Text [ en-US ] = "Zoom out";
+};
+
// PopupMenu -------------------------------------------------------------
Menu RID_SVXMNU_ZOOM
{
diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx
index 01a69242eb81..63210fee20b4 100644
--- a/svx/source/stbctrls/zoomctrl.cxx
+++ b/svx/source/stbctrls/zoomctrl.cxx
@@ -103,6 +103,7 @@ SvxZoomStatusBarControl::SvxZoomStatusBarControl( sal_uInt16 _nSlotId,
nZoom( 100 ),
nValueSet( SVX_ZOOM_ENABLE_ALL )
{
+ GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(RID_SVXSTR_ZOOMTOOL_HINT));
}
void SvxZoomStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState,
diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx
index 6f5b400ca7a7..8ea241bbdc82 100644
--- a/svx/source/stbctrls/zoomsliderctrl.cxx
+++ b/svx/source/stbctrls/zoomsliderctrl.cxx
@@ -351,14 +351,13 @@ bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt )
return true;
const short nButtons = rEvt.GetButtons();
+ const Rectangle aControlRect = getControlRect();
+ const Point aPoint = rEvt.GetPosPixel();
+ const sal_Int32 nXDiff = aPoint.X() - aControlRect.Left();
// check mouse move with button pressed
if ( 1 == nButtons )
{
- const Rectangle aControlRect = getControlRect();
- const Point aPoint = rEvt.GetPosPixel();
- const sal_Int32 nXDiff = aPoint.X() - aControlRect.Left();
-
if ( nXDiff >= nSliderXOffset && nXDiff <= aControlRect.GetWidth() - nSliderXOffset )
{
mpImpl->mnCurrentZoom = Offset2Zoom( nXDiff );
@@ -367,6 +366,23 @@ bool SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt )
}
}
+ // Tooltips
+
+ long nIncDecWidth = mpImpl->maIncreaseButton.GetSizePixel().Width();
+
+ const long nButtonLeftOffset = (nSliderXOffset - nIncDecWidth)/2;
+ const long nButtonRightOffset = (nSliderXOffset + nIncDecWidth)/2;
+
+ // click to - button
+ if ( nXDiff >= nButtonLeftOffset && nXDiff <= nButtonRightOffset )
+ GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(RID_SVXSTR_ZOOM_OUT));
+ // click to + button
+ else if ( nXDiff >= aControlRect.GetWidth() - nSliderXOffset + nButtonLeftOffset &&
+ nXDiff <= aControlRect.GetWidth() - nSliderXOffset + nButtonRightOffset )
+ GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(RID_SVXSTR_ZOOM_IN));
+ else
+ GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(RID_SVXSTR_ZOOM));
+
return true;
}
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index c4c7780dd953..c95c16a2241f 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -80,6 +80,7 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/uibase/utlui/attrdesc.src \
sw/source/uibase/utlui/navipi.src \
sw/source/uibase/utlui/initui.src \
+ sw/source/uibase/utlui/statusbar.src \
sw/source/uibase/wrtsh/wrtsh.src \
sw/source/uibase/utlui/unotools.src \
sw/source/uibase/dbui/mailmergechildwindow.src \
diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc
index 4e8428a0a52b..0af476262780 100644
--- a/sw/inc/rcid.hrc
+++ b/sw/inc/rcid.hrc
@@ -40,7 +40,6 @@
#define RC_FRMDLG (RC_BASE + 1000)
#define RC_FLDDLG (RC_BASE + 1100)
#define RC_UTLUI (RC_BASE + 1250)
-#define RC_ATTR (RC_BASE + 1350)
#define RC_TABLE (RC_BASE + 1450)
#define RC_CONFIG (RC_BASE + 1550)
#define RC_MISC (RC_BASE + 1650)
@@ -71,6 +70,7 @@
#define RC_PAGEFRM (RC_BASE + 4250)
#define RC_IDXTXT (RC_BASE + 4350)
#define RC_SIDEBAR (RC_BASE + 4450)
+#define RC_ATTR (RC_BASE + 4550)
/*--------------------------------------------------------------------
Description: areas unharness
@@ -149,11 +149,7 @@
// Utilities UI
#define RC_UTLUI_BEGIN RC_UTLUI
-#define RC_UTLUI_END (RC_UTLUI + 99)
-
-// Utilities UI-Attributes
-#define RC_ATTR_BEGIN RC_ATTR
-#define RC_ATTR_END (RC_ATTR + 99)
+#define RC_UTLUI_END (RC_UTLUI + 199)
// Tables
#define RC_TABLE_BEGIN RC_TABLE
@@ -258,6 +254,11 @@
// sidebar (mostly the Page one)
#define RC_SIDEBAR_BEGIN RC_SIDEBAR
+#define RC_SIDEBAR_END (RC_SIDEBAR + 99)
+
+// Utilities UI-Attributes
+#define RC_ATTR_BEGIN RC_ATTR
+#define RC_ATTR_END (RC_ATTR + 99)
#endif
diff --git a/sw/source/uibase/inc/utlui.hrc b/sw/source/uibase/inc/utlui.hrc
index 9007b886838a..4caa3b387604 100644
--- a/sw/source/uibase/inc/utlui.hrc
+++ b/sw/source/uibase/inc/utlui.hrc
@@ -45,7 +45,15 @@
#define STR_CONTENT_TYPE_INDEX (RC_UTLUI_BEGIN + 17)
#define STR_CONTENT_TYPE_POSTIT (RC_UTLUI_BEGIN + 18)
#define STR_CONTENT_TYPE_DRAWOBJECT (RC_UTLUI_BEGIN + 19)
-#define STR_CONTENT_END (RC_UTLUI_BEGIN + 19)
+// Statusbar: Word count/Viewlayout/Page count
+#define STR_WORDCOUNT_HINT (RC_UTLUI_BEGIN + 20)
+#define STR_VIEWLAYOUT_ONE (RC_UTLUI_BEGIN + 21)
+#define STR_VIEWLAYOUT_TWO (RC_UTLUI_BEGIN + 22)
+#define STR_VIEWLAYOUT_BOOK (RC_UTLUI_BEGIN + 23)
+#define STR_BOOKCTRL_HINT (RC_UTLUI_BEGIN + 24)
+#define STR_BOOKCTRL_HINT_EXTENDED (RC_UTLUI_BEGIN + 25)
+#define STR_TMPLCTRL_HINT (RC_UTLUI_BEGIN + 26)
+#define STR_CONTENT_END (RC_UTLUI_BEGIN + 26)
#define STR_CONTENT_TYPE_SINGLE_FIRST (STR_CONTENT_END + 1)
#define STR_CONTENT_TYPE_SINGLE_OUTLINE (STR_CONTENT_TYPE_SINGLE_FIRST + 0)
@@ -142,13 +150,13 @@
#define IMG_NAVI_ENTRYBMP (RC_UTLUI_BEGIN + 4)
#define ILIST_DB_DLG (RC_UTLUI_BEGIN + 6)
-#define IMG_VIEWLAYOUT_AUTOMATIC (RC_UTLUI_BEGIN + 12)
-#define IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE (RC_UTLUI_BEGIN + 13)
-#define IMG_VIEWLAYOUT_BOOKMODE (RC_UTLUI_BEGIN + 14)
-#define IMG_VIEWLAYOUT_BOOKMODE_ACTIVE (RC_UTLUI_BEGIN + 15)
-#define IMG_VIEWLAYOUT_SINGLECOLUMN (RC_UTLUI_BEGIN + 16)
-#define IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE (RC_UTLUI_BEGIN + 17)
-#define IMG_PAGE_BREAK (RC_UTLUI_BEGIN + 18)
+#define IMG_VIEWLAYOUT_AUTOMATIC (RC_UTLUI_BEGIN + 12)
+#define IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE (RC_UTLUI_BEGIN + 13)
+#define IMG_VIEWLAYOUT_BOOKMODE (RC_UTLUI_BEGIN + 14)
+#define IMG_VIEWLAYOUT_BOOKMODE_ACTIVE (RC_UTLUI_BEGIN + 15)
+#define IMG_VIEWLAYOUT_SINGLECOLUMN (RC_UTLUI_BEGIN + 16)
+#define IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE (RC_UTLUI_BEGIN + 17)
+#define IMG_PAGE_BREAK (RC_UTLUI_BEGIN + 18)
//local ids of the Database ImageLists
#define IMG_COLLAPSE 18002 /*RID_SVXIMG_COLLAPSEDNODE*/
diff --git a/sw/source/uibase/inc/viewlayoutctrl.hxx b/sw/source/uibase/inc/viewlayoutctrl.hxx
index 0816b001eb77..fb47e04263be 100644
--- a/sw/source/uibase/inc/viewlayoutctrl.hxx
+++ b/sw/source/uibase/inc/viewlayoutctrl.hxx
@@ -38,6 +38,7 @@ public:
virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE;
virtual void Paint( const UserDrawEvent& rEvt ) SAL_OVERRIDE;
virtual bool MouseButtonDown( const MouseEvent & ) SAL_OVERRIDE;
+ virtual bool MouseMove( const MouseEvent & ) SAL_OVERRIDE;
};
#endif
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 159941ff4e4e..1625a884a7fc 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1278,9 +1278,16 @@ void SwView::UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUStr
{
OUString sTemp(GetPageStr( nPhyNum, nVirtNum, rPgStr ));
const SfxStringItem aTmp( FN_STAT_PAGE, sTemp );
+ // Used to distinguish which tooltip to show
+ const SfxBoolItem bExtendedTooltip( FN_STAT_PAGE,
+ !rPgStr.isEmpty() && OUString::number(nPhyNum) != rPgStr
+ && nPhyNum != nVirtNum );
+
SfxBindings &rBnd = GetViewFrame()->GetBindings();
rBnd.SetState( aTmp );
rBnd.Update( FN_STAT_PAGE );
+ rBnd.SetState( bExtendedTooltip );
+ rBnd.Update( FN_STAT_PAGE );
}
void SwView::UpdateDocStats()
diff --git a/sw/source/uibase/utlui/bookctrl.cxx b/sw/source/uibase/utlui/bookctrl.cxx
index e4e5c90c0342..70a913fdb7a5 100644
--- a/sw/source/uibase/utlui/bookctrl.cxx
+++ b/sw/source/uibase/utlui/bookctrl.cxx
@@ -18,6 +18,8 @@
*/
#include "hintids.hxx"
+#include <swtypes.hxx>
+#include <utlui.hrc>
#include <svl/intitem.hxx>
#include <svl/stritem.hxx>
@@ -79,6 +81,14 @@ void SwBookmarkControl::StateChanged(
sPageNumber = ((SfxStringItem*)pState)->GetValue();
GetStatusBar().SetItemText( GetId(), sPageNumber );
}
+ else if ( pState->ISA( SfxBoolItem ) )
+ {
+ if (((SfxBoolItem*)pState)->GetValue()) // Indicates whether to show extended tooltip
+ GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_BOOKCTRL_HINT_EXTENDED));
+ else
+ GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_BOOKCTRL_HINT));
+ }
+
}
void SwBookmarkControl::Paint( const UserDrawEvent& )
diff --git a/sw/source/uibase/utlui/statusbar.src b/sw/source/uibase/utlui/statusbar.src
new file mode 100644
index 000000000000..dcb5bbab26e4
--- /dev/null
+++ b/sw/source/uibase/utlui/statusbar.src
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <utlui.hrc>
+
+String STR_WORDCOUNT_HINT
+{
+ Text [ en-US ] = "Word and character count. Click for more extensive stats";
+};
+String STR_VIEWLAYOUT_ONE
+{
+ Text [ en-US ] = "Single page view";
+};
+
+String STR_VIEWLAYOUT_TWO
+{
+ Text [ en-US ] = "Two page view";
+};
+
+String STR_VIEWLAYOUT_BOOK
+{
+ Text [ en-US ] = "Book view";
+};
+String STR_BOOKCTRL_HINT
+{
+ Text [ en-US ] = "Page number/Total pages. Click to show Navigator";
+};
+String STR_BOOKCTRL_HINT_EXTENDED
+{
+ Text [ en-US ] = "Document page number/Total pages (Print page number). Click to show Navigator";
+};
+String STR_TMPLCTRL_HINT
+{
+ Text [ en-US ] = "Page Style. Right-click to change style and click to modify style";
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/utlui/tmplctrl.cxx b/sw/source/uibase/utlui/tmplctrl.cxx
index a22c112f24c8..1046b05294c6 100644
--- a/sw/source/uibase/utlui/tmplctrl.cxx
+++ b/sw/source/uibase/utlui/tmplctrl.cxx
@@ -23,6 +23,9 @@
#include <sfx2/dispatch.hxx>
#include <vcl/status.hxx>
+#include <swtypes.hxx>
+#include <utlui.hrc>
+
#include "wrtsh.hxx"
#include "view.hxx"
#include "swmodule.hxx"
@@ -56,13 +59,12 @@ void SwTemplatePopup_Impl::Select()
nCurId = GetCurItemId();
}
-// class SvxZoomStatusBarControl
-
SwTemplateControl::SwTemplateControl( sal_uInt16 _nSlotId,
sal_uInt16 _nId,
StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb )
{
+ GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_TMPLCTRL_HINT));
}
SwTemplateControl::~SwTemplateControl()
diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx
index bc58ff865d91..b3204ee4bbc8 100644
--- a/sw/source/uibase/utlui/viewlayoutctrl.cxx
+++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx
@@ -191,4 +191,32 @@ bool SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
return true;
}
+bool SwViewLayoutControl::MouseMove( const MouseEvent & rEvt )
+{
+ const Rectangle aRect = getControlRect();
+ const Point aPoint = rEvt.GetPosPixel();
+ const long nXDiff = aPoint.X() - aRect.Left();
+
+ const long nImageWidthSingle = mpImpl->maImageSingleColumn.GetSizePixel().Width();
+ const long nImageWidthAuto = mpImpl->maImageAutomatic.GetSizePixel().Width();
+ const long nImageWidthBook = mpImpl->maImageBookMode.GetSizePixel().Width();
+ const long nImageWidthSum = nImageWidthSingle + nImageWidthAuto + nImageWidthBook;
+
+ const long nXOffset = (aRect.GetWidth() - nImageWidthSum)/2;
+
+ if ( nXDiff < nXOffset + nImageWidthSingle )
+ {
+ GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_VIEWLAYOUT_ONE));
+ }
+ else if ( nXDiff < nXOffset + nImageWidthSingle + nImageWidthAuto )
+ {
+ GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_VIEWLAYOUT_TWO));
+ }
+ else
+ {
+ GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_VIEWLAYOUT_BOOK));
+ }
+ return true;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/utlui/wordcountctrl.cxx b/sw/source/uibase/utlui/wordcountctrl.cxx
index 3d3ac34f8e87..58fe4b40db37 100644
--- a/sw/source/uibase/utlui/wordcountctrl.cxx
+++ b/sw/source/uibase/utlui/wordcountctrl.cxx
@@ -7,6 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <swtypes.hxx>
+#include <utlui.hrc>
#include "wordcountctrl.hxx"
#include <svl/stritem.hxx>
@@ -29,6 +31,8 @@ void SwWordCountStatusBarControl::StateChanged(
{
if (eState == SfxItemState::DEFAULT) // Can access pState
GetStatusBar().SetItemText( GetId(), ((SfxStringItem*)pState)->GetValue() );
+
+ GetStatusBar().SetQuickHelpText(GetId(), SW_RESSTR(STR_WORDCOUNT_HINT));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */