[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 10 commits - configure.cmd desktop/os2 drawinglayer/source dtrans/source filter/source i18npool/source sal/osl svtools/Executable_g2g.mk sw/inc sw/sdi sw/source vcl/aqua vcl/os2
Armin Le Grand
alg at apache.org
Thu Feb 20 18:07:30 PST 2014
configure.cmd | 2
desktop/os2/source/applauncher/launcher.hxx | 2
drawinglayer/source/primitive2d/textlayoutdevice.cxx | 6 -
dtrans/source/win32/ftransl/ftransl.cxx | 4
filter/source/graphicfilter/eras/makefile.mk | 3
filter/source/graphicfilter/etiff/makefile.mk | 3
filter/source/graphicfilter/expm/makefile.mk | 3
filter/source/graphicfilter/idxf/makefile.mk | 3
filter/source/graphicfilter/ieps/makefile.mk | 3
filter/source/graphicfilter/ios2met/makefile.mk | 3
filter/source/graphicfilter/ipbm/makefile.mk | 3
filter/source/graphicfilter/ipcd/makefile.mk | 3
filter/source/graphicfilter/ipcx/makefile.mk | 3
filter/source/graphicfilter/ipict/makefile.mk | 3
filter/source/graphicfilter/ipsd/makefile.mk | 3
filter/source/graphicfilter/iras/makefile.mk | 3
filter/source/graphicfilter/itga/makefile.mk | 3
filter/source/graphicfilter/itiff/makefile.mk | 3
i18npool/source/textconversion/data/makefile.mk | 4
sal/osl/os2/module.c | 2
svtools/Executable_g2g.mk | 5
sw/inc/pam.hxx | 2
sw/sdi/_basesh.sdi | 2
sw/sdi/_textsh.sdi | 3
sw/source/core/crsr/crsrsh.cxx | 32 ++---
sw/source/core/crsr/pam.cxx | 104 +++++++++----------
sw/source/core/edit/eddel.cxx | 2
sw/source/core/edit/edfcol.cxx | 7 -
sw/source/core/edit/ednumber.cxx | 39 +++----
sw/source/ui/docvw/edtwin.cxx | 100 ++++++++----------
sw/source/ui/shells/basesh.cxx | 7 +
sw/source/ui/shells/textsh1.cxx | 10 +
vcl/aqua/source/gdi/ctlayout.cxx | 16 ++
vcl/os2/source/gdi/salgdi3.cxx | 2
34 files changed, 230 insertions(+), 163 deletions(-)
New commits:
commit 3bd259ce52b15e968302ecca39f72d06af66e301
Author: Armin Le Grand <alg at apache.org>
Date: Thu Feb 20 15:49:56 2014 +0000
i124085 improved support for PNG clipboard format on windows
diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index 258b597..cfceddc1 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -513,9 +513,9 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
//SOT_FORMATSTR_ID_DIALOG_60
m_TranslTable.push_back(FormatEntry("application/vnd.sun.xml.dialog", "Dialog 6.0", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_BMP
- m_TranslTable.push_back(FormatEntry("image/bmp", "Windows Bitmap", NULL, 49657 /* ID for "image/bmp" CF_INVALID*/, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("image/bmp", "Windows Bitmap", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_PNG
- m_TranslTable.push_back(FormatEntry("image/png", "PNG", NULL, 49656 /* ID for "image/png" CF_INVALID*/, CPPUTYPE_DEFAULT));
+ m_TranslTable.push_back(FormatEntry("image/png", "PNG", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_DUMMY3
m_TranslTable.push_back(FormatEntry("application/x-openoffice-dummy3;windows_formatname=\"SO_DUMMYFORMAT_3\"", "SO_DUMMYFORMAT_3", NULL, CF_INVALID, CPPUTYPE_DEFAULT));
//SOT_FORMATSTR_ID_DUMMY4
commit c6d291416fecd48f56782d2c92f58d10b9ba2c27
Author: Yuri Dario <ydario at apache.org>
Date: Thu Feb 20 15:42:08 2014 +0000
#i118923# OS/2 port, add CPPULIB to resolve uno constructors.
diff --git a/svtools/Executable_g2g.mk b/svtools/Executable_g2g.mk
index dd2ba34..8e109dc 100644
--- a/svtools/Executable_g2g.mk
+++ b/svtools/Executable_g2g.mk
@@ -42,6 +42,11 @@ $(eval $(call gb_Executable_add_linked_libs,g2g,\
vos3 \
$(gb_STDLIBS) \
))
+ifeq ($(OS),OS2)
+$(eval $(call gb_Executable_add_linked_libs,g2g,\
+ cppu \
+))
+endif
ifneq ($(USE_SYSTEM_STL),YES)
ifeq ($(PRODUCT),)
commit c3f761a8e6f6d3f959b756401e84c9a1efe35419
Author: Yuri Dario <ydario at apache.org>
Date: Thu Feb 20 15:33:05 2014 +0000
#i118923# OS/2 port, remove parenthesis around soffice name constant.
diff --git a/desktop/os2/source/applauncher/launcher.hxx b/desktop/os2/source/applauncher/launcher.hxx
index 29f9e72..736e70c 100644
--- a/desktop/os2/source/applauncher/launcher.hxx
+++ b/desktop/os2/source/applauncher/launcher.hxx
@@ -24,7 +24,7 @@
#define INCL_PM
#include <os2.h>
-#define OFFICE_IMAGE_NAME ("soffice")
+#define OFFICE_IMAGE_NAME "soffice"
extern CHAR APPLICATION_SWITCH[];
commit 9ef080c6f3d59fd3f27559b780d456106396cb84
Author: Yuri Dario <ydario at apache.org>
Date: Thu Feb 20 15:30:57 2014 +0000
#i118923# OS/2 port, use UNIXROOT drive for perl shell dir.
diff --git a/configure.cmd b/configure.cmd
index 65d422f..dcd51e4 100755
--- a/configure.cmd
+++ b/configure.cmd
@@ -25,7 +25,7 @@ SET MY_ANT_HOME=d:/os2/java160/apache-ant-1.7.0
SET PATH=%JAVA_HOME%\bin;%PATH%;%MY_ANT_HOME%\bin;
set config_shell=sh
-set perl_sh_dir=/usr/bin
+set perl_sh_dir=%UNIXROOT%/usr/bin
sh ./configure --prefix=/@unixroot/usr --with-system-zlib --with-system-jpeg --without-stlport --with-system-icu --with-system-curl --with-system-python --with-system-openssl --with-system-libxml --with-system-libxslt --disable-werror --disable-mozilla --disable-odk --with-x=no --disable-fontconfig --disable-gnome-vfs --disable-gtk --with-java=yes --disable-gcjaot --without-fonts --with-ant-home=%MY_ANT_HOME% --without-junit --with-system-apr --with-system-apr-util --with-system-serf --with-system-coinmp | tee configure.log
endlocal
commit 3850c1ea205b1b948077c1a7e73d37b92ae06f6f
Author: Yuri Dario <ydario at apache.org>
Date: Thu Feb 20 15:29:34 2014 +0000
#i118923# OS/2 port, add CPPULIB to resolve uno constructors.
diff --git a/filter/source/graphicfilter/eras/makefile.mk b/filter/source/graphicfilter/eras/makefile.mk
index 1bdb9a3..d5500b1 100644
--- a/filter/source/graphicfilter/eras/makefile.mk
+++ b/filter/source/graphicfilter/eras/makefile.mk
@@ -44,6 +44,9 @@ SLOFILES = $(SLO)$/eras.obj
SHL1TARGET= era$(DLLPOSTFIX)
SHL1IMPLIB= eras
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) $(SVTOOLLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/eras.lib
.IF "$(GUI)" != "UNX"
diff --git a/filter/source/graphicfilter/etiff/makefile.mk b/filter/source/graphicfilter/etiff/makefile.mk
index c6fdadf..dbd6fa9 100644
--- a/filter/source/graphicfilter/etiff/makefile.mk
+++ b/filter/source/graphicfilter/etiff/makefile.mk
@@ -44,6 +44,9 @@ SLOFILES = $(SLO)$/etiff.obj
SHL1TARGET= eti$(DLLPOSTFIX)
SHL1IMPLIB= etiff
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) $(SVTOOLLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/etiff.lib
.IF "$(GUI)" != "UNX"
diff --git a/filter/source/graphicfilter/expm/makefile.mk b/filter/source/graphicfilter/expm/makefile.mk
index 2f375ce..ff8e1a2 100644
--- a/filter/source/graphicfilter/expm/makefile.mk
+++ b/filter/source/graphicfilter/expm/makefile.mk
@@ -45,6 +45,9 @@ SLOFILES = $(SLO)$/expm.obj
SHL1TARGET= exp$(DLLPOSTFIX)
SHL1IMPLIB= expm
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) $(SVTOOLLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/expm.lib
.IF "$(GUI)" != "UNX"
diff --git a/filter/source/graphicfilter/idxf/makefile.mk b/filter/source/graphicfilter/idxf/makefile.mk
index 28e4f4c..7432fd8 100644
--- a/filter/source/graphicfilter/idxf/makefile.mk
+++ b/filter/source/graphicfilter/idxf/makefile.mk
@@ -55,6 +55,9 @@ SLOFILES = $(SLO)$/dxfgrprd.obj \
SHL1TARGET= idx$(DLLPOSTFIX)
SHL1IMPLIB= idxf
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/idxf.lib # $(LB)$/rtftoken.lib
diff --git a/filter/source/graphicfilter/ieps/makefile.mk b/filter/source/graphicfilter/ieps/makefile.mk
index 131e7bd..f812e5b 100644
--- a/filter/source/graphicfilter/ieps/makefile.mk
+++ b/filter/source/graphicfilter/ieps/makefile.mk
@@ -44,6 +44,9 @@ SLOFILES = $(SLO)$/ieps.obj
SHL1TARGET= ips$(DLLPOSTFIX)
SHL1IMPLIB= ieps
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/ieps.lib
.IF "$(GUI)" != "UNX"
diff --git a/filter/source/graphicfilter/ios2met/makefile.mk b/filter/source/graphicfilter/ios2met/makefile.mk
index 0bc66f4..1ca1242 100644
--- a/filter/source/graphicfilter/ios2met/makefile.mk
+++ b/filter/source/graphicfilter/ios2met/makefile.mk
@@ -44,6 +44,9 @@ SLOFILES = $(SLO)$/ios2met.obj
SHL1TARGET= ime$(DLLPOSTFIX)
SHL1IMPLIB= ios2met
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/ios2met.lib # $(LB)$/rtftoken.lib
diff --git a/filter/source/graphicfilter/ipbm/makefile.mk b/filter/source/graphicfilter/ipbm/makefile.mk
index f137d0f..d4397a6 100644
--- a/filter/source/graphicfilter/ipbm/makefile.mk
+++ b/filter/source/graphicfilter/ipbm/makefile.mk
@@ -44,6 +44,9 @@ SLOFILES = $(SLO)$/ipbm.obj
SHL1TARGET= ipb$(DLLPOSTFIX)
SHL1IMPLIB= ipbm
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/ipbm.lib
.IF "$(GUI)" != "UNX"
diff --git a/filter/source/graphicfilter/ipcd/makefile.mk b/filter/source/graphicfilter/ipcd/makefile.mk
index 776e7ff..5526899 100644
--- a/filter/source/graphicfilter/ipcd/makefile.mk
+++ b/filter/source/graphicfilter/ipcd/makefile.mk
@@ -44,6 +44,9 @@ SLOFILES = $(SLO)$/ipcd.obj
SHL1TARGET= icd$(DLLPOSTFIX)
SHL1IMPLIB= ipcd
SHL1STDLIBS= $(SVTOOLLIB) $(VCLLIB) $(TOOLSLIB) $(SALLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/ipcd.lib # $(LB)$/rtftoken.lib
.IF "$(GUI)" != "UNX"
diff --git a/filter/source/graphicfilter/ipcx/makefile.mk b/filter/source/graphicfilter/ipcx/makefile.mk
index 55084c0..9ba8c46 100644
--- a/filter/source/graphicfilter/ipcx/makefile.mk
+++ b/filter/source/graphicfilter/ipcx/makefile.mk
@@ -44,6 +44,9 @@ SLOFILES = $(SLO)$/ipcx.obj
SHL1TARGET= ipx$(DLLPOSTFIX)
SHL1IMPLIB= ipcx
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/ipcx.lib
.IF "$(GUI)" != "UNX"
diff --git a/filter/source/graphicfilter/ipict/makefile.mk b/filter/source/graphicfilter/ipict/makefile.mk
index fbfe779..1ecfe0a 100644
--- a/filter/source/graphicfilter/ipict/makefile.mk
+++ b/filter/source/graphicfilter/ipict/makefile.mk
@@ -44,6 +44,9 @@ SLOFILES = $(SLO)$/ipict.obj $(SLO)$/shape.obj
SHL1TARGET= ipt$(DLLPOSTFIX)
SHL1IMPLIB= ipict
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) $(BASEGFXLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/ipict.lib
.IF "$(GUI)" != "UNX"
diff --git a/filter/source/graphicfilter/ipsd/makefile.mk b/filter/source/graphicfilter/ipsd/makefile.mk
index 577b1e2..6d5f9db 100644
--- a/filter/source/graphicfilter/ipsd/makefile.mk
+++ b/filter/source/graphicfilter/ipsd/makefile.mk
@@ -44,6 +44,9 @@ SLOFILES = $(SLO)$/ipsd.obj
SHL1TARGET= ipd$(DLLPOSTFIX)
SHL1IMPLIB= ipsd
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/ipsd.lib
.IF "$(GUI)" != "UNX"
diff --git a/filter/source/graphicfilter/iras/makefile.mk b/filter/source/graphicfilter/iras/makefile.mk
index d5795c9..7d25481 100644
--- a/filter/source/graphicfilter/iras/makefile.mk
+++ b/filter/source/graphicfilter/iras/makefile.mk
@@ -44,6 +44,9 @@ SLOFILES = $(SLO)$/iras.obj
SHL1TARGET= ira$(DLLPOSTFIX)
SHL1IMPLIB= iras
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/iras.lib
.IF "$(GUI)" != "UNX"
diff --git a/filter/source/graphicfilter/itga/makefile.mk b/filter/source/graphicfilter/itga/makefile.mk
index 41e92a2..0f0fc1c 100644
--- a/filter/source/graphicfilter/itga/makefile.mk
+++ b/filter/source/graphicfilter/itga/makefile.mk
@@ -44,6 +44,9 @@ SLOFILES = $(SLO)$/itga.obj
SHL1TARGET= itg$(DLLPOSTFIX)
SHL1IMPLIB= itga
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/itga.lib
.IF "$(GUI)" != "UNX"
diff --git a/filter/source/graphicfilter/itiff/makefile.mk b/filter/source/graphicfilter/itiff/makefile.mk
index f7c9340..ac004df 100644
--- a/filter/source/graphicfilter/itiff/makefile.mk
+++ b/filter/source/graphicfilter/itiff/makefile.mk
@@ -48,6 +48,9 @@ EXCEPTIONSNOOPTFILES= $(SLO)$/itiff.obj
SHL1TARGET= iti$(DLLPOSTFIX)
SHL1IMPLIB= itiff
SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB)
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(CPPULIB)
+.ENDIF
SHL1LIBS= $(SLB)$/itiff.lib # $(LB)$/rtftoken.lib
.IF "$(GUI)" != "UNX"
diff --git a/i18npool/source/textconversion/data/makefile.mk b/i18npool/source/textconversion/data/makefile.mk
index 308387c..f6ad14a 100644
--- a/i18npool/source/textconversion/data/makefile.mk
+++ b/i18npool/source/textconversion/data/makefile.mk
@@ -36,6 +36,10 @@ CDEFS+=-Zm300
# --- Files --------------------------------------------------------
+.IF "$(GUI)" == "OS2"
+SHL1STDLIBS+= $(SALLIB) $(CPPULIB)
+.ENDIF
+
# collator data library
SHL1TARGET=$(TARGET)
SHL1IMPLIB=i$(SHL1TARGET)
commit f73b742763b7adc3d35b4fba73d415357045ac6e
Author: Yuri Dario <ydario at apache.org>
Date: Thu Feb 20 15:16:41 2014 +0000
#i123840# fix name typo in OS/2 code.
diff --git a/vcl/os2/source/gdi/salgdi3.cxx b/vcl/os2/source/gdi/salgdi3.cxx
index 2de80e8..e0aba64 100644
--- a/vcl/os2/source/gdi/salgdi3.cxx
+++ b/vcl/os2/source/gdi/salgdi3.cxx
@@ -1541,7 +1541,7 @@ sal_Bool Os2SalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
{
// TODO: remap notdef glyph if needed
// TODO: use GDI's GetGlyphIndices instead? Does it handle GSUB properly?
- sal_uInt32 aGlyphIdx = pGlyphIds[i] & GF_IDXMASK;
+ sal_uInt32 aGlyphId = pGlyphIds[i] & GF_IDXMASK;
if( pGlyphIds[i] & GF_ISCHAR ) // remaining pseudo-glyphs need to be translated
aGlyphId = pImplFontCharMap->GetGlyphIndex( aGlyphId );
if( (pGlyphIds[i] & (GF_ROTMASK|GF_GSUB)) != 0) // TODO: vertical substitution
commit 198bb3b623d4c9fc82effdde98b6aea6dfb53af6
Author: Herbert Dürr <hdu at apache.org>
Date: Thu Feb 20 13:52:52 2014 +0000
#i124233# prevent the accumulation of rounding errors in CTLayout::FillDXArry()
diff --git a/vcl/aqua/source/gdi/ctlayout.cxx b/vcl/aqua/source/gdi/ctlayout.cxx
index 3ec11c9..cfc8442 100644
--- a/vcl/aqua/source/gdi/ctlayout.cxx
+++ b/vcl/aqua/source/gdi/ctlayout.cxx
@@ -382,9 +382,8 @@ long CTLayout::FillDXArray( sal_Int32* pDXArray ) const
long nPixWidth = GetTextWidth();
if( pDXArray ) {
- // initialize the result array
- for( int i = 0; i < mnCharCount; ++i)
- pDXArray[i] = 0;
+ // prepare the sub-pixel accurate logical-width array
+ ::std::vector<float> aWidthVector( mnCharCount );
//Â handle each glyph run
CFArrayRef aGlyphRuns = CTLineGetGlyphRuns( mpCTLine );
const int nRunCount = CFArrayGetCount( aGlyphRuns );
@@ -402,9 +401,18 @@ long CTLayout::FillDXArray( sal_Int32* pDXArray ) const
CTRunGetStringIndices( pGlyphRun, aFullRange, &aIndexVec[0] );
for( int i = 0; i != nGlyphCount; ++i ) {
const int nRelIdx = aIndexVec[i];
- pDXArray[ nRelIdx ] += aSizeVec[i].width;
+ aWidthVector[nRelIdx] += aSizeVec[i].width;
}
}
+
+ // convert the sub-pixel accurate array into classic pDXArray integers
+ float fWidthSum = 0.0;
+ sal_Int32 nOldDX = 0;
+ for( int i = 0; i < mnCharCount; ++i) {
+ const sal_Int32 nNewDX = rint( fWidthSum += aWidthVector[i]);
+ pDXArray[i] = nNewDX - nOldDX;
+ nOldDX = nNewDX;
+ }
}
return nPixWidth;
commit daf363af20ddd83bbcc7e8e9de16147c760f9085
Author: Herbert Dürr <hdu at apache.org>
Date: Thu Feb 20 12:29:44 2014 +0000
#i124269# fix memory leak in drawinglayer's TextLayouterDevice::getTextArray()
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 54995d8..7f2e695 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -342,12 +342,12 @@ namespace drawinglayer
if(nTextLength)
{
aRetval.reserve(nTextLength);
- sal_Int32* pArray = new sal_Int32[nTextLength];
- mrDevice.GetTextArray(rText, pArray, nIndex, nLength);
+ ::std::vector<sal_Int32> aDXArray( nTextLength);
+ mrDevice.GetTextArray(rText, &aDXArray[0], nIndex, nLength);
for(sal_uInt32 a(0); a < nTextLength; a++)
{
- aRetval.push_back(pArray[a]);
+ aRetval.push_back(aDXArray[a]);
}
}
commit 34dd827c58caf08ff4538971dc5186aa5447e9cf
Author: Yuri Dario <ydario at apache.org>
Date: Thu Feb 20 12:12:45 2014 +0000
#i118923# fix failure to show message box in release mode.
diff --git a/sal/osl/os2/module.c b/sal/osl/os2/module.c
index 2ddd77a..d383db8 100644
--- a/sal/osl/os2/module.c
+++ b/sal/osl/os2/module.c
@@ -120,7 +120,7 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *ustrModuleName, sal_Int32 nRtldMo
#endif
debug_printf("osl_loadModule error %s", szError);
-#ifndef OSL_DEBUG_LEVEL
+#if (OSL_DEBUG_LEVEL==0) || !defined(OSL_DEBUG_LEVEL)
WinMessageBox(HWND_DESKTOP,HWND_DESKTOP,
szError, "Critical error: DosLoadModule failed",
0, MB_ERROR | MB_OK | MB_MOVEABLE);
commit 1708b9bee77ab0e8762bbb6886b778b93428a2b0
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Thu Feb 20 11:01:04 2014 +0000
124243: allow in-place editing of Input Fields in protected areas (e.g. protected sections)
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index e32463d..8b0b4ee 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -253,7 +253,7 @@ public:
// steht in etwas geschuetztem oder in die Selektion umspannt
// etwas geschuetztes.
- sal_Bool HasReadonlySel( bool bFormView ) const;
+ sal_Bool HasReadonlySel( const bool bFormView ) const;
sal_Bool ContainsPosition(const SwPosition & rPos)
{ return *Start() <= rPos && rPos <= *End(); }
diff --git a/sw/sdi/_basesh.sdi b/sw/sdi/_basesh.sdi
index cee73b2..f693f71 100644
--- a/sw/sdi/_basesh.sdi
+++ b/sw/sdi/_basesh.sdi
@@ -37,7 +37,6 @@ interface BaseTextSelection
ExecMethod = ExecDelete ;
StateMethod = GetState ;
FastCall = FALSE ;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
FN_BACKSPACE // status(final|play)
@@ -45,7 +44,6 @@ interface BaseTextSelection
ExecMethod = ExecDelete ;
StateMethod = GetState ;
FastCall = FALSE ;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
FN_SHIFT_BACKSPACE // status()
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index 15532fa..64e7f69 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -240,12 +240,13 @@ interface BaseText
StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+
FN_INSERT_BREAK // status(final|play)
[
ExecMethod = ExecInsert ;
StateMethod = GetState ;
- DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+
FN_INSERT_PAGEBREAK // status(final|play)
[
ExecMethod = ExecInsert ;
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index ac8c92b..5e286a8 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2429,9 +2429,7 @@ sal_Bool SwCrsrShell::IsOverReadOnlyPos( const Point& rPt ) const
Point aPt( rPt );
SwPaM aPam( *pCurCrsr->GetPoint() );
GetLayout()->GetCrsrOfst( aPam.GetPoint(), aPt );
- // --> FME 2004-06-29 #114856# Formular view
return aPam.HasReadonlySel( GetViewOptions()->IsFormView() );
- // <--
}
@@ -3059,28 +3057,26 @@ void SwCrsrShell::SetReadOnlyAvailable( sal_Bool bFlag )
sal_Bool SwCrsrShell::HasReadonlySel() const
{
sal_Bool bRet = sal_False;
- if( IsReadOnlyAvailable() ||
- // --> FME 2004-06-29 #114856# Formular view
- GetViewOptions()->IsFormView() )
- // <--
+ if ( IsReadOnlyAvailable() || GetViewOptions()->IsFormView() )
{
- if( pTblCrsr )
- bRet = pTblCrsr->HasReadOnlyBoxSel() ||
- pTblCrsr->HasReadonlySel(
- // --> FME 2004-06-29 #114856# Formular view
- GetViewOptions()->IsFormView() );
- // <--
+ if ( pTblCrsr != NULL )
+ {
+ bRet = pTblCrsr->HasReadOnlyBoxSel()
+ || pTblCrsr->HasReadonlySel( GetViewOptions()->IsFormView() );
+ }
else
{
const SwPaM* pCrsr = pCurCrsr;
- do {
- if( pCrsr->HasReadonlySel(
- // --> FME 2004-06-29 #114856# Formular view
- GetViewOptions()->IsFormView() ) )
- // <--
+ do
+ {
+ if ( pCrsr->HasReadonlySel( GetViewOptions()->IsFormView() ) )
+ {
bRet = sal_True;
- } while( !bRet && pCurCrsr != ( pCrsr = (SwPaM*)pCrsr->GetNext() ));
+ }
+
+ pCrsr = (SwPaM*)pCrsr->GetNext();
+ } while ( !bRet && pCrsr != pCurCrsr );
}
}
return bRet;
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 79cff74..ca318ee 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -671,74 +671,80 @@ const SwFrm* lcl_FindEditInReadonlyFrm( const SwFrm& rFrm )
// steht in etwas geschuetztem oder in die Selektion umspannt
// etwas geschuetztes.
-sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
+sal_Bool SwPaM::HasReadonlySel( const bool bFormView ) const
{
sal_Bool bRet = sal_False;
- Point aTmpPt;
- const SwCntntNode *pNd;
- const SwCntntFrm *pFrm;
- if( 0 != ( pNd = GetPoint()->nNode.GetNode().GetCntntNode() ))
+ const SwCntntNode* pNd = GetPoint()->nNode.GetNode().GetCntntNode();
+ const SwCntntFrm *pFrm = NULL;
+ if ( pNd != NULL )
+ {
+ Point aTmpPt;
pFrm = pNd->getLayoutFrm( pNd->GetDoc()->GetCurrentLayout(), &aTmpPt, GetPoint(), sal_False );
- else
- pFrm = 0;
-
- // --> FME 2004-06-29 #114856# Formular view
- // Will be set if point/mark are inside edit-in-readonly environment
- const SwFrm* pSttEIRFrm = 0;
- const SwFrm* pEndEIRFrm = 0;
-
- if( pFrm && ( pFrm->IsProtected() ||
- // --> FME 2004-06-29 #114856# Formular view
- ( bFormView &&
- 0 == ( pSttEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
- // <--
+ }
+
+ // Will be set if point are inside edit-in-readonly environment
+ const SwFrm* pPointEditInReadonlyFrm = NULL;
+ if ( pFrm != NULL
+ && ( pFrm->IsProtected()
+ || ( bFormView
+ && 0 == ( pPointEditInReadonlyFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
+ {
bRet = sal_True;
- else if( pNd )
+ }
+ else if( pNd != NULL )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
- if( pSNd && ( pSNd->GetSection().IsProtectFlag() ||
- // --> FME 2004-06-29 #114856# Formular view
- (bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
- // <--
+ if ( pSNd != NULL
+ && ( pSNd->GetSection().IsProtectFlag()
+ || ( bFormView
+ && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
+ {
bRet = sal_True;
+ }
}
- if( !bRet && HasMark() && GetPoint()->nNode != GetMark()->nNode )
+ if ( !bRet
+ && HasMark()
+ && GetPoint()->nNode != GetMark()->nNode )
{
- if( 0 != ( pNd = GetMark()->nNode.GetNode().GetCntntNode() ))
+ pNd = GetMark()->nNode.GetNode().GetCntntNode();
+ pFrm = NULL;
+ if ( pNd != NULL )
+ {
+ Point aTmpPt;
pFrm = pNd->getLayoutFrm( pNd->GetDoc()->GetCurrentLayout(), &aTmpPt, GetMark(), sal_False );
- else
- pFrm = 0;
+ }
- if( pFrm && ( pFrm->IsProtected() ||
- // --> FME 2004-06-29 #114856# Formular view
- ( bFormView &&
- 0 == ( pEndEIRFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
- // <--
+ const SwFrm* pMarkEditInReadonlyFrm = NULL;
+ if ( pFrm != NULL
+ && ( pFrm->IsProtected()
+ || ( bFormView
+ && 0 == ( pMarkEditInReadonlyFrm = lcl_FindEditInReadonlyFrm( *pFrm ) ) ) ) )
+ {
bRet = sal_True;
- else if( pNd )
+ }
+ else if( pNd != NULL )
{
const SwSectionNode* pSNd = pNd->GetSectionNode();
- if( pSNd && ( pSNd->GetSection().IsProtectFlag() ||
- // --> FME 2004-06-29 #114856# Formular view
- (bFormView && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
- // <--
+ if ( pSNd != NULL
+ && ( pSNd->GetSection().IsProtectFlag()
+ || ( bFormView
+ && !pSNd->GetSection().IsEditInReadonlyFlag()) ) )
+ {
bRet = sal_True;
+ }
}
- // --> FME 2004-06-29 #114856# Formular view
if ( !bRet && bFormView )
{
// Check if start and end frame are inside the _same_
// edit-in-readonly-environment. Otherwise we better return 'true'
- if ( pSttEIRFrm != pEndEIRFrm )
+ if ( pPointEditInReadonlyFrm != pMarkEditInReadonlyFrm )
bRet = sal_True;
}
- // <--
- // oder sollte eine geschuetzte Section innerhalb der
- // Selektion liegen?
+ // check for protected section inside the selection
if( !bRet )
{
sal_uLong nSttIdx = GetMark()->nNode.GetIndex(),
@@ -767,15 +773,6 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
if( nSttIdx <= nIdx && nEndIdx >= nIdx &&
rCntnt.GetCntntIdx()->GetNode().GetNodes().IsDocNodes() )
{
-/* // ist es keine gelinkte Section, dann kann sie auch
- // nicht mitselektiert werden
- const SwSection& rSect = *pFmt->GetSection();
- if( CONTENT_SECTION == rSect.GetType() )
- {
- RestoreSavePos();
- return sal_True;
- }
-*/
bRet = sal_True;
break;
}
@@ -819,9 +816,11 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
}
}
}
+
//FIXME FieldBk
// TODO: Form Protection when Enhanced Fields are enabled
- if (!bRet) {
+ if (!bRet)
+ {
const SwDoc *pDoc = GetDoc();
sw::mark::IMark* pA = NULL;
sw::mark::IMark* pB = NULL;
@@ -836,6 +835,7 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
if ( bProtectForm )
bRet |= ( pA == NULL || pB == NULL );
}
+
return bRet;
}
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index 3906b59..f672ca1 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -118,7 +118,7 @@ long SwEditShell::Delete()
{
SET_CURR_SHELL( this );
long nRet = 0;
- if( !HasReadonlySel() )
+ if ( !HasReadonlySel() || CrsrInsideInputFld() )
{
StartAllAction();
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 71dd549..85af11a 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -77,11 +77,10 @@ void SwEditShell::SetTxtFmtColl( SwTxtFmtColl *pFmt,
GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_SETFMTCOLL, &aRewriter);
FOREACHPAM_START(this)
- if( !PCURCRSR->HasReadonlySel(
- // --> FME 2004-06-29 #114856# Formular view
- GetViewOptions()->IsFormView() ) )
- // <--
+ if ( !PCURCRSR->HasReadonlySel( GetViewOptions()->IsFormView() ) )
+ {
GetDoc()->SetTxtFmtColl( *PCURCRSR, pLocal, true, bResetListAttrs );
+ }
FOREACHPAM_END()
GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_SETFMTCOLL, &aRewriter);
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index 857bba8..bbb2e93 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -696,35 +696,36 @@ sal_Bool SwEditShell::IsOutlineCopyable( sal_uInt16 nIdx ) const
}
-sal_Bool SwEditShell::NumOrNoNum( sal_Bool bNumOn, sal_Bool bChkStart ) // #115901#
+sal_Bool SwEditShell::NumOrNoNum(
+ sal_Bool bNumOn,
+ sal_Bool bChkStart )
{
sal_Bool bRet = sal_False;
- SwPaM* pCrsr = GetCrsr();
- if( pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() &&
- ( !bChkStart || !pCrsr->GetPoint()->nContent.GetIndex()) )
+
+ if ( !IsMultiSelection()
+ && !HasSelection()
+ && ( !bChkStart || IsSttPara() ) )
{
- StartAllAction(); // Klammern fuers Updaten !!
- // #115901#
- bRet = GetDoc()->NumOrNoNum( pCrsr->GetPoint()->nNode, !bNumOn ); // #i29560#
+ StartAllAction();
+ bRet = GetDoc()->NumOrNoNum( GetCrsr()->GetPoint()->nNode, !bNumOn );
EndAllAction();
}
return bRet;
}
+
sal_Bool SwEditShell::IsNoNum( sal_Bool bChkStart ) const
{
- // ein Backspace im Absatz ohne Nummer wird zum Delete
sal_Bool bResult = sal_False;
- SwPaM* pCrsr = GetCrsr();
- if (pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() &&
- (!bChkStart || !pCrsr->GetPoint()->nContent.GetIndex()))
+ if ( !IsMultiSelection()
+ && !HasSelection()
+ && ( !bChkStart || IsSttPara() ) )
{
- const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
-
- if (pTxtNd)
+ const SwTxtNode* pTxtNd = GetCrsr()->GetNode()->GetTxtNode();
+ if ( pTxtNd != NULL )
{
- bResult = ! pTxtNd->IsCountedInList();
+ bResult = !pTxtNd->IsCountedInList();
}
}
@@ -740,12 +741,12 @@ sal_uInt8 SwEditShell::GetNumLevel() const
SwPaM* pCrsr = GetCrsr();
const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
- ASSERT( pTxtNd, "GetNumLevel() without text node" )
- if ( !pTxtNd )
+ ASSERT( pTxtNd != NULL, "GetNumLevel() without text node" )
+ if ( pTxtNd == NULL )
return nLevel;
const SwNumRule* pRule = pTxtNd->GetNumRule();
- if(pRule)
+ if ( pRule != NULL )
{
const int nListLevelOfTxtNode( pTxtNd->GetActualListLevel() );
if ( nListLevelOfTxtNode >= 0 )
@@ -774,7 +775,7 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule,
GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
SwPaM* pCrsr = GetCrsr();
- if( pCrsr->GetNext() != pCrsr ) // Mehrfachselektion ?
+ if( IsMultiSelection() )
{
SwPamRanges aRangeArr( *pCrsr );
SwPaM aPam( *pCrsr->GetPoint() );
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index e272549..3e3aed7 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -301,7 +301,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
if( pApplyTempl )
{
PointerStyle eStyle = POINTER_FILL;
- if( rSh.IsOverReadOnlyPos( rLPt ))
+ if ( rSh.IsOverReadOnlyPos( rLPt ) )
{
if( pUserMarker )
{
@@ -1851,7 +1851,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KEY_BACKSPACE:
case KEY_BACKSPACE | KEY_SHIFT:
- if( !rSh.HasReadonlySel() )
+ if ( !rSh.HasReadonlySel()
+ && !rSh.CrsrInsideInputFld() )
{
sal_Bool bDone = sal_False;
// Remove the paragraph indent, if the cursor is at the
@@ -1860,12 +1861,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
// Also try to remove indent, if current paragraph
// has numbering rule, but isn't counted and only
// key <backspace> is hit.
- const bool bOnlyBackspaceKey(
- KEY_BACKSPACE == rKeyCode.GetFullCode() );
- if ( rSh.IsSttPara() &&
- !rSh.HasSelection() && // i40834
- ( NULL == rSh.GetCurNumRule() ||
- ( rSh.IsNoNum() && bOnlyBackspaceKey ) ) )
+ const bool bOnlyBackspaceKey( KEY_BACKSPACE == rKeyCode.GetFullCode() );
+ if ( rSh.IsSttPara()
+ && !rSh.HasSelection()
+ && ( rSh.GetCurNumRule() == NULL
+ || ( rSh.IsNoNum() && bOnlyBackspaceKey ) ) )
{
bDone = rSh.TryRemoveIndent();
}
@@ -1874,11 +1874,10 @@ KEYINPUT_CHECKTABLE_INSDEL:
eKeyState = KS_Ende;
else
{
- if (rSh.IsSttPara() &&
- ! rSh.IsNoNum())
+ if ( rSh.IsSttPara() && !rSh.IsNoNum() )
{
- if (nKS_NUMDOWN_Count > 0 &&
- 0 < rSh.GetNumLevel())
+ if (nKS_NUMDOWN_Count > 0
+ && rSh.GetNumLevel() > 0)
{
eKeyState = KS_NumUp;
nKS_NUMDOWN_Count = 2;
@@ -1892,7 +1891,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
}
// If the cursor is in an empty paragraph, which has
- // a numbering, but not the oultine numbering, and
+ // a numbering, but not the outline numbering, and
// there is no selection, the numbering has to be
// deleted on key <Backspace>.
// Otherwise method <SwEditShell::NumOrNoNum(..)>
@@ -1902,37 +1901,35 @@ KEYINPUT_CHECKTABLE_INSDEL:
// on <shift-backspace> it is set to <true>.
// Thus, assure that method <SwEditShell::NumOrNum(..)>
// is only called for the intended purpose.
- bool bCallNumOrNoNum( false );
+ if ( !bDone && rSh.IsSttPara() )
{
- if ( !bDone )
+ bool bCallNumOrNoNum( false );
+ if ( bOnlyBackspaceKey && !rSh.IsNoNum() )
{
- if ( bOnlyBackspaceKey && !rSh.IsNoNum() )
- {
- bCallNumOrNoNum = true;
- }
- else if ( !bOnlyBackspaceKey && rSh.IsNoNum() )
+ bCallNumOrNoNum = true;
+ }
+ else if ( !bOnlyBackspaceKey && rSh.IsNoNum() )
+ {
+ bCallNumOrNoNum = true;
+ }
+ else if ( bOnlyBackspaceKey
+ && rSh.IsSttPara()
+ && rSh.IsEndPara()
+ && !rSh.HasSelection() )
+ {
+ const SwNumRule* pCurrNumRule( rSh.GetCurNumRule() );
+ if ( pCurrNumRule != NULL
+ && pCurrNumRule != rSh.GetOutlineNumRule() )
{
bCallNumOrNoNum = true;
}
- else if ( bOnlyBackspaceKey &&
- rSh.IsSttPara() && rSh.IsEndPara() &&
- !rSh.HasSelection() )
- {
- const SwNumRule* pCurrNumRule( rSh.GetCurNumRule() );
- if ( pCurrNumRule &&
- pCurrNumRule != rSh.GetOutlineNumRule() )
- {
- bCallNumOrNoNum = true;
- }
- }
+ }
+ if ( bCallNumOrNoNum
+ && rSh.NumOrNoNum( !bOnlyBackspaceKey, sal_True ) )
+ {
+ eKeyState = KS_NumOrNoNum;
}
}
- if ( bCallNumOrNoNum &&
- rSh.NumOrNoNum( !bOnlyBackspaceKey, sal_True ) )
- {
- eKeyState = KS_NumOrNoNum;
- }
- // <--
}
}
break;
@@ -1960,9 +1957,9 @@ KEYINPUT_CHECKTABLE_INSDEL:
GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_NEXT_INPUTFLD );
eKeyState = KS_Ende;
}
- else
- if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
- !rSh.HasReadonlySel() )
+ else if( rSh.GetCurNumRule()
+ && rSh.IsSttOfPara()
+ && !rSh.HasReadonlySel() )
{
if ( rSh.IsFirstOfNumRule() &&
numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() )
@@ -2019,8 +2016,9 @@ KEYINPUT_CHECKTABLE_INSDEL:
GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_PREV_INPUTFLD );
eKeyState = KS_Ende;
}
- else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
- !rSh.HasReadonlySel() )
+ else if( rSh.GetCurNumRule()
+ && rSh.IsSttOfPara()
+ && !rSh.HasReadonlySel() )
{
if ( rSh.IsFirstOfNumRule() &&
numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() )
@@ -2308,10 +2306,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
eKeyState = KS_Ende;
}
- else if(!rSh.HasReadonlySel())
+ else if ( !rSh.HasReadonlySel()
+ || rSh.CrsrInsideInputFld() )
{
- sal_Bool bIsNormalChar = GetAppCharClass().isLetterNumeric(
- String( aCh ), 0 );
+ const sal_Bool bIsNormalChar =
+ GetAppCharClass().isLetterNumeric( String( aCh ), 0 );
if( bChkInsBlank && bIsNormalChar &&
(aInBuffer.Len() || !rSh.IsSttPara() || !rSh.IsEndPara() ))
{
@@ -2321,9 +2320,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
aInBuffer.Expand( aInBuffer.Len() + 1, ' ' );
}
-
- sal_Bool bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
- sal_Bool bRunNext = pACorr && pACorr->HasRunNext();
+ const sal_Bool bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
+ const sal_Bool bRunNext = pACorr != NULL && pACorr->HasRunNext();
if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
pACfg->IsAutoFmtByInput() &&
(( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) &&
@@ -3399,9 +3397,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
const int nSelType = rSh.GetSelectionType();
// Check in general, if an object is selectable at given position.
// Thus, also text fly frames in background become selectable via Ctrl-Click.
- if ( nSelType & nsSelectionType::SEL_OLE ||
- nSelType & nsSelectionType::SEL_GRF ||
- rSh.IsObjSelectable( aDocPos ) )
+ if ( ( nSelType & nsSelectionType::SEL_OLE )
+ || ( nSelType & nsSelectionType::SEL_GRF )
+ || rSh.IsObjSelectable( aDocPos ) )
{
MV_KONTEXT( &rSh );
if( !rSh.IsFrmSelected() )
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 79aace3..a04211e 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -1541,11 +1541,16 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
rSet.Put(SfxBoolItem(nWhich, bDisable));
}
break;
+
case FN_BACKSPACE:
case SID_DELETE:
- if (rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0)
+ if ( ( rSh.HasReadonlySel() && !rSh.CrsrInsideInputFld() )
+ || rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0 )
+ {
rSet.DisableItem( nWhich );
+ }
break;
+
case SID_CONTOUR_DLG:
{
sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index b67d2b2..ae9180f 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -1629,6 +1629,16 @@ void SwTextShell::GetState( SfxItemSet &rSet )
}
break;
+
+ case FN_INSERT_BREAK:
+ if ( rSh.HasReadonlySel()
+ && !rSh.CrsrInsideInputFld() )
+ {
+ rSet.DisableItem( nWhich );
+ }
+ break;
+
+
case FN_INSERT_BREAK_DLG:
case FN_INSERT_COLUMN_BREAK:
case FN_INSERT_PAGEBREAK:
More information about the Libreoffice-commits
mailing list