[Libreoffice-commits] core.git: 4 commits - sc/inc sc/source vcl/inc
Caolán McNamara
caolanm at redhat.com
Tue Jan 27 09:03:26 PST 2015
sc/inc/ViewSettingsSequenceDefines.hxx | 17 +++++++++--------
sc/source/ui/view/viewdata.cxx | 4 ++++
vcl/inc/win/salgdi.h | 4 ++--
3 files changed, 15 insertions(+), 10 deletions(-)
New commits:
commit e8d3dfd9c4c2674ac759fda2a5546e89a34d728b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 27 16:51:21 2015 +0000
Revert "merge these two selection changing hunks of code"
This reverts commit bef9cc01c7da9fd75393bfa1818e07f484306829.
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 98f959f..8a1eb1e 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -49,28 +49,6 @@
#include <boost/scoped_ptr.hpp>
#include <swuiexp.hxx>
-void SwFldEditDlg::EnsureSelection(SwField *pCurFld)
-{
- if (pSh->CrsrInsideInputFld())
- {
- // move cursor to start of Input Field
- SwInputField* pInputFld = dynamic_cast<SwInputField*>(pCurFld);
- if (pInputFld && pInputFld->GetFmtFld())
- {
- pSh->GotoField( *(pInputFld->GetFmtFld()) );
- }
- }
-
- /* Only create selection if there is none already.
- Normalize PaM instead of swapping. */
- if (!pSh->HasSelection())
- {
- //Note that after this, it is possible that rMgr.GetCurFld() != pCurFld
- pSh->Right(CRSR_SKIP_CHARS, true, 1, false );
- }
-
- pSh->NormalizePam();
-}
SwFldEditDlg::SwFldEditDlg(SwView& rVw)
: SfxSingleTabDialog(&rVw.GetViewFrame()->GetWindow(), 0,
@@ -84,12 +62,28 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw)
SwFldMgr aMgr(pSh);
SwField *pCurFld = aMgr.GetCurFld();
- if (!pCurFld)
+ if(!pCurFld)
return;
SwViewShell::SetCareWin(this);
- EnsureSelection(pCurFld);
+ if ( pSh->CrsrInsideInputFld() )
+ {
+ // move cursor to start of Input Field
+ SwInputField* pInputFld = dynamic_cast<SwInputField*>(pCurFld);
+ if ( pInputFld != NULL
+ && pInputFld->GetFmtFld() != NULL )
+ {
+ pSh->GotoField( *(pInputFld->GetFmtFld()) );
+ }
+ }
+
+ if ( ! pSh->HasSelection() )
+ {
+ pSh->Right(CRSR_SKIP_CHARS, true, 1, false);
+ }
+
+ pSh->NormalizePam();
sal_uInt16 nGroup = aMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType());
@@ -260,7 +254,12 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
rMgr.GoNextPrev( bNext, pOldTyp );
pCurFld = rMgr.GetCurFld();
- EnsureSelection(pCurFld);
+ /* #108536# Only create selection if there is none
+ already. Normalize PaM instead of swapping. */
+ if ( ! pSh->HasSelection() )
+ pSh->Right(CRSR_SKIP_CHARS, true, 1, false );
+
+ pSh->NormalizePam();
sal_uInt16 nGroup = rMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType());
diff --git a/sw/source/uibase/inc/fldedt.hxx b/sw/source/uibase/inc/fldedt.hxx
index fc8f27d..0c859e9 100644
--- a/sw/source/uibase/inc/fldedt.hxx
+++ b/sw/source/uibase/inc/fldedt.hxx
@@ -37,10 +37,9 @@ class SwFldEditDlg : public SfxSingleTabDialog
void Init();
SfxTabPage* CreatePage(sal_uInt16 nGroup);
- void EnsureSelection(SwField *pCurFld);
public:
- SwFldEditDlg(SwView& rVw);
+ SwFldEditDlg(SwView& rVw);
virtual ~SwFldEditDlg();
DECL_LINK(OKHdl, void *);
commit 78a5c5dcf0bd0a4406ea5d7da7573010863299b8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 27 16:50:18 2015 +0000
fix windows build
could have sworn it built under windows under jenkins
Change-Id: I97501d09b417ba1f8701f7efe884f26a7714a98a
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index d78b191..97431fd 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -397,8 +397,8 @@ public:
// as "undefined character"
virtual bool CreateFontSubset( const OUString& rToFile,
const PhysicalFontFace*,
- sal_GlyphId* pGlyphIDs,
- sal_uInt8* pEncoding,
+ const sal_GlyphId* pGlyphIDs,
+ const sal_uInt8* pEncoding,
sal_Int32* pWidths,
int nGlyphs,
FontSubsetInfo& rInfo // out parameter
commit bef9cc01c7da9fd75393bfa1818e07f484306829
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 27 15:39:00 2015 +0000
merge these two selection changing hunks of code
Change-Id: I4113a38a3a15cd2173f9a2530dc2e7278b8713b2
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 8a1eb1e..98f959f 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -49,6 +49,28 @@
#include <boost/scoped_ptr.hpp>
#include <swuiexp.hxx>
+void SwFldEditDlg::EnsureSelection(SwField *pCurFld)
+{
+ if (pSh->CrsrInsideInputFld())
+ {
+ // move cursor to start of Input Field
+ SwInputField* pInputFld = dynamic_cast<SwInputField*>(pCurFld);
+ if (pInputFld && pInputFld->GetFmtFld())
+ {
+ pSh->GotoField( *(pInputFld->GetFmtFld()) );
+ }
+ }
+
+ /* Only create selection if there is none already.
+ Normalize PaM instead of swapping. */
+ if (!pSh->HasSelection())
+ {
+ //Note that after this, it is possible that rMgr.GetCurFld() != pCurFld
+ pSh->Right(CRSR_SKIP_CHARS, true, 1, false );
+ }
+
+ pSh->NormalizePam();
+}
SwFldEditDlg::SwFldEditDlg(SwView& rVw)
: SfxSingleTabDialog(&rVw.GetViewFrame()->GetWindow(), 0,
@@ -62,28 +84,12 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw)
SwFldMgr aMgr(pSh);
SwField *pCurFld = aMgr.GetCurFld();
- if(!pCurFld)
+ if (!pCurFld)
return;
SwViewShell::SetCareWin(this);
- if ( pSh->CrsrInsideInputFld() )
- {
- // move cursor to start of Input Field
- SwInputField* pInputFld = dynamic_cast<SwInputField*>(pCurFld);
- if ( pInputFld != NULL
- && pInputFld->GetFmtFld() != NULL )
- {
- pSh->GotoField( *(pInputFld->GetFmtFld()) );
- }
- }
-
- if ( ! pSh->HasSelection() )
- {
- pSh->Right(CRSR_SKIP_CHARS, true, 1, false);
- }
-
- pSh->NormalizePam();
+ EnsureSelection(pCurFld);
sal_uInt16 nGroup = aMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType());
@@ -254,12 +260,7 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
rMgr.GoNextPrev( bNext, pOldTyp );
pCurFld = rMgr.GetCurFld();
- /* #108536# Only create selection if there is none
- already. Normalize PaM instead of swapping. */
- if ( ! pSh->HasSelection() )
- pSh->Right(CRSR_SKIP_CHARS, true, 1, false );
-
- pSh->NormalizePam();
+ EnsureSelection(pCurFld);
sal_uInt16 nGroup = rMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType());
diff --git a/sw/source/uibase/inc/fldedt.hxx b/sw/source/uibase/inc/fldedt.hxx
index 0c859e9..fc8f27d 100644
--- a/sw/source/uibase/inc/fldedt.hxx
+++ b/sw/source/uibase/inc/fldedt.hxx
@@ -37,9 +37,10 @@ class SwFldEditDlg : public SfxSingleTabDialog
void Init();
SfxTabPage* CreatePage(sal_uInt16 nGroup);
+ void EnsureSelection(SwField *pCurFld);
public:
- SwFldEditDlg(SwView& rVw);
+ SwFldEditDlg(SwView& rVw);
virtual ~SwFldEditDlg();
DECL_LINK(OKHdl, void *);
commit 7daf15884d980a8b848f3bdf9bdaed498dcb7b55
Author: Tsutomu Uchino <hanya at apache.org>
Date: Tue Jan 27 13:25:47 2015 +0000
Resolves: #i85241# store settings about value highlighting in document
(cherry picked from commit d3fb83cbaea17418def1ace6e868d8892d64d85d)
Change-Id: I34b4ee12e4af8300a51d72f0dd36e27c79832eb5
diff --git a/sc/inc/ViewSettingsSequenceDefines.hxx b/sc/inc/ViewSettingsSequenceDefines.hxx
index 5bbaff4..d80346c 100644
--- a/sc/inc/ViewSettingsSequenceDefines.hxx
+++ b/sc/inc/ViewSettingsSequenceDefines.hxx
@@ -23,7 +23,7 @@
// this are the defines for the position of the settings in the
// ViewSettingsSequence
-#define SC_VIEWSETTINGS_COUNT 23
+#define SC_VIEWSETTINGS_COUNT 24
#define SC_VIEW_ID 0
#define SC_TABLE_VIEWSETTINGS 1
@@ -41,13 +41,14 @@
#define SC_COLROWHDR 13
#define SC_SHEETTABS 14
#define SC_OUTLSYMB 15
-#define SC_SNAPTORASTER 16
-#define SC_RASTERVIS 17
-#define SC_RASTERRESX 18
-#define SC_RASTERRESY 19
-#define SC_RASTERSUBX 20
-#define SC_RASTERSUBY 21
-#define SC_RASTERSYNC 22
+#define SC_VALUE_HIGHLIGHTING 16
+#define SC_SNAPTORASTER 17
+#define SC_RASTERVIS 18
+#define SC_RASTERRESX 19
+#define SC_RASTERRESY 20
+#define SC_RASTERSUBX 21
+#define SC_RASTERSUBY 22
+#define SC_RASTERSYNC 23
// this are the defines for the position of the settings in the
// TableViewSettingsSequence
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 357b900..5ac8886 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2708,6 +2708,8 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe
ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_SHEETTABS].Value, pOptions->GetOption( VOPT_TABCONTROLS ) );
pSettings[SC_OUTLSYMB].Name = SC_UNO_OUTLSYMB;
ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_OUTLSYMB].Value, pOptions->GetOption( VOPT_OUTLINER ) );
+ pSettings[SC_VALUE_HIGHLIGHTING].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNO_VALUEHIGH ) );
+ ScUnoHelpFunctions::SetBoolInAny( pSettings[SC_VALUE_HIGHLIGHTING].Value, pOptions->GetOption( VOPT_SYNTAX ) );
const ScGridOptions& aGridOpt = pOptions->GetGridOptions();
pSettings[SC_SNAPTORASTER].Name = SC_UNO_SNAPTORASTER;
@@ -2861,6 +2863,8 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
if ( rSettings[i].Value >>= nTemp16 )
pOptions->SetObjMode( VOBJ_TYPE_DRAW, (nTemp16 == 1) ? VOBJ_MODE_HIDE : VOBJ_MODE_SHOW );
}
+ else if ( sName.compareToAscii( SC_UNO_VALUEHIGH ) == 0 )
+ pOptions->SetOption( VOPT_SYNTAX, ScUnoHelpFunctions::GetBoolFromAny( rSettings[i].Value ) );
else
{
ScGridOptions aGridOpt(pOptions->GetGridOptions());
More information about the Libreoffice-commits
mailing list