[Libreoffice-commits] core.git: 2 commits - officecfg/registry sc/source sw/uiconfig
Marco Cecchetti
marco.cecchetti at collabora.com
Thu Oct 13 17:51:38 UTC 2016
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 6 +
sc/source/ui/app/inputhdl.cxx | 10 +-
sc/source/ui/inc/viewdata.hxx | 5 +
sc/source/ui/view/viewdata.cxx | 13 ++-
sw/uiconfig/swriter/ui/notebookbar_groups.ui | 35 +---------
5 files changed, 29 insertions(+), 40 deletions(-)
New commits:
commit 8974b0fafb18f9dd3f2c0e175a3255b80e4c249e
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Sun Oct 9 22:08:51 2016 +0200
LOK: Calc: in the numeric content case, the used alignment can be wrong
-description: in the numeric content case, the used horizontal
alignment can be wrong when input content goes further than the cell
border;
- reason: (very odd) bMoveArea and nEditAdjust are global variables in
viewdata.cxx instead of being data members of ScViewdata;
- solution: now bMoveArea and nEditAdjust are data members of
ScViewdata.
Change-Id: I58a4ec26ca290fd328ef28a92c3c590462c7231a
Reviewed-on: https://gerrit.libreoffice.org/29628
Reviewed-by: Marco Cecchetti <mrcekets at gmail.com>
Tested-by: Marco Cecchetti <mrcekets at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/29661
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 834d4c4..e0712c4 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -91,8 +91,6 @@ using namespace formula;
bool ScInputHandler::bOptLoaded = false; // Evaluate App options
bool ScInputHandler::bAutoComplete = false; // Is set in KeyInput
-extern sal_uInt16 nEditAdjust; //! Member of ViewData
-
namespace {
// Formula data replacement character for a pair of parentheses at end of
@@ -1972,8 +1970,10 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
pEditDefaults->Put( SvxAdjustItem( eSvxAdjust, EE_PARA_JUST ) );
pEngine->SetDefaults( *pEditDefaults );
- nEditAdjust = sal::static_int_cast<sal_uInt16>(eSvxAdjust); //! set at ViewData or with PostEditView
-
+ if ( pActiveViewSh )
+ {
+ pActiveViewSh->GetViewData().SetEditAdjust( eSvxAdjust );
+ }
pEngine->SetVertical( bAsianVertical );
}
@@ -2317,7 +2317,7 @@ void ScInputHandler::DataChanged( bool bFromTopNotify, bool bSetModified )
{
ScViewData& rViewData = pActiveViewSh->GetViewData();
- bool bNeedGrow = ( nEditAdjust != SVX_ADJUST_LEFT ); // Always right-aligned
+ bool bNeedGrow = ( rViewData.GetEditAdjust() != SVX_ADJUST_LEFT ); // Always right-aligned
if (!bNeedGrow)
{
// Cursor before the end?
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index b0cd0a3..d4b5a04 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -218,12 +218,14 @@ private:
ScSplitPos eEditActivePart; // the part that was active when edit mode was started
ScFillMode nFillMode;
+ SvxAdjust eEditAdjust;
bool bEditActive[4]; // Active?
bool bActive:1; // Active Window ?
bool bIsRefMode:1; // Reference input
bool bDelMarkValid:1; // Only valid at SC_REFTYPE_FILL
bool bPagebreak:1; // Page break preview mode
bool bSelCtrlMouseClick:1; // special selection handling for ctrl-mouse-click
+ bool bMoveArea:1;
long m_nLOKPageUpDownOffset;
@@ -375,6 +377,9 @@ public:
bool IsFillMode() { return nFillMode == ScFillMode::FILL; }
ScFillMode GetFillMode() { return nFillMode; }
+ SvxAdjust GetEditAdjust() const {return eEditAdjust; }
+ void SetEditAdjust( SvxAdjust eNewEditAdjust ) { eEditAdjust = eNewEditAdjust; }
+
// TRUE: Cell is merged
bool GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix ) const;
void GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 3cb30c7..7763af3 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -74,9 +74,6 @@ using namespace com::sun::star;
#define TAG_TABBARWIDTH "tw:"
-static bool bMoveArea = false; // Member?
-sal_uInt16 nEditAdjust = SVX_ADJUST_LEFT; // Member!
-
namespace {
void lcl_LOKRemoveEditView(ScTabViewShell* pTabViewShell, ScSplitPos eWhich)
@@ -352,11 +349,13 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
nPasteFlags ( SC_PASTE_NONE ),
eEditActivePart( SC_SPLIT_BOTTOMLEFT ),
nFillMode ( ScFillMode::NONE ),
+ eEditAdjust ( SVX_ADJUST_LEFT ),
bActive ( true ), // how to initialize?
bIsRefMode ( false ),
bDelMarkValid( false ),
bPagebreak ( false ),
bSelCtrlMouseClick( false ),
+ bMoveArea ( false ),
m_nLOKPageUpDownOffset( 0 )
{
mpMarkData->SelectOneTable(0); // Sync with nTabNo
@@ -441,11 +440,13 @@ ScViewData::ScViewData( const ScViewData& rViewData ) :
nPasteFlags ( SC_PASTE_NONE ),
eEditActivePart( rViewData.eEditActivePart ),
nFillMode ( ScFillMode::NONE ),
+ eEditAdjust ( rViewData.eEditAdjust ),
bActive ( true ), // how to initialize?
bIsRefMode ( false ),
bDelMarkValid( false ),
bPagebreak ( rViewData.bPagebreak ),
bSelCtrlMouseClick( rViewData.bSelCtrlMouseClick ),
+ bMoveArea ( rViewData.bMoveArea ),
m_nLOKPageUpDownOffset( rViewData.m_nLOKPageUpDownOffset )
{
@@ -1028,7 +1029,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
// when right-aligned, leave space for the cursor
// in vertical mode, editing is always right-aligned
- if ( nEditAdjust == SVX_ADJUST_RIGHT || bAsianVertical )
+ if ( GetEditAdjust() == SVX_ADJUST_RIGHT || bAsianVertical )
aPixRect.Right() += 1;
Rectangle aOutputArea = pWin->PixelToLogic( aPixRect, GetLogicMode() );
@@ -1104,12 +1105,12 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
Size aPaper = pNewEngine->GetPaperSize();
Rectangle aVis = pEditView[eWhich]->GetVisArea();
long nDiff = aVis.Right() - aVis.Left();
- if ( nEditAdjust == SVX_ADJUST_RIGHT )
+ if ( GetEditAdjust() == SVX_ADJUST_RIGHT )
{
aVis.Right() = aPaper.Width() - 1;
bMoveArea = !bLayoutRTL;
}
- else if ( nEditAdjust == SVX_ADJUST_CENTER )
+ else if ( GetEditAdjust() == SVX_ADJUST_CENTER )
{
aVis.Right() = ( aPaper.Width() - 1 + nDiff ) / 2;
bMoveArea = true; // always
commit 5a5b83b102ac84eb6013cd5383075493c5bcd8ba
Author: Yousuf Philips <philipz85 at hotmail.com>
Date: Thu Oct 13 05:09:48 2016 +0400
tdf#103170 Remove button labels/tooltips and enable font controls
Change-Id: If4720ef1bc934bdfda20ebe7a5d612eca0b2d9e5
Reviewed-on: https://gerrit.libreoffice.org/29747
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Yousuf Philips <philipz85 at hotmail.com>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index b18a5e6..17701c2 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -4832,8 +4832,14 @@
</node>
<node oor:name=".uno:ExportToPDF" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">PDF</value>
+ </prop>
+ <prop oor:name="ContextLabel" oor:type="xs:string">
<value xml:lang="en-US">~Export as PDF...</value>
</prop>
+ <prop oor:name="TooltipLabel" oor:type="xs:string">
+ <value xml:lang="en-US">Export as PDF</value>
+ </prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
diff --git a/sw/uiconfig/swriter/ui/notebookbar_groups.ui b/sw/uiconfig/swriter/ui/notebookbar_groups.ui
index c24b8ae..888ef99 100644
--- a/sw/uiconfig/swriter/ui/notebookbar_groups.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar_groups.ui
@@ -225,7 +225,7 @@
<object class="GtkMenuItem" id="bold">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Stron Emphasis</property>
+ <property name="label" translatable="yes">Strong Emphasis</property>
<property name="use_underline">True</property>
</object>
</child>
@@ -271,11 +271,9 @@
<property name="spacing">3</property>
<child>
<object class="GtkButton" id="newb">
- <property name="label" translatable="yes">New</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Create a new document</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
<property name="action_name">.uno:AddDirect</property>
@@ -292,11 +290,9 @@
</child>
<child>
<object class="GtkButton" id="openb">
- <property name="label" translatable="yes">Open</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Open a document</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
<property name="action_name">.uno:Open</property>
@@ -325,7 +321,6 @@
<property name="orientation">vertical</property>
<child>
<object class="GtkButton" id="saveb">
- <property name="label" translatable="yes">Save</property>
<property name="width_request">60</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -358,7 +353,6 @@
<property name="spacing">3</property>
<child>
<object class="GtkButton" id="printb">
- <property name="label" translatable="yes">Print</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -378,13 +372,12 @@
</child>
<child>
<object class="GtkButton" id="pdfb">
- <property name="label" translatable="yes">PDF</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
- <property name="action_name">.uno:ExportToPDF</property>
+ <property name="action_name">.uno:ExportDirectToPDF</property>
<property name="image">pdfi</property>
<property name="relief">none</property>
<property name="xalign">0</property>
@@ -480,11 +473,9 @@
<property name="spacing">3</property>
<child>
<object class="GtkButton" id="undob">
- <property name="label" translatable="yes">Undo</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Create a new document</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
<property name="action_name">.uno:Undo</property>
@@ -501,11 +492,9 @@
</child>
<child>
<object class="GtkButton" id="copyb">
- <property name="label" translatable="yes">Copy</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Open a document</property>
<property name="valign">center</property>
<property name="vexpand">True</property>
<property name="action_name">.uno:Copy</property>
@@ -535,7 +524,6 @@
<property name="spacing">3</property>
<child>
<object class="GtkButton" id="redob">
- <property name="label" translatable="yes">Redo</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -555,7 +543,6 @@
</child>
<child>
<object class="GtkButton" id="pasteb">
- <property name="label" translatable="yes">Paste</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -681,6 +668,7 @@
<property name="orientation">vertical</property>
<child>
<object class="sfxlo-SidebarToolBox" id="font">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkToolButton" id="fontname">
@@ -706,7 +694,7 @@
<child>
<object class="svtlo-FontNameBox" id="fontnamelist">
<property name="height_request">36</property>
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">False</property>
</object>
<packing>
@@ -733,7 +721,7 @@
<object class="svtlo-FontSizeBox" id="fontsizelist">
<property name="width_request">60</property>
<property name="height_request">30</property>
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
@@ -746,6 +734,7 @@
</child>
<child>
<object class="sfxlo-SidebarToolBox" id="fontheight">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
@@ -874,7 +863,6 @@
<property name="spacing">3</property>
<child>
<object class="GtkButton" id="leftb">
- <property name="label" translatable="yes">Left</property>
<property name="height_request">24</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -893,7 +881,6 @@
</child>
<child>
<object class="GtkButton" id="centerb">
- <property name="label" translatable="yes">Center</property>
<property name="height_request">24</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -911,7 +898,6 @@
</child>
<child>
<object class="GtkButton" id="rightb">
- <property name="label" translatable="yes">Right</property>
<property name="height_request">24</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -942,7 +928,6 @@
<property name="spacing">3</property>
<child>
<object class="GtkButton" id="boldb">
- <property name="label" translatable="yes">Bold</property>
<property name="height_request">24</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -961,7 +946,6 @@
</child>
<child>
<object class="GtkButton" id="italicsb">
- <property name="label" translatable="yes">Italic</property>
<property name="height_request">24</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -979,7 +963,6 @@
</child>
<child>
<object class="GtkButton" id="underlineb">
- <property name="label" translatable="yes">Underline</property>
<property name="height_request">24</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -1106,7 +1089,6 @@
<property name="spacing">3</property>
<child>
<object class="GtkButton" id="bulletsb">
- <property name="label" translatable="yes">Bullets</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -1124,7 +1106,6 @@
</child>
<child>
<object class="GtkButton" id="numberingb">
- <property name="label" translatable="yes">Numbering</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -1287,7 +1268,6 @@
<property name="can_focus">False</property>
<property name="is_important">True</property>
<property name="action_name">.uno:InsertTable</property>
- <property name="label" translatable="yes">Table</property>
</object>
<packing>
<property name="expand">True</property>
@@ -1359,7 +1339,6 @@
<property name="spacing">3</property>
<child>
<object class="GtkButton" id="imageb">
- <property name="label" translatable="yes">Image</property>
<property name="height_request">24</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -1376,7 +1355,6 @@
</child>
<child>
<object class="GtkButton" id="chartb">
- <property name="label" translatable="yes">Chart</property>
<property name="height_request">24</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -1394,7 +1372,6 @@
</child>
<child>
<object class="GtkButton" id="commentb">
- <property name="label" translatable="yes">Comment</property>
<property name="height_request">24</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
More information about the Libreoffice-commits
mailing list