[Libreoffice-commits] sw/source

2013-02-03 Thread Miklos Vajna
 sw/source/core/layout/frmtool.cxx |   14 --
 1 file changed, 14 deletions(-)

New commits:
commit cb33714517c3302da6c765aed977341b603c1017
Author: Miklos Vajna 
Date:   Sun Feb 3 12:23:40 2013 +0100

sw: unused includes in frmtool

Change-Id: Iddd1c24211597822f6dd480c76f841607bc13364

diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index 9a60553..db4ef96 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -17,23 +17,17 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -41,15 +35,12 @@
 #include 
 #include "pagefrm.hxx"
 #include "colfrm.hxx"
-#include "doc.hxx"
 #include "fesh.hxx"
 #include "viewimp.hxx"
 #include "viewopt.hxx"
-#include "pam.hxx"
 #include "dflyobj.hxx"
 #include "dcontact.hxx"
 #include "frmtool.hxx"
-#include "docsh.hxx"
 #include "tabfrm.hxx"
 #include "rowfrm.hxx"
 #include "ftnfrm.hxx"
@@ -62,14 +53,10 @@
 #include "sectfrm.hxx"
 #include "node2lay.hxx"
 #include "ndole.hxx"
-#include "ndtxt.hxx"
-#include "swtable.hxx"
 #include "hints.hxx"
 #include 
 #include 
 #include 
-#include "mdiexp.hxx"
-#include "statstr.hrc"
 #include 
 #include 
 #include 
@@ -3359,7 +3346,6 @@ const SwFrm* FindPage( const SwRect &rRect, const SwFrm 
*pPage )
 return pPage;
 }
 
-#include 
 class SwFrmHolder : private SfxListener
 {
 SwFrm* pFrm;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-02-02 Thread Joren De Cuyper
 sw/source/core/txtnode/ndtxt.cxx |9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 0cd3e819ecef72df2d586facd4e3f635fb95146a
Author: Joren De Cuyper 
Date:   Sat Feb 2 02:59:30 2013 +0100

fix if statement and translate German OSL_ENSURE

Change-Id: I3eefa563e00e6a4dcb3f1e5726bdf6d27f536624
Reviewed-on: https://gerrit.libreoffice.org/1960
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index ab4cd3c..703e632 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1071,10 +1071,9 @@ void SwTxtNode::_ChgTxtCollUpdateNum( const SwTxtFmtColl 
*pOldColl,
 {
 SetAttrListLevel(nNewLevel);
 }
-
+if (pDoc)
 {
-if (pDoc)
-pDoc->GetNodes().UpdateOutlineNode(*this);
+pDoc->GetNodes().UpdateOutlineNode(*this);
 }
 
 
@@ -3575,9 +3574,9 @@ void SwTxtNode::Modify( const SfxPoolItem* pOldValue, 
const SfxPoolItem* pNewVal
 
 SwFmtColl* SwTxtNode::ChgFmtColl( SwFmtColl *pNewColl )
 {
-OSL_ENSURE( pNewColl,"ChgFmtColl: Collectionpointer ist 0." );
+OSL_ENSURE( pNewColl,"ChgFmtColl: Collectionpointer has value 0." );
 OSL_ENSURE( HAS_BASE( SwTxtFmtColl, pNewColl ),
-"ChgFmtColl: ist kein Text-Collectionpointer." );
+"ChgFmtColl: is not a Text Collection pointer." );
 
 SwTxtFmtColl *pOldColl = GetTxtColl();
 if( pNewColl != pOldColl )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-02-01 Thread Stephan Bergmann
 sw/source/filter/xml/swxml.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e8e263de89c4dce720a568f8132977e730bd682c
Author: Stephan Bergmann 
Date:   Fri Feb 1 16:17:41 2013 +0100

-Wc++11-narrowing

Change-Id: I044033ca41dea75dc438bc3989d067fc8e70b9fc

diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 76778b6..175372d 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -643,7 +643,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const String& 
rBaseURL, SwPaM &rPaM, con
 { "TextDocInOOoFileFormat", sizeof("TextDocInOOoFileFormat")-1, 0,
   &::getBooleanCppuType(),
   beans::PropertyAttribute::MAYBEVOID, 0 },
-{ "SourceStorage", strlen( "SourceStorage" ), 0, 
&embed::XStorage::static_type(),
+{ "SourceStorage", sizeof("SourceStorage")-1, 0, 
&embed::XStorage::static_type(),
   ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 },
 { NULL, 0, 0, NULL, 0, 0 }
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-02-01 Thread Takeshi Abe
 sw/source/ui/docvw/edtwin.cxx |4 +---
 sw/source/ui/inc/edtwin.hxx   |4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 6bf2f6664573e734cc54582aae37838795cccb1e
Author: Takeshi Abe 
Date:   Fri Feb 1 18:15:43 2013 +0900

Drop useless member variables

Change-Id: Ib933d150d5d82383d23619857b2797a63be28626

diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 78c6491..34d30e3 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -1799,7 +1799,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
 eKeyState = KS_End;
 bTblInsDelMode = sal_True;
 bTblIsInsMode = sal_False;
-bTblIsColMode = sal_True;
 aKeyInputTimer.Start();
 bStopKeyInputTimer = false;
 eAutoCompleteAction = ACA_NoOp;
@@ -1811,7 +1810,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
 eKeyState = KS_End;
 bTblInsDelMode = sal_True;
 bTblIsInsMode = sal_True;
-bTblIsColMode = sal_True;
 aKeyInputTimer.Start();
 bStopKeyInputTimer = false;
 eAutoCompleteAction = ACA_NoOp;
@@ -4798,7 +4796,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView):
 EnableChildTransparentMode();
 SetDialogControlFlags( WINDOW_DLGCTRL_RETURN | WINDOW_DLGCTRL_WANTFOCUS );
 
-bLinkRemoved = bMBPressed = bInsDraw = bInsFrm =
+bMBPressed = bInsDraw = bInsFrm =
 bIsInDrag = bOldIdle = bOldIdleSet = bChainMode = bWasShdwCrsr = sal_False;
 // initially use the input language
 bUseInputLanguage = sal_True;
diff --git a/sw/source/ui/inc/edtwin.hxx b/sw/source/ui/inc/edtwin.hxx
index b95539e..2d71f5c 100644
--- a/sw/source/ui/inc/edtwin.hxx
+++ b/sw/source/ui/inc/edtwin.hxx
@@ -118,8 +118,7 @@ friend void PageNumNotify(  ViewShell* pVwSh,
 sal_uInt16  eBezierMode;
 sal_uInt16  nInsFrmColCount; // column number for interactive frame
 SdrObjKind  eDrawMode;
-sal_BoolbLinkRemoved: 1,
-bMBPressed  : 1,
+sal_BoolbMBPressed  : 1,
 bInsDraw: 1,
 bInsFrm : 1,
 bIsInMove   : 1,
@@ -128,7 +127,6 @@ friend void PageNumNotify(  ViewShell* pVwSh,
 bOldIdleSet : 1, // during QeueryDrop
 bTblInsDelMode  : 1, //
 bTblIsInsMode   : 1, //
-bTblIsColMode   : 1, //
 bChainMode  : 1, // connect frames
 bWasShdwCrsr: 1, // ShadowCrsr was on in 
MouseButtonDown
 bLockInput  : 1, // lock while calc panel is active
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source xmloff/inc xmloff/Library_xo.mk xmloff/source

2013-02-01 Thread Luboš Luňák
 sw/source/filter/xml/xmlfonte.cxx|   23 -
 sw/source/filter/xml/xmlimp.hxx  |2 
 xmloff/Library_xo.mk |1 
 xmloff/inc/xmloff/XMLFontAutoStylePool.hxx   |5 -
 xmloff/inc/xmloff/XMLFontStylesContext.hxx   |   39 
 xmloff/inc/xmloff/xmlimp.hxx |2 
 xmloff/inc/xmloff/xmltoken.hxx   |2 
 xmloff/source/core/xmltoken.cxx  |2 
 xmloff/source/style/XMLFontAutoStylePool.cxx |  111 +++-
 xmloff/source/style/XMLFontStylesContext.cxx |  124 +++
 10 files changed, 304 insertions(+), 7 deletions(-)

New commits:
commit 989d0953a4d69bef3c8aba8e9dc7758194adcdc4
Author: Luboš Luňák 
Date:   Fri Feb 1 14:26:36 2013 +0100

basic support for embedded fonts in odt (fdo#42195)

There are still places that should be improved a bit, but this works.

Change-Id: Ieb7947a294ec95b6fd8cec2e8c4bc731e2594c42

diff --git a/sw/source/filter/xml/xmlfonte.cxx 
b/sw/source/filter/xml/xmlfonte.cxx
index 4b4e48c..60e9dca5 100644
--- a/sw/source/filter/xml/xmlfonte.cxx
+++ b/sw/source/filter/xml/xmlfonte.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 using namespace ::com::sun::star::uno;
@@ -35,13 +36,13 @@ class SwXMLFontAutoStylePool_Impl: public 
XMLFontAutoStylePool
 {
 public:
 
-SwXMLFontAutoStylePool_Impl( SwXMLExport& rExport );
+SwXMLFontAutoStylePool_Impl( SwXMLExport& rExport, bool blockFontEmbedding 
);
 
 };
 
 SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl(
-SwXMLExport& _rExport ) :
-XMLFontAutoStylePool( _rExport )
+SwXMLExport& _rExport, bool blockFontEmbedding ) :
+XMLFontAutoStylePool( _rExport, blockFontEmbedding )
 {
 sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
 RES_CHRATR_CTL_FONT };
@@ -75,7 +76,21 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl(
 
 XMLFontAutoStylePool* SwXMLExport::CreateFontAutoStylePool()
 {
-return new SwXMLFontAutoStylePool_Impl( *this );
+bool blockFontEmbedding = false;
+// We write font info to both content.xml and styles.xml, but they are both
+// written by different SwXMLExport instance, and would therefore write 
each
+// font file twice without complicated checking for duplicates, so handle
+// the embedding only in one of them.
+if(( getExportFlags() & EXPORT_CONTENT ) == 0 )
+blockFontEmbedding = true;
+if( !getDoc()->get( IDocumentSettingAccess::EMBED_FONTS ))
+blockFontEmbedding = true;
+return new SwXMLFontAutoStylePool_Impl( *this, !blockFontEmbedding );
+}
+
+void SwXMLImport::NotifyEmbeddedFontRead()
+{
+getDoc()->set( IDocumentSettingAccess::EMBED_FONTS, true );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index 093aea3..9922360 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -197,6 +197,8 @@ public:
 ::com::sun::star::document::XDocumentProperties>
 GetDocumentProperties() const;
 
+virtual void NotifyEmbeddedFontRead() SAL_OVERRIDE;
+
 const SwDoc* getDoc() const;
 SwDoc* getDoc();
 };
diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk
index a24b6fd..7ffa8ba 100644
--- a/xmloff/Library_xo.mk
+++ b/xmloff/Library_xo.mk
@@ -50,6 +50,7 @@ $(eval $(call gb_Library_use_libraries,xo,\
 svl \
 tl \
 utl \
+vcl \
$(gb_UWINAPI) \
 ))
 
diff --git a/xmloff/inc/xmloff/XMLFontAutoStylePool.hxx 
b/xmloff/inc/xmloff/XMLFontAutoStylePool.hxx
index 4fd666b..8ed243d 100644
--- a/xmloff/inc/xmloff/XMLFontAutoStylePool.hxx
+++ b/xmloff/inc/xmloff/XMLFontAutoStylePool.hxx
@@ -37,6 +37,9 @@ class XMLOFF_DLLPUBLIC XMLFontAutoStylePool : public 
UniRefBase
 XMLFontAutoStylePool_Impl *pPool;
 XMLFontAutoStylePoolNames_Impl m_aNames;
 sal_uInt32 nName;
+bool tryToEmbedFonts;
+
+OUString embedFontFile( const OUString& fontUrl, const char* style );
 
 protected:
 
@@ -44,7 +47,7 @@ protected:
 
 public:
 
-XMLFontAutoStylePool( SvXMLExport& rExport );
+XMLFontAutoStylePool( SvXMLExport& rExport, bool tryToEmbedFonts = false );
 ~XMLFontAutoStylePool();
 
 ::rtl::OUString Add(
diff --git a/xmloff/inc/xmloff/XMLFontStylesContext.hxx 
b/xmloff/inc/xmloff/XMLFontStylesContext.hxx
index e48ae0a..7a50fc7 100644
--- a/xmloff/inc/xmloff/XMLFontStylesContext.hxx
+++ b/xmloff/inc/xmloff/XMLFontStylesContext.hxx
@@ -121,12 +121,51 @@ public:
  sal_Int32 nPitchIdx,
  sal_Int32 nCharsetIdx ) const;
 
+OUString familyName() const;
+
 SvXMLImportContext * CreateChildContext(
 sal_uInt16 nPrefix,
 const ::rtl::OUString& rLocalName,
 const ::com::sun::star::uno::Reference< 
::com::sun::star::xml::sax::XAttributeList > & xAttrList );
 };
 
+/// Handl

[Libreoffice-commits] .: sw/source

2013-02-01 Thread Miklos Vajna
 sw/source/ui/shells/grfsh.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 52c2de966b4f24a1ac997370efa517b1916ade33
Author: Miklos Vajna 
Date:   Fri Feb 1 11:42:47 2013 +0100

sw: clean up TOOLBOX_NAME define

Change-Id: Ida6b3820989acaa2f1bac43aa40276eaa12c8aae

diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index 18665c3..be7cb40 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -69,7 +69,7 @@
 
 #include "swabstdlg.hxx"
 
-#define TOOLBOX_NAME::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"colorbar" ) )
+#define TOOLBOX_NAME "colorbar"
 
 class SwExternalToolEdit : public ExternalToolEdit
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-30 Thread Libreoffice Gerrit user
 sw/source/ui/docvw/edtwin.cxx |   58 ++
 1 file changed, 42 insertions(+), 16 deletions(-)

New commits:
commit 94721b2aec614e0d99504138d484b2ad6cd550c7
Author: Michael Stahl 
Date:   Wed Jan 30 00:45:44 2013 +0100

fdo#59928: sw: fix mouse selection of fields:

SwEditWin::MouseButtonDown: the selection of fields was messed up by a
call to rSh.SetCursor near the bottom of the method. This used to be
fixed up by SwEditWin::MouseButtonUp previously, but that was broken
with commit dcb080347ca127044313bbb3c11c37761cc2a7a2.

To fix that move the field selection code to a place where it prevents
the other code from running, in the hope that it is not necessary.

Also it does not make any sense to select whole words when clicking on a
field, just selecting the field seems much better.

Change-Id: I8d604450789844b6a446cf3a35f62ed530d0328e

diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 9b4ec05..78c6491 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -131,6 +131,7 @@
 
 #include 
 #include 
+#include  // FIXME this sucks
 #include 
 
 #include 
@@ -3210,22 +3211,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
 if (aVEvt.eEvent == SDREVENT_EXECUTEURL)
 bExecDrawTextLink = true;
 }
-
-SwContentAtPos aFieldAtPos ( SwContentAtPos::SW_FIELD 
);
-
-// Are we selecting a field?
-if ( rSh.GetContentAtPos( aDocPos, aFieldAtPos ) )
-{
-// select work, AdditionalMode if applicable
-if ( KEY_MOD1 == rMEvt.GetModifier() && 
!rSh.IsAddMode() )
-{
-rSh.EnterAddMode();
-rSh.SelWrd( &aDocPos );
-rSh.LeaveAddMode();
-}
-else
-rSh.SelWrd( &aDocPos );
-}
 break;
 }
 case 2:
@@ -3563,6 +3548,47 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
 rSh.ClearGCAttr();
 }
 
+SwContentAtPos aFieldAtPos(SwContentAtPos::SW_FIELD);
+
+// Are we clicking on a field?
+if (rSh.GetContentAtPos(aDocPos, aFieldAtPos))
+{
+bool bAddMode(false); // AdditionalMode if applicable
+if (KEY_MOD1 == rMEvt.GetModifier() && !rSh.IsAddMode())
+{
+bAddMode = true;
+rSh.EnterAddMode();
+}
+rSh.SetCursor(&aDocPos, bOnlyText);
+// Select the field. Unfortunately cursor may be on field
+// position or on position after field depending on which
+// half of the field was clicked on.
+SwTxtAttr const*const pTxtFld(aFieldAtPos.pFndTxtAttr);
+if (rSh.GetCurrentShellCursor().GetPoint()->nContent
+.GetIndex() == *pTxtFld->GetStart())
+{
+rSh.Right( CRSR_SKIP_CHARS, true, 1, false );
+rSh.NormalizePam();
+}
+else
+{
+assert(rSh.GetCurrentShellCursor().GetPoint()->nContent
+.GetIndex() == (*pTxtFld->GetStart() + 1));
+rSh.Left( CRSR_SKIP_CHARS, true, 1, false );
+}
+// it's a bit of a mystery what this is good for?
+// in this case we assume it's valid since we just
+// selected a field
+bValidCrsrPos = true;
+if (bAddMode)
+{
+rSh.LeaveAddMode();
+}
+// don't go into the !bOverSelect block below - it moves
+// the cursor
+break;
+}
+
 sal_Bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf 
= sal_False;
 if( !bOverSelect )
 bOverURLGrf = bOverSelect = 0 != rSh.IsURLGrfAtPos( 
aDocPos );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-29 Thread Libreoffice Gerrit user
 sw/source/core/layout/paintfrm.cxx |   18 --
 1 file changed, 18 deletions(-)

New commits:
commit a2b651825926fd6d84073419d03a9808e284b48d
Author: Miklos Vajna 
Date:   Tue Jan 29 17:57:46 2013 +0100

sw: unused includes in paintfrm

Change-Id: Iee1e943db369532e88e1d5badcfb5106e9d6ef26

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index d6e1106..ef94882 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -17,23 +17,16 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
-#include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -42,11 +35,8 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -60,7 +50,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -68,7 +57,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -76,7 +64,6 @@
 #include 
 #include 
 #include 
-#include 
 // <--
 // --> OD #i76669#
 #include 
@@ -94,11 +81,8 @@
 #define COL_NOTES_SIDEPANE_SCROLLAREA   RGB_COLORDATA(230,230,220)
 
 #include  //Need for svtools::DrawLine
-#include  //Need for svtools::DrawLine
 
 #include "pagefrm.hrc"
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -108,9 +92,7 @@
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-28 Thread Libreoffice Gerrit user
 sw/source/core/layout/calcmove.cxx |4 
 sw/source/core/layout/tabfrm.cxx   |4 
 sw/source/filter/html/htmlatr.cxx  |4 
 sw/source/ui/inc/conrect.hxx   |6 -
 sw/source/ui/inc/content.hxx   |   16 +-
 sw/source/ui/inc/conttree.hxx  |   56 -
 sw/source/ui/misc/glosbib.cxx  |6 -
 sw/source/ui/ribbar/conrect.cxx|   14 +-
 sw/source/ui/uno/unomailmerge.cxx  |   10 -
 sw/source/ui/utlui/content.cxx |  221 ++---
 sw/source/ui/utlui/glbltree.cxx|   24 ++--
 11 files changed, 183 insertions(+), 182 deletions(-)

New commits:
commit 6db0a5f381f206801035ab1d786dbac8c31cc5eb
Author: Takeshi Abe 
Date:   Tue Jan 29 10:55:26 2013 +0900

sal_Bool to bool

Change-Id: Iae6343a71137c5ffbc9d38f56c01d5b182975912

diff --git a/sw/source/core/layout/calcmove.cxx 
b/sw/source/core/layout/calcmove.cxx
index 86fe38e..f4a2c3a 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1155,7 +1155,7 @@ void SwCntntFrm::MakeAll()
 // this flag is set. If it turns 
out that it
 // didn't keep it's promise, we 
can act in a
 // controlled fashion.
-sal_Bool bMoveable;
+bool bMoveable;
 const sal_Bool bFly = IsInFly();
 const sal_Bool bTab = IsInTab();
 const sal_Bool bFtn = IsInFtn();
@@ -1265,7 +1265,7 @@ void SwCntntFrm::MakeAll()
 // - loop prevention
 SwRect aOldFrm_StopFormat( Frm() );
 SwRect aOldPrt_StopFormat( Prt() );
-if ( sal_True == (bMoveable = IsMoveable()) )
+if ( (bMoveable = IsMoveable()) )
 {
 SwFrm *pPre = GetIndPrev();
 if ( CheckMoveFwd( bMakePage, bKeep, bMovedBwd ) )
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 3945383..27ad754 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1858,7 +1858,7 @@ void SwTabFrm::MakeAll()
 // gets set to true when the Frm is split
 bool bSplit = false;
 const bool bFtnsInDoc = !GetFmt()->GetDoc()->GetFtnIdxs().empty();
-sal_Bool bMoveable;
+bool bMoveable;
 const sal_Bool bFly = IsInFly();
 
 SwBorderAttrAccess  *pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), 
this );
@@ -1943,7 +1943,7 @@ void SwTabFrm::MakeAll()
 SWRECTFN( this )
 while ( !bValidPos || !bValidSize || !bValidPrtArea )
 {
-if ( sal_True == (bMoveable = IsMoveable()) )
+if ( (bMoveable = IsMoveable()) )
 if ( CheckMoveFwd( bMakePage, bKeep && KEEPTAB, bMovedBwd ) )
 {
 bMovedFwd = true;
diff --git a/sw/source/filter/html/htmlatr.cxx 
b/sw/source/filter/html/htmlatr.cxx
index 9e84dc3..7c0c227 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -1579,14 +1579,14 @@ void HTMLEndPosLst::SplitItem( const SfxPoolItem& 
rItem, xub_StrLen nStart,
 if( pItem->Which() == nWhich &&
 HTML_ON_VALUE == GetHTMLItemState( *pItem ) )
 {
-sal_Bool bDelete = sal_True;
+bool bDelete = true;
 
 if( nTestStart < nStart )
 {
 // der Start des neuen Attribut entspricht
 // dem neuen Ende des Attribts
 FixSplittedItem( pTest, nStart, i );
-bDelete = sal_False;
+bDelete = false;
 }
 else
 {
diff --git a/sw/source/ui/inc/conrect.hxx b/sw/source/ui/inc/conrect.hxx
index c87056c..f382d73 100644
--- a/sw/source/ui/inc/conrect.hxx
+++ b/sw/source/ui/inc/conrect.hxx
@@ -30,11 +30,11 @@
 
 class ConstRectangle : public SwDrawBase
 {
-sal_Bool bMarquee;
-sal_Bool bCapVertical;
+bool bMarquee;
+bool bCapVertical;
 
 // #93382#
-sal_BoolmbVertical;
+bool mbVertical;
 
  public:
 ConstRectangle(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
diff --git a/sw/source/ui/inc/content.hxx b/sw/source/ui/inc/content.hxx
index 8cdf135..57c2927 100644
--- a/sw/source/ui/inc/content.hxx
+++ b/sw/source/ui/inc/content.hxx
@@ -55,20 +55,20 @@ class SwOutlineContent : public SwContent
 {
 sal_uInt16  nOutlinePos;
 sal_uInt8   nOutlineLevel;
-sal_BoolbIsMoveable;
+boolbIsMoveable;
 public:
 SwOutlineContent(   const SwContentType* pCnt,
 const String& rName,
 sal_uInt16 nArrPos,
 sal_uInt8 nLevel,
-sal_Bool bMove,
+bool bMove,
 long nYPos) :
 SwContent(pCnt, rName, nYPos),
 nOutlinePos(nArrPos), nOutlineLevel(nLevel), bIsMoveable(bMove) {}
 
 sal_uInt16  GetPos(){retur

[Libreoffice-commits] .: sw/source

2013-01-25 Thread Libreoffice Gerrit user
 sw/source/core/doc/poolfmt.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b0a2b73222482d1379e90b636efdf44a48ba3ab6
Author: Cédric Bosdonnat 
Date:   Fri Jan 25 15:08:30 2013 +0100

fdo#59779: Set the first page attributes on pooled styles creation

diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index fc8f1b4..38683a3 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -1597,6 +1597,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, 
bool bRegardLanguage )
 if( bSetLeft )
 pNewPgDsc->GetLeft().SetFmtAttr( aSet );
 pNewPgDsc->GetMaster().SetFmtAttr( aSet );
+pNewPgDsc->GetFirst().SetFmtAttr( aSet );
 }
 }
 return pNewPgDsc;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-24 Thread Libreoffice Gerrit user
 sw/source/core/text/portxt.cxx  |4 ++--
 sw/source/core/txtnode/fntcache.cxx |8 
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit e029e7394b972fd72930c8c475f3768dd99fe673
Author: Caolán McNamara 
Date:   Thu Jan 24 12:26:28 2013 +

Resolves: fdo#59586 Missing comma in particular PDF file

regression from d9e4c74811855de15f1bf2045c2c9b061a2d4dc6

- if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang )
+ if (MsLangId::isKorean(aLang))

should obviously have been

- if ( LANGUAGE_KOREAN != aLang && LANGUAGE_KOREAN_JOHAB != aLang )
+ if (!MsLangId::isKorean(aLang))

Change-Id: I5d4407729c46111fc080e24b6a86d6740faa0f81

diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index dffcfa4..8dee6f7 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -94,7 +94,7 @@ static sal_uInt16 lcl_AddSpace( const SwTxtSizeInfo &rInf, 
const XubString* pStr
 LanguageType aLang =
 rInf.GetTxtFrm()->GetTxtNode()->GetLang( rInf.GetIdx(), 1, nScript 
);
 
-if (MsLangId::isKorean(aLang))
+if (!MsLangId::isKorean(aLang))
 {
 const SwLinePortion* pPor = rPor.GetPortion();
 if ( pPor && ( pPor->IsKernPortion() ||
@@ -202,7 +202,7 @@ static sal_uInt16 lcl_AddSpace( const SwTxtSizeInfo &rInf, 
const XubString* pStr
 LanguageType aLang =
 rInf.GetTxtFrm()->GetTxtNode()->GetLang( nPos, 1, nNextScript 
);
 
-if (MsLangId::isKorean(aLang))
+if (!MsLangId::isKorean(aLang))
 ++nCnt;
 }
 }
diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index fe189ab..a0ef06a 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1077,7 +1077,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 if ( ( SW_CJK == nActual || SW_LATIN == nActual ) && 
nSpaceAdd )
 {
 LanguageType aLang = rInf.GetFont()->GetLanguage( 
SW_CJK );
-if (MsLangId::isKorean(aLang))
+if (!MsLangId::isKorean(aLang))
 {
 long nSpaceSum = nSpaceAdd;
 for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
@@ -1253,7 +1253,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 {
 LanguageType aLang = rInf.GetFont()->GetLanguage( SW_CJK );
 
-if (MsLangId::isKorean(aLang))
+if (!MsLangId::isKorean(aLang))
 {
 long nSpaceSum = nSpaceAdd;
 for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
@@ -1464,7 +1464,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 {
 LanguageType aLang = rInf.GetFont()->GetLanguage( SW_CJK );
 
-if (MsLangId::isKorean(aLang))
+if (!MsLangId::isKorean(aLang))
 {
 long nSpaceSum = nSpaceAdd;
 for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
@@ -2028,7 +2028,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
 {
 LanguageType aLang = rInf.GetFont()->GetLanguage( SW_CJK );
 
-if (MsLangId::isKorean(aLang))
+if (!MsLangId::isKorean(aLang))
 {
 long nSpaceSum = nSpaceAdd;
 for ( sal_uInt16 nI = 0; nI < rInf.GetLen(); ++nI )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-23 Thread Libreoffice Gerrit user
 sw/source/ui/misc/outline.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit c3ea61ab29648bf93b3b4f809c7e98c40c1113f8
Author: Caolán McNamara 
Date:   Wed Jan 23 21:14:53 2013 +

set all format->untitled X menu entries to the same helpid

Change-Id: I1d112948f6e0595329f44e34d8d1cba37ae8fd6e

diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index a5d1142..5038025 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -244,6 +244,14 @@ IMPL_LINK( SwOutlineTabDialog, FormHdl, Button *, pBtn )
 if( pRules )
 pFormMenu->SetItemText(pFormMenu->GetItemId(i), pRules->GetName());
 }
+
+OString sHelpId(pFormMenu->GetHelpId(pFormMenu->GetItemId("form1")));
+for (sal_Int32 i = 2; i <= 9; ++i)
+{
+OString sForm("form");
+pFormMenu->SetHelpId(pFormMenu->GetItemId(sForm + 
OString::valueOf(i)), sHelpId);
+}
+
 pFormMenu->SetSelectHdl(LINK(this, SwOutlineTabDialog, MenuSelectHdl));
 pFormMenu->Execute(pBtn, Rectangle(Point(0,0), pBtn->GetSizePixel()), 
POPUPMENU_EXECUTE_DOWN);
 return 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-23 Thread Libreoffice Gerrit user
 sw/source/core/doc/docdesc.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit da1398c503784086ecd0a10dd8e809069d649653
Author: Michael Stahl 
Date:   Wed Jan 23 19:23:14 2013 +0100

fdo#59428: SwDoc::ChgPageDesc: always copy to first-pagedesc

... otherwise the first page will not be updated on page style changes.
(uncovered by commit c41675a7d13dac64540ad420f905e80dbcbc023d,
 which should have fixed this too)

Change-Id: I04f75b2a8e8929767fb36dd7085c3a273f07c93a

diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 37b6566..1852b4c 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -296,12 +296,12 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc 
&rChged )
 ((SwPageDesc&)rChged).Mirror();
 else
 {
-// Or else transfer values from Master to Left and First.
-::lcl_DescSetAttr( ((SwPageDesc&)rChged).GetMaster(),
-   ((SwPageDesc&)rChged).GetLeft() );
-::lcl_DescSetAttr( ((SwPageDesc&)rChged).GetMaster(),
-   ((SwPageDesc&)rChged).GetFirst() );
+// Or else transfer values from Master to Left
+::lcl_DescSetAttr(rChged.GetMaster(),
+   const_cast(rChged).GetLeft());
 }
+::lcl_DescSetAttr(rChged.GetMaster(),
+   const_cast(rChged).GetFirst());
 
 // Take over NumType.
 if( rChged.GetNumType().GetNumberingType() != 
pDesc->GetNumType().GetNumberingType() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-23 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/docxattributeoutput.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5923e540d4eab0dc331ea439377ec1eb407400b9
Author: Pierre-Eric Pelloux-Prayer 
Date:   Wed Jan 23 14:26:02 2013 +0100

docx export: use 'nil' instead of 'none' to express no border

Word2007 writes nil too, and doesn't properly import none.

Change-Id: I32147bbf8c94f8dcf079bcecad48ffaaf3aa1968

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 0031b7f..6300ddd 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1419,7 +1419,7 @@ static void impl_borderLine( FSHelperPtr pSerializer, 
sal_Int32 elementToken, co
 // OOXml also supports those types of borders, but we'll try to play with 
the first ones.
 //  thickThinMediumGap, thickThinLargeGap, thickThinSmallGap
 //  thinThickLargeGap, thinThickMediumGap, thinThickSmallGap
-const char* pVal = "none";
+const char* pVal = "nil";
 if ( pBorderLine && !pBorderLine->isEmpty( ) )
 {
 switch (pBorderLine->GetBorderLineStyle())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-23 Thread Libreoffice Gerrit user
 sw/source/ui/docvw/edtwin2.cxx|   16 ++---
 sw/source/ui/docvw/frmsidebarwincontainer.cxx |4 +--
 sw/source/ui/docvw/srcedtw.cxx|   10 
 sw/source/ui/envelp/envfmt.cxx|8 +++---
 sw/source/ui/envelp/envfmt.hxx|2 -
 sw/source/ui/envelp/envimg.cxx|6 ++---
 sw/source/ui/envelp/label1.cxx|   26 +++---
 sw/source/ui/envelp/labelcfg.cxx  |   14 ++--
 sw/source/ui/envelp/labfmt.cxx|   30 +-
 sw/source/ui/envelp/labfmt.hxx|8 +++---
 sw/source/ui/envelp/labimg.cxx|4 +--
 sw/source/ui/envelp/mailmrge.cxx  |2 -
 12 files changed, 65 insertions(+), 65 deletions(-)

New commits:
commit cd97df31f28d8941b53929493c9651fbfda46395
Author: Takeshi Abe 
Date:   Wed Jan 23 21:08:35 2013 +0900

sal_Bool to bool

Change-Id: I27471e2331ff4813850fc5d3ca398ae6e1d86758

diff --git a/sw/source/ui/docvw/edtwin2.cxx b/sw/source/ui/docvw/edtwin2.cxx
index 6c0c454..78cbd7f 100644
--- a/sw/source/ui/docvw/edtwin2.cxx
+++ b/sw/source/ui/docvw/edtwin2.cxx
@@ -100,10 +100,10 @@ static void lcl_GetRedlineHelp( const SwRedline& rRedl, 
String& rTxt, sal_Bool b
 void SwEditWin::RequestHelp(const HelpEvent &rEvt)
 {
 SwWrtShell &rSh = rView.GetWrtShell();
-sal_Bool bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | 
HELPMODE_BALLOON ));
+bool bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | 
HELPMODE_BALLOON ));
 if(bQuickBalloon && rSh.GetViewOptions()->IsPreventTips())
 return;
-sal_Bool bWeiter = sal_True;
+bool bWeiter = true;
 SET_CURR_SHELL(&rSh);
 String sTxt;
 Point aPos( PixelToLogic( ScreenToOutputPixel( rEvt.GetMousePosPixel() ) 
));
@@ -380,7 +380,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
 }
 }
 
-bWeiter = sal_False;
+bWeiter = false;
 }
 if( bWeiter )
 {
@@ -419,7 +419,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
 Rectangle aRect(rEvt.GetMousePosPixel(), aTxtSize);
 Help::ShowQuickHelp(this, aRect, sTxt);
 }
-bWeiter = sal_False;
+bWeiter = false;
 }
 }
 
@@ -438,7 +438,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
 pObj = aVEvt.pObj;
 sTxt = pField->GetURL();
 
-bWeiter = sal_False;
+bWeiter = false;
 }
 }
 if (bWeiter && eHit == SDRHIT_TEXTEDIT)
@@ -463,7 +463,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
 if (pField )
 {
 sTxt = ((const SvxURLField*) pField)->GetURL();
-bWeiter = sal_False;
+bWeiter = false;
 }
 }
 }
@@ -502,7 +502,7 @@ void  SwEditWin::Paint(const Rectangle& rRect)
 SwWrtShell* pWrtShell = GetView().GetWrtShellPtr();
 if(!pWrtShell)
 return;
-sal_Bool bPaintShadowCrsr = sal_False;
+bool bPaintShadowCrsr = false;
 if( pShadCrsr )
 {
 Rectangle aRect( pShadCrsr->GetRect());
@@ -515,7 +515,7 @@ void  SwEditWin::Paint(const Rectangle& rRect)
 // resides somewhat above, then everything is clipped outside
 // and we have to make the "inner part" at the end of the
 // Paint visible again. Otherwise Paint errors occur!
-bPaintShadowCrsr = sal_True;
+bPaintShadowCrsr = true;
 }
 }
 
diff --git a/sw/source/ui/docvw/frmsidebarwincontainer.cxx 
b/sw/source/ui/docvw/frmsidebarwincontainer.cxx
index dd906ed..0426de9d 100644
--- a/sw/source/ui/docvw/frmsidebarwincontainer.cxx
+++ b/sw/source/ui/docvw/frmsidebarwincontainer.cxx
@@ -42,7 +42,7 @@ namespace {
 
 struct SidebarWinOrder
 {
-sal_Bool operator()( const SidebarWinKey& rSidebarWinKeyA,
+bool operator()( const SidebarWinKey& rSidebarWinKeyA,
  const SidebarWinKey& rSidebarWinKeyB ) const
 {
 return rSidebarWinKeyA < rSidebarWinKeyB;
@@ -67,7 +67,7 @@ namespace {
 
 struct FrmOrder
 {
-sal_Bool operator()( const FrmKey& rFrmKeyA,
+bool operator()( const FrmKey& rFrmKeyA,
  const FrmKey& rFrmKeyB ) const
 {
 return rFrmKeyA < rFrmKeyB;
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index 77fed41..9bf24bb 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -163,18 +163,18 @@ static void lcl_Highlight(const String& rSource, 
SwTextPortions& aPortionList)
 // now we still have to look for '>'
 if(svtools::HTMLUNKNOWN != eFoundType)
 {
-sal_Bool bFound = sal_False;
+   

[Libreoffice-commits] .: sw/source

2013-01-22 Thread Libreoffice Gerrit user
 sw/source/ui/docvw/srcedtw.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit c4b3af1e9f069d7d922974565ee66a30fd5744e4
Author: Takeshi Abe 
Date:   Tue Jan 22 17:59:08 2013 +0900

It is unconditional

Change-Id: Ib2864a57b67f6b29efafcac0a00751aea04968dd

diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index 0e5e46d..77fed41 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -683,11 +683,6 @@ void SwSrcEditWindow::ImpDoHighlight( const String& 
rSource, sal_uInt16 nLineOff
 return;
 }
 
-// maybe optimize:
-// If frequently the same color, blank without color in between,
-// maybe summarize or at least the blank; for less attributes
-sal_Bool bOptimizeHighlight = sal_True; // war in der BasicIDE static
-if ( bOptimizeHighlight )
 {
 // Only blanks and tabs have to be attributed along.
 // When two identical attributes are placed consecutively,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-22 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/docxattributeoutput.cxx |   17 -
 sw/source/filter/ww8/docxattributeoutput.hxx |2 +-
 2 files changed, 13 insertions(+), 6 deletions(-)

New commits:
commit f88c296212ac39055d2179ecf6e19f9f3848a032
Author: Pierre-Eric Pelloux-Prayer 
Date:   Tue Jan 22 17:20:02 2013 +0100

docx export: fix table 'tblInd' attribute computation

Change-Id: I3980ad8e372290973ed89488eb540267136af491

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 0e82f7f..89a72bb 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1833,6 +1833,16 @@ void DocxAttributeOutput::TableDefinition( 
ww8::WW8TableNodeInfoInner::Pointer_t
 else
 pJcVal = "start";
 nIndent = sal_Int32( pTblFmt->GetLRSpace( ).GetLeft( ) );
+// Table indentation has different meaning in Word, depending if 
the table is nested or not.
+// If nested, tblInd is added to parent table's left spacing and 
defines left edge position
+// If not nested, text position of left-most cell must be at 
absolute X = tblInd
+// so, table_spacing + table_spacing_to_content = tblInd
+if (m_nTableDepth == 0)
+{
+const SwTableBox * pTabBox = 
pTableTextNodeInfoInner->getTableBox();
+const SwFrmFmt * pFrmFmt = pTabBox->GetFrmFmt();
+nIndent += sal_Int32( pFrmFmt->GetBox( ).GetDistance( 
BOX_LINE_LEFT ) );
+}
 break;
 }
 }
@@ -1844,7 +1854,7 @@ void DocxAttributeOutput::TableDefinition( 
ww8::WW8TableNodeInfoInner::Pointer_t
 TableDefaultBorders( pTableTextNodeInfoInner );
 
 // Output the default cell margins
-TableDefaultCellMargins( pTableTextNodeInfoInner, nIndent );
+TableDefaultCellMargins( pTableTextNodeInfoInner );
 
 TableBidi( pTableTextNodeInfoInner );
 
@@ -1886,7 +1896,7 @@ void DocxAttributeOutput::TableDefaultBorders( 
ww8::WW8TableNodeInfoInner::Point
 impl_pageBorders( m_pSerializer, pFrmFmt->GetBox( ), XML_tblBorders, 
!bEcma, true );
 }
 
-void DocxAttributeOutput::TableDefaultCellMargins( 
ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_Int32& 
tblIndent )
+void DocxAttributeOutput::TableDefaultCellMargins( 
ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
 {
 const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox();
 const SwFrmFmt * pFrmFmt = pTabBox->GetFrmFmt();
@@ -1894,9 +1904,6 @@ void DocxAttributeOutput::TableDefaultCellMargins( 
ww8::WW8TableNodeInfoInner::P
 const bool bEcma = GetExport().GetFilter().getVersion( ) == 
oox::core::ECMA_DIALECT;
 
 impl_cellMargins(m_pSerializer, rBox, XML_tblCellMar, !bEcma);
-
-// add table cell left margin to tblIndent
-tblIndent += sal_Int32( rBox.GetDistance( BOX_LINE_LEFT ) );
 }
 
 void DocxAttributeOutput::TableBackgrounds( 
ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx 
b/sw/source/filter/ww8/docxattributeoutput.hxx
index 26b43ac..91539b5 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -148,7 +148,7 @@ public:
 virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t 
pTableTextNodeInfoInner );
 virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t 
pTableTextNodeInfoInner );
 virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t 
pTableTextNodeInfoInner );
-virtual void TableDefaultCellMargins( 
ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_Int32& 
tblIndent );
+virtual void TableDefaultCellMargins( 
ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
 virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t 
pTableTextNodeInfoInner );
 virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t 
pTableTextNodeInfoInner );
 virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t 
pTableTextNodeInfoInner );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-16 Thread Libreoffice Gerrit user
 sw/source/core/unocore/unoport.cxx |   21 ++---
 sw/source/core/unocore/unoportenum.cxx |4 ++--
 sw/source/core/unocore/unosett.cxx |   18 +++---
 sw/source/core/unocore/unosrch.cxx |5 ++---
 sw/source/core/unocore/unostyle.cxx|   23 ---
 sw/source/core/unocore/unotbl.cxx  |   25 -
 6 files changed, 25 insertions(+), 71 deletions(-)

New commits:
commit 1ca295eb999fa08fbf0d211f1a464544532a253d
Author: Miklos Vajna 
Date:   Wed Jan 16 16:04:48 2013 +0100

sw: start using cppu::supportsService in unocore

Change-Id: Ifa2154af314af98c7c81781f8cbd47ba1e48f730

diff --git a/sw/source/core/unocore/unoport.cxx 
b/sw/source/core/unocore/unoport.cxx
index 75f7a3e..56dfe2f 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -42,10 +42,10 @@
 #include 
 #include 
 #include 
+#include 
 
 
 using namespace ::com::sun::star;
-using ::rtl::OUString;
 
 /**
  * SwXTextPortion
@@ -918,24 +918,7 @@ throw( uno::RuntimeException )
 
 sal_Bool SwXTextPortion::supportsService(const OUString& rServiceName) throw( 
uno::RuntimeException )
 {
-SolarMutexGuard aGuard;
-SwUnoCrsr* pUnoCrsr = GetCursor();
-if(!pUnoCrsr)
-throw uno::RuntimeException();
-
-sal_Bool bRet = sal_False;
-if(!rServiceName.compareToAscii("com.sun.star.text.TextPortion") ||
-
!rServiceName.compareToAscii("com.sun.star.style.CharacterProperties") ||
-
!rServiceName.compareToAscii("com.sun.star.style.CharacterPropertiesAsian") ||
-
!rServiceName.compareToAscii("com.sun.star.style.CharacterPropertiesComplex") ||
-
!rServiceName.compareToAscii("com.sun.star.style.ParagraphProperties") ||
-
!rServiceName.compareToAscii("com.sun.star.style.ParagraphPropertiesAsian") ||
-
!rServiceName.compareToAscii("com.sun.star.style.ParagraphPropertiesComplex"))
-{
-bRet = sal_True;
-}
-
-return bRet;
+return cppu::supportsService(this, rServiceName);
 }
 
 uno::Sequence< OUString > SwXTextPortion::getSupportedServiceNames()
diff --git a/sw/source/core/unocore/unoportenum.cxx 
b/sw/source/core/unocore/unoportenum.cxx
index 8794d5c..b1eff9d 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -61,7 +62,6 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::text;
-using ::rtl::OUString;
 using namespace ::std;
 
 typedef ::std::pair< TextRangeList_t * const, SwTxtAttr const * const > 
PortionList_t;
@@ -226,7 +226,7 @@ sal_Bool
 SwXTextPortionEnumeration::supportsService(const OUString& rServiceName)
 throw( RuntimeException )
 {
-return rServiceName == "com.sun.star.text.TextPortionEnumeration";
+return cppu::supportsService(this, rServiceName);
 }
 
 Sequence< OUString > SwXTextPortionEnumeration::getSupportedServiceNames()
diff --git a/sw/source/core/unocore/unosett.cxx 
b/sw/source/core/unocore/unosett.cxx
index 55b2d45..d142975 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -65,9 +65,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
-using ::rtl::OUString;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
@@ -75,8 +75,6 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::text;
 using namespace ::com::sun::star::style;
 
-using rtl::OUString;
-
 struct PropValData
 {
 uno::AnyaVal;
@@ -294,7 +292,7 @@ OUString SwXFootnoteProperties::getImplementationName(void) 
throw( RuntimeExcept
 
 sal_Bool SwXFootnoteProperties::supportsService(const OUString& rServiceName) 
throw( RuntimeException )
 {
-return rServiceName == "com.sun.star.text.FootnoteSettings";
+return cppu::supportsService(this, rServiceName);
 }
 
 Sequence< OUString > SwXFootnoteProperties::getSupportedServiceNames(void) 
throw( RuntimeException )
@@ -604,7 +602,7 @@ OUString SwXEndnoteProperties::getImplementationName(void) 
throw( RuntimeExcepti
 
 sal_Bool SwXEndnoteProperties::supportsService(const OUString& rServiceName) 
throw( RuntimeException )
 {
-return rServiceName == "com.sun.star.text.FootnoteSettings";
+return cppu::supportsService(this, rServiceName);
 }
 
 Sequence< OUString > SwXEndnoteProperties::getSupportedServiceNames(void) 
throw( RuntimeException )
@@ -835,7 +833,7 @@ OUString 
SwXLineNumberingProperties::getImplementationName(void) throw( RuntimeE
 
 sal_Bool SwXLineNumberingProperties::supportsService(const OUString& 
rServiceName) throw( RuntimeException )
 {
-return rServiceName == "com.sun.star.text.LineNumberingProperties";
+return cppu::supportsService(this, rServ

[Libreoffice-commits] .: sw/source

2013-01-15 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/docxattributeoutput.cxx |9 -
 1 file changed, 9 deletions(-)

New commits:
commit 6819f9b834581acd5507cd2301bda8b5395b937d
Author: Pierre-Eric Pelloux-Prayer 
Date:   Wed Jan 16 00:48:28 2013 +0100

docx export: fix regression on table borders export

The removed code was supposed to allow LO to write cell borders only
if they were different from default cell border.
Bug #59275 show that this is incorrect.

Change-Id: If31914c412480fdadb775ca6675999ecde3e6bba

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index e72e924..9d1ded5 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1472,15 +1472,6 @@ static void impl_pageBorders( FSHelperPtr pSerializer, 
const SvxBoxItem& rBox, s
 for( int i = 0; i < 4; ++i, ++pBrd )
 {
 const SvxBorderLine* pLn = rBox.GetLine( *pBrd );
-if ( pDefaultBorders && pLn )
-{
-const SvxBorderLine* pRefLn = pDefaultBorders->GetLine( *pBrd );
-
-// If border is equal to default border: do not output
-if ( pRefLn && *pLn == *pRefLn) {
-continue;
-}
-}
 
 if (!tagWritten && bWriteTag) {
 pSerializer->startElementNS( XML_w, tag, FSEND );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-15 Thread Libreoffice Gerrit user
 sw/source/ui/config/optcomp.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 30798fbedb93bca8988ca3a0f626dedc3df052d3
Author: Miklos Vajna 
Date:   Tue Jan 15 21:32:31 2013 +0100

sw: kill no longer needed ASCII_STR() define

Change-Id: Id7f221ba96594502d04bba05375cba03b0f36970

diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 8fe63fd..6d56270 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -39,12 +39,10 @@
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::uno;
-using ::rtl::OUString;
 using namespace ::std;
 
-#define ASCII_STR(s)OUString( RTL_CONSTASCII_USTRINGPARAM( s ) )
 #define DEFAULT_ENTRY   COMPATIBILITY_DEFAULT_NAME
-#define USER_ENTRY  ASCII_STR( "_user" )
+#define USER_ENTRY  "_user"
 #define BUTTON_BORDER   2
 
 // struct CompatibilityItem --
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-15 Thread Libreoffice Gerrit user
 sw/source/ui/uiview/viewmdi.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit fa058a4cd6580d5538c49d565499fb5cc4ecfe53
Author: Winfried Donkers 
Date:   Mon Jan 14 19:53:10 2013 +0100

fdo#40465 solve regression when zooming with cursor not visible

Change-Id: If8dfff1a27218c7821823fcad04bab9f924fec70

diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 17a1ac5..9a791d0 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -64,10 +64,11 @@ using namespace ::com::sun::star::frame;
 
 void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, sal_Bool bViewOnly 
)
 {
+bool const bCrsrIsVisible(pWrtShell->IsCrsrVisible());
 _SetZoom( GetEditWin().GetOutputSizePixel(), eZoomType, nFactor, bViewOnly 
);
-
-//fdo40465 force the cursor to stay in view whilst zooming
-pWrtShell->ShowCrsr();
+// fdo#40465 force the cursor to stay in view whilst zooming
+if (bCrsrIsVisible)
+pWrtShell->ShowCrsr();
 }
 
 void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-14 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/docxattributeoutput.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 8c178a50334109b34ef456ca6aa51cd3d98699ae
Author: Pierre-Eric Pelloux-Prayer 
Date:   Fri Jan 11 14:38:12 2013 +0100

docx export: also export rPr in  (paragraph mark styling)

Change-Id: I179363e7d0acc3d6a1f95dcfe975275a9243e863
Reviewed-on: https://gerrit.libreoffice.org/1649
Reviewed-by: Noel Power 
Tested-by: Noel Power 

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 273287b..e72e924 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -442,6 +442,9 @@ void DocxAttributeOutput::EndParagraphProperties()
 {
 WriteCollectedParagraphProperties();
 
+// insert copy of 
+m_pSerializer->copyTopMarkPop();
+
 m_pSerializer->endElementNS( XML_w, XML_pPr );
 
 if ( m_nColBreakStatus == COLBRK_WRITE )
@@ -973,6 +976,9 @@ void DocxAttributeOutput::EndRunProperties( const 
SwRedlineData* /*pRedlineData*
 
 m_pSerializer->endElementNS( XML_w, XML_rPr );
 
+// Clone ... for later re-use, in pPr
+m_pSerializer->copyTopMarkPush();
+
 // write footnotes/endnotes if we have any
 FootnoteEndnoteReference();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-14 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/wrtww8.cxx |4 +---
 sw/source/filter/ww8/ww8atr.cxx |   11 ++-
 2 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit ee9f23bb94b4c2c8c4db6466ecca272a092e9492
Author: Pierre-Eric Pelloux-Prayer 
Date:   Thu Jan 10 18:45:42 2013 +0100

docx export: invalid sectPr added at the beginning of the doc

This reverts commit 60fa5057039d2413d56813df4d45e5cfdfbb40ac,
which was a revert of 723f772d (fix for ooo#106749) with an
alternative fix to avoid a regression (fdo#56513).

This commit contain a fix for the sectPr issue, and does not
regress on the 2 previously fixed issue.

Change-Id: Ibc551b38d25554c59b7c4ac5a447a0d60323f53f
Reviewed-on: https://gerrit.libreoffice.org/1647
Reviewed-by: Noel Power 
Tested-by: Noel Power 

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index b89a143..01d61c5 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2368,9 +2368,7 @@ void MSWordExportBase::WriteText()
 }
 else if ( pNd->IsTableNode() )
 {
-SwTable * pTable = &pNd->GetTableNode()->GetTable();
-OutputSectionBreaks( &pTable->GetTableFmt()->GetAttrSet(), *pNd );
-mpTableInfo->processSwTable( pTable );
+mpTableInfo->processSwTable( &pNd->GetTableNode()->GetTable() );
 }
 else if ( pNd->IsSectionNode() && TXT_MAINTEXT == nTxtTyp )
 OutputSectionNode( *pNd->GetSectionNode() );
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index d6cbdaa..393a685 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -403,6 +403,15 @@ void MSWordExportBase::OutputSectionBreaks( const 
SfxItemSet *pSet, const SwNode
 //section.
 bool bBreakSet = false;
 
+const SwPageDesc * pPageDesc = rNd.FindPageDesc(sal_False);
+
+if (pAktPageDesc != pPageDesc)
+{
+bBreakSet = true;
+bNewPageDesc = true;
+pAktPageDesc = pPageDesc;
+}
+
 if ( pSet && pSet->Count() )
 {
 if ( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) 
&&
@@ -456,7 +465,7 @@ void MSWordExportBase::OutputSectionBreaks( const 
SfxItemSet *pSet, const SwNode
 if ( pBreak &&
  pBreak->GetBreak() == SVX_BREAK_PAGE_BEFORE )
 {
-bNewPageDesc = SetAktPageDescFromNode( rNd );
+bNewPageDesc |= SetAktPageDescFromNode( rNd );
 }
 }
 if ( !bNewPageDesc )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-14 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/docxattributeoutput.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b1859c3a6d32dff66550c33831df241035d91aa9
Author: Pierre-Eric Pelloux-Prayer 
Date:   Mon Jan 14 14:49:01 2013 +0100

docx export: add missing arg to impl_pageBorders call

The missing argument could cause data loss due to ill-formatted
document produced.

Change-Id: I65dee7f42c633ae9602d454e2f03ebc821c9c0ab

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 2669b5f..273287b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4474,7 +4474,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& 
rBox )
 m_pSerializer->startElementNS( XML_w, XML_pBdr, FSEND );
 }
 
-impl_pageBorders( m_pSerializer, rBox, false, false );
+impl_pageBorders( m_pSerializer, rBox, XML_pBdr, false, false );
 
 if ( m_bOpenedSectPr )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-14 Thread Libreoffice Gerrit user
 sw/source/core/crsr/pam.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 50b6dc0099ff61050b82a2e37e70d643151e7ce7
Author: Miklos Vajna 
Date:   Mon Jan 14 10:55:55 2013 +0100

fdo#57938 SwPaM::HasReadonlySel allow editing before commented text ranges

Change-Id: I229602e7783c76e7fc57b78a408f90c1f6a8cda5

diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 852..5fbf4bc 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -700,6 +700,13 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
 if (!bUnhandledMark)
 bCommentrangeMark = pFieldmark->GetFieldname() == 
ODF_COMMENTRANGE;
 }
+// Allow editing selection right before a commented range.
+if (!bCommentrangeMark && GetMark())
+{
+pFieldmark = pMarksAccess->getFieldmarkFor(*GetMark());
+if (pFieldmark)
+bCommentrangeMark = pFieldmark->GetFieldname() == 
ODF_COMMENTRANGE;
+}
 }
 
 if (!bRet)
@@ -708,7 +715,7 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
 if ( ( pA == pB ) && bUnhandledMark )
 bRet = sal_True;
 // Allow editing of commented ranges.
-else if (!((pA == pB) && bCommentrangeMark))
+else if (!bCommentrangeMark)
 {
 // Form protection case
 bool bAtStartA = pA != NULL && pA->GetMarkStart() == *GetPoint();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-14 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/docxattributeoutput.cxx |   31 ---
 1 file changed, 28 insertions(+), 3 deletions(-)

New commits:
commit 18be0ce63bbff4132c198e29a34cf3e5a27369d5
Author: Eilidh McAdam 
Date:   Fri Jan 11 18:16:45 2013 +0100

Fixes image drop shadow export to DOCX.

Word has problems if the effect extent element is omitted. This gets
the minimum required extent using the shadow position.

Change-Id: I69d0d7a694c34f50289253e5cb7c4265198deaa8
Reviewed-on: https://gerrit.libreoffice.org/1655
Reviewed-by: Noel Power 
Tested-by: Noel Power 

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index b97b368..2669b5f 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2141,9 +2141,35 @@ void DocxAttributeOutput::FlyFrameGraphic( const 
SwGrfNode* pGrfNode, const Size
 XML_cx, aWidth.getStr(),
 XML_cy, aHeight.getStr(),
 FSEND );
-// TODO - the right effectExtent, extent including the effect
+
+// effectExtent, extent including the effect (shadow only for now)
+SvxShadowItem aShadowItem = pFrmFmt->GetShadow();
+OString aLeftExt("0"), aRightExt("0"), aTopExt("0"), aBottomExt("0");
+if ( aShadowItem.GetLocation() != SVX_SHADOW_NONE )
+{
+OString aShadowWidth( OString::valueOf( TwipsToEMU( 
aShadowItem.GetWidth() ) ) );
+switch ( aShadowItem.GetLocation() )
+{
+case SVX_SHADOW_TOPLEFT:
+aTopExt = aLeftExt = aShadowWidth;
+break;
+case SVX_SHADOW_TOPRIGHT:
+aTopExt = aRightExt = aShadowWidth;
+break;
+case SVX_SHADOW_BOTTOMLEFT:
+aBottomExt = aLeftExt = aShadowWidth;
+break;
+case SVX_SHADOW_BOTTOMRIGHT:
+aBottomExt = aRightExt = aShadowWidth;
+break;
+case SVX_SHADOW_NONE:
+case SVX_SHADOW_END:
+break;
+}
+}
+
 m_pSerializer->singleElementNS( XML_wp, XML_effectExtent,
-XML_l, "0", XML_t, "0", XML_r, "0", XML_b, "0",
+XML_l, aLeftExt, XML_t, aTopExt, XML_r, aRightExt, XML_b, 
aBottomExt,
 FSEND );
 
 if( isAnchor )
@@ -2275,7 +2301,6 @@ void DocxAttributeOutput::FlyFrameGraphic( const 
SwGrfNode* pGrfNode, const Size
 m_pSerializer->endElementNS( XML_a, XML_ln );
 
 // Output effects
-SvxShadowItem aShadowItem = pFrmFmt->GetShadow();
 if ( aShadowItem.GetLocation() != SVX_SHADOW_NONE )
 {
 // Distance is measured diagonally from corner
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-13 Thread Libreoffice Gerrit user
 sw/source/ui/config/modcfg.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2ab24c8f11d20892532da8601ff76f22e0a05a5b
Author: Julien Nabet 
Date:   Sun Jan 13 22:23:09 2013 +0100

Fix 2 scopes can be reduced

Change-Id: Ieb216aff08307ca684e11dbd7f59d1f7719ca274

diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx
index 765e4e1..61f410d 100644
--- a/sw/source/ui/config/modcfg.cxx
+++ b/sw/source/ui/config/modcfg.cxx
@@ -74,9 +74,9 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
 }
 else
 {
-bool bFound = false;
 if(eType == OLE_CAP && pOleId)
 {
+bool bFound = false;
 for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
 bFound = *pOleId == aInsertConfig.aGlobalNames[nId  ];
 if(!bFound)
@@ -96,9 +96,9 @@ sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const 
InsCaptionOpt* pOpt
 }
 else if (pOpt)
 {
-bool bFound = false;
 if(pOpt->GetObjType() == OLE_CAP && &pOpt->GetOleId())
 {
+bool bFound = false;
 for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++)
 bFound = pOpt->GetOleId() == aInsertConfig.aGlobalNames[nId  ];
 if(!bFound)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-11 Thread Libreoffice Gerrit user
 sw/source/core/undo/unins.cxx |   21 +
 1 file changed, 21 insertions(+)

New commits:
commit f132eaa5a6ec6fd3051442bda9caf94a3341c680
Author: Miklos Vajna 
Date:   Fri Jan 11 17:32:18 2013 +0100

fdo#53487 SwUndoInsert: take care of fieldmarks when deleting field chars

The problem was that while SwUndoInsert removed the field characters, it
didn't remove the fieldmark, so after unding a comment insert, it wasn't
possible to re-insert a comment.

diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 0dbb1be..473a915 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -242,6 +243,26 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & 
rContext)
 RemoveIdxFromRange( aPaM, sal_False );
 pTxt = new String( pTxtNode->GetTxt().Copy(nCntnt-nLen, nLen) 
);
 pTxtNode->EraseText( aPaM.GetPoint()->nContent, nLen );
+
+// Undo deletes fieldmarks in two step: first the end then the 
start position.
+// Once the start position is deleted, make sure the fieldmark 
itself is deleted as well.
+if (nLen == 1)
+{
+IDocumentMarkAccess* const pMarkAccess = 
pTmpDoc->getIDocumentMarkAccess();
+for ( IDocumentMarkAccess::const_iterator_t i = 
pMarkAccess->getMarksBegin(); i != pMarkAccess->getMarksEnd(); ++i)
+{
+sw::mark::IMark* pMark = i->get();
+if (pMark->GetMarkStart() == *aPaM.GetPoint() && 
pMark->GetMarkStart().nContent == aPaM.GetPoint()->nContent)
+{
+sw::mark::IFieldmark* pFieldmark = 
dynamic_cast(pMark);
+if (pFieldmark && pFieldmark->GetFieldname() == 
ODF_COMMENTRANGE)
+{
+
pTmpDoc->getIDocumentMarkAccess()->deleteMark(pMark);
+break;
+}
+}
+}
+}
 }
 else// otherwise Graphics/OLE/Text/...
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-11 Thread Libreoffice Gerrit user
 sw/source/ui/lingu/hhcwrp.cxx |   28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 40cfbd62e9f3aa52036a339cbbc9e542647017d3
Author: Matteo Casalin 
Date:   Thu Jan 10 23:36:51 2013 +0100

Use member initializer list in constructor

Change-Id: I8d4f8b95909b91917b456f49d7a3ac270703cc96
Reviewed-on: https://gerrit.libreoffice.org/1640
Reviewed-by: Noel Power 
Tested-by: Noel Power 

diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index b6da29b..4d9a0d4 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -101,21 +101,21 @@ SwHHCWrapper::SwHHCWrapper(
 pTargetFont,
 nConvOptions,
 bIsInteractive ),
-mrWrtShell( pSwView->GetWrtShell() )
+mpView( pSwView ),
+mpWin( &pSwView->GetEditWin() ),
+mrWrtShell( pSwView->GetWrtShell() ),
+mpConvArgs( 0 ),
+mnLastPos( 0 ),
+mnUnitOffset( 0 ),
+mnPageCount( 0 ),
+mnPageStart( 0 ),
+mbIsDrawObj( sal_False ),
+mbIsOtherCntnt( bOther ),
+mbStartChk( bOther ),
+mbIsSelection( bSelection ),
+mbStartDone( bOther || bStart ),
+mbEndDone( sal_False )
 {
-mpConvArgs  = 0;
-mnLastPos   = 0;
-mnUnitOffset= 0;
-
-mpView  = pSwView;
-mpWin   = &pSwView->GetEditWin();
-mbIsDrawObj = sal_False;
-mbIsOtherCntnt  = mbStartChk = bOther;
-mbIsSelection   = bSelection;
-mbStartDone  = bOther || bStart;
-mbEndDone= sal_False;
-//bLastRet= sal_True;
-mnPageCount = mnPageStart = 0;
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-11 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/rtfexport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3527efa7e078ce11ac537d8f8591b159c05e760f
Author: Tor Lillqvist 
Date:   Fri Jan 11 15:43:56 2013 +0200

Output version number as text, not binary

Change-Id: I1ada5bd38a55fa2815c03260a2465c1908b5019f

diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index 80085ed..3edad2a 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -423,7 +423,7 @@ void RtfExport::WriteInfo()
 #error Minor, micro and patchlevel version numbers must be less than 256
 #endif
 
-Strm() << (sal_Int32) LIBO_VERSION_ENCODED_IN_32BITS << '}';
+Strm().WriteNumber((sal_Int32) LIBO_VERSION_ENCODED_IN_32BITS) << '}';
 Strm() << '}';
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-11 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/rtfexport.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c031fde0518257b3272d5baa3de29ba5a0a90a89
Author: Miklos Vajna 
Date:   Fri Jan 11 10:30:18 2013 +0100

RtfExport::WriteInfo: use config_version.h

diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index 9b01126..1b211b8 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
 #include "rtfexportfilter.hxx"
 #include "rtfsdrexport.hxx"
 #include "rtfattributeoutput.hxx"
@@ -412,7 +413,7 @@ void RtfExport::WriteInfo()
 
 Strm() << '{' << OOO_STRING_SVTOOLS_RTF_COMMENT << " ";
 Strm() << OUStringToOString( utl::ConfigManager::getProductName(), 
eCurrentEncoding).getStr() << "}{" << OOO_STRING_SVTOOLS_RTF_VERN;
-OutULong( SUPD*10 ) << '}';
+Strm() << LIBO_VERSION_MAJOR LIBO_VERSION_MINOR LIBO_VERSION_MICRO "0" << 
'}';
 Strm() << '}';
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-11 Thread Libreoffice Gerrit user
 sw/source/core/txtnode/txtedt.cxx |   22 +++---
 1 file changed, 19 insertions(+), 3 deletions(-)

New commits:
commit a0477d991661de605aec4fec87ca52e32ec8f743
Author: Matteo Casalin 
Date:   Mon Jan 7 22:20:59 2013 +0100

Character conversion: do not destroy sequence while iterating on it

Change-Id: Ib77e15b776384cc75880a907a6425c6105bc3fab
Reviewed-on: https://gerrit.libreoffice.org/1636
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/core/txtnode/txtedt.cxx 
b/sw/source/core/txtnode/txtedt.cxx
index d5bc382..82c6cf8 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -74,6 +74,7 @@
 #include 
 
 #include 
+#include 
 
 using rtl::OUString;
 using namespace ::com::sun::star;
@@ -1073,6 +1074,12 @@ sal_uInt16 SwTxtNode::Convert( SwConversionArgs &rArgs )
 {
 SwLanguageIterator aIter( *this, nBegin );
 
+// Implicit changes require setting new attributes, which in turn 
destroys
+// the attribute sequence on which aIter iterates. We store the 
necessary
+// coordinates and apply those changes after iterating through the 
text.
+typedef std::pair ImplicitChangesRange;
+std::vector aImplicitChanges;
+
 // find non zero length text portion of appropriate language
 do {
 nLangFound = aIter.GetLanguage();
@@ -1108,13 +1115,22 @@ sal_uInt16 SwTxtNode::Convert( SwConversionArgs &rArgs )
 
 if (!bIsAsianScript && 
rArgs.bAllowImplicitChangesForNotConvertibleText)
 {
-SetLanguageAndFont( aCurPaM,
-rArgs.nConvTargetLang, RES_CHRATR_CJK_LANGUAGE,
-rArgs.pTargetFont, RES_CHRATR_CJK_FONT );
+// Store for later use
+aImplicitChanges.push_back(ImplicitChangesRange(nBegin, 
nBegin+nLen));
 }
 nBegin = nChPos;// start of next language portion
 }
 } while (!bFound && aIter.Next());  /* loop while nothing was found 
and still sth is left to be searched */
+
+// Apply implicit changes, if any, now that aIter is no longer used
+for (size_t i = 0; i < aImplicitChanges.size(); ++i)
+{
+SwPaM aPaM( *this, aImplicitChanges[i].first );
+aPaM.SetMark();
+aPaM.GetPoint()->nContent = aImplicitChanges[i].second;
+SetLanguageAndFont( aPaM, rArgs.nConvTargetLang, 
RES_CHRATR_CJK_LANGUAGE, rArgs.pTargetFont, RES_CHRATR_CJK_FONT );
+}
+
 }
 
 // keep resulting text within selection / range of text to be converted
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-11 Thread Libreoffice Gerrit user
 sw/source/ui/lingu/hhcwrp.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit bbab2d865996e7f3ed52f4d70358bb16bb73a81b
Author: Matteo Casalin 
Date:   Fri Jan 11 08:00:16 2013 +0100

Remove unused #define

Change-Id: Ic92663d13892d7e4978b5f3a10ed7f473e091835
Reviewed-on: https://gerrit.libreoffice.org/1641
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index 953fdc7..d6256e9 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -56,8 +56,6 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::linguistic2;
 using namespace ::com::sun::star::i18n;
 
-#define CHAR_PAR_BRK((sal_Char) 0x0D)
-
 //
 // Description: Turn off frame/object shell if applicable
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-11 Thread Libreoffice Gerrit user
 sw/source/core/doc/docedt.cxx |   27 ---
 1 file changed, 27 deletions(-)

New commits:
commit 2c1eca7bd70ff5f66132aeb8d3919a1362fb3e57
Author: Miklos Vajna 
Date:   Fri Jan 11 10:19:53 2013 +0100

sw: more unused includes in docedt

diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 5aa66f3..4ec41ac 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -18,42 +18,21 @@
  */
 
 
-#include  // for strchr()
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include  // AutoCorrect
-#include // for SwBookmark
-#include// for Spell
-#include 
-#include 
 #include 
 #include 
 #include 
 #include// when moving: correct indexes
 #include 
-#include 
 #include// status bar
 #include// structures to save when moving/deleting
-#include 
-#include 
 #include 
 #include   // for UpdateFtn
 #include   // for Spell
-#include 
-#include// for the UndoIds
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -63,7 +42,6 @@
 #include 
 #include "comcore.hrc"
 #include "editsh.hxx"
-#include 
 #include 
 #include 
 #include 
@@ -71,15 +49,10 @@
 
 #include 
 
-using ::rtl::OUString;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::linguistic2;
 using namespace ::com::sun::star::i18n;
 
-#ifndef S2U
-#define S2U(rString) OUString::createFromAscii(rString)
-#endif
-
 struct _SaveRedline
 {
 SwRedline* pRedl;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-11 Thread Libreoffice Gerrit user
 sw/source/core/doc/docedt.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 36c5abb012e48f0c7e8b8b0d50e562b423e43869
Author: Matteo Casalin 
Date:   Mon Jan 7 23:41:15 2013 +0100

Remove unneeded #include

Change-Id: Ic0c82079aeb586af97c864aebf966f01643ebfd6
Reviewed-on: https://gerrit.libreoffice.org/1637
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 693e2bf..5aa66f3 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -60,7 +60,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include "comcore.hrc"
 #include "editsh.hxx"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-10 Thread Libreoffice Gerrit user
 sw/source/core/crsr/pam.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit fd0da52d371ca13d66be3b04d89f9d9cf73baddd
Author: Miklos Vajna 
Date:   Thu Jan 10 16:21:55 2013 +0100

fdo#57938 SwPaM::HasReadonlySel: commented text ranges are not read-only

diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index e9b7802..852 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -686,6 +686,7 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
 sw::mark::IMark* pA = NULL;
 sw::mark::IMark* pB = NULL;
 bool bUnhandledMark = false;
+bool bCommentrangeMark = false;
 if ( pDoc )
 {
 const IDocumentMarkAccess* pMarksAccess = 
pDoc->getIDocumentMarkAccess( );
@@ -694,7 +695,11 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
 
 sw::mark::IFieldmark* pFieldmark = pMarksAccess->getFieldmarkFor( 
*GetPoint() );
 if ( pFieldmark )
+{
 bUnhandledMark = pFieldmark->GetFieldname( ) == ODF_UNHANDLED;
+if (!bUnhandledMark)
+bCommentrangeMark = pFieldmark->GetFieldname() == 
ODF_COMMENTRANGE;
+}
 }
 
 if (!bRet)
@@ -702,7 +707,8 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const
 // Unhandled fieldmarks case shouldn't be edited manually to avoid 
breaking anything
 if ( ( pA == pB ) && bUnhandledMark )
 bRet = sal_True;
-else
+// Allow editing of commented ranges.
+else if (!((pA == pB) && bCommentrangeMark))
 {
 // Form protection case
 bool bAtStartA = pA != NULL && pA->GetMarkStart() == *GetPoint();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-09 Thread Libreoffice Gerrit user
 sw/source/ui/uno/unoatxt.cxx|4 ++--
 sw/source/ui/utlui/attrdesc.cxx |   10 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 8948b137acc954778b6198b3e333945eb8c63d31
Author: Michael Meeks 
Date:   Wed Jan 9 13:08:53 2013 +

lame_OUString_valueOf_sal_Int32_casts += 6;

diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index 527a6ce..8c102ec 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -194,7 +194,7 @@ uno::Reference< text::XAutoTextGroup >  
SwXAutoTextContainer::insertNewByName(
 if(STRING_NOTFOUND == sGroup.Search(GLOS_DELIM))
 {
 sGroup += GLOS_DELIM;
-sGroup += OUString::valueOf(0);
+sGroup += OUString::valueOf(sal_Int32(0));
 }
 pGlossaries->NewGroupDoc(sGroup, sGroup.GetToken(0, GLOS_DELIM));
 
@@ -494,7 +494,7 @@ void SwXAutoTextGroup::setName(const OUString& rName) 
throw( uno::RuntimeExcepti
 if(STRING_NOTFOUND == sNewGroup.Search(GLOS_DELIM))
 {
 sNewGroup += GLOS_DELIM;
-sNewGroup += OUString::valueOf(0);
+sNewGroup += OUString::valueOf(sal_Int32(0));
 }
 
 //the name must be saved, the group may be invalidated while in 
RenameGroupDoc()
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index ee63cd7..5b6a4c9 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -1095,7 +1095,7 @@ SfxItemPresentation SwRotationGrf::GetPresentation(
 rText = SW_RESSTR( STR_ROTATION );
 else if( rText.Len() )
 rText.Erase();
-( rText += OUString::valueOf( GetValue() )) += '\xB0';
+( rText += OUString::valueOf( static_cast( GetValue() ) )) 
+= '\xB0';
 break;
 
 default:
@@ -1118,7 +1118,7 @@ SfxItemPresentation SwLuminanceGrf::GetPresentation(
 rText = SW_RESSTR( STR_LUMINANCE );
 else if( rText.Len() )
 rText.Erase();
-( rText += OUString::valueOf( GetValue() )) += '%';
+( rText += OUString::valueOf( static_cast( GetValue() ) )) 
+= '%';
 break;
 
 default:
@@ -1141,7 +1141,7 @@ SfxItemPresentation SwContrastGrf::GetPresentation(
 rText = SW_RESSTR( STR_CONTRAST );
 else if( rText.Len() )
 rText.Erase();
-( rText += OUString::valueOf( GetValue() )) += '%';
+( rText += OUString::valueOf( static_cast( GetValue() ) )) 
+= '%';
 break;
 
 default:
@@ -1177,7 +1177,7 @@ SfxItemPresentation SwChannelGrf::GetPresentation(
 }
 else if( rText.Len() )
 rText.Erase();
-( rText += OUString::valueOf( GetValue() )) += '%';
+( rText += OUString::valueOf( static_cast( GetValue() ) )) 
+= '%';
 break;
 
 default:
@@ -1245,7 +1245,7 @@ SfxItemPresentation SwTransparencyGrf::GetPresentation(
 rText = SW_RESSTR( STR_TRANSPARENCY );
 else if( rText.Len() )
 rText.Erase();
-( rText += OUString::valueOf( GetValue() )) += '%';
+( rText += OUString::valueOf( static_cast( GetValue() ) )) 
+= '%';
 break;
 
 default:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-09 Thread Libreoffice Gerrit user
 sw/source/core/unocore/unotext.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 2f320afd978f15a8197f11614251b1e7014487c9
Author: Michael Meeks 
Date:   Wed Jan 9 09:41:57 2013 +

cleanup speedup patch pushed in error.

Change-Id: I24eb1c00d7e36cff85a9446ca024fd1d0652120f

diff --git a/sw/source/core/unocore/unotext.cxx 
b/sw/source/core/unocore/unotext.cxx
index 8060a1b..34572a1 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
-
 #include 
 
 #include 
@@ -1310,7 +1308,7 @@ throw (lang::IllegalArgumentException, 
uno::RuntimeException)
 {
 aPam.Move( fnMoveBackward, fnGoNode );
 }
-#if 1
+#if 1 // This section should be removed in favour of the one below when it 
works.
 if (rProperties.getLength())
 {
 // now set the properties
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-08 Thread Libreoffice Gerrit user
 sw/source/ui/dochdl/swdtflvr.cxx |   12 +--
 sw/source/ui/docvw/edtdd.cxx |   20 ++---
 sw/source/ui/docvw/edtwin.cxx|  153 ++-
 sw/source/ui/inc/pview.hxx   |   60 ---
 sw/source/ui/inc/uitool.hxx  |2 
 sw/source/ui/ribbar/conform.cxx  |   32 ++--
 sw/source/ui/ribbar/conrect.cxx  |   42 +++---
 7 files changed, 129 insertions(+), 192 deletions(-)

New commits:
commit 639fe001aebef325d577c0e8e3283575563e6298
Author: Philipp Weissenbacher 
Date:   Mon Jan 7 23:18:26 2013 +0100

Translate German comments, cleanup whitespace

Change-Id: I4cea9568c5f24340c6bdac387efe8e94f8edb95a
Reviewed-on: https://gerrit.libreoffice.org/1568
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 28bd60c..9dd3f36 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -583,7 +583,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& 
xStream,
 {
 case SWTRANSFER_OBJECTTYPE_DRAWMODEL:
 {
-// dont change the sequence of commands
+// don't change the sequence of commands
 SdrModel *pModel = (SdrModel*)pObject;
 xStream->SetBufferSize( 16348 );
 
@@ -822,7 +822,7 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
 
 SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
 
-pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so 
belassen
+pTmpDoc->LockExpFlds(); // Never update fields - leave text as is
 lclOverWriteDoc(*pWrtShell, *pTmpDoc);
 
 {
@@ -843,7 +843,7 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
 pMarkAccess->deleteMark(*ppMark);
 }
 
-// a new one was created in CORE (OLE-Objekte copied!)
+// a new one was created in CORE (OLE objects copied!)
 aDocShellRef = pTmpDoc->GetTmpDocShell();
 if( aDocShellRef.Is() )
 SwTransferable::InitOle( aDocShellRef, *pTmpDoc );
@@ -2407,7 +2407,7 @@ int SwTransferable::_PasteFileName( 
TransferableDataHelper& rData,
 sFileURL, aEmptyStr );
 if( pFlt && !rSh.GetView().GetDocShell()->ISA(SwWebDocShell) )
 {
-// and then pull up the insert-region-dialog by PostUser event
+// and then pull up the insert-region-dialog by PostUser event
 SwSectionData * pSect = new SwSectionData(
 FILE_LINK_SECTION,
 rSh.GetDoc()->GetUniqueSectionName() );
@@ -3053,7 +3053,7 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
 {
 // first, ask for the SelectionType, then action-bracketing 
 // (otherwise it's not pasted into a TableSelection!!!)
-OSL_ENSURE( !rShell.ActionPend(), "Paste darf nie eine Actionklammerung 
haben" );
+OSL_ENSURE( !rShell.ActionPend(), "Paste must never have an ActionPend" );
 if ( !pClpDocFac )
 return sal_False; // the return value of the SwFEShell::Paste also is 
sal_Bool!
 
@@ -3092,7 +3092,7 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
 // in the buffer, word in this context means 'something with spaces at 
beginning
 // and end'. In this case we definitely want these spaces to be inserted here.
 bInWrd = rShell.IsInWrd();
- bEndWrd = rShell.IsEndWrd();
+bEndWrd = rShell.IsEndWrd();
 bSmart = bInWrd || bEndWrd;
 if( bSmart )
 {
diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx
index e607878..fab1fa8 100644
--- a/sw/source/ui/docvw/edtdd.cxx
+++ b/sw/source/ui/docvw/edtdd.cxx
@@ -77,7 +77,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& 
rPosPixel )
 if( rSh.GetDrawView()->Command( aDragEvent, this ) )
 {
 rView.GetViewFrame()->GetBindings().InvalidateAll(sal_False);
-return; // Event von der SdrView ausgewertet
+return; // Event evaluated by SdrView
 }
 }
 
@@ -218,13 +218,13 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& 
rEvt )
 }
 
 
-//  There's a special treatment for file lists 
with a single
-//  element, that depends on the actual content of 
the
-//  Transferable to be accessible. Since the 
transferable
-//  may only be accessed after the drop has been 
accepted
-//  (according to KA due to Java D&D), we'll have 
to
-//  reevaluate the drop action once more _with_ the
-//  Transferable.
+// There's a special treatment for file lists with a single
+// element, that depends on the actual content of the
+// Transferable to be accessible. Sinc

[Libreoffice-commits] .: sw/source

2013-01-08 Thread Libreoffice Gerrit user
 sw/source/ui/uiview/viewmdi.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit d14f7e4ec48f9a9eee0585fb5ee72512e9f4bd19
Author: Winfried Donkers 
Date:   Sun Dec 9 12:34:45 2012 +0100

fdo#40465 fix to maintain correct focus whilst zooming

Change-Id: Ifed6e9a1fcb23e3565843842c3db695ab51b3d54

diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 286435e..17a1ac5 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -65,6 +65,9 @@ using namespace ::com::sun::star::frame;
 void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, sal_Bool bViewOnly 
)
 {
 _SetZoom( GetEditWin().GetOutputSizePixel(), eZoomType, nFactor, bViewOnly 
);
+
+//fdo40465 force the cursor to stay in view whilst zooming
+pWrtShell->ShowCrsr();
 }
 
 void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-07 Thread Libreoffice Gerrit user
 sw/source/ui/shells/textsh1.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 06bdc1e3ae8e93154dc9b9487691b547348c8634
Author: Werner Koerner 
Date:   Sat Dec 29 13:24:20 2012 +0100

Fix wrong bracketing

Wrong bracketing, item is put at a which-id of sal_false.

Change-Id: Ic4216519d74de75690b21a3efa5083e79aa5b83d
Reviewed-on: https://gerrit.libreoffice.org/1498
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index 1124d51..c351e38 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -1426,7 +1426,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
 break;
 case FN_GLOSSARY_DLG:
 {
-rSet.Put(SfxBoolItem(nWhich), sal_True);
+rSet.Put( SfxBoolItem( nWhich, sal_True ) );
 }
 break;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-06 Thread Libreoffice Gerrit user
 sw/source/core/text/porlay.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 989863d849b1e703e78afc413088c3ae51093139
Author: Julien Nabet 
Date:   Sat Jan 5 16:21:52 2013 +0100

!= instead of < for comparison with end iterator

Change-Id: I6b1d524a7771678758c5cd8d0ef46cb03aba7655

diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index fb346b4..79bde32 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1238,7 +1238,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& 
rNode, sal_Bool bRTL )
 // position and that we don't have "empty" changes.
 sal_uInt8 nLastTyp = i18n::ScriptType::WEAK;
 xub_StrLen nLastPos = 0;
-for (std::vector::const_iterator i2 = 
aScriptChanges.begin(); i2 < aScriptChanges.end(); ++i2)
+for (std::vector::const_iterator i2 = 
aScriptChanges.begin(); i2 != aScriptChanges.end(); ++i2)
 {
 SAL_WARN_IF( nLastTyp == i2->type ||
 nLastPos >= i2->position,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-04 Thread Libreoffice Gerrit user
 sw/source/filter/xml/xmliteme.cxx |2 -
 sw/source/filter/xml/xmlithlp.cxx |2 -
 sw/source/filter/xml/xmltble.cxx  |   30 ++---
 sw/source/filter/xml/xmltbli.cxx  |   54 +++---
 sw/source/filter/xml/xmltbli.hxx  |   22 +++
 sw/source/filter/xml/xmltexte.cxx |8 ++---
 sw/source/filter/xml/xmltexti.cxx |   40 ++--
 7 files changed, 79 insertions(+), 79 deletions(-)

New commits:
commit a472d6176c7d2a88fbea0f25de17924753b052b2
Author: Takeshi Abe 
Date:   Fri Jan 4 21:38:38 2013 +0900

sal_Bool to bool

Change-Id: If855e5fafb8f1291d69d5e50fdaa9ef165071293

diff --git a/sw/source/filter/xml/xmliteme.cxx 
b/sw/source/filter/xml/xmliteme.cxx
index 1dbefcb..d17c101 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -135,7 +135,7 @@ void SwXMLTableItemMapper_Impl::handleSpecialItem(
 {
 sal_Int16 eHoriOrient =
 ((const SwFmtHoriOrient *)pItem)->GetHoriOrient();
-sal_Bool bExport = sal_False;
+bool bExport = false;
 sal_uInt16 nMemberId =
 static_cast( rEntry.nMemberId & 
MID_SW_FLAG_MASK );
 switch( nMemberId )
diff --git a/sw/source/filter/xml/xmlithlp.cxx 
b/sw/source/filter/xml/xmlithlp.cxx
index 2e3ce1a..2f4e4c3 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -186,7 +186,7 @@ bool sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
   ((API_LINE_SOLID == nStyle && rpLine->GetDistance()) ||
 (API_LINE_DOUBLE == nStyle && !rpLine->GetDistance())) ) )
{
-   sal_Bool bDouble = (bHasWidth && API_LINE_DOUBLE == nStyle ) ||
+   bool bDouble = (bHasWidth && API_LINE_DOUBLE == nStyle ) ||
rpLine->GetDistance();
 
// fdo#38542: for double borders, do not override the width
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 0dc0be5..344ef1d 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -195,12 +195,12 @@ public:
 SwXMLTableFrmFmtsSort_Impl ( sal_uInt16 /* nInit */, sal_uInt16 /*nGrow*/ )
 {}
 
-sal_Bool AddRow( SwFrmFmt& rFrmFmt, const OUString& rNamePrefix, 
sal_uInt32 nLine );
-sal_Bool AddCell( SwFrmFmt& rFrmFmt, const OUString& rNamePrefix,
+bool AddRow( SwFrmFmt& rFrmFmt, const OUString& rNamePrefix, sal_uInt32 
nLine );
+bool AddCell( SwFrmFmt& rFrmFmt, const OUString& rNamePrefix,
   sal_uInt32 nCol, sal_uInt32 nRow, sal_Bool bTop );
 };
 
-sal_Bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt,
+bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt,
  const OUString& rNamePrefix,
 sal_uInt32 nLine )
 {
@@ -221,10 +221,10 @@ sal_Bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& 
rFrmFmt,
 
 // empty styles have not to be exported
 if( !pFrmSize && !pBrush && !pRowSplit )
-return sal_False;
+return false;
 
 // order is: -/brush, size/-, size/brush
-sal_Bool bInsert = sal_True;
+bool bInsert = true;
 SwXMLFrmFmts_Impl::iterator i;
 for( i = aFormatList.begin(); i < aFormatList.end(); ++i )
 {
@@ -290,7 +290,7 @@ sal_Bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& 
rFrmFmt,
 // found!
 const String& rFmtName = pTestFmt->GetName();
 rFrmFmt.SetName( rFmtName );
-bInsert = sal_False;
+bInsert = false;
 break;
 }
 
@@ -330,7 +330,7 @@ static void lcl_xmltble_appendBoxPrefix( OUStringBuffer& 
rBuffer,
 rBuffer.append( (sal_Int32)(nRow + 1));
 }
 
-sal_Bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt,
+bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt,
  const OUString& rNamePrefix,
 sal_uInt32 nCol, sal_uInt32 nRow, 
sal_Bool bTop )
 {
@@ -361,7 +361,7 @@ sal_Bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& 
rFrmFmt,
 
 // empty styles have not to be exported
 if( !pVertOrient && !pBrush && !pBox && !pNumFmt && !pFrameDir )
-return sal_False;
+return false;
 
 // order is: -/-/-/num,
 //   -/-/box/-, --/-/box/num,
@@ -369,7 +369,7 @@ sal_Bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& 
rFrmFmt,
 //   vert/-/-/-, vert/-/-/num, vert/-/box/-, ver/-/box/num,
 //   vert/brush/-/-, vert/brush/-/num, vert/brush/box/-,
 //   vert/brush/box/num
-sal_Bool bInsert = sal_True;
+bool bInsert = true;
 SwXMLFrmFmts_Impl::iterator i;
 for( i = aFormatList.begin(); i < aFormatList.end(); ++i )
 {
@@ -470,7 +470,7 @@ sal_Bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& 
rFrmFmt,
 // found!
 const String& rFmtName = pTestFmt->GetName()

[Libreoffice-commits] .: sw/source

2013-01-04 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/ww8par.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d115f128f645ebccc9f5c0a8e1bf6223c286
Author: Miklos Vajna 
Date:   Fri Jan 4 16:31:47 2013 +0100

sw: forgot to adapt this

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 268ed91..58970eb 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -145,7 +145,7 @@ bool BasicProjImportHelper::import( const uno::Reference< 
io::XInputStream >& rx
 try
 {
 oox::ole::OleStorage root( mxCtx, rxIn, false );
-oox::StorageRef vbaStg = root.openSubStorage( CREATE_OUSTRING( 
"Macros" ), false );
+oox::StorageRef vbaStg = root.openSubStorage( "Macros" , false );
 if ( vbaStg.get() )
 {
 oox::ole::VbaProject aVbaPrj( mxCtx, mrDocShell.GetModel(), 
rtl::OUString("Writer") );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2013-01-04 Thread Libreoffice Gerrit user
 sw/source/ui/lingu/olmenu.src |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 645f17ba755a677f649313ddc95749a4aee2770e
Author: Miklos Vajna 
Date:   Fri Jan 4 10:54:54 2013 +0100

sw: Add -> Add to dictionary in olmenu as well

As done for editeng in d39f1fb508128c23c39c24e04b20a2f56c03cb5e

diff --git a/sw/source/ui/lingu/olmenu.src b/sw/source/ui/lingu/olmenu.src
index ae0897f..29f0f23 100644
--- a/sw/source/ui/lingu/olmenu.src
+++ b/sw/source/ui/lingu/olmenu.src
@@ -40,13 +40,13 @@ Menu MN_SPELL_POPUP
 SubMenu = Menu
 {
 };
-Text [ en-US ] = "~Add" ;
+Text [ en-US ] = "~Add to dictionary" ;
 };
 MenuItem
 {
 Identifier = MN_ADD_TO_DIC_SINGLE ;
 HelpID = HID_LINGU_ADD_WORD ;
-Text [ en-US ] = "~Add" ;
+Text [ en-US ] = "~Add to dictionary" ;
 };
 MenuItem
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-28 Thread Libreoffice Gerrit user
 sw/source/core/docnode/ndsect.cxx  |5 ++---
 sw/source/core/docnode/nodes.cxx   |2 +-
 sw/source/core/edit/edfld.cxx  |3 +--
 sw/source/core/frmedt/feshview.cxx |5 ++---
 sw/source/core/text/atrstck.cxx|   12 
 sw/source/core/undo/rolbck.cxx |3 +--
 sw/source/core/undo/undel.cxx  |2 +-
 sw/source/filter/ww8/ww8par3.cxx   |4 ++--
 8 files changed, 14 insertions(+), 22 deletions(-)

New commits:
commit 05cc878bb4567aa15841fe316b1e898ae43fe7a7
Author: Julien Nabet 
Date:   Fri Dec 28 22:06:35 2012 +0100

Some cppcheck cleaning in sw

Change-Id: I3dd51a8ddd0c01c453331934869413d5999a826f

diff --git a/sw/source/core/docnode/ndsect.cxx 
b/sw/source/core/docnode/ndsect.cxx
index 4b52bfb..7ea4f7e 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -241,7 +241,6 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & 
rNewData,
 }
 }
 
-const SwCntntNode* pCNd;
 if( pPrvNd && 1 == nRegionRet )
 {
 pSttPos->nNode.Assign( *pPrvNd );
@@ -259,7 +258,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & 
rNewData,
 }
 else
 {
-pCNd = pEndPos->nNode.GetNode().GetCntntNode();
+const SwCntntNode* pCNd = 
pEndPos->nNode.GetNode().GetCntntNode();
 if( pCNd && pCNd->Len() != pEndPos->nContent.GetIndex() )
 {
 xub_StrLen nCntnt = pSttPos->nContent.GetIndex();
@@ -807,10 +806,10 @@ SwSectionNode* SwNodes::InsertTextSection(SwNodeIndex 
const& rNdIdx,
 }
 else
 {
-SwNode* pNd;
 ++aInsPos;
 if (!lcl_IsTOXSection(rSectionData))
 {
+SwNode* pNd;
 while( aInsPos.GetIndex() < Count() - 1 &&
 ( pNd = &aInsPos.GetNode())->IsEndNode() &&
 pNd->StartOfSectionNode()->IsSectionNode())
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 500f56d..8767e36 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -1481,7 +1481,6 @@ sal_Bool SwNodes::CheckNodesRange( const SwNodeIndex& 
rStt, const SwNodeIndex& r
 */
 void SwNodes::DelNodes( const SwNodeIndex & rStart, sal_uLong nCnt )
 {
-int bUpdateNum = 0;
 sal_uLong nSttIdx = rStart.GetIndex();
 
 if( !nSttIdx && nCnt == GetEndOfContent().GetIndex()+1 )
@@ -1509,6 +1508,7 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, 
sal_uLong nCnt )
 }
 else
 {
+int bUpdateNum = 0;
 for( sal_uLong n = nSttIdx, nEnd = nSttIdx + nCnt; n < nEnd; ++n )
 {
 SwNode* pNd = (*this)[ n ];
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index ac0177b..ede37d0 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -316,7 +316,6 @@ void SwEditShell::UpdateFlds( SwField &rFld )
 SET_CURR_SHELL( this );
 StartAllAction();
 {
-SwField *pCurFld = 0;
 
 // Wenn es keine Selektionen gibt, gilt der Wert der aktuellen
 // Cursor-Position.
@@ -377,7 +376,7 @@ void SwEditShell::UpdateFlds( SwField &rFld )
 if( 0 != (pTxtFld = GetDocTxtFld( pCurStt )) )
 {
 pFmtFld = (SwFmtFld*)&pTxtFld->GetFld();
-pCurFld = pFmtFld->GetFld();
+SwField *pCurFld = pFmtFld->GetFld();
 
 // bei gemischten Feldtypen
 if( pCurFld->GetTyp()->Which() !=
diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index 01c2956..048eb1d3 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2579,7 +2579,7 @@ sal_Bool SwFEShell::IsAlignPossible() const
 }
 
 
-// temporary fix till  SS of JOE is availale
+// temporary fix till  SS of JOE is available
 void SwFEShell::CheckUnboundObjects()
 {
 SET_CURR_SHELL( this );
@@ -2611,9 +2611,8 @@ void SwFEShell::CheckUnboundObjects()
 Imp()->GetDrawView()->GetCurrentObjIdentifier() : 
0x;
 
 SwFmtAnchor aAnch;
-const SwFrm *pAnch = 0;
 {
-pAnch = ::FindAnchor( pPage, aPt, sal_True );
+const SwFrm *pAnch = ::FindAnchor( pPage, aPt, sal_True );
 SwPosition aPos( *((SwCntntFrm*)pAnch)->GetNode() );
 aAnch.SetType( FLY_AT_PARA );
 aAnch.SetAnchor( &aPos );
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index 237b024..e811ed5 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -644,12 +644,11 @@ void SwAttrHandler::ActivateTop( SwFont& rFnt, con

[Libreoffice-commits] .: sw/source

2012-12-27 Thread Libreoffice Gerrit user
 sw/source/filter/html/css1atr.cxx |   20 
 sw/source/filter/html/htmlatr.cxx |   27 ---
 sw/source/filter/ww8/ww8atr.cxx   |   27 ---
 3 files changed, 74 deletions(-)

New commits:
commit f7ad8786736c4682c2ee45c33665c8364bab6547
Author: Tor Lillqvist 
Date:   Thu Dec 27 14:43:42 2012 +0200

Get rid of duplicated and apparently unused historical leftovers

Change-Id: I3ce6d7c9cfba9f1391e9cb26df2573ea969d2f94

diff --git a/sw/source/filter/html/css1atr.cxx 
b/sw/source/filter/html/css1atr.cxx
index 796ac3c..f9159c6 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -94,26 +94,6 @@
 using namespace ::com::sun::star;
 using ::editeng::SvxBorderLine;
 
-/*
- * um nicht immer wieder nach einem Update festzustellen, das irgendwelche
- * Hint-Ids dazugekommen sind, wird hier definiert, die Groesse der Tabelle
- * definiert und mit der akt. verglichen. Bei unterschieden wird der
- * Compiler schon meckern.
- *
- * diese Section und die dazugeherigen Tabellen muessen in folgenden Files
- * gepflegt werden: rtf\rtfatr.cxx, sw6\sw6atr.cxx, w4w\w4watr.cxx
- */
-#if !defined(UNX) && !defined(_MSC_VER) && !defined(PPC) && 
!defined(__MINGW32__)
-
-#error Interesting, I though this ifdef block would never be compiled. So 
remove this line and please tell me --t...@iki.fi
-
-#define ATTRFNTAB_SIZE 130
-#if ATTRFNTAB_SIZE != POOLATTR_END - POOLATTR_BEGIN
-#error Attribut-Tabelle ist ungueltigt. Wurden neue Hint-IDs zugefuegt ??
-#endif
-
-#endif
-
 #define HTML_HEADSPACE (12*20)
 
 #define CSS1_BACKGROUND_ATTR1
diff --git a/sw/source/filter/html/htmlatr.cxx 
b/sw/source/filter/html/htmlatr.cxx
index d48202e..9e84dc3 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -77,33 +77,6 @@
 
 using namespace ::com::sun::star;
 
-/*
- * um nicht immer wieder nach einem Update festzustellen, das irgendwelche
- * Hint-Ids dazugekommen sind, wird hier definiert, die Groesse der Tabelle
- * definiert und mit der akt. verglichen. Bei unterschieden wird der
- * Compiler schon meckern.
- *
- * diese Section und die dazugeherigen Tabellen muessen in folgenden Files
- * gepflegt werden: rtf\rtfatr.cxx, sw6\sw6atr.cxx, w4w\w4watr.cxx
- */
-#if !defined(UNX) && !defined(_MSC_VER) && !defined(PPC) && 
!defined(__MINGW32__)
-
-#error Interesting, I though this ifdef block would never be compiled. So 
remove this line and please tell me --t...@iki.fi
-
-#define ATTRFNTAB_SIZE 130
-#if ATTRFNTAB_SIZE != POOLATTR_END - POOLATTR_BEGIN
-#error Attribut-Tabelle ist ungueltigt. Wurden neue Hint-IDs zugefuegt ??
-#endif
-
-#define NODETAB_SIZE 3
-#if NODETAB_SIZE != RES_NODE_END - RES_NODE_BEGIN
-#error Node-Tabelle ist ungueltigt. Wurden neue Hint-IDs zugefuegt ??
-#endif
-
-#endif
-
-//---
-
 HTMLOutEvent aAnchorEventTable[] =
 {
 { OOO_STRING_SVTOOLS_HTML_O_SDonclick,  
OOO_STRING_SVTOOLS_HTML_O_onclick,  SFX_EVENT_MOUSECLICK_OBJECT },
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 2c9c3e9..d6cbdaa 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -129,33 +129,6 @@ using ::editeng::SvxBorderLine;
 using namespace ::com::sun::star;
 using namespace nsFieldFlags;
 using namespace nsSwDocInfoSubType;
-
-/*
- * um nicht immer wieder nach einem Update festzustellen, das irgendwelche
- * Hint-Ids dazugekommen sind, wird hier definiert, die Groesse der Tabelle
- * definiert und mit der akt. verglichen. Bei unterschieden wird der
- * Compiler schon meckern.
- *
- * diese Section und die dazugeherigen Tabellen muessen in folgenden Files
- * gepflegt werden: rtf\rtfatr.cxx, sw6\sw6atr.cxx, w4w\w4watr.cxx
-*/
-
-#if !defined(_MSC_VER) && !defined(UNX) && !defined(PPC) && 
!defined(__MINGW32__)
-
-#error Interesting, I though this ifdef block would never be compiled. So 
remove this line and please tell me --t...@iki.fi
-
-#define ATTRFNTAB_SIZE 130
-#if ATTRFNTAB_SIZE != POOLATTR_END - POOLATTR_BEGIN
-#   error "Attribut-Tabelle ist ungueltigt. Wurden neue Hint-ID's zugefuegt ??"
-#endif
-
-#define NODETAB_SIZE 3
-#if NODETAB_SIZE != RES_NODE_END - RES_NODE_BEGIN
-#   error "Node-Tabelle ist ungueltigt. Wurden neue Hint-ID's zugefuegt ??"
-#endif
-
-#endif
-
 using namespace sw::util;
 using namespace sw::types;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-24 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/rtfattributeoutput.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2d8a50d3f8a5af914e2e184796bfab05df52c539
Author: LeMoyne Castle 
Date:   Fri Dec 21 09:20:16 2012 -0700

Fix for rtfexport subsequenttest

was re-using previous data buffer in later write to file
fixes crash in subsequenttest
should correct some image garbling in rtfs

Change-Id: I922d04b621a85997611f537fe1f1ca9460676056
Reviewed-on: https://gerrit.libreoffice.org/1464
Reviewed-by: Norbert Thiebaud 
Tested-by: Norbert Thiebaud 

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 36d1cea..9a65c42 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3347,7 +3347,7 @@ void RtfAttributeOutput::FlyFrameOLEReplacement(const 
SwFlyFrmFmt* pFlyFrmFmt, S
 OSL_FAIL("failed to export the graphic");
 aWmfStream.Seek(STREAM_SEEK_TO_END);
 nSize = aWmfStream.Tell();
-pGraphicAry = (sal_uInt8*)aStream.GetData();
+pGraphicAry = (sal_uInt8*)aWmfStream.GetData();
 m_aRunText->append(ExportPICT( pFlyFrmFmt, aSize, aRendered, aMapped, rCr, 
pBLIPType, pGraphicAry, nSize, m_rExport ));
 m_aRunText->append("}"); // nonshppict
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-22 Thread Libreoffice Gerrit user
 sw/source/ui/envelp/labelcfg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9c655c4c55e3be85a6cef0bd04f95e4d47e211f1
Author: Tor Lillqvist 
Date:   Sun Dec 23 07:59:34 2012 +0200

Fix that actually compiles, at least with V2012

Change-Id: I04a29decfeec5e05b50070904189bbeccaf25910

diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx
index 259e9da..1e48502 100644
--- a/sw/source/ui/envelp/labelcfg.cxx
+++ b/sw/source/ui/envelp/labelcfg.cxx
@@ -133,7 +133,7 @@ static Sequence lcl_CreateProperties(
 case 1:
 {
 OUString sTmp;
-sTmp += ( rRec.bCont ? "C" : "S" );   
sTmp += sColon;
+sTmp += rRec.bCont ? OUString("C") : OUString("S");   
sTmp += sColon;
 sTmp += OUString::valueOf(TWIP_TO_MM100(rRec.lHDist) );   
sTmp += sColon;
 sTmp += OUString::valueOf(TWIP_TO_MM100(rRec.lVDist));
sTmp += sColon;
 sTmp += OUString::valueOf(TWIP_TO_MM100(rRec.lWidth)  );  
sTmp += sColon;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-22 Thread Libreoffice Gerrit user
 sw/source/ui/envelp/labelcfg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7552dc46259eb022ff6de7383c9886941df0477e
Author: Tor Lillqvist 
Date:   Sun Dec 23 02:11:27 2012 +0200

Try to fix "cannot convert from 'const char *' to 'rtl::OUString'"

Change-Id: I0950c45af8505e0801431eb711108ea43f88c242

diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx
index 1e39ecc..259e9da 100644
--- a/sw/source/ui/envelp/labelcfg.cxx
+++ b/sw/source/ui/envelp/labelcfg.cxx
@@ -133,7 +133,7 @@ static Sequence lcl_CreateProperties(
 case 1:
 {
 OUString sTmp;
-sTmp += OUString( rRec.bCont ? "C" : "S");
sTmp += sColon;
+sTmp += ( rRec.bCont ? "C" : "S" );   
sTmp += sColon;
 sTmp += OUString::valueOf(TWIP_TO_MM100(rRec.lHDist) );   
sTmp += sColon;
 sTmp += OUString::valueOf(TWIP_TO_MM100(rRec.lVDist));
sTmp += sColon;
 sTmp += OUString::valueOf(TWIP_TO_MM100(rRec.lWidth)  );  
sTmp += sColon;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-21 Thread Libreoffice Gerrit user
 sw/source/ui/dbui/addresslistdialog.cxx   |   50 ++---
 sw/source/ui/dbui/createaddresslistdialog.cxx |2 
 sw/source/ui/dbui/dbinsdlg.cxx|   30 
 sw/source/ui/dbui/dbmgr.cxx   |   97 --
 sw/source/ui/dbui/dbtablepreviewdialog.cxx|8 --
 sw/source/ui/dbui/mmconfigitem.cxx|   28 +++
 sw/source/ui/dbui/mmlayoutpage.cxx|2 
 sw/source/ui/dbui/mmoutputpage.cxx|   10 +-
 sw/source/ui/dbui/mmpreparemergepage.cxx  |   14 +--
 sw/source/ui/dbui/selectdbtabledialog.cxx |   17 ++--
 10 files changed, 126 insertions(+), 132 deletions(-)

New commits:
commit 8808f482a2d28919e4d3eddfccfe6e4daf697601
Author: Miklos Vajna 
Date:   Fri Dec 21 12:00:43 2012 +0100

sw: kill C2U in dbui

diff --git a/sw/source/ui/dbui/addresslistdialog.cxx 
b/sw/source/ui/dbui/addresslistdialog.cxx
index 03f80d7..b8126c7 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -99,13 +99,13 @@ static ::rtl::OUString lcl_getFlatURL( 
uno::Reference& xSou
 if(xSourceProperties.is())
 {
 rtl::OUString sDBURL;
-xSourceProperties->getPropertyValue(C2U("URL")) >>= sDBURL;
+xSourceProperties->getPropertyValue("URL") >>= sDBURL;
 if(String(sDBURL).SearchAscii("sdbc:flat:") == 0)
 {
 uno::Sequence aFilters;
-xSourceProperties->getPropertyValue(C2U("TableFilter")) >>= 
aFilters;
+xSourceProperties->getPropertyValue("TableFilter") >>= aFilters;
 uno::Sequence aInfo;
-xSourceProperties->getPropertyValue(C2U("Info")) >>= aInfo;
+xSourceProperties->getPropertyValue("Info") >>= aInfo;
 if(aFilters.getLength() == 1 && aInfo.getLength() )
 {
 ::rtl::OUString sFieldDelim;
@@ -114,13 +114,13 @@ static ::rtl::OUString lcl_getFlatURL( 
uno::Reference& xSou
 ::rtl::OUString sCharSet;
 for(sal_Int32 nInfo = 0; nInfo < aInfo.getLength(); ++nInfo)
 {
-if(aInfo[nInfo].Name == C2U("FieldDelimiter"))
+if(aInfo[nInfo].Name == "FieldDelimiter")
 aInfo[nInfo].Value >>= sFieldDelim;
-else if(aInfo[nInfo].Name == C2U("StringDelimiter"))
+else if(aInfo[nInfo].Name == "StringDelimiter")
 aInfo[nInfo].Value >>= sStringDelim;
-else if(aInfo[nInfo].Name == C2U("Extension"))
+else if(aInfo[nInfo].Name == "Extension")
 aInfo[nInfo].Value >>= sExtension;
-else if(aInfo[nInfo].Name == C2U("CharSet"))
+else if(aInfo[nInfo].Name == "CharSet")
 aInfo[nInfo].Value >>= sCharSet;
 }
 if(!sCharSet.compareToAscii( cUTF8 ))
@@ -128,9 +128,9 @@ static ::rtl::OUString lcl_getFlatURL( 
uno::Reference& xSou
 sURL = String(sDBURL).Copy( 10 );
 //#i97577# at this point the 'URL' can also be a file name!
 sURL = URIHelper::SmartRel2Abs( INetURLObject(), sURL );
-sURL += C2U("/");
+sURL += "/";
 sURL += aFilters[0];
-sURL += C2U(".");
+sURL += ".";
 sURL += sExtension;
 }
 }
@@ -289,21 +289,21 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl)
 {
 uno::Reference 
xConnectFactory(pUserData->xConnection, UNO_QUERY_THROW);
 uno::Reference xComposer(
-
xConnectFactory->createInstance(C2U("com.sun.star.sdb.SingleSelectQueryComposer")),
 UNO_QUERY_THROW);
+
xConnectFactory->createInstance("com.sun.star.sdb.SingleSelectQueryComposer"), 
UNO_QUERY_THROW);
 
 uno::Reference xRowSet(
-xMgr->createInstance(C2U("com.sun.star.sdb.RowSet")), 
UNO_QUERY);
+xMgr->createInstance("com.sun.star.sdb.RowSet"), 
UNO_QUERY);
 uno::Reference xRowProperties(xRowSet, 
UNO_QUERY);
-xRowProperties->setPropertyValue(C2U("DataSourceName"),
+xRowProperties->setPropertyValue("DataSourceName",
 makeAny(OUString(m_aListLB.GetEntryText(pSelect, 
ITEMID_NAME - 1;
-xRowProperties->setPropertyValue(C2U("Command"), makeAny(
+xRowProperties->setPropertyValue("Command", makeAny(
 OUString(sCommand)));
-xRowProperties->setPropertyValue(C2U("CommandType"), 
makeAny(pUserData->nCommandType));
-xRowProperties->setPropertyValue(C2U("ActiveConnection"), 
makeAny(pUserData->xConnection.getTyped()));
+xRowProperties->setPropertyValue("Comm

[Libreoffice-commits] .: sw/source

2012-12-20 Thread Libreoffice Gerrit user
 sw/source/core/doc/acmplwrd.cxx|2 -
 sw/source/core/doc/docbm.cxx   |   52 ++---
 sw/source/core/doc/doccorr.cxx |   16 
 sw/source/core/doc/poolfmt.cxx |2 -
 sw/source/core/docnode/nodes.cxx   |3 -
 sw/source/core/layout/paintfrm.cxx |2 -
 sw/source/core/text/frmform.cxx|2 -
 sw/source/core/text/itrform2.cxx   |2 +
 sw/source/core/txtnode/fntcache.cxx|2 -
 sw/source/core/txtnode/thints.cxx  |3 -
 sw/source/filter/html/htmlplug.cxx |3 -
 sw/source/filter/xml/xmltexte.cxx  |2 -
 sw/source/ui/app/docstyle.cxx  |4 +-
 sw/source/ui/app/swmodul1.cxx  |4 +-
 sw/source/ui/docvw/PostItMgr.cxx   |6 +--
 sw/source/ui/envelp/envlop1.cxx|4 +-
 sw/source/ui/fldui/flddinf.cxx |4 --
 sw/source/ui/shells/annotsh.cxx|   17 +++--
 sw/source/ui/shells/txtattr.cxx|   14 +++
 sw/source/ui/uiview/view2.cxx  |2 -
 sw/source/ui/uno/unotxdoc.cxx  |6 +--
 sw/source/ui/vba/vbadocumentproperties.cxx |2 -
 sw/source/ui/vba/vbapalette.cxx|4 +-
 23 files changed, 74 insertions(+), 84 deletions(-)

New commits:
commit 5f75082ef17c713a9e41a05d222fe9dda9c3136e
Author: Luboš Luňák 
Date:   Thu Dec 20 14:08:36 2012 +0100

incorrect if/for body alignment

I checked history of all the questionable ones, and the itrform2.cxx
one was a genuine error.

Change-Id: Ibfcd8732ba4a66a8c038940ae10f8b27fee466c9

diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 8548545..80c657d 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -146,7 +146,7 @@ void SwAutoCompleteClient::Modify( const SfxPoolItem* pOld, 
const SfxPoolItem *)
 case RES_OBJECTDYING:
 if( (void*)GetRegisteredIn() == ((SwPtrMsgPoolItem *)pOld)->pObject )
 ((SwModify*)GetRegisteredIn())->Remove(this);
-pAutoCompleteWord->DocumentDying(*pDoc);
+pAutoCompleteWord->DocumentDying(*pDoc);
 break;
 
 }
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 76e9cfc..4f43b7d 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1392,12 +1392,12 @@ void _SaveCntntIdx(SwDoc* pDoc,
 FOREACHSHELL_START( pShell )
 SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
 if( _pStkCrsr )
-do {
-lcl_ChkPaM( rSaveArr, nNode, nCntnt, *_pStkCrsr,
-aSave, false );
-aSave.IncCount();
-} while ( (_pStkCrsr != 0 ) &&
-((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != 
PCURSH->GetStkCrsr()) );
+do {
+lcl_ChkPaM( rSaveArr, nNode, nCntnt, *_pStkCrsr,
+aSave, false );
+aSave.IncCount();
+} while ( (_pStkCrsr != 0 ) &&
+((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != 
PCURSH->GetStkCrsr()) );
 
 FOREACHPAM_START( PCURSH->_GetCrsr() )
 lcl_ChkPaM( rSaveArr, nNode, nCntnt, *PCURCRSR,
@@ -1517,16 +1517,16 @@ void _RestoreCntntIdx(SwDoc* pDoc,
 FOREACHSHELL_START( pShell )
 SwPaM *_pStkCrsr = PCURSH->GetStkCrsr();
 if( _pStkCrsr )
-do {
-if( aSave.GetCount() == nCnt )
-{
-pPos = &_pStkCrsr->GetBound( 0x0800 ==
-aSave.GetType() );
-break;
-}
-++nCnt;
-} while ( (_pStkCrsr != 0 ) &&
-((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) != 
PCURSH->GetStkCrsr()) );
+do {
+if( aSave.GetCount() == nCnt )
+{
+pPos = &_pStkCrsr->GetBound( 0x0800 ==
+aSave.GetType() );
+break;
+}
+++nCnt;
+} while ( (_pStkCrsr != 0 ) &&
+((_pStkCrsr=(SwPaM *)_pStkCrsr->GetNext()) 
!= PCURSH->GetStkCrsr()) );
 
 if( pPos )
 break;
@@ -1678,16 +1678,16 @@ void _RestoreCntntIdx(std::vector &rSaveArr,
 FOREACHSHELL_STAR

[Libreoffice-commits] .: sw/source

2012-12-19 Thread Libreoffice Gerrit user
 sw/source/ui/shells/grfsh.cxx |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 0de82fe25545a58e956addc5de81891852e9e5de
Author: Rodolfo Ribeiro Gomes 
Date:   Wed Dec 19 20:07:25 2012 -0200

sal_Bool to bool in sw/source/ui/shells/grfsh.cxx

Change-Id: I10727407c04b46eb80fb7b9b7f5ddcb0c7d628fa
Reviewed-on: https://gerrit.libreoffice.org/1425
Reviewed-by: Norbert Thiebaud 
Tested-by: Norbert Thiebaud 

diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index e987237..18665c3 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -290,20 +290,20 @@ void SwGrfShell::Execute(SfxRequest &rReq)
 }
 aMgr.UpdateFlyFrm();
 
-sal_Bool bApplyUsrPref = sal_False;
+bool bApplyUsrPref = false;
 if (SFX_ITEM_SET == pSet->GetItemState(
 FN_KEEP_ASPECT_RATIO, sal_True, &pItem ))
 {
 aUsrPref.SetKeepRatio(
 ((const SfxBoolItem*)pItem)->GetValue() );
-bApplyUsrPref = sal_True;
+bApplyUsrPref = true;
 }
 if( SFX_ITEM_SET == pSet->GetItemState(
 SID_ATTR_GRAF_KEEP_ZOOM, sal_True, &pItem ))
 {
 aUsrPref.SetGrfKeepZoom(
 ((const SfxBoolItem*)pItem)->GetValue() );
-bApplyUsrPref = sal_True;
+bApplyUsrPref = true;
 }
 
 if( bApplyUsrPref )
@@ -524,8 +524,8 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
 SwWrtShell &rSh = GetShell();
 SfxItemSet aCoreSet( GetPool(), aNoTxtNodeSetRange );
 rSh.GetCurAttr( aCoreSet );
-sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected( 
FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
-sal_Bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
+bool bParentCntProt = 0 != rSh.IsSelObjProtected( 
FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
+bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
 
 SetGetStateSet( &rSet );
 
@@ -533,24 +533,24 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
 sal_uInt16 nWhich = aIter.FirstWhich();
 while( nWhich )
 {
-sal_Bool bDisable = bParentCntProt;
+bool bDisable = bParentCntProt;
 switch( nWhich )
 {
 case SID_INSERT_GRAPHIC:
 case FN_FORMAT_GRAFIC_DLG:
 case SID_TWAIN_TRANSFER:
 if( bParentCntProt || !bIsGrfCntnt )
-bDisable = sal_True;
+bDisable = true;
 break;
 case SID_SAVE_GRAPHIC:
 case SID_EXTERNAL_EDIT:
 if( rSh.GetGraphicType() == GRAPHIC_NONE )
-bDisable = sal_True;
+bDisable = true;
 break;
 case SID_COLOR_SETTINGS:
 {
 if ( bParentCntProt || !bIsGrfCntnt )
-bDisable = sal_True;
+bDisable = true;
 else
 {
 svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME );
@@ -622,7 +622,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
 {
 if( pGrafObj->IsAnimated() ||
 GRAPHIC_GDIMETAFILE == pGrafObj->GetType() )
-bDisable = sal_True;
+bDisable = true;
 else
 rSet.Put( SfxUInt16Item( nWhich, ((SwTransparencyGrf&)
 aCoreSet.Get(RES_GRFATR_TRANSPARENCY)).GetValue() 
));
@@ -655,7 +655,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
 case SID_GRFFILTER_SOLARIZE:
 {
 if( bParentCntProt || !bIsGrfCntnt )
-bDisable = sal_True;
+bDisable = true;
 // #i59688# load graphic only if type is unknown
 else
 {
@@ -677,7 +677,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
 break;
 
 default:
-bDisable = sal_False;
+bDisable = false;
 }
 
 if( bDisable )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-19 Thread Libreoffice Gerrit user
 sw/source/filter/ascii/ascatr.cxx|   10 +-
 sw/source/filter/ascii/wrtasc.cxx|8 +-
 sw/source/filter/basflt/fltini.cxx   |4 -
 sw/source/filter/basflt/iodetect.cxx |4 -
 sw/source/filter/basflt/shellio.cxx  |   10 +-
 sw/source/filter/html/css1atr.cxx|  130 +--
 sw/source/filter/html/htmlcss1.cxx   |2 
 sw/source/filter/html/htmlfldw.cxx   |2 
 sw/source/filter/html/swhtml.cxx |2 
 9 files changed, 86 insertions(+), 86 deletions(-)

New commits:
commit 1e65f0176a9243274971321ffa5b6462130904ed
Author: Takeshi Abe 
Date:   Wed Dec 19 22:41:13 2012 +0900

sal_Bool to bool

Change-Id: Ie4aac09e9aa7232c61cfdcda7b2bffd5002036a7

diff --git a/sw/source/filter/ascii/ascatr.cxx 
b/sw/source/filter/ascii/ascatr.cxx
index 503793f..d620c2b 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -54,7 +54,7 @@ public:
 void NextPos()  { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
 
 xub_StrLen WhereNext() const{ return nAktSwPos; }
-sal_Bool OutAttr( xub_StrLen nSwPos );
+bool OutAttr( xub_StrLen nSwPos );
 };
 
 
@@ -93,9 +93,9 @@ xub_StrLen SwASC_AttrIter::SearchNext( xub_StrLen nStartPos )
 }
 
 
-sal_Bool SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
+bool SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
 {
-sal_Bool bRet = sal_False;
+bool bRet = false;
 const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
 if( pTxtAttrs )
 {
@@ -105,7 +105,7 @@ sal_Bool SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
 const SwTxtAttr* pHt = (*pTxtAttrs)[i];
 if ( pHt->HasDummyChar() && nSwPos == *pHt->GetStart() )
 {
-bRet = sal_True;
+bRet = true;
 String sOut;
 switch( pHt->Which() )
 {
@@ -149,7 +149,7 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& 
rNode )
 
 xub_StrLen nStrPos = rWrt.pCurPam->GetPoint()->nContent.GetIndex();
 xub_StrLen nNodeEnde = rNd.Len(), nEnde = nNodeEnde;
-sal_Bool bLastNd =  rWrt.pCurPam->GetPoint()->nNode == 
rWrt.pCurPam->GetMark()->nNode;
+bool bLastNd =  rWrt.pCurPam->GetPoint()->nNode == 
rWrt.pCurPam->GetMark()->nNode;
 if( bLastNd )
 nEnde = rWrt.pCurPam->GetMark()->nContent.GetIndex();
 
diff --git a/sw/source/filter/ascii/wrtasc.cxx 
b/sw/source/filter/ascii/wrtasc.cxx
index 57229dc..3f6847a 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -111,7 +111,7 @@ sal_uLong SwASCWriter::WriteStream()
 
 SwPaM* pPam = pOrigPam;
 
-sal_Bool bWriteSttTag = bUCS2_WithStartChar &&
+bool bWriteSttTag = bUCS2_WithStartChar &&
 (RTL_TEXTENCODING_UCS2 == GetAsciiOptions().GetCharSet() ||
 RTL_TEXTENCODING_UTF8 == GetAsciiOptions().GetCharSet());
 
@@ -120,7 +120,7 @@ sal_uLong SwASCWriter::WriteStream()
 
 // Output all areas of the pam into the ASC file
 do {
-sal_Bool bTstFly = sal_True;
+bool bTstFly = true;
 while( pCurPam->GetPoint()->nNode.GetIndex() < 
pCurPam->GetMark()->nNode.GetIndex() ||
   (pCurPam->GetPoint()->nNode.GetIndex() == 
pCurPam->GetMark()->nNode.GetIndex() &&
pCurPam->GetPoint()->nContent.GetIndex() <= 
pCurPam->GetMark()->nContent.GetIndex()) )
@@ -175,11 +175,11 @@ sal_uLong SwASCWriter::WriteStream()
 break;
 
 }
-bWriteSttTag = sal_False;
+bWriteSttTag = false;
 }
 Out( aASCNodeFnTab, *pNd, *this );
 }
-bTstFly = sal_False;// Testing once is enough
+bTstFly = false;// Testing once is enough
 }
 
 if( !pCurPam->Move( fnMoveForward, fnGoNode ) )
diff --git a/sw/source/filter/basflt/fltini.cxx 
b/sw/source/filter/basflt/fltini.cxx
index 8d42f30..2cf90c2 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -354,7 +354,7 @@ void CalculateFlySize(SfxItemSet& rFlySet, const 
SwNodeIndex& rAnchor,
 
GetCntntIdx();
 if( pSttNd )
 {
-sal_Bool bOnlyOneNode = sal_True;
+bool bOnlyOneNode = true;
 sal_uLong nMinFrm = 0;
 sal_uLong nMaxFrm = 0;
 SwTxtNode* pFirstTxtNd = 0;
@@ -370,7 +370,7 @@ void CalculateFlySize(SfxItemSet& rFlySet, const 
SwNodeIndex& rAnchor,
 else if( pFirstTxtNd != pTxtNd )
 {
 // forget it
-bOnlyOneNode = sal_False;
+bOnlyOneNode = f

[Libreoffice-commits] .: sw/source

2012-12-19 Thread Libreoffice Gerrit user
 sw/source/core/doc/tblafmt.cxx|3 +--
 sw/source/core/layout/flowfrm.cxx |3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit f3ea8bb8f69db2398a3858de0dc9c3b0d8cc9774
Author: Julien Nabet 
Date:   Thu Dec 20 00:25:25 2012 +0100

Some cppcheck cleaning

Change-Id: I04a7a1b119cb6cca4bf0dd0d576e5e051f99cc6f

diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index ea1630c..9762733 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -912,10 +912,9 @@ void SwTableAutoFmt::StoreTableProperties(const SwTable 
&table)
 
 sal_Bool SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& 
rVersions )
 {
-sal_BoolbRet = sal_True;
 sal_uInt16  nVal = 0;
 rStream >> nVal;
-bRet = 0 == rStream.GetError();
+sal_Bool bRet = 0 == rStream.GetError();
 
 if( bRet && (nVal == AUTOFORMAT_DATA_ID_X ||
 (AUTOFORMAT_DATA_ID_504 <= nVal && nVal <= AUTOFORMAT_DATA_ID)) )
diff --git a/sw/source/core/layout/flowfrm.cxx 
b/sw/source/core/layout/flowfrm.cxx
index 8e6c686..188a760 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1983,7 +1983,6 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool 
bPageBreak, sal_Bool b
 // If our NewUpper lies in a SectionFrm, we need to make sure
 // that it won't destroy itself in Calc.
 SwSectionFrm* pSect = pNewUpper->FindSctFrm();
-bool bUnlock = false;
 if( pSect )
 {
 // If we only switch column within our SectionFrm, we better don't
@@ -1991,7 +1990,7 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool 
bPageBreak, sal_Bool b
 // call us again, etc.
 if( pSect != rThis.FindSctFrm() )
 {
-bUnlock = !pSect->IsColLocked();
+bool bUnlock = !pSect->IsColLocked();
 pSect->ColLock();
 pNewUpper->Calc();
 if( bUnlock )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-19 Thread Libreoffice Gerrit user
 sw/source/core/doc/poolfmt.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit ecfdf8a42401b9762fb78ae693b19bdc76403508
Author: Samuel Mehrbrodt 
Date:   Sat Dec 15 18:13:07 2012 +0100

Changed Writer follow-up Style for "Title" to be "Text body".

"Text body" is the most sensible follower for this I think.

Change-Id: I4fc091446ada5f4aea82ba79dba84f2874bca760

diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index 5321944..a78cb31 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -933,8 +933,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, 
bool bRegardLanguage )
 
 aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST 
) );
 
-pNewColl->SetNextTxtFmtColl( *GetTxtCollFromPool(
-RES_POOLCOLL_DOC_SUBTITEL 
));
+pNewColl->SetNextTxtFmtColl( *GetTxtCollFromPool( 
RES_POOLCOLL_TEXT ));
 }
 break;
 
@@ -967,9 +966,8 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, 
bool bRegardLanguage )
 {
 ::lcl_SetDfltFont( DEFAULTFONT_FIXED, aSet );
 
-// WORKAROUND: Set PRE to 10pt
+// WORKAROUND: Set PRE to 10pt
 SetAllScriptItem( aSet, SvxFontHeightItem(PT_10, 100, 
RES_CHRATR_FONTSIZE) );
-// WORKAROUND: Set PRE to 10pt
 
 // The lower paragraph distance is set explicitly (makes
 // assigning hard attributes easier)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-18 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/docxattributeoutput.cxx |   34 +--
 1 file changed, 32 insertions(+), 2 deletions(-)

New commits:
commit 75c05bd7d2e0e2fb41d4218eb0bb8f5631ca46fe
Author: Pierre-Eric Pelloux-Prayer 
Date:   Fri Dec 14 16:05:24 2012 +0100

docx export: graphics relativeFrom attributes now matches import code

Change-Id: I9f543c08f5e19c11c7e1b8020b8c5f62ae040f6e
Reviewed-on: https://gerrit.libreoffice.org/1342
Reviewed-by: Luboš Luňák 
Tested-by: Luboš Luňák 

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 29bef4a..b97b368 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2077,8 +2077,38 @@ void DocxAttributeOutput::FlyFrameGraphic( const 
SwGrfNode* pGrfNode, const Size
 break;
 case FLY_AT_CHAR:
 default:
-relativeFromH = "character";
-relativeFromV = "line";
+// We apply the same conversion that we do in import
+// (see writerfilter/source/dmapper/GraphicHelper.cxx)
+switch (pFrmFmt->GetVertOrient().GetRelationOrient() )
+{
+case text::RelOrientation::PAGE_PRINT_AREA:
+relativeFromV = "margin";
+break;
+case text::RelOrientation::PAGE_FRAME:
+relativeFromV = "page";
+break;
+case text::RelOrientation::FRAME:
+relativeFromV = "paragraph";
+break;
+case text::RelOrientation::TEXT_LINE:
+default:
+relativeFromV = "line";
+}
+switch (pFrmFmt->GetHoriOrient().GetRelationOrient() )
+{
+case text::RelOrientation::PAGE_PRINT_AREA:
+relativeFromH = "margin";
+break;
+case text::RelOrientation::PAGE_FRAME:
+relativeFromH = "page";
+break;
+case text::RelOrientation::CHAR:
+relativeFromH = "character";
+break;
+case text::RelOrientation::FRAME:
+default:
+relativeFromH = "column";
+}
 break;
 };
 Point pos( 0, 0 );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-18 Thread Libreoffice Gerrit user
 sw/source/core/layout/pagechg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5b7810581c573c4406a0e4529193dd3a7871a56c
Author: Miklos Vajna 
Date:   Tue Dec 18 12:42:33 2012 +0100

SwFrm::CheckPageDescs: if bOdd is false, we want left format

diff --git a/sw/source/core/layout/pagechg.cxx 
b/sw/source/core/layout/pagechg.cxx
index 2c9a4b7..54b2f22 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1195,7 +1195,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool 
bNotifyFields )
 {
 //Format mit verdrehter Logic besorgen.
 if (bFirst)
-pFmtWish = bOdd ? pDesc->GetRightFmt() : 
pDesc->GetRightFmt();
+pFmtWish = bOdd ? pDesc->GetRightFmt() : 
pDesc->GetLeftFmt();
 if (!pFmtWish)
 pFmtWish = bOdd ? pDesc->GetLeftFmt() : 
pDesc->GetRightFmt();
 if ( pPage->GetFmt() != pFmtWish )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-18 Thread Libreoffice Gerrit user
 sw/source/core/layout/pagechg.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 1b67d91b0065c46ca7b36db0836c9159ca8b50cf
Author: Miklos Vajna 
Date:   Tue Dec 18 11:17:06 2012 +0100

fdo#58376 SwFrm::CheckPageDescs: fix crash on fallback

The problem was that fallback worked like this: if we have no page
style, then right falls back to left, and left falls back to right.
This is no longer enough when 'first' is missing: for odd 'first' pages,
first we should fall back to right.

diff --git a/sw/source/core/layout/pagechg.cxx 
b/sw/source/core/layout/pagechg.cxx
index 8509a40..2c9a4b7 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1194,7 +1194,10 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool 
bNotifyFields )
 else if ( !pFmtWish )   //6.
 {
 //Format mit verdrehter Logic besorgen.
-pFmtWish = bOdd ? pDesc->GetLeftFmt() : pDesc->GetRightFmt();
+if (bFirst)
+pFmtWish = bOdd ? pDesc->GetRightFmt() : 
pDesc->GetRightFmt();
+if (!pFmtWish)
+pFmtWish = bOdd ? pDesc->GetLeftFmt() : 
pDesc->GetRightFmt();
 if ( pPage->GetFmt() != pFmtWish )
 pPage->SetFrmFmt( pFmtWish );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-18 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/ww8par3.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fa655c0038ad6f9d4e26b78e5438953615e9bdb7
Author: Miklos Vajna 
Date:   Tue Dec 18 10:15:22 2012 +0100

SwMSConvertControls::InsertControl: typo

diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index ed3c969..0821e94 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2510,7 +2510,7 @@ sal_Bool SwMSConvertControls::InsertControl(
 return sal_False;
 
 uno::Reference< uno::XInterface > xCreate = 
rServiceFactory->createInstance(
-"com.sun.star.drawing.ControlShape"));
+"com.sun.star.drawing.ControlShape");
 if( !xCreate.is() )
 return sal_False;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-18 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/wrtw8esh.cxx |   24 ++--
 sw/source/filter/ww8/ww8par3.cxx  |   44 ++
 2 files changed, 33 insertions(+), 35 deletions(-)

New commits:
commit bc1387714118773b3ac27903080200fc7c9a50d7
Author: Miklos Vajna 
Date:   Tue Dec 18 09:56:10 2012 +0100

sw: kill C2U in filter

diff --git a/sw/source/filter/ww8/wrtw8esh.cxx 
b/sw/source/filter/ww8/wrtw8esh.cxx
index 31c3b40..216f132 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -163,12 +163,12 @@ bool WW8Export::MiserableFormFieldExportHack(const 
SwFrmFmt& rFrmFmt)
 uno::Reference< lang::XServiceInfo > xInfo(xControlModel,
 uno::UNO_QUERY);
 uno::Reference xPropSet(xControlModel, 
uno::UNO_QUERY);
-if 
(xInfo->supportsService(C2U("com.sun.star.form.component.ComboBox")))
+if (xInfo->supportsService("com.sun.star.form.component.ComboBox"))
 {
 DoComboBox(xPropSet);
 bHack = true;
 }
-else if 
(xInfo->supportsService(C2U("com.sun.star.form.component.CheckBox")))
+else if 
(xInfo->supportsService("com.sun.star.form.component.CheckBox"))
 {
 DoCheckBox(xPropSet);
 bHack = true;
@@ -183,11 +183,11 @@ void 
WW8Export::DoComboBox(uno::Reference xPropSet)
 {
 rtl::OUString sSelected;
 uno::Sequence aListItems;
-xPropSet->getPropertyValue(C2U("StringItemList")) >>= aListItems;
+xPropSet->getPropertyValue("StringItemList") >>= aListItems;
 sal_Int32 nNoStrings = aListItems.getLength();
 if (nNoStrings)
 {
-uno::Any aTmp = xPropSet->getPropertyValue(C2U("DefaultText"));
+uno::Any aTmp = xPropSet->getPropertyValue("DefaultText");
 const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue();
 if (pStr)
 sSelected = *pStr;
@@ -195,7 +195,7 @@ void 
WW8Export::DoComboBox(uno::Reference xPropSet)
 
 rtl::OUString sName;
 {
-uno::Any aTmp = xPropSet->getPropertyValue(C2U("Name"));
+uno::Any aTmp = xPropSet->getPropertyValue("Name");
 const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue();
 if (pStr)
 sName = *pStr;
@@ -207,7 +207,7 @@ void 
WW8Export::DoComboBox(uno::Reference xPropSet)
 // property "Help" does not exist and due to the no-existence an 
exception is thrown.
 try
 {
-uno::Any aTmp = xPropSet->getPropertyValue(C2U("HelpText"));
+uno::Any aTmp = xPropSet->getPropertyValue("HelpText");
 const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue();
 if (pStr)
 sHelp = *pStr;
@@ -218,7 +218,7 @@ void 
WW8Export::DoComboBox(uno::Reference xPropSet)
 
 rtl::OUString sToolTip;
 {
-uno::Any aTmp = xPropSet->getPropertyValue(C2U("Name"));
+uno::Any aTmp = xPropSet->getPropertyValue("Name");
 const rtl::OUString *pStr = (const rtl::OUString *)aTmp.getValue();
 if (pStr)
 sToolTip = *pStr;
@@ -309,27 +309,27 @@ void 
WW8Export::DoCheckBox(uno::Reference xPropSet)
 aFFData.setCheckboxHeight(0x14);
 
 sal_Int16 nTemp = 0;
-xPropSet->getPropertyValue(C2U("DefaultState")) >>= nTemp;
+xPropSet->getPropertyValue("DefaultState") >>= nTemp;
 aFFData.setDefaultResult(nTemp);
 
-xPropSet->getPropertyValue(C2U("State")) >>= nTemp;
+xPropSet->getPropertyValue("State") >>= nTemp;
 aFFData.setResult(nTemp);
 
 ::rtl::OUString aStr;
-static ::rtl::OUString sName(C2U("Name"));
+static ::rtl::OUString sName("Name");
 if (xPropSetInfo->hasPropertyByName(sName))
 {
 xPropSet->getPropertyValue(sName) >>= aStr;
 aFFData.setName(aStr);
 }
 
-static ::rtl::OUString sHelpText(C2U("HelpText"));
+static ::rtl::OUString sHelpText("HelpText");
 if (xPropSetInfo->hasPropertyByName(sHelpText))
 {
 xPropSet->getPropertyValue(sHelpText) >>= aStr;
 aFFData.setHelp(aStr);
 }
-static ::rtl::OUString sHelpF1Text(C2U("HelpF1Text"));
+static ::rtl::OUString sHelpF1Text("HelpF1Text");
 if (xPropSetInfo->hasPropertyByName(sHelpF1Text))
 {
 xPropSet->getPropertyValue(sHelpF1Text) >>= aStr;
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 9017061..ed3c969 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2262,7 +2262,7 @@ awt::Size 
SwWW8ImplReader::MiserableDropDownFormHack(const String &rString,
 case RES_CHRATR_COLOR:
 {
 String pNm;
-if (xPropSetInfo->hasPropertyByName(pNm = C2U("TextColor")))
+if (xPropSetInfo->hasPropertyByName(pNm = "TextColor"))
 {
 aTmp <<= 
(sal_Int32)((SvxColorItem*)pItem)->GetValue().GetColor();

[Libreoffice-commits] .: sw/source

2012-12-17 Thread Libreoffice Gerrit user
 sw/source/filter/html/htmlfly.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a923084f872b8ce13f6213827fe5b1c711e6b15f
Author: Michael Stahl 
Date:   Mon Dec 17 17:44:22 2012 +0100

fdo#58286: sw HTML export: fix missing end tags on FrmFmts

SwHTMLWriter::OutFrmFmtOptions must return a value that includes the
parameter rEndTags.

(regression from 3852a6f54880af8ed9161227baa80c7d4517)

Change-Id: I280a0de57e254f75b69d08d93e23bf7c765058ec

diff --git a/sw/source/filter/html/htmlfly.cxx 
b/sw/source/filter/html/htmlfly.cxx
index cdf6292..f9761aa 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -534,7 +534,7 @@ rtl::OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt 
&rFrmFmt,
  sal_uInt32 nFrmOpts,
  const rtl::OString &rEndTags )
 {
-rtl::OString sRetEndTags;
+rtl::OString sRetEndTags(rEndTags);
 rtl::OStringBuffer sOut;
 const SfxPoolItem* pItem;
 const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
@@ -811,6 +811,7 @@ rtl::OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt 
&rFrmFmt,
 sRetEndTags = sOut.makeStringAndClear();
 }
 }
+assert(sRetEndTags.endsWith(rEndTags)); // fdo#58286
 return sRetEndTags;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-17 Thread Libreoffice Gerrit user
 sw/source/core/unocore/unostyle.cxx |   66 ++--
 sw/source/core/unocore/unotbl.cxx   |   40 ++---
 sw/source/core/unocore/unotext.cxx  |4 +-
 sw/source/core/view/vdraw.cxx   |4 +-
 sw/source/core/view/viewsh.cxx  |   20 +-
 5 files changed, 67 insertions(+), 67 deletions(-)

New commits:
commit 2bbb4b9c5bf9c61c5b0b7fdfcce5b97e04a63a8a
Author: Takeshi Abe 
Date:   Mon Dec 17 18:12:09 2012 +0900

sal_Bool to bool

Change-Id: I8fe2b267454a3a4c235e6de7f44aa127657d0429

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index e6f5abf..a1995e4 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1390,7 +1390,7 @@ void SwXStyle::setName(const OUString& rName) throw( 
uno::RuntimeException )
 pBasePool->SetSearchMask(eFamily, SFXSTYLEBIT_ALL );
 SfxStyleSheetBase* pBase = pBasePool->Find(sStyleName);
 OSL_ENSURE(pBase, "where is the style?" );
-sal_Bool bExcept = sal_True;
+bool bExcept = true;
 if(pBase && pBase->IsUserDefined())
 {
 rtl::Reference< SwDocStyleSheet > xTmp( new SwDocStyleSheet( 
*(SwDocStyleSheet*)pBase ) );
@@ -1466,7 +1466,7 @@ void SwXStyle::setParentStyle(const OUString& 
rParentStyle)
 if(pBasePool)
 {
 pBasePool->SetSearchMask(eFamily);
-sal_Bool bExcept = sal_False;
+bool bExcept = false;
 SfxStyleSheetBase* pBase = pBasePool->Find(sStyleName);
 if(pBase)
 {
@@ -1479,7 +1479,7 @@ void SwXStyle::setParentStyle(const OUString& 
rParentStyle)
 }
 }
 else
-bExcept = sal_True;
+bExcept = true;
 if(bExcept)
 throw uno::RuntimeException();
 }
@@ -2411,11 +2411,11 @@ uno::Sequence< uno::Any > SAL_CALL 
SwXStyle::GetPropertyValues_Impl(
 pPropImpl->GetProperty ( pNames[nProp], pAny );
 if( !pAny )
 {
-sal_Bool bExcept = sal_False;
+bool bExcept = false;
 switch( eFamily )
 {
 case SFX_STYLE_FAMILY_PSEUDO:
-bExcept = sal_True;
+bExcept = true;
 break;
 case SFX_STYLE_FAMILY_PARA:
 case SFX_STYLE_FAMILY_PAGE:
@@ -2436,7 +2436,7 @@ uno::Sequence< uno::Any > SAL_CALL 
SwXStyle::GetPropertyValues_Impl(
 rItem.QueryValue ( pRet[nProp], pEntry->nMemberId 
);
 }
 else
-bExcept = sal_True;
+bExcept = true;
 }
 break;
 
@@ -3069,50 +3069,50 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
 case FN_UNO_FOOTER_HEIGHT:
 case FN_UNO_FOOTER_EAT_SPACING:
 {
-sal_Bool bFooter = sal_False;
+bool bFooter = false;
 sal_uInt16 nItemType = TYPE_BOOL;
 sal_uInt16 nRes = 0;
 switch(pEntry->nWID)
 {
-case FN_UNO_FOOTER_ON:  bFooter = 
sal_True;
+case FN_UNO_FOOTER_ON:  bFooter = true;
 //kein break;
 case FN_UNO_HEADER_ON:  nRes = 
SID_ATTR_PAGE_ON;
 break;
-case FN_UNO_FOOTER_BACKGROUND:  bFooter = 
sal_True;
+case FN_UNO_FOOTER_BACKGROUND:  bFooter = true;
 // kein break;
 case FN_UNO_HEADER_BACKGROUND:  nRes = 
RES_BACKGROUND; nItemType = TYPE_BRUSH;
 break;
-case FN_UNO_FOOTER_BOX: bFooter = 
sal_True;
+case FN_UNO_FOOTER_BOX: bFooter = true;
 // kein break;
 case FN_UNO_HEADER_BOX: nRes = 
RES_BOX; nItemType = TYPE_BOX;
 break;
-case FN_UNO_FOOTER_LR_SPACE:bFooter = 
sal_True;
+case FN_UNO_FOOTER_LR_SPACE:bFooter = true;
 // kein break;
 case FN_UNO_HEADER_LR_SPACE:nRes = 
RES_LR_SPACE;nItemType = TYPE_LRSPACE;
 break;
-case FN_UNO_FOOTER_SHADOW:  bFooter = 
sal_True;
+case FN_UNO_FOOTER_SHADOW:  bFooter = true;
 // kein break;
 case FN_UNO_HEADER_SHADOW:  nRes = 
RES_SHADOW;nItemType = TYPE_SHADOW;
 break;
-  

[Libreoffice-commits] .: sw/source

2012-12-13 Thread Libreoffice Gerrit user
 sw/source/core/text/portxt.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit d3a9e97164c0071d8b18f8dcf4197ec7c5c5c2f9
Author: Caolán McNamara 
Date:   Thu Dec 13 16:35:06 2012 +

Resolves: fdo#32181 #i68503# don't emit pesky space unless in tagged pdf 
mode

which means that they are not there to be underlined

Change-Id: Ic02372c5284384e18198ebea44c36e83ccb6bf2a

diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 617cf39..d2140b6 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include  // CH_TXTATR
+#include 
 #include 
 #include 
 #include 
@@ -717,7 +718,8 @@ SwLinePortion *SwHolePortion::Compress() { return this; }
 void SwHolePortion::Paint( const SwTxtPaintInfo &rInf ) const
 {
 // #i16816# tagged pdf support
-if( rInf.GetVsh() && rInf.GetVsh()->GetViewOptions()->IsPDFExport() )
+if( rInf.GetVsh() && rInf.GetVsh()->GetViewOptions()->IsPDFExport() &&
+SwTaggedPDFHelper::IsExportTaggedPDF( *rInf.GetOut()) )
 {
 const OUString aTxt( ' ' );
 rInf.DrawText( aTxt, *this, 0, 1, false );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-11 Thread Libreoffice Gerrit user
 sw/source/filter/rtf/swparrtf.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 12ebc9c7a6e669155bd6f4dc8e40199b0e9e85df
Author: Miklos Vajna 
Date:   Tue Dec 11 11:11:28 2012 +0100

sw: splitted -> split in SwRTFReader

Change-Id: Iffa3296a15cbfaef8b7eca0648d9d954c92b3d4a

diff --git a/sw/source/filter/rtf/swparrtf.cxx 
b/sw/source/filter/rtf/swparrtf.cxx
index b64fba0..cae9fe2 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -58,7 +58,7 @@ sal_uLong SwRTFReader::Read( SwDoc &rDoc, const String& 
/*rBaseURL*/, SwPaM& rPa
 SwNodeIndex *pSttNdIdx = new SwNodeIndex(rDoc.GetNodes());
 const SwPosition* pPos = rPam.GetPoint();
 
-// Step 2: Split once and remember the node that has been splitted.
+// Step 2: Split once and remember the node that has been split.
 rDoc.SplitNode( *pPos, false );
 *pSttNdIdx = pPos->nNode.GetIndex()-1;
 
@@ -106,7 +106,7 @@ sal_uLong SwRTFReader::Read( SwDoc &rDoc, const String& 
/*rBaseURL*/, SwPaM& rPa
 ::sw::XTextRangeToSwPaM(aPam, xInsertPosition);
 if (pSttNdIdx->GetIndex())
 {
-// If we are in insert mode, join the splitted node that is in front
+// If we are in insert mode, join the split node that is in front
 // of the new content with the first new node. Or in other words:
 // Revert the first split node.
 SwTxtNode* pTxtNode = pSttNdIdx->GetNode().GetTxtNode();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-10 Thread Libreoffice Gerrit user
 sw/source/core/layout/tabfrm.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c479ccc438edeb7197a2d05bdb99067365d7bac0
Author: Michael Stahl 
Date:   Mon Dec 10 20:52:55 2012 +0100

fdo#57780: sw: lcl_ArrangeLowers: register drawing ...

... objects at the right page.  This was effectively disabled for all
anchor types except FLY_AT_PARA by a misplaced ! in the conditional,
and C++ not being a type safe language.

Change-Id: I64af2141e577ac896292eecd9f8c46c62a0548db

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 932cb2a..3945383 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4820,8 +4820,8 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long 
lYStart, bool bInva )
 if ( pTabFrm &&
  !( pTabFrm->IsFollow() &&
 pTabFrm->FindMaster()->IsRebuildLastLine() ) &&
- 
!pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId()
-== FLY_AS_CHAR )
+
(pAnchoredObj->GetFrmFmt().GetAnchor().GetAnchorId()
+!= FLY_AS_CHAR))
 {
 SwPageFrm* pPageFrm = pAnchoredObj->GetPageFrm();
 SwPageFrm* pPageOfAnchor = pFrm->FindPageFrm();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source writerfilter/source

2012-12-10 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/docxattributeoutput.cxx  |8 
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 1b0d9fa747c4a7fcdcd1c057bc2b31345f4bfe76
Author: Lennard 
Date:   Sun Dec 9 16:29:47 2012 +0100

docx import/export non-breaking hyphen and soft hyphen

God made non-breaking hyphen
and saw that it was gone
he told us to fix it as soon as hell
we promised that we would


Change-Id: I1d2bb8f7542f5ffec36fafdbdb07ace1cb62fb4a
Signed-off-by: Lennard 
Reviewed-on: https://gerrit.libreoffice.org/1279
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8414e60..29bef4a 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1062,6 +1062,14 @@ void DocxAttributeOutput::RunText( const String& rText, 
rtl_TextEncoding /*eChar
 impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt );
 m_pSerializer->singleElementNS( XML_w, XML_br, FSEND );
 break;
+case 0x1E: //non-breaking hyphen
+impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt );
+m_pSerializer->singleElementNS( XML_w, XML_noBreakHyphen, 
FSEND );
+break;
+case 0x1F: //soft (on demand) hyphen
+impl_WriteRunText( m_pSerializer, nTextToken, pBegin, pIt );
+m_pSerializer->singleElementNS( XML_w, XML_softHyphen, FSEND );
+break;
 default:
 if ( *pIt < 0x0020 ) // filter out the control codes
 {
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx 
b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index c6f03bb..37c3336 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -44,8 +44,8 @@ static const sal_Unicode uFtnEdnRef = 0x2;
 static const sal_Unicode uFtnEdnSep = 0x3;
 static const sal_Unicode uTab = 0x9;
 static const sal_Unicode uPgNum = 0x0;
-static const sal_Unicode uNoBreakHyphen = 0x1e;
-static const sal_Unicode uSoftHyphen = 0x1f;
+static const sal_Unicode uNoBreakHyphen = 0x2011;
+static const sal_Unicode uSoftHyphen = 0xAD;
 
 static const sal_uInt8 cFtnEdnCont = 0x4;
 static const sal_uInt8 cFieldStart = 0x13;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-10 Thread Libreoffice Gerrit user
 sw/source/core/inc/txtfrm.hxx |5 -
 sw/source/core/text/txtio.cxx |   18 +++---
 2 files changed, 3 insertions(+), 20 deletions(-)

New commits:
commit 9d09dcfd23e70adb4834253f697c479dab4cf673
Author: Takeshi Abe 
Date:   Sun Dec 9 20:08:29 2012 +0900

IsDbg() is no longer called

Change-Id: Id1860de882a4999eaa7fc253e1332f1c298f287f
Reviewed-on: https://gerrit.libreoffice.org/1277
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 8081724..9a28e02 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -646,11 +646,6 @@ inline SwTwips SwTxtFrm::GrowTst( const SwTwips nGrow )
 return Grow( nGrow, sal_True );
 }
 
-#ifdef DBG_UTIL
-// query WYSIWYG DBG
-extern sal_Bool IsDbg( const SwTxtFrm *pFrm );
-#endif
-
 inline sal_Bool SwTxtFrm::IsInside( const xub_StrLen nPos ) const
 {
 sal_Bool bRet = sal_True;
diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx
index 01a9099..8ff53f1 100644
--- a/sw/source/core/text/txtio.cxx
+++ b/sw/source/core/text/txtio.cxx
@@ -20,10 +20,10 @@
 
 #ifdef DBG_UTIL
 
-#include "viewsh.hxx"   // IsDbg()
-#include "viewopt.hxx"  // IsDbg()
+#include "viewsh.hxx"
+#include "viewopt.hxx"
 #include "txtatr.hxx"
-#include "txtfrm.hxx"   // IsDbg()
+#include "txtfrm.hxx"
 #include "rootfrm.hxx"
 #include "flyfrms.hxx"
 #include "inftxt.hxx"
@@ -53,18 +53,6 @@ SvStream &operator<<( SvStream &rOs, const SwpHints & ) //$ 
ostream
 return rOs;
 }
 
-/*
- *  IsDbg()
- */
-
-sal_Bool IsDbg( const SwTxtFrm *pFrm )
-{
-if( pFrm && pFrm->getRootFrm()->GetCurrShell() )
-return pFrm->getRootFrm()->GetCurrShell()->GetViewOptions()->IsTest4();
-else
-return sal_False;
-}
-
 #if OSL_DEBUG_LEVEL < 2
 
 static void Error()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-10 Thread Libreoffice Gerrit user
 sw/source/ui/config/optload.cxx |   12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 5cb4004a443910c6eefb0b58f1fc4ed3e20ba36c
Author: Jack Leigh 
Date:   Sat Dec 8 21:12:23 2012 +

fdo#38895 fix toggling of numbering separator on Autocaption page

Only enable the Edit box if the overall option is enabled

Change-Id: Ica0f973d22b89a37bd690c285d7cc0ae5204b7a8
Reviewed-on: https://gerrit.libreoffice.org/1272
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index f3fd604..fbdd800 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -819,9 +819,17 @@ IMPL_LINK_NOARG_INLINE_END(SwCaptionOptPage, SelectHdl)
 IMPL_LINK( SwCaptionOptPage, OrderHdl, ListBox*, pBox )
 {
 DrawSample();
+
+SvTreeListEntry* pSelEntry = aCheckLB.FirstSelected();
+sal_Bool bChecked = sal_False;
+if (pSelEntry)
+{
+bChecked = 
aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pSelEntry));
+}
+
 sal_Int32 nPos = pBox->GetSelectEntryPos();
-aNumberingSeparatorFT.Enable( nPos == 1 );
-aNumberingSeparatorED.Enable( nPos == 1 );
+aNumberingSeparatorFT.Enable( bChecked && nPos == 1 );
+aNumberingSeparatorED.Enable( bChecked && nPos == 1 );
 return 0;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-10 Thread Libreoffice Gerrit user
 sw/source/core/access/accpara.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9aec18854afb1ec2d28c334861924ad6eacf26af
Author: Herbert Duerr 
Date:   Mon Dec 10 02:08:46 2012 -0600

i121446:fix SwAccessibleParagraph::GetGlyphBoundary()'s ret val

Change-Id: I651ed02aa65b556c2315c8d9ed49ab7dc59687c8

diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index 6d0b596..a66aeb5 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -730,7 +730,7 @@ sal_Bool SwAccessibleParagraph::GetGlyphBoundary(
  rText, nPos, aLocale, nIterMode, 1, nDone );
 rBound.startPos = pBreakIt->GetBreakIter()->previousCharacters(
  rText, rBound.endPos, aLocale, nIterMode, 1, nDone );
-
+bRet = ((rBound.startPos <= nPos) && (nPos <= rBound.endPos));
 OSL_ENSURE( rBound.startPos <= nPos, "start pos too high" );
 OSL_ENSURE( rBound.endPos >= nPos, "end pos too low" );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-07 Thread Libreoffice Gerrit user
 sw/source/ui/frmdlg/cption.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit dd629829c78c294ccbc93c885bbaae11bb72b20b
Author: Jack Leigh 
Date:   Fri Dec 7 15:30:45 2012 +

don't display caption number separator on category 'None'

Change-Id: Id01fb900a3e558d5f9d4613e18f3761cf6a670bf
Reviewed-on: https://gerrit.libreoffice.org/1265
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index f9a3f5b..5d7f6eb 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -278,12 +278,17 @@ void SwCaptionDialog::Apply()
 aOpt.UseCaption() = sal_True;
 String aName( aCategoryBox.GetText() );
 if ( aName == sNone )
+{
 aOpt.SetCategory( aEmptyStr );
+aOpt.SetNumSeparator( aEmptyStr );
+}
 else
+{
 aOpt.SetCategory(comphelper::string::strip(aName, ' '));
+aOpt.SetNumSeparator( aNumberingSeparatorED.GetText() );
+}
 aOpt.SetNumType( (sal_uInt16)(sal_uIntPtr)aFormatBox.GetEntryData( 
aFormatBox.GetSelectEntryPos() ) );
 aOpt.SetSeparator( aSepEdit.IsEnabled() ? aSepEdit.GetText() : String() );
-aOpt.SetNumSeparator( aNumberingSeparatorED.GetText() );
 aOpt.SetCaption( aTextEdit.GetText() );
 aOpt.SetPos( aPosBox.GetSelectEntryPos() );
 aOpt.IgnoreSeqOpts() = sal_True;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-07 Thread Libreoffice Gerrit user
 sw/source/core/text/porrst.cxx   |   10 +-
 sw/source/core/text/porrst.hxx   |   10 +-
 sw/source/core/text/portab.hxx   |2 +-
 sw/source/core/text/portxt.cxx   |6 +++---
 sw/source/core/text/redlnitr.hxx |8 
 sw/source/core/text/txtdrop.cxx  |   16 
 sw/source/core/text/txtfly.cxx   |   18 +-
 sw/source/core/text/txtfrm.cxx   |   34 +-
 sw/source/core/text/txtftn.cxx   |   34 +-
 9 files changed, 69 insertions(+), 69 deletions(-)

New commits:
commit a25b3dd6c474f2a496c0ba2b1d24926ea60417da
Author: Takeshi Abe 
Date:   Fri Dec 7 23:46:54 2012 +0900

sal_Bool to bool

Change-Id: I4f4778ff0bb14ddb3e4ae5f9b76104fc8bed

diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 7c03572..cb35c4c 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -126,7 +126,7 @@ void SwBreakPortion::HandlePortion( SwPortionHandler& rPH ) 
const
 
 
 SwKernPortion::SwKernPortion( SwLinePortion &rPortion, short nKrn,
-  sal_Bool bBG, sal_Bool bGK ) :
+  bool bBG, bool bGK ) :
 nKern( nKrn ), bBackground( bBG ), bGridKern( bGK )
 {
 Height( rPortion.Height() );
@@ -139,7 +139,7 @@ SwKernPortion::SwKernPortion( SwLinePortion &rPortion, 
short nKrn,
 }
 
 SwKernPortion::SwKernPortion( const SwLinePortion& rPortion ) :
-nKern( 0 ), bBackground( sal_False ), bGridKern( sal_True )
+nKern( 0 ), bBackground( false ), bGridKern( true )
 {
 Height( rPortion.Height() );
 SetAscent( rPortion.GetAscent() );
@@ -191,7 +191,7 @@ void SwKernPortion::FormatEOL( SwTxtFormatInfo &rInf )
 }
 
 SwArrowPortion::SwArrowPortion( const SwLinePortion &rPortion ) :
-bLeft( sal_True )
+bLeft( true )
 {
 Height( rPortion.Height() );
 SetAscent( rPortion.GetAscent() );
@@ -200,7 +200,7 @@ SwArrowPortion::SwArrowPortion( const SwLinePortion 
&rPortion ) :
 }
 
 SwArrowPortion::SwArrowPortion( const SwTxtPaintInfo &rInf )
-: bLeft( sal_False )
+: bLeft( false )
 {
 Height( (sal_uInt16)(rInf.GetTxtFrm()->Prt().Height()) );
 aPos.X() = rInf.GetTxtFrm()->Frm().Left() +
@@ -320,7 +320,7 @@ sal_Bool SwTxtFrm::FormatEmpty()
 {
 SwTxtFly aTxtFly( this );
 SwRect aRect;
-sal_Bool bFirstFlyCheck = 0 != Prt().Height();
+bool bFirstFlyCheck = 0 != Prt().Height();
 if ( !bCollapse && bFirstFlyCheck &&
  aTxtFly.IsOn() && aTxtFly.IsAnyObj( aRect ) )
 return sal_False;
diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx
index 38edfcb..e613f57 100644
--- a/sw/source/core/text/porrst.hxx
+++ b/sw/source/core/text/porrst.hxx
@@ -66,8 +66,8 @@ public:
 class SwKernPortion : public SwLinePortion
 {
 short nKern;
-sal_Bool bBackground;
-sal_Bool bGridKern;
+bool bBackground;
+bool bGridKern;
 
 public:
 
@@ -77,7 +77,7 @@ public:
 // bGridKern indicates, that the kerning portion is used to provide
 // additional space in grid mode.
 SwKernPortion( SwLinePortion &rPortion, short nKrn,
-   sal_Bool bBG = sal_False, sal_Bool bGridKern = sal_False );
+   bool bBG = false, bool bGridKern = false );
 
 // This constructor only sets the height and ascent to the values
 // of rPortion. It is only used for kerning portions for grid mode
@@ -96,13 +96,13 @@ public:
 class SwArrowPortion : public SwLinePortion
 {
 Point aPos;
-sal_Bool bLeft;
+bool bLeft;
 public:
 SwArrowPortion( const SwLinePortion &rPortion );
 SwArrowPortion( const SwTxtPaintInfo &rInf );
 virtual void Paint( const SwTxtPaintInfo &rInf ) const;
 virtual SwLinePortion *Compress();
-inline sal_Bool IsLeft() const { return bLeft; }
+inline bool IsLeft() const { return bLeft; }
 inline const Point& GetPos() const { return aPos; }
 OUTPUT_OPERATOR
 };
diff --git a/sw/source/core/text/portab.hxx b/sw/source/core/text/portab.hxx
index 63a8f37..75841be 100644
--- a/sw/source/core/text/portab.hxx
+++ b/sw/source/core/text/portab.hxx
@@ -41,7 +41,7 @@ public:
 sal_Bool PostFormat( SwTxtFormatInfo &rInf );
 inline  sal_Bool IsFilled() const { return 0 != cFill; }
 inline  KSHORT GetTabPos() const { return nTabPos; }
-inline  sal_Bool IsAutoTabStop() const { return bAutoTabStop; }
+inline  bool IsAutoTabStop() const { return bAutoTabStop; }
 
 // Accessibility: pass information about this portion to the PortionHandler
 virtual void HandlePortion( SwPortionHandler& rPH ) const;
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 3f5934a..617cf39 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -150,7 +150,7 @@ static sal_uInt16 lcl_AddSpace( const SwTxtSizeInfo &rInf, 
const XubString* pStr
 // Here star

[Libreoffice-commits] .: sw/source

2012-12-07 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/writerwordglue.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 7d88aac6029353c293dfdacbfa462d62c0da69ea
Author: Luke Deller 
Date:   Wed Dec 5 23:09:38 2012 +1100

fix for fdo#57551: landscape/portrait sequence lost in FILESAVE as .doc

Change-Id: I4d888fc7e9b68ee4c693b565d8ef23dcb825f7ce
Reviewed-on: https://gerrit.libreoffice.org/1251
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/filter/ww8/writerwordglue.cxx 
b/sw/source/filter/ww8/writerwordglue.cxx
index 3ae8a1c..2af44cd 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -349,6 +349,8 @@ namespace sw
 const SwColumns& rFollowColumns = rFollowCols.GetColumns();
 const SvxLRSpaceItem &rOneLR = rTitleFmt.GetLRSpace();
 const SvxLRSpaceItem &rTwoLR= rFollowFmt.GetLRSpace();
+const SwFmtFrmSize& rFirstFrmSize = rTitleFmt.GetFrmSize();
+const SwFmtFrmSize& rFollowFrmSize = rFollowFmt.GetFrmSize();
 
 if (rFirstColumns.size() != rFollowColumns.size())
 {
@@ -357,6 +359,8 @@ namespace sw
 }
 else if (rOneLR != rTwoLR)
 bPlausableTitlePage = false;
+else if (rFirstFrmSize != rFollowFrmSize)
+bPlausableTitlePage = false;
 else
 {
 HdFtDistanceGlue aOne(rTitleFmt.GetAttrSet());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-07 Thread Libreoffice Gerrit user
 sw/source/ui/shells/txtattr.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit d4ca0036d723963b1874901f7185072a70789a99
Author: Caolán McNamara 
Date:   Fri Dec 7 12:52:43 2012 +

eEscape can never be FN_SET_SUPER_SCRIPT

orthogonal enum and slot id things

If it was supposed to be if(eEscape == SVX_ESCAPEMENT_SUPERSCRIPT) then 
setting
superscript would instead sets subscript. Seeing as this is wrong since day 0
and the code should never goes into that branch I reckon its a forgotten
remnant from before superscript was implemented as it is now and its better 
to
remove the code entirely

Change-Id: I73010cf9428c96dfc75033c138694c5781a73c50

diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx
index a746419..6802fe5 100644
--- a/sw/source/ui/shells/txtattr.cxx
+++ b/sw/source/ui/shells/txtattr.cxx
@@ -123,11 +123,6 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
 aEscape.GetEsc() = DFLT_ESC_AUTO_SUPER;
 else if(eEscape == SVX_ESCAPEMENT_SUBSCRIPT)
 aEscape.GetEsc() = DFLT_ESC_AUTO_SUB;
-if(eState != STATE_OFF )
-{
-if(eEscape == FN_SET_SUPER_SCRIPT)
-aEscape.GetEsc() *= -1;
-}
 rSh.SetAttr( aEscape );
 rReq.AppendItem( aEscape );
 rReq.Done();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-07 Thread Libreoffice Gerrit user
 sw/source/filter/rtf/swparrtf.cxx |   48 --
 sw/source/filter/rtf/swparrtf.hxx |7 -
 2 files changed, 55 deletions(-)

New commits:
commit 8dd1581a4f65eacc2a0f62b79873b533e8237a43
Author: Miklos Vajna 
Date:   Fri Dec 7 10:13:06 2012 +0100

sw: unused RtfReader

diff --git a/sw/source/filter/rtf/swparrtf.cxx 
b/sw/source/filter/rtf/swparrtf.cxx
index 13216ca..75f0a45 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -225,54 +225,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL 
ImportRTF()
 return new SwRTFReader();
 }
 
-// Aufruf fuer die allg. Reader-Schnittstelle
-sal_uLong RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, 
const String &)
-{
-if( !pStrm )
-{
-OSL_FAIL( "RTF-Read ohne Stream" );
-return ERR_SWG_READ_ERROR;
-}
-
-if( !bInsertMode )
-{
-// MIB 27.09.96: Umrandung uns Abstaende aus Frm-Vorlagen entf.
-Reader::ResetFrmFmts( rDoc );
-}
-
-sal_uLong nRet = 0;
-SwDocShell *pDocShell(rDoc.GetDocShell());
-OSL_ENSURE(pDocShell, "no SwDocShell");
-uno::Reference xDocProps;
-if (pDocShell) {
-uno::Reference xDPS(
-pDocShell->GetModel(), uno::UNO_QUERY_THROW);
-xDocProps.set(xDPS->getDocumentProperties());
-}
-
-SvParserRef xParser = new SwRTFParser( &rDoc, xDocProps,
-rPam, *pStrm, rBaseURL, !bInsertMode );
-SvParserState eState = xParser->CallParser();
-if( SVPAR_PENDING != eState && SVPAR_ACCEPTED != eState )
-{
-String sErr( String::CreateFromInt32( xParser->GetLineNr() ));
-sErr += ',';
-sErr += String::CreateFromInt32( xParser->GetLinePos() );
-
-nRet = *new StringErrorInfo( ERR_FORMAT_ROWCOL, sErr,
-ERRCODE_BUTTON_OK | ERRCODE_MSG_ERROR );
-}
-
-
-return nRet;
-}
-
-sal_uLong RtfReader::Read(SvStream* pStream, SwDoc& rDoc, const String& 
rBaseURL, SwPaM& rPam)
-{
-pStrm = pStream;
-return Read(rDoc, rBaseURL, rPam, rBaseURL);
-}
-
 SwRTFParser::SwRTFParser(SwDoc* pD,
 uno::Reference i_xDocProps,
 const SwPaM& rCrsr, SvStream& rIn, const String& rBaseURL,
diff --git a/sw/source/filter/rtf/swparrtf.hxx 
b/sw/source/filter/rtf/swparrtf.hxx
index b60dc50..1ff1cbf 100644
--- a/sw/source/filter/rtf/swparrtf.hxx
+++ b/sw/source/filter/rtf/swparrtf.hxx
@@ -57,13 +57,6 @@ class SwNodeNum;
 class SwTxtNode;
 struct SvxRTFPictureType;
 
-class RtfReader: public Reader
-{
-virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const 
String &);
-public:
-virtual sal_uLong Read( SvStream* pStrm, SwDoc &, const String& rBaseURL, 
SwPaM &);
-};
-
 class SwNodeIdx : public SvxNodeIdx
 {
 SwNodeIndex aIdx;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-06 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/docxattributeoutput.cxx |   14 ++--
 sw/source/filter/ww8/rtfexport.cxx   |3 
 sw/source/filter/ww8/writerwordglue.cxx  |2 
 sw/source/filter/ww8/wrtw8esh.cxx|4 -
 sw/source/filter/ww8/wrtw8nds.cxx|   28 
 sw/source/filter/ww8/wrtww8gr.cxx|4 -
 sw/source/filter/ww8/ww8atr.cxx  |   92 +--
 sw/source/filter/ww8/ww8par5.cxx |8 +-
 sw/source/filter/ww8/ww8scan.cxx |2 
 sw/source/filter/ww8/ww8scan.hxx |7 --
 10 files changed, 78 insertions(+), 86 deletions(-)

New commits:
commit 4839c0ab201fd4dd7b32a5d6c9f6e202a88ad09d
Author: Miklos Vajna 
Date:   Thu Dec 6 12:41:46 2012 +0100

sw: kill RTL_CONSTASCII_STRINGPARAM and friends in ww8 filters

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index b4dbee9..8414e60 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -847,9 +847,9 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos 
)
 m_pSerializer->endElementNS( XML_w, XML_r );
 
 rInfos.sCmd = FieldString( ww::eREF );
-rInfos.sCmd.APPEND_CONST_ASC( "\"" );
+rInfos.sCmd.AppendAscii( "\"" );
 rInfos.sCmd += m_sFieldBkm;
-rInfos.sCmd.APPEND_CONST_ASC( "\" " );
+rInfos.sCmd.AppendAscii( "\" " );
 
 // Clean the field bookmark data to avoid infinite loop
 m_sFieldBkm = String( );
@@ -1166,16 +1166,16 @@ bool DocxAttributeOutput::AnalyzeURL( const String& 
rUrl, const String& rTarget,
 else
 {
 String sFld( FieldString( ww::eHYPERLINK ) );
-sFld.APPEND_CONST_ASC( "\"" );
+sFld.AppendAscii( "\"" );
 sURL.Insert( sFld, 0 );
 sURL += '\"';
 }
 
 if ( sMark.Len() )
-( ( sURL.APPEND_CONST_ASC( " \\l \"" ) ) += sMark ) += '\"';
+( ( sURL.AppendAscii( " \\l \"" ) ) += sMark ) += '\"';
 
 if ( rTarget.Len() )
-( sURL.APPEND_CONST_ASC( " \\n " ) ) += rTarget;
+( sURL.AppendAscii( " \\n " ) ) += rTarget;
 }
 
 *pLinkURL = sURL;
@@ -3545,9 +3545,9 @@ void DocxAttributeOutput::RefField( const SwField&  rFld, 
const String& rRef )
 if ( nType == RES_GETEXPFLD )
 {
 String sCmd = FieldString( ww::eREF );
-sCmd.APPEND_CONST_ASC( "\"" );
+sCmd.AppendAscii( "\"" );
 sCmd += rRef;
-sCmd.APPEND_CONST_ASC( "\" " );
+sCmd.AppendAscii( "\" " );
 
 m_rExport.OutputField( &rFld, ww::eREF, sCmd );
 }
diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index 8259d59..0d874d8 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -245,8 +245,7 @@ void RtfExport::WriteRevTab()
 return;
 
 // RTF always seems to use Unknown as the default first entry
-String sUnknown(RTL_CONSTASCII_USTRINGPARAM("Unknown"));
-GetRedline(sUnknown);
+GetRedline(OUString("Unknown"));
 
 for( sal_uInt16 i = 0; i < pDoc->GetRedlineTbl().size(); ++i )
 {
diff --git a/sw/source/filter/ww8/writerwordglue.cxx 
b/sw/source/filter/ww8/writerwordglue.cxx
index 9a843dd..3ae8a1c 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -46,7 +46,7 @@
 #include//pBreakIt
 #include 
 
-#define ASSIGN_CONST_ASC(s) AssignAscii(RTL_CONSTASCII_STRINGPARAM(s))
+#define ASSIGN_CONST_ASC(s) AssignAscii(s)
 
 namespace myImplHelpers
 {
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx 
b/sw/source/filter/ww8/wrtw8esh.cxx
index 6262238..719d8e6 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -2844,9 +2844,9 @@ bool SwMSConvertControls::ExportControl(WW8Export 
&rWW8Wrt, const SdrObject *pOb
 Set_UInt32(pData,nObjId );
 
 String sFld(FieldString(ww::eCONTROL));
-sFld.APPEND_CONST_ASC("Forms.");
+sFld.AppendAscii("Forms.");
 sFld += sName;
-sFld.APPEND_CONST_ASC(".1 \\s ");
+sFld.AppendAscii(".1 \\s ");
 
 rWW8Wrt.OutputField(0, ww::eCONTROL, sFld,
 WRITEFIELD_START|WRITEFIELD_CMD_START|WRITEFIELD_CMD_END);
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 9320e70..aabd3f3 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -627,7 +627,7 @@ const SfxPoolItem& SwWW8AttrIter::GetItem(sal_uInt16 
nWhich) const
 void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen 
/*nPos*/, const SwFmtRuby& rRuby )
 {
 String aStr( FieldString( ww::eEQ ) );
-aStr.APPEND_CONST_ASC( "\\* jc" );
+aStr.AppendAscii( "\\* jc" );
 sal_Int32 nJC = 0;
 sal_Char cDirective = 0;
 switch ( rRuby.GetAdjustment() )
@@ -701,17 +701,17 @@ void

[Libreoffice-commits] .: sw/source

2012-12-04 Thread Libreoffice Gerrit user
 sw/source/core/text/frminf.cxx   |4 -
 sw/source/core/text/frmpaint.cxx |   53 +
 sw/source/core/text/guess.cxx|8 +--
 sw/source/core/text/guess.hxx|2 
 sw/source/core/text/inftxt.cxx   |   28 ++---
 sw/source/core/text/inftxt.hxx   |   80 +++
 sw/source/core/text/itrcrsr.cxx  |   12 ++---
 sw/source/core/text/itrform2.cxx |   10 ++--
 sw/source/core/text/itrpaint.cxx |4 -
 sw/source/core/text/itrtxt.cxx   |2 
 sw/source/core/text/itrtxt.hxx   |2 
 sw/source/core/text/porexp.hxx   |8 +--
 sw/source/core/text/porfld.cxx   |2 
 sw/source/core/text/pormulti.cxx |   10 ++--
 sw/source/core/text/pormulti.hxx |8 +--
 sw/source/core/text/portxt.cxx   |   12 ++---
 sw/source/core/text/txtftn.cxx   |2 
 17 files changed, 124 insertions(+), 123 deletions(-)

New commits:
commit 2e053cf5ea4d93a2e1845e795a9c7fe1e08c84af
Author: Takeshi Abe 
Date:   Wed Dec 5 08:33:07 2012 +0900

sal_Bool to bool

Change-Id: Ic1cc3312e61e602c33be7444f8d4bbad9268ae77

diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx
index c8f13c2..4d4f243 100644
--- a/sw/source/core/text/frminf.cxx
+++ b/sw/source/core/text/frminf.cxx
@@ -213,7 +213,7 @@ void SwTxtFrmInfo::GetSpaces( SwPaM &rPam, sal_Bool 
bWithLineBreak ) const
 SwTxtSizeInfo aInf( (SwTxtFrm*)pFrm );
 SwTxtMargin aLine( (SwTxtFrm*)pFrm, &aInf );
 SwPaM *pPam = &rPam;
-sal_Bool bFirstLine = sal_True;
+bool bFirstLine = true;
 do {
 
 if( aLine.GetCurr()->GetLen() )
@@ -240,7 +240,7 @@ void SwTxtFrmInfo::GetSpaces( SwPaM &rPam, sal_Bool 
bWithLineBreak ) const
 }
 }
 }
-bFirstLine = sal_False;
+bFirstLine = false;
 }
 while( aLine.Next() );
 }
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index f5a1341..78a59c4 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -68,7 +68,7 @@ using namespace ::com::sun::star;
 
 
 
-sal_Bool bInitFont = sal_True;
+bool bInitFont = true;
 
 class SwExtraPainter
 {
@@ -82,28 +82,28 @@ class SwExtraPainter
 SwTwips nRedX;
 sal_uLong nLineNr;
 MSHORT nDivider;
-sal_Bool bGoLeft;
-sal_Bool bLineNum;
+bool bGoLeft;
+bool bLineNum;
 inline sal_Bool IsClipChg() { return aClip.IsChg(); }
 public:
 SwExtraPainter( const SwTxtFrm *pFrm, ViewShell *pVwSh,
 const SwLineNumberInfo &rLnInf, const SwRect &rRct,
-sal_Int16 eHor, sal_Bool bLnNm );
+sal_Int16 eHor, bool bLnNm );
 ~SwExtraPainter() { delete pFnt; }
 inline SwFont* GetFont() const { return pFnt; }
 inline void IncLineNr() { ++nLineNr; }
-inline sal_Bool HasNumber() { return !( nLineNr % rLineInf.GetCountBy() ); 
}
-inline sal_Bool HasDivider() { if( !nDivider ) return sal_False;
+inline bool HasNumber() { return !( nLineNr % rLineInf.GetCountBy() ); }
+inline bool HasDivider() { if( !nDivider ) return false;
 return !(nLineNr % rLineInf.GetDividerCountBy()); }
 
-void PaintExtra( SwTwips nY, long nAsc, long nMax, sal_Bool bRed );
+void PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed );
 void PaintRedline( SwTwips nY, long nMax );
 };
 
 
 SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, ViewShell *pVwSh,
 const SwLineNumberInfo &rLnInf, const SwRect &rRct,
-sal_Int16 eHor, sal_Bool bLnNm )
+sal_Int16 eHor, bool bLnNm )
 : aClip( pVwSh->GetWin() || pFrm->IsUndersized() ? pVwSh->GetOut() : 0 ),
   aRect( rRct ), pTxtFrm( pFrm ), pSh( pVwSh ), pFnt( 0 ), rLineInf( 
rLnInf ),
   nLineNr( 1L ), bLineNum( bLnNm )
@@ -151,17 +151,17 @@ SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, 
ViewShell *pVwSh,
 }
 if( LINENUMBER_POS_LEFT == ePos )
 {
-bGoLeft = sal_True;
+bGoLeft = true;
 nX -= rLineInf.GetPosFromLeft();
 if( nX < aRect.Left() )
-bLineNum = sal_False;
+bLineNum = false;
 }
 else
 {
-bGoLeft = sal_False;
+bGoLeft = false;
 nX += pFrm->Frm().Width() + rLineInf.GetPosFromLeft();
 if( nX > aRect.Right() )
-bLineNum = sal_False;
+bLineNum = false;
 }
 }
 if( eHor != text::HoriOrientation::NONE )
@@ -183,7 +183,7 @@ SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, 
ViewShell *pVwSh,
 }
 }
 
-void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, sal_Bool 
bRed )
+void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, bool bRed )
 {
   // Line number is stronger than the divider
 const XubString aTmp( HasNumber() ? rLineInf.GetNumType().GetNumStr( 
nLineNr )
@@ -204,7 +204,7 @@ void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, 
lo

[Libreoffice-commits] .: sw/source

2012-12-04 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/docxattributeoutput.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 67f42de08bb5d075d554cf5aa1a4c106fe9e4f5c
Author: Eilidh McAdam 
Date:   Thu Nov 15 13:57:47 2012 +

Export finely dashed borders to docx.

Change-Id: I4a65f8e874abe406a9cd2d3a088ea52f0850088f
Reviewed-on: https://gerrit.libreoffice.org/1124
Reviewed-by: Fridrich Strba 
Tested-by: Fridrich Strba 

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index b55daeb..b4dbee9 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1398,6 +1398,9 @@ static void impl_borderLine( FSHelperPtr pSerializer, 
sal_Int32 elementToken, co
 case table::BorderLineStyle::INSET:
 pVal = ( sal_Char* )"inset";
 break;
+case table::BorderLineStyle::FINE_DASHED:
+pVal = ( sal_Char* )"dashSmallGap";
+break;
 case table::BorderLineStyle::NONE:
 default:
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-12-03 Thread Libreoffice Gerrit user
 sw/source/core/layout/trvlfrm.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit ece13b024a34ffe46ee8d8fca4eadfec86bf2bf7
Author: Julien Nabet 
Date:   Mon Dec 3 22:08:26 2012 +0100

Related: fdo#57515 Crash when creating a Table of Contents

Change-Id: Idfdb62e495987a15bc5fc36548074ced7426e21c

diff --git a/sw/source/core/layout/trvlfrm.cxx 
b/sw/source/core/layout/trvlfrm.cxx
index cbcdc52..a70b08d 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -294,10 +294,13 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point 
&rPoint,
 // FIXME There are still cases were we don't have the proper 
node here.
 SwCntntFrm* pBackFrm = pBackNd->getLayoutFrm( getRootFrm( ) );
 SwRect rBackRect;
-pBackFrm->GetCharRect( rBackRect, aBackPos );
+if (pBackFrm)
+{
+pBackFrm->GetCharRect( rBackRect, aBackPos );
 
-nBackDistance = lcl_getDistance( rBackRect, rPoint );
-bValidBackDistance = true;
+nBackDistance = lcl_getDistance( rBackRect, rPoint );
+bValidBackDistance = true;
+}
 }
 
 if ( bValidTextDistance && bValidBackDistance && 
basegfx::fTools::more( nTextDistance, nBackDistance ) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-11-30 Thread Libreoffice Gerrit user
 sw/source/filter/rtf/swparrtf.cxx |6 --
 1 file changed, 6 deletions(-)

New commits:
commit ed654c4aa7f9f10fcb16127349009bc0c38b12e8
Author: Miklos Vajna 
Date:   Fri Nov 30 17:37:08 2012 +0100

Revert "fdo#43869 use the old rtf importer for paste"

This reverts commit bb147bbb801b53dba8928340df7e2aa2d4545349. It's no
longer needed, now the new importer supports importing to an existing
document.

diff --git a/sw/source/filter/rtf/swparrtf.cxx 
b/sw/source/filter/rtf/swparrtf.cxx
index 8f5a554..13216ca 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -26,7 +26,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -223,11 +222,6 @@ sal_uLong SwRTFReader::Read( SwDoc &rDoc, const String& 
/*rBaseURL*/, SwPaM& rPa
 
 extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportRTF()
 {
-// Use the old rtf importer by default for paste, till the new one supports
-// undo stack and PaM.
-SvtMiscOptions aMiscOptions;
-if (!aMiscOptions.IsExperimentalMode())
-return new RtfReader();
 return new SwRTFReader();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-11-30 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/wrtw8sty.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit accebf15ae5d8f93399cbe93ea4e8ba22aedd5d2
Author: Michael Stahl 
Date:   Fri Nov 30 11:44:40 2012 +0100

wrtw8sty.cxx: convert anachronistic SvArray calls

... which came in via caaeb0a046a0c712224c21e3e8531e67efd4216f

Change-Id: I76066f1847075e645f4847c9ce44a599ed8703f4

diff --git a/sw/source/filter/ww8/wrtw8sty.cxx 
b/sw/source/filter/ww8/wrtw8sty.cxx
index 8a898f0..f002c1f 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1802,7 +1802,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
 
 void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
 {
-OSL_ENSURE(m_SectionAttributes.size() == 
static_cast(aSects.Count())
+OSL_ENSURE(m_SectionAttributes.size() == static_cast(aSects.size())
 , "WriteSepx(): arrays out of sync!");
 for (size_t i = 0; i < m_SectionAttributes.size(); i++) // all sections
 {
@@ -1820,7 +1820,7 @@ void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
 
 void WW8_WrPlcSepx::WritePlcSed( WW8Export& rWrt ) const
 {
-OSL_ENSURE(m_SectionAttributes.size() == 
static_cast(aSects.Count())
+OSL_ENSURE(m_SectionAttributes.size() == static_cast(aSects.size())
 , "WritePlcSed(): arrays out of sync!");
 OSL_ENSURE( aCps.size() == aSects.size() + 1, "WrPlcSepx: DeSync" );
 sal_uLong nFcStart = rWrt.pTableStrm->Tell();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-11-29 Thread Libreoffice Gerrit user
 sw/source/core/layout/ssfrm.cxx |   18 
 sw/source/core/layout/tabfrm.cxx|   67 +++
 sw/source/core/layout/trvlfrm.cxx   |   10 ++--
 sw/source/core/layout/wsfrm.cxx |   68 
 sw/source/core/ole/ndole.cxx|4 -
 sw/source/core/swg/SwXMLTextBlocks.cxx  |2 
 sw/source/core/swg/SwXMLTextBlocks1.cxx |2 
 sw/source/core/swg/swblocks.cxx |4 -
 8 files changed, 87 insertions(+), 88 deletions(-)

New commits:
commit dffb58f927ed68b58de1d5d6ad0df6549eb21d70
Author: Takeshi Abe 
Date:   Fri Nov 30 08:49:55 2012 +0900

sal_Bool to bool

Change-Id: I3b201985d204995c4b9eb707e7ef650c55985751

diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 177cd4d..c27e2cb 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -227,7 +227,7 @@ void SwFrm::CheckDirChange()
 sal_Bool bOldR2L = GetRightToLeftFlag();
 SetInvalidVert( sal_True );
 SetInvalidR2L( sal_True );
-sal_Bool bChg = bOldR2L != IsRightToLeft();
+bool bChg = bOldR2L != IsRightToLeft();
 //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint 
with Jiayanmin
 sal_Bool bOldVertL2R = IsVertLR();
 if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || 
bOldVertL2R != IsVertLR() )
@@ -675,8 +675,8 @@ const SwRect SwFrm::PaintArea() const
 long nRight = (aRect.*fnRect->fnGetRight)();
 long nLeft  = (aRect.*fnRect->fnGetLeft)();
 const SwFrm* pTmp = this;
-sal_Bool bLeft = sal_True;
-sal_Bool bRight = sal_True;
+bool bLeft = true;
+bool bRight = true;
 long nRowSpan = 0;
 while( pTmp )
 {
@@ -706,8 +706,8 @@ const SwRect SwFrm::PaintArea() const
 nRight = nTmpRight;
 if( pTmp->IsPageFrm() || pTmp->IsFlyFrm() || pTmp->IsRootFrm() )
 break;
-bLeft = sal_False;
-bRight = sal_False;
+bLeft = false;
+bRight = false;
 }
 else if( pTmp->IsColumnFrm() )  // nobody enters neightbour columns
 {
@@ -717,14 +717,14 @@ const SwRect SwFrm::PaintArea() const
 {
 if( bLeft || nLeft < nTmpLeft )
 nLeft = nTmpLeft;
-bLeft = sal_False;
+bLeft = false;
 }
  // the last column has _no_ influence to the right range
 if( bR2L ? pTmp->GetPrev() : pTmp->GetNext() )
 {
 if( bRight || nTmpRight < nRight )
 nRight = nTmpRight;
-bRight = sal_False;
+bRight = false;
 }
 }
 else if( bVert && pTmp->IsBodyFrm() )
@@ -738,14 +738,14 @@ const SwRect SwFrm::PaintArea() const
 if( pTmp->GetPrev() && ( bLeft || nLeft < nTmpLeft ) )
 {
 nLeft = nTmpLeft;
-bLeft = sal_False;
+bLeft = false;
 }
 if( pTmp->GetNext() &&
 ( pTmp->GetNext()->IsFooterFrm() || pTmp->GetNext()->GetNext() 
)
 && ( bRight || nTmpRight < nRight ) )
 {
 nRight = nTmpRight;
-bRight = sal_False;
+bRight = false;
 }
 }
 pTmp = pTmp->GetUpper();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index db3f7b2..de12762 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -199,7 +199,7 @@ void SwTabFrm::RegistFlys()
 |*/
 void SwInvalidateAll( SwFrm *pFrm, long nBottom );
 static void lcl_RecalcRow( SwRowFrm& rRow, long nBottom );
-static sal_Bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, sal_Bool 
bInva );
+static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva );
 // #i26945# - add parameter <_bOnlyRowsAndCells> to control
 // that only row and cell frames are formatted.
 static sal_Bool lcl_InnerCalcLayout( SwFrm *pFrm,
@@ -356,7 +356,7 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow )
 // all lowers should have the correct position
 lcl_ArrangeLowers( &rToAdjust,
(rToAdjust.*fnRect->fnGetPrtTop)(),
-   sal_False );
+   false );
 // TODO: Optimize number of frames which are set to 0 height
 // we have to start with the last lower frame, otherwise
 // the shrink will not shrink the current cell
@@ -395,7 +395,7 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow )
 // all lowers should have the correct position
 lcl_ArrangeLowers( &rToAdjust,
(rToAdjust.*fnRect->fnGetPrtTop)(),
-   sal_False );
+  

[Libreoffice-commits] .: sw/source

2012-11-28 Thread Libreoffice Gerrit user
 sw/source/ui/vba/vbaheaderfooter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3e1f769bdaa61e031c4a049eb29b581e5311e760
Author: Tor Lillqvist 
Date:   Wed Nov 28 23:46:33 2012 +0200

OUString::concat() does not modify in-place

Change-Id: I71286414fe173bf9f698fcfbeb48524914dea2e9

diff --git a/sw/source/ui/vba/vbaheaderfooter.cxx 
b/sw/source/ui/vba/vbaheaderfooter.cxx
index 41199f3..d2c03f2 100644
--- a/sw/source/ui/vba/vbaheaderfooter.cxx
+++ b/sw/source/ui/vba/vbaheaderfooter.cxx
@@ -71,7 +71,7 @@ uno::Reference< word::XRange > SAL_CALL 
SwVbaHeaderFooter::getRange() throw (uno
 }
 if( mnIndex == word::WdHeaderFooterIndex::wdHeaderFooterEvenPages )
 {
-sPropsNameText.concat( rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM("Left") ) );
+sPropsNameText = sPropsNameText.concat( rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM("Left") ) );
 }
 
 uno::Reference< text::XText > xText( mxPageStyleProps->getPropertyValue( 
sPropsNameText ), uno::UNO_QUERY_THROW );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-11-28 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/ww8par.cxx |   34 +--
 sw/source/filter/ww8/ww8toolbar.cxx |   44 
 sw/source/filter/ww8/ww8toolbar.hxx |8 ++
 3 files changed, 59 insertions(+), 27 deletions(-)

New commits:
commit b2be75d95899a3babc16b2a590f8568cfca8124f
Author: Caolán McNamara 
Date:   Wed Nov 28 21:43:11 2012 +

Resolves: fdo#41554 ww6 file cannot be opened

it falls into a (apparently) ww8 specific old school macro
parser we use to scrape out some toolbar info and tries
to allocate some nutso numbers which throws and aborts
the import.

Skip importing these in ww6 document, and tweak the code
to be a bit more forgiving in ww8 documents where the
load fails via exceptions

Change-Id: I9bba60db3b95ece54f68d4fa23031f46545697da

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index ef163cd..9b1b5db 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4252,22 +4252,30 @@ WW8Customizations::WW8Customizations( SvStream* 
pTableStream, WW8Fib& rFib ) : m
 
 bool WW8Customizations::Import( SwDocShell* pShell )
 {
-if ( mWw8Fib.lcbCmds == 0 )
+if ( mWw8Fib.lcbCmds == 0 || !IsEightPlus(mWw8Fib.GetFIBVersion()) )
 return false;
-Tcg aTCG;
-long nCur = mpTableStream->Tell();
-mpTableStream->Seek( mWw8Fib.fcCmds ); // point at tgc record
-bool bReadResult = aTCG.Read( *mpTableStream );
-mpTableStream->Seek( nCur ); // return to previous position, is that 
necessary?
-if ( !bReadResult )
-{
-OSL_TRACE("** Read of Customization data failed ");
-return false;
-}
+try
+{
+Tcg aTCG;
+long nCur = mpTableStream->Tell();
+mpTableStream->Seek( mWw8Fib.fcCmds ); // point at tgc record
+bool bReadResult = aTCG.Read( *mpTableStream );
+mpTableStream->Seek( nCur ); // return to previous position, is that 
necessary?
+if ( !bReadResult )
+{
+SAL_WARN("sw.ww8", "** Read of Customization data failed ");
+return false;
+}
 #if DEBUG
-aTCG.Print( stderr );
+aTCG.Print( stderr );
 #endif
-return aTCG.ImportCustomToolBar( *pShell );
+return aTCG.ImportCustomToolBar( *pShell );
+}
+catch(...)
+{
+SAL_WARN("sw.ww8", "** Read of Customization data failed 
epically");
+return false;
+}
 }
 
 bool SwWW8ImplReader::ReadGlobalTemplateSettings( const rtl::OUString& 
sCreatedFrom, const uno::Reference< container::XNameContainer >& xPrjNameCache )
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx 
b/sw/source/filter/ww8/ww8toolbar.cxx
index 696bbb4..2d8f5c7 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -955,16 +955,12 @@ bool Tcg255SubStruct::Read(SvStream &rS)
 return true;
 }
 
-PlfMcd::PlfMcd( bool bReadId ): Tcg255SubStruct( bReadId ), iMac(0), rgmcd( 
NULL )
+PlfMcd::PlfMcd(bool bReadId)
+: Tcg255SubStruct(bReadId)
+, iMac(0)
 {
 }
 
-PlfMcd::~PlfMcd()
-{
-if ( rgmcd )
-delete[] rgmcd;
-}
-
 bool PlfMcd::Read(SvStream &rS)
 {
 OSL_TRACE("PffMcd::Read() stream pos 0x%x", rS.Tell() );
@@ -973,7 +969,7 @@ bool PlfMcd::Read(SvStream &rS)
 rS >> iMac;
 if ( iMac )
 {
-rgmcd = new MCD[ iMac ];
+rgmcd.resize(iMac);
 for ( sal_Int32 index = 0; index < iMac; ++index )
 {
 if ( !rgmcd[ index ].Read( rS ) )
@@ -1312,7 +1308,37 @@ MCD::MCD() :  reserved1(0x56)
 {
 }
 
-bool  MCD::Read(SvStream &rS)
+MCD::MCD(const MCD& rO)
+: reserved1(rO.reserved1)
+, reserved2(rO.reserved2)
+, ibst(rO.ibst)
+, ibstName(rO.ibstName)
+, reserved3(rO.reserved3)
+, reserved4(rO.reserved4)
+, reserved5(rO.reserved5)
+, reserved6(rO.reserved6)
+, reserved7(rO.reserved7)
+{
+}
+
+MCD& MCD::operator=(const MCD& rO)
+{
+if (this != &rO)
+{
+reserved1 = rO.reserved1;
+reserved2 = rO.reserved2;
+ibst = rO.ibst;
+ibstName = rO.ibstName;
+reserved3 = rO.reserved3;
+reserved4 = rO.reserved4;
+reserved5 = rO.reserved5;
+reserved6 = rO.reserved6;
+reserved7 = rO.reserved7;
+}
+return *this;
+}
+
+bool MCD::Read(SvStream &rS)
 {
 OSL_TRACE("MCD::Read() stream pos 0x%x", rS.Tell() );
 nOffSet = rS.Tell();
diff --git a/sw/source/filter/ww8/ww8toolbar.hxx 
b/sw/source/filter/ww8/ww8toolbar.hxx
index 542d288..954958f 100644
--- a/sw/source/filter/ww8/ww8toolbar.hxx
+++ b/sw/source/filter/ww8/ww8toolbar.hxx
@@ -192,11 +192,10 @@ class MCD : public TBBase
 sal_uInt32 reserved6; //MUST be ignored.
 sal_uInt32 reserved7; //MUST be ignored
 
-MCD(const MCD&);
-MCD& operator = ( const MCD&);
 public:
 MCD();
-~MCD(){}
+MCD(const MCD&);
+MCD& operator = ( const MCD&);
 bool Read(SvStream &rS);
 vo

[Libreoffice-commits] .: sw/source

2012-11-28 Thread Libreoffice Gerrit user
 sw/source/core/layout/pagechg.cxx  |   30 +++
 sw/source/core/layout/paintfrm.cxx |  155 ++---
 sw/source/core/layout/sectfrm.cxx  |   60 +++---
 3 files changed, 122 insertions(+), 123 deletions(-)

New commits:
commit 4db2a6f682d1c1a2bd869831b684844b92c6852c
Author: Takeshi Abe 
Date:   Thu Nov 29 00:25:09 2012 +0900

sal_Bool to bool

Change-Id: I7b00701ed44bb747a3f85e1638f0f82c1ee15299

diff --git a/sw/source/core/layout/pagechg.cxx 
b/sw/source/core/layout/pagechg.cxx
index e020077..178a29e 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -133,13 +133,13 @@ void SwBodyFrm::Format( const SwBorderAttrs * )
 Frm().Width( nWidth );
 }
 
-sal_Bool bNoGrid = sal_True;
+bool bNoGrid = true;
 if( GetUpper()->IsPageFrm() && ((SwPageFrm*)GetUpper())->HasGrid() )
 {
 GETGRID( ((SwPageFrm*)GetUpper()) )
 if( pGrid )
 {
-bNoGrid = sal_False;
+bNoGrid = false;
 long nSum = pGrid->GetBaseHeight() + pGrid->GetRubyHeight();
 SWRECTFN( this )
 long nSize = (Frm().*fnRect->fnGetWidth)();
@@ -446,7 +446,7 @@ static void lcl_MakeObjs( const SwFrmFmts &rTbl, SwPageFrm 
*pPage )
 }
 
 //Wird ein Rahmen oder ein SdrObject beschrieben?
-sal_Bool bSdrObj = RES_DRAWFRMFMT == pFmt->Which();
+bool bSdrObj = RES_DRAWFRMFMT == pFmt->Which();
 pSdrObj = 0;
 if ( bSdrObj  && 0 == (pSdrObj = pFmt->FindSdrObject()) )
 {
@@ -569,7 +569,7 @@ void SwPageFrm::Modify( const SfxPoolItem* pOld, const 
SfxPoolItem * pNew )
 SfxItemIter aOIter( *((SwAttrSetChg*)pOld)->GetChgSet() );
 SwAttrSetChg aOldSet( *(SwAttrSetChg*)pOld );
 SwAttrSetChg aNewSet( *(SwAttrSetChg*)pNew );
-while( sal_True )
+while( true )
 {
 _UpdateAttr( (SfxPoolItem*)aOIter.GetCurItem(),
  (SfxPoolItem*)aNIter.GetCurItem(), nInvFlags,
@@ -607,7 +607,7 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const 
SfxPoolItem *pNew,
  sal_uInt8 &rInvFlags,
  SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
 {
-sal_Bool bClear = sal_True;
+bool bClear = true;
 const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
 switch( nWhich )
 {
@@ -728,7 +728,7 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const 
SfxPoolItem *pNew,
 break;
 
 default:
-bClear = sal_False;
+bClear = false;
 }
 if ( bClear )
 {
@@ -1255,7 +1255,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool 
bNotifyFields )
 
 //1. Keine zwei EmptyPages hintereinander.
 //2. Alle PageDescs richtig?
-sal_Bool bEmpty = sal_False;
+bool bEmpty = false;
 SwPageFrm *pPg = pStart;
 while ( pPg )
 {
@@ -1266,10 +1266,10 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool 
bNotifyFields )
 OSL_FAIL( "Doppelte Leerseiten." );
 break;  //Einmal reicht.
 }
-bEmpty = sal_True;
+bEmpty = true;
 }
 else
-bEmpty = sal_False;
+bEmpty = false;
 
 //MA 21. Jun. 95: Kann zu testzwecken 'rein, ist aber bei zyklen durchaus
 //moeglich: Ein paar Seiten, auf der ersten 'erste Seite' anwenden,
@@ -1296,8 +1296,8 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, 
sal_Bool bFtn )
 
 pSibling = (SwPageFrm*)pPrevPage->GetNext();
 //Rechte (ungerade) oder linke (gerade) Seite einfuegen?
-sal_Bool bNextOdd = !pPrevPage->OnRightPage();
-sal_Bool bWishedOdd = bNextOdd;
+bool bNextOdd = !pPrevPage->OnRightPage();
+bool bWishedOdd = bNextOdd;
 
 //Welcher PageDesc gilt?
 //Bei CntntFrm der aus dem Format wenn einer angegeben ist,
@@ -1308,7 +1308,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, 
sal_Bool bFtn )
 pDesc = rDesc.GetPageDesc();
 if ( rDesc.GetNumOffset() )
 {
-bWishedOdd = rDesc.GetNumOffset() % 2 ? sal_True : sal_False;
+bWishedOdd = rDesc.GetNumOffset() % 2 ? true : false;
 //Die Gelegenheit nutzen wir um das Flag an der Root zu pflegen.
 pRoot->SetVirtPageNum( sal_True );
 }
@@ -1325,7 +1325,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, 
sal_Bool bFtn )
 
 SwDoc *pDoc = pPrevPage->GetFmt()->GetDoc();
 SwFrmFmt *pFmt;
-sal_Bool bCheckPages = sal_False;
+bool bCheckPages = false;
 //Wenn ich kein FrmFmt fuer die Seite gefunden habe, muss ich eben eine
 //Leerseite einfuegen.
 if( bWishedOdd != bNextOdd )
@@ -1347,7 +1347,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, 
sal_Bool bFtn )
 delete pDel;
 }
 else
-bCheckPages = sal_True;
+  

[Libreoffice-commits] .: sw/source

2012-11-27 Thread Libreoffice Gerrit user
 sw/source/core/text/txttab.cxx |   16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 721b1aca38a851c390f8e00ea96b761198db8bd5
Author: Caolán McNamara 
Date:   Tue Nov 27 22:12:05 2012 +

String::Fill -> OUStringBuffer::padToLength

Change-Id: I1a2bba922d583b9f38bb6617d46c4fc0874f4844

diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 6342731..1fe1f94 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -28,8 +28,10 @@
 
 
 #include "hintids.hxx"
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -617,14 +619,15 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) 
const
 if( rInf.GetFont()->IsPaintBlank() )
 {
 // tabs with filling / filled tabs
-UniString aTxt = OUString(' ');
-const KSHORT nCharWidth = rInf.GetTxtSize( aTxt ).Width();
+const KSHORT nCharWidth = rInf.GetTxtSize(OUString(' ')).Width();
 // robust:
 if( nCharWidth )
 {
 // 6864: always with kerning, also on printer!
 KSHORT nChar = Width() / nCharWidth;
-rInf.DrawText( aTxt.Fill( nChar, ' ' ), *this, 0, nChar, sal_True 
);
+rtl::OUStringBuffer aBuf;
+comphelper::string::padToLength(aBuf, nChar, ' ');
+rInf.DrawText(aBuf.makeStringAndClear(), *this, 0, nChar, 
sal_True);
 }
 }
 
@@ -632,8 +635,7 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
 if( IsFilled() )
 {
 // tabs with filling / filled tabs
-UniString aTxt = OUString(cFill);
-const KSHORT nCharWidth = rInf.GetTxtSize( aTxt ).Width();
+const KSHORT nCharWidth = rInf.GetTxtSize(OUString(cFill)).Width();
 OSL_ENSURE( nCharWidth, "!SwTabPortion::Paint: sophisticated tabchar" 
);
 // robust:
 if( nCharWidth )
@@ -642,7 +644,9 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
 KSHORT nChar = Width() / nCharWidth;
 if ( cFill == '_' )
 ++nChar; // to avoid gaps (Bug 13430)
-rInf.DrawText( aTxt.Fill( nChar, cFill ), *this, 0, nChar, 
sal_True );
+rtl::OUStringBuffer aBuf;
+comphelper::string::padToLength(aBuf, nChar, cFill);
+rInf.DrawText(aBuf.makeStringAndClear(), *this, 0, nChar, 
sal_True);
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-11-27 Thread Libreoffice Gerrit user
 sw/source/core/crsr/findattr.cxx  |2 +-
 sw/source/core/edit/edtox.cxx |2 +-
 sw/source/core/unocore/unoobj.cxx |2 +-
 sw/source/ui/uiview/view2.cxx |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 201a3b83d0868c8b0a884a17779b6a4838ed0615
Author: Eike Rathke 
Date:   Tue Nov 27 18:55:08 2012 +0100

we don't need to convert a system locale

Change-Id: I1b964fc34f078ddf400927ddce4c19130db43ad8

diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 451c2a5..a9180ab 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -1107,7 +1107,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, 
const SwPaM* pRegion,
 aTmp.searchFlag |= (SearchFlags::REG_NOT_BEGINOFLINE |
 SearchFlags::REG_NOT_ENDOFLINE);
 
-aTmp.Locale = LanguageTag( LANGUAGE_SYSTEM ).getLocale();
+aTmp.Locale = SvtSysLocale().GetLanguageTag().getLocale();
 
 pSTxt = new utl::TextSearch( aTmp );
 }
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 0f10f11..6645588 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -374,7 +374,7 @@ void SwEditShell::ApplyAutoMark()
 SearchOptions aSearchOpt(
 SearchAlgorithms_ABSOLUTE, nSrchFlags,
 sEmpty, sEmpty,
-LanguageTag( LANGUAGE_SYSTEM ).getLocale(),
+SvtSysLocale().GetLanguageTag().getLocale(),
 nLEV_Other, nLEV_Longer, nLEV_Shorter,
 nTransliterationFlags );
 
diff --git a/sw/source/core/unocore/unoobj.cxx 
b/sw/source/core/unocore/unoobj.cxx
index aea55c8..d9adeb3 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -2518,7 +2518,7 @@ SwUnoCursorHelper::CreateSortDescriptor(const bool 
bFromTable)
 uno::Sequence< table::TableSortField > aFields(3);
 table::TableSortField* pFields = aFields.getArray();
 
-lang::Locale aLang( LanguageTag( LANGUAGE_SYSTEM).getLocale());
+lang::Locale aLang( SvtSysLocale().GetLanguageTag().getLocale());
 // get collator algorithm to be used for the locale
 uno::Sequence< OUString > aSeq(
 GetAppCollator().listCollatorAlgorithms( aLang ) );
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index afeb9f4..5cf63a0 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -1897,7 +1897,7 @@ bool SwView::JumpToSwMark( const String& rMark )
 SearchOptions aSearchOpt(
 SearchAlgorithms_ABSOLUTE, 0,
 sName, rtl::OUString(),
-LanguageTag( LANGUAGE_SYSTEM ).getLocale(),
+
SvtSysLocale().GetLanguageTag().getLocale(),
 0,0,0,
 TransliterationModules_IGNORE_CASE );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-11-27 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/wrtww8.cxx |4 +++-
 sw/source/filter/ww8/ww8atr.cxx |9 -
 2 files changed, 3 insertions(+), 10 deletions(-)

New commits:
commit 60fa5057039d2413d56813df4d45e5cfdfbb40ac
Author: Luke Deller 
Date:   Mon Nov 26 20:08:22 2012 +1100

fdo#56513 second header/footer lost saving as .doc

This reverts changeset 723f772d for i#106749, then applies an
alternative fix for that issue.

Change-Id: Ib5a1788b67517c8d3cf80fd76801e30587535366
Reviewed-on: https://gerrit.libreoffice.org/1170
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index f1da99d..57d2343 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2372,7 +2372,9 @@ void MSWordExportBase::WriteText()
 }
 else if ( pNd->IsTableNode() )
 {
-mpTableInfo->processSwTable( &pNd->GetTableNode()->GetTable() );
+SwTable * pTable = &pNd->GetTableNode()->GetTable();
+OutputSectionBreaks( &pTable->GetTableFmt()->GetAttrSet(), *pNd );
+mpTableInfo->processSwTable( pTable );
 }
 else if ( pNd->IsSectionNode() && TXT_MAINTEXT == nTxtTyp )
 OutputSectionNode( *pNd->GetSectionNode() );
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 632a569..e8a3a57 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -437,15 +437,6 @@ void MSWordExportBase::OutputSectionBreaks( const 
SfxItemSet *pSet, const SwNode
 //section.
 bool bBreakSet = false;
 
-const SwPageDesc * pPageDesc = rNd.FindPageDesc(sal_False);
-
-if (pAktPageDesc != pPageDesc)
-{
-bBreakSet = true;
-bNewPageDesc = true;
-pAktPageDesc = pPageDesc;
-}
-
 if ( pSet && pSet->Count() )
 {
 if ( SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) 
&&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-11-27 Thread Libreoffice Gerrit user
 sw/source/ui/uiview/formatclipboard.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit df25641bc1f38d2c9228cea42318a58c4dc2ead5
Author: Maxime de Roucy 
Date:   Fri Nov 23 14:40:27 2012 +0100

fix bug 53508

In the format paintbrush function :
Apply the paragraph automatic attributes to all the nodes in the
selection instead of just the last node.

Change-Id: I655f00cbf44d3d80c19a7ef623bc1c7cb505ead9

diff --git a/sw/source/ui/uiview/formatclipboard.cxx 
b/sw/source/ui/uiview/formatclipboard.cxx
index f907754..e56a93d 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -550,7 +550,15 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, 
SfxStyleSheetBasePool* pPo
 // it can't be a multiple selection
 SwPaM* pCrsr = rWrtShell.GetCrsr();
 
-// apply the paragraph automatic attributes
+// apply the paragraph automatic attributes to all the nodes in 
the selection
+for (SwNodeIndex pNodeIndexIterator = pCrsr->Start()->nNode,
+ pNodeIndexEnd = pCrsr->End()->nNode;
+pNodeIndexIterator != pNodeIndexEnd;
+++pNodeIndexIterator )
+{
+pNodeIndexIterator.GetNode().GetCntntNode()->SetAttr( 
*pTemplateItemSet );
+}
+// same as pCrsr->End()->nNode.GetNode().GetCntntNode()->SetAttr
 pCrsr->GetCntntNode()->SetAttr( *pTemplateItemSet );
 
 // store the attributes in aItemVector in order not to apply them 
as
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source sw/uiconfig

2012-11-26 Thread Libreoffice Gerrit user
 sw/source/ui/inc/instable.hxx |3 ++-
 sw/source/ui/table/instable.cxx   |   12 ++--
 sw/uiconfig/swriter/ui/inserttable.ui |5 ++---
 3 files changed, 14 insertions(+), 6 deletions(-)

New commits:
commit 95b4c0322d486d7899917ed22dd1f8193af77dcf
Author: Caolán McNamara 
Date:   Mon Nov 26 19:50:13 2012 +

use secondary-group packing to left group help and adapt to OK->Insert 
change

Change-Id: I0325f42e78efbf819c6883b69d5a8903e05ac36e

diff --git a/sw/source/ui/inc/instable.hxx b/sw/source/ui/inc/instable.hxx
index 5e15ccd..40a5984 100644
--- a/sw/source/ui/inc/instable.hxx
+++ b/sw/source/ui/inc/instable.hxx
@@ -57,7 +57,7 @@ class SwInsTableDlg : public SfxModalDialog
 CheckBox*   m_pDontSplitCB;
 CheckBox*   m_pBorderCB;
 
-OKButton*   m_pOkBtn;
+PushButton* m_pInsertBtn;
 PushButton* m_pAutoFmtBtn;
 
 SwWrtShell* pShell;
@@ -67,6 +67,7 @@ class SwInsTableDlg : public SfxModalDialog
 DECL_LINK( ModifyName, Edit * );
 DECL_LINK( ModifyRowCol, NumericField * );
 DECL_LINK( AutoFmtHdl, PushButton* );
+DECL_LINK(OKHdl, void*);
 DECL_LINK(CheckBoxHdl, void * = 0);
 DECL_LINK( ReapeatHeaderCheckBoxHdl, void* p = 0 );
 DECL_LINK( ModifyRepeatHeaderNF_Hdl, void* p = 0 );
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index fbffb7e..f7f5d51 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -96,7 +96,7 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView )
 get(m_pDontSplitCB, "dontsplitcb");
 get(m_pBorderCB, "bordercb");
 get(m_pAutoFmtBtn, "autoformat");
-get(m_pOkBtn, "ok");
+get(m_pInsertBtn, "ok");
 get(m_pRepeatGroup, "repeatgroup");
 get(m_pRepeatHeaderNF, "repeatheaderspin");
 
@@ -109,6 +109,8 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView )
 m_pColNF->SetMax(ROW_COL_PROD/m_pRowNF->GetValue());
 m_pAutoFmtBtn->SetClickHdl(LINK(this, SwInsTableDlg, AutoFmtHdl));
 
+m_pInsertBtn->SetClickHdl(LINK(this, SwInsTableDlg, OKHdl));
+
 sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
 const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
 
@@ -142,6 +144,12 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView )
 m_pRepeatHeaderNF->SetMax( nMax );
 }
 
+IMPL_LINK_NOARG(SwInsTableDlg, OKHdl)
+{
+EndDialog(RET_OK);
+return 0;
+}
+
 SwInsTableDlg::~SwInsTableDlg()
 {
 delete pTAutoFmt;
@@ -156,7 +164,7 @@ IMPL_LINK_INLINE_START( SwInsTableDlg, ModifyName, Edit *, 
pEdit )
 pEdit->SetText(sTblName);
 }
 
-m_pOkBtn->Enable(pShell->GetTblStyle( sTblName ) == 0);
+m_pInsertBtn->Enable(pShell->GetTblStyle( sTblName ) == 0);
 return 0;
 }
 IMPL_LINK_INLINE_END( SwInsTableDlg, ModifyName, Edit *, pEdit )
diff --git a/sw/uiconfig/swriter/ui/inserttable.ui 
b/sw/uiconfig/swriter/ui/inserttable.ui
index 90eebb1..56043c0 100644
--- a/sw/uiconfig/swriter/ui/inserttable.ui
+++ b/sw/uiconfig/swriter/ui/inserttable.ui
@@ -30,7 +30,6 @@
 True
 True
 True
-start
 False
 True
   
@@ -38,18 +37,18 @@
 True
 True
 0
+True
   
 
 
   
-gtk-add
+Insert
 False
 True
 True
 True
 True
 False
-True
   
   
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source sw/uiconfig sw/UI_swriter.mk

2012-11-26 Thread Libreoffice Gerrit user
 sw/UI_swriter.mk   |1 
 sw/source/ui/fldui/javaedit.cxx|  104 +---
 sw/source/ui/fldui/javaedit.hrc|   18 --
 sw/source/ui/fldui/javaedit.src|  115 -
 sw/source/ui/inc/javaedit.hxx  |   26 +--
 sw/uiconfig/swriter/ui/insertscript.ui |  280 +
 6 files changed, 340 insertions(+), 204 deletions(-)

New commits:
commit 0c46736bb2789abb8aa3eb6308c03bc2538c7586
Author: Jack Leigh 
Date:   Fri Nov 23 18:49:12 2012 +

Migrate 'Insert Script' dialog to .ui file

Change-Id: Icd3cd8579e9fa8fa4d01fc234317b3b0b03525aa
Reviewed-on: https://gerrit.libreoffice.org/1152
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk
index 5c78331..ade3a51 100644
--- a/sw/UI_swriter.mk
+++ b/sw/UI_swriter.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/footnotepage \
sw/uiconfig/swriter/ui/indexentry \
sw/uiconfig/swriter/ui/insertbreak \
+   sw/uiconfig/swriter/ui/insertscript \
sw/uiconfig/swriter/ui/inserttable \
sw/uiconfig/swriter/ui/linenumbering \
sw/uiconfig/swriter/ui/printeroptions \
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index 63f34e1..956fbe0 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -55,23 +55,7 @@ using namespace ::com::sun::star;
 
 
 SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) :
-
-SvxStandardDialog(pParent, SW_RES(DLG_JAVAEDIT)),
-
-aTypeFT ( this, SW_RES( FT_TYPE ) ),
-aTypeED ( this, SW_RES( ED_TYPE ) ),
-aUrlRB  ( this, SW_RES( RB_URL ) ),
-aEditRB ( this, SW_RES( RB_EDIT ) ),
-aUrlPB  ( this, SW_RES( PB_URL ) ),
-aUrlED  ( this, SW_RES( ED_URL ) ),
-aEditED ( this, SW_RES( ED_EDIT ) ),
-aPostItFL   ( this, SW_RES( FL_POSTIT ) ),
-
-aOKBtn  ( this, SW_RES( BTN_POST_OK ) ),
-aCancelBtn  ( this, SW_RES( BTN_POST_CANCEL ) ),
-aPrevBtn( this, SW_RES( BTN_PREV ) ),
-aNextBtn( this, SW_RES( BTN_NEXT ) ),
-aHelpBtn( this, SW_RES( BTN_POST_HELP ) ),
+SvxStandardDialog(pParent, "InsertScriptDialog", 
"modules/swriter/ui/insertscript.ui"),
 
 bNew(sal_True),
 bIsUrl(sal_False),
@@ -80,19 +64,30 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, 
SwWrtShell* pWrtSh) :
 pFileDlg(NULL),
 pOldDefDlgParent(NULL)
 {
+get(m_pTypeED, "scripttype");
+get(m_pUrlRB, "url");
+get(m_pUrlED, "urlentry");
+get(m_pUrlPB, "browse");
+get(m_pEditRB, "text");
+get(m_pEditED, "textentry");
+
+get(m_pOKBtn, "ok");
+get(m_pPrevBtn, "previous");
+get(m_pNextBtn, "next");
+
 // install handler
-aPrevBtn.SetClickHdl( LINK( this, SwJavaEditDialog, PrevHdl ) );
-aNextBtn.SetClickHdl( LINK( this, SwJavaEditDialog, NextHdl ) );
-aOKBtn.SetClickHdl( LINK( this, SwJavaEditDialog, OKHdl ) );
+m_pPrevBtn->SetClickHdl( LINK( this, SwJavaEditDialog, PrevHdl ) );
+m_pNextBtn->SetClickHdl( LINK( this, SwJavaEditDialog, NextHdl ) );
+m_pOKBtn->SetClickHdl( LINK( this, SwJavaEditDialog, OKHdl ) );
 
 Link aLk = LINK(this, SwJavaEditDialog, RadioButtonHdl);
-aUrlRB.SetClickHdl(aLk);
-aEditRB.SetClickHdl(aLk);
-aUrlPB.SetClickHdl(LINK(this, SwJavaEditDialog, InsertFileHdl));
+m_pUrlRB->SetClickHdl(aLk);
+m_pEditRB->SetClickHdl(aLk);
+m_pUrlPB->SetClickHdl(LINK(this, SwJavaEditDialog, InsertFileHdl));
 
-Font aFont( aEditED.GetFont() );
+Font aFont( m_pEditED->GetFont() );
 aFont.SetWeight( WEIGHT_LIGHT );
-aEditED.SetFont( aFont );
+m_pEditED->SetFont( aFont );
 
 pMgr = new SwFldMgr;
 pFld = (SwScriptField*)pMgr->GetCurFld();
@@ -103,11 +98,6 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, 
SwWrtShell* pWrtSh) :
 
 if( !bNew )
 SetText( SW_RES( STR_JAVA_EDIT ) );
-else
-// newly create
-SetText( SW_RES( STR_JAVA_INSERT ) );
-
-FreeResource();
 
 RadioButtonHdl(NULL);
 }
@@ -185,42 +175,42 @@ void SwJavaEditDialog::CheckTravel()
 if(INET_PROT_FILE == aINetURL.GetProtocol())
 sURL = aINetURL.PathToFileName();
 }
-aUrlED.SetText(sURL);
-aEditED.SetText(aEmptyStr);
-aUrlRB.Check();
+m_pUrlED->SetText(sURL);
+m_pEditED->SetText(aEmptyStr);
+m_pUrlRB->Check();
 }
 else
 {
-aEditED.SetText(pFld->GetPar2());
-aUrlED.SetText(aEmptyStr);
-aEditRB.Check();
+m_pEditED->SetText(pFld->GetPar2());
+m_pUrlED->SetText(aEmptyStr);
+m_pEditRB->Check();
 }
-aTypeED.SetText(pFld->GetPar1());
+m_pTypeED->SetText(pFld-

[Libreoffice-commits] .: sw/source

2012-11-26 Thread Libreoffice Gerrit user
 sw/source/core/inc/frmtool.hxx |   10 ++--
 sw/source/core/inc/layact.hxx  |4 -
 sw/source/core/layout/flycnt.cxx   |4 -
 sw/source/core/layout/frmtool.cxx  |   78 ++---
 sw/source/core/layout/ftnfrm.cxx   |   58 +--
 sw/source/core/layout/hffrm.cxx|6 +-
 sw/source/core/layout/laycache.cxx |4 -
 sw/source/core/layout/paintfrm.cxx |2 
 sw/source/core/layout/tabfrm.cxx   |8 +--
 sw/source/core/view/viewsh.cxx |2 
 10 files changed, 88 insertions(+), 88 deletions(-)

New commits:
commit 6313953d87e5328fffe192233dc67d52250231c6
Author: Takeshi Abe 
Date:   Mon Nov 26 18:52:32 2012 +0900

sal_Bool to bool

Change-Id: I31fa2f4a711f01ca134e8a977eb2147637fc7830

diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 2ae7971..2006675 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -90,10 +90,10 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
 const SwNodeIndex &rEndIdx );
 
 // prevent creation of Flys in _InsertCnt, e.g. for table headlines
-extern sal_Bool bDontCreateObjects;
+extern bool bDontCreateObjects;
 
 // for FlyCnts, see SwFlyAtCntFrm::MakeAll()
-extern sal_Bool bSetCompletePaintOnInvalidate;
+extern bool bSetCompletePaintOnInvalidate;
 
 // for table settings via keyboard
 long CalcRowRstHeight( SwLayoutFrm *pRow );
@@ -118,12 +118,12 @@ void Notify_Background( const SdrObject* pObj,
 
 const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos );
 
-sal_Bool Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj );
+bool Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj );
 
 // FIXME: EasyHack (refactoring): rename method and parameter name in all files
 const SwFrm *FindKontext( const SwFrm *pFrm, sal_uInt16 nAdditionalKontextTyp 
);
 
-sal_Bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm );
+bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm );
 
 const SwFrm * FindPage( const SwRect &rRect, const SwFrm *pPage );
 
@@ -136,7 +136,7 @@ SwFrm* GetFrmOfModify( const SwRootFrm* pLayout,
const sal_Bool bCalcFrm = sal_False );
 
 // Should extra data (reline stroke, line numbers) be painted?
-sal_Bool IsExtraData( const SwDoc *pDoc );
+bool IsExtraData( const SwDoc *pDoc );
 
 // #i11760# - method declaration 
 void CalcCntnt( SwLayoutFrm *pLay,
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index d23d55e..a4ae9cc 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -100,7 +100,7 @@ class SwLayAction
 sal_Bool bBrowseActionStop; //Action fruehzeitig beenden (per bInput) und 
den
 //Rest dem Idler ueberlassen.
 sal_Bool bWaitAllowed;  //Wartecursor erlaubt?
-sal_Bool bPaintExtraData;   //Anzeige von Zeilennumerierung o. ae. 
eingeschaltet?
+bool bPaintExtraData;   //Anzeige von Zeilennumerierung o. ae. 
eingeschaltet?
 sal_Bool bActionInProgress; // wird in Action() anfangs gesetzt und zum 
Schluss geloescht
 
 // OD 14.04.2003 #106346# - new flag for content formatting on interrupt.
@@ -152,7 +152,7 @@ public:
 sal_Bool IsPaint()  const   { return bPaint; }
 sal_Bool IsIdle()   const   { return bIdle;  }
 sal_Bool IsReschedule() const   { return bReschedule;  }
-sal_Bool IsPaintExtraData() const   { return bPaintExtraData;}
+bool IsPaintExtraData() const   { return bPaintExtraData;}
 sal_Bool IsStopPrt()  const;
 sal_Bool IsInterrupt()const { return IsInput() || IsStopPrt(); }
 
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 81976e7..b3e4f4f 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -353,7 +353,7 @@ void SwFlyAtCntFrm::MakeAll()
 // #i28701# - use new method 
 if( GetPageFrm() )
 {
-bSetCompletePaintOnInvalidate = sal_True;
+bSetCompletePaintOnInvalidate = true;
 {
 SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
 const SwFmtFrmSize &rFrmSz = GetFmt()->GetFrmSize();
@@ -541,7 +541,7 @@ void SwFlyAtCntFrm::MakeAll()
 SetRestartLayoutProcess( true );
 SetTmpConsiderWrapInfluenceOfOtherObjs( true );
 }
-bSetCompletePaintOnInvalidate = sal_False;
+bSetCompletePaintOnInvalidate = false;
 }
 }
 }
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index 96139b1..cb7500e 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -90,9 +90,9 @@ void sw_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, 
sal_Bool bEndNotes
 using namespace ::com::sun::star;
 
 
-sal_Bool bObjsDirect = sal_True;
-sal_

[Libreoffice-commits] .: sw/source

2012-11-26 Thread Libreoffice Gerrit user
 sw/source/core/frmedt/fefly1.cxx |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit ff7eb03c4ad1027eb7dbcac73858f726ae558915
Author: jailletc36 
Date:   Sat Nov 24 08:12:05 2012 +0100

cppCheck: Possible NULL pointer dereference

Change-Id: I1d740eea5c26e0515835c4dc6199a387b6fa8f6b
Signed-off-by: jailletc36 
Reviewed-on: https://gerrit.libreoffice.org/1154
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 2673b31..50ef8d7 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -841,14 +841,16 @@ void SwFEShell::Insert( const String& rGrfName, const 
String& rFltName,
 const Point aPt( GetCrsrDocPos() );
 SwFlyFrm* pFrm = pFmt->GetFrm( &aPt );
 
-// fdo#36681: Invalidate the content and layout to refresh the picture 
anchoring
-// properly
-SwPageFrm* pPageFrm = pFrm->FindPageFrmOfAnchor();
-pPageFrm->InvalidateFlyLayout();
-pPageFrm->InvalidateCntnt();
-
 if( pFrm )
+{
+// fdo#36681: Invalidate the content and layout to refresh
+// the picture anchoring properly
+SwPageFrm* pPageFrm = pFrm->FindPageFrmOfAnchor();
+pPageFrm->InvalidateFlyLayout();
+pPageFrm->InvalidateCntnt();
+
 SelectFlyFrm( *pFrm, sal_True );
+}
 else
 GetLayout()->SetAssertFlyPages();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-11-26 Thread Libreoffice Gerrit user
 sw/source/core/graphic/ndgrf.cxx   |6 ++---
 sw/source/core/layout/atrfrm.cxx   |   16 ++---
 sw/source/core/layout/calcmove.cxx |   40 -
 sw/source/core/layout/dbg_lay.cxx  |   36 +++---
 sw/source/core/layout/findfrm.cxx  |   30 -
 sw/source/core/layout/flowfrm.cxx  |   44 ++---
 sw/source/core/layout/fly.cxx  |   20 
 sw/source/core/layout/flycnt.cxx   |   30 -
 sw/source/core/layout/flyincnt.cxx |8 +++---
 sw/source/core/layout/flylay.cxx   |   10 
 10 files changed, 120 insertions(+), 120 deletions(-)

New commits:
commit b19be5c73cadfa398f6f40e74ec23b9f79a9e3b7
Author: Takeshi Abe 
Date:   Sun Nov 25 21:47:12 2012 +0900

sal_Bool to bool

Change-Id: Ieb7ddea4c5934717a22e2fdc78883a5d13cfc448

diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 2c291ee..2b516de 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -683,7 +683,7 @@ void SwGrfNode::ScaleImageMap()
 if ( !aURL.GetMap() )
 return;
 
-sal_Bool bScale = sal_False;
+bool bScale = false;
 Fraction aScaleX( 1, 1 );
 Fraction aScaleY( 1, 1 );
 
@@ -702,7 +702,7 @@ void SwGrfNode::ScaleImageMap()
 if( nGrfSize.Width() != nWidth )
 {
 aScaleX = Fraction( nGrfSize.Width(), nWidth );
-bScale = sal_True;
+bScale = true;
 }
 }
 if( !rFrmSize.GetHeightPercent() )
@@ -717,7 +717,7 @@ void SwGrfNode::ScaleImageMap()
 if( nGrfSize.Height() != nHeight )
 {
 aScaleY = Fraction( nGrfSize.Height(), nHeight );
-bScale = sal_True;
+bScale = true;
 }
 }
 
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 8d180ae..a850e95 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -176,7 +176,7 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt )
 }
 
 // Anything other than frames registered?
-sal_Bool bDel = sal_True;
+bool bDel = true;
 {
 // nested scope because DTOR of SwClientIter resets the flag bTreeChg.
 // It's suboptimal if the format is deleted beforehand.
@@ -334,7 +334,7 @@ bool SwFmtFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
 
 bool SwFmtFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 {
-sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
+bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
 nMemberId &= ~CONVERT_TWIPS;
 bool bRet = true;
 switch ( nMemberId )
@@ -765,7 +765,7 @@ bool SwFmtPageDesc::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 {
 // here we convert always!
 nMemberId &= ~CONVERT_TWIPS;
-sal_Bool bRet = sal_True;
+bool bRet = true;
 switch ( nMemberId )
 {
 case MID_PAGEDESC_PAGENUMOFFSET:
@@ -897,7 +897,7 @@ sal_uInt16 SwFmtCol::GetGutterWidth( sal_Bool bMin ) const
 nRet = aColumns[0].GetRight() + aColumns[1].GetLeft();
 else if ( aColumns.size() > 2 )
 {
-sal_Bool bSet = sal_False;
+bool bSet = false;
 for ( sal_uInt16 i = 1; i < aColumns.size()-1; ++i )
 {
 const sal_uInt16 nTmp = aColumns[i].GetRight() + 
aColumns[i+1].GetLeft();
@@ -912,7 +912,7 @@ sal_uInt16 SwFmtCol::GetGutterWidth( sal_Bool bMin ) const
 }
 }
 else
-{   bSet = sal_True;
+{   bSet = true;
 nRet = nTmp;
 }
 }
@@ -1319,7 +1319,7 @@ bool SwFmtVertOrient::QueryValue( uno::Any& rVal, 
sal_uInt8 nMemberId ) const
 
 bool SwFmtVertOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 {
-sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
+bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
 nMemberId &= ~CONVERT_TWIPS;
 bool bRet = true;
 switch ( nMemberId )
@@ -1441,7 +1441,7 @@ bool SwFmtHoriOrient::QueryValue( uno::Any& rVal, 
sal_uInt8 nMemberId ) const
 
 bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
 {
-sal_Bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
+bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
 nMemberId &= ~CONVERT_TWIPS;
 bool bRet = true;
 switch ( nMemberId )
@@ -1722,7 +1722,7 @@ int SwFmtURL::operator==( const SfxPoolItem &rAttr ) const
 {
 OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "not the same attributes" );
 const SwFmtURL &rCmp = (SwFmtURL&)rAttr;
-sal_Bool bRet = bIsServerMap == rCmp.IsServerMap() &&
+bool bRet = bIsServerMap == rCmp.IsServerMap() &&
 sURL == rCmp.GetURL() &&
 sTargetFrameName == rCmp.GetTargetFrameName() &&
 sName== rCmp.GetName();
diff --git a/sw/source/core/layout/calcmove.cx

[Libreoffice-commits] .: sw/source

2012-11-24 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/rtfexport.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9343d996f5150b6aa8d2dd184a7ba918c7ee204b
Author: Miklos Vajna 
Date:   Sat Nov 24 10:18:27 2012 +0100

SwRTFWriter::WriteStream: fix leak

Change-Id: I86205aeeefd727090b780bc41a959200affa9920

diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index 33ab009..d45e057 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -1144,7 +1144,8 @@ SwRTFWriter::~SwRTFWriter()
 sal_uLong SwRTFWriter::WriteStream()
 {
 SAL_INFO("sw.rtf", OSL_THIS_FUNC);
-RtfExport aExport( NULL, pDoc, new SwPaM( *pCurPam->End(), 
*pCurPam->Start() ), pCurPam, this, m_bOutOutlineOnly );
+SwPaM aPam(*pCurPam->End(), *pCurPam->Start());
+RtfExport aExport( NULL, pDoc, &aPam, pCurPam, this, m_bOutOutlineOnly );
 aExport.ExportDocument( true );
 return 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-11-23 Thread Libreoffice Gerrit user
 sw/source/core/fields/authfld.cxx  |8 +--
 sw/source/core/fields/dbfld.cxx|2 
 sw/source/core/fields/flddat.cxx   |2 
 sw/source/core/fields/reffld.cxx   |   18 +++---
 sw/source/core/frmedt/fecopy.cxx   |   24 -
 sw/source/core/frmedt/fedesc.cxx   |4 -
 sw/source/core/frmedt/fefly1.cxx   |   24 -
 sw/source/core/frmedt/feflyole.cxx |4 -
 sw/source/core/frmedt/feshview.cxx |   56 ++---
 sw/source/core/frmedt/fetab.cxx|6 +-
 sw/source/core/frmedt/fews.cxx |   10 +--
 sw/source/core/frmedt/tblsel.cxx   |   96 ++---
 12 files changed, 126 insertions(+), 128 deletions(-)

New commits:
commit 233369b1e7990c6a3d03810b81eae0ee9175771d
Author: Takeshi Abe 
Date:   Sat Nov 24 09:06:58 2012 +0900

sal_Bool to bool

Change-Id: I1bd921c55223671d3474c882b059b46fb87fd694

diff --git a/sw/source/core/fields/authfld.cxx 
b/sw/source/core/fields/authfld.cxx
index bb488fa..ff618c8 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -95,7 +95,7 @@ SwFieldType*SwAuthorityFieldType::Copy()  const
 voidSwAuthorityFieldType::RemoveField(long nHandle)
 {
 #if OSL_DEBUG_LEVEL > 0
-sal_Bool bRemoved = sal_False;
+bool bRemoved = false;
 #endif
 for(sal_uInt16 j = 0; j < m_DataArr.size(); j++)
 {
@@ -104,7 +104,7 @@ voidSwAuthorityFieldType::RemoveField(long nHandle)
 if(nRet == nHandle)
 {
 #if OSL_DEBUG_LEVEL > 0
-bRemoved = sal_True;
+bRemoved = true;
 #endif
 pTemp->RemoveRef();
 if(!pTemp->GetRefCount())
@@ -271,7 +271,7 @@ sal_uInt16  SwAuthorityFieldType::GetSequencePos(long 
nHandle)
 {
 //find the field in a sorted array of handles,
 #if OSL_DEBUG_LEVEL > 0
-sal_Bool bCurrentFieldWithoutTextNode = sal_False;
+bool bCurrentFieldWithoutTextNode = false;
 #endif
 if(!m_SequArr.empty() && m_SequArr.size() != m_DataArr.size())
 DelSequenceArray();
@@ -289,7 +289,7 @@ sal_uInt16  SwAuthorityFieldType::GetSequencePos(long 
nHandle)
 {
 #if OSL_DEBUG_LEVEL > 0
 if(nHandle == 
((SwAuthorityField*)pFmtFld->GetFld())->GetHandle())
-bCurrentFieldWithoutTextNode = sal_True;
+bCurrentFieldWithoutTextNode = true;
 #endif
 continue;
 }
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index 4b4d0ba..9c46f41 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -435,7 +435,7 @@ bool SwDBField::PutValue( const uno::Any& rAny, sal_uInt16 
nWhichId )
 sal_uInt16 nSubTyp = GetSubType();
 sal_Bool bVisible = sal_False;
 if(!(rAny >>= bVisible))
-return sal_False;
+return false;
 if(bVisible)
 nSubTyp &= ~nsSwExtendedSubType::SUB_INVISIBLE;
 else
diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx
index a990f09..2ca0244 100644
--- a/sw/source/core/fields/flddat.cxx
+++ b/sw/source/core/fields/flddat.cxx
@@ -246,7 +246,7 @@ bool SwDateTimeField::PutValue( const uno::Any& rVal, 
sal_uInt16 nWhichId )
 {
 util::DateTime aDateTimeValue;
 if(!(rVal >>= aDateTimeValue))
-return sal_False;
+return false;
 DateTime aDateTime( DateTime::EMPTY );
 aDateTime.Set100Sec(aDateTimeValue.HundredthSeconds);
 aDateTime.SetSec(aDateTimeValue.Seconds);
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index bec55fb..4d68397 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -942,18 +942,18 @@ private:
 std::set aIds;
 std::set aDstIds;
 std::map sequencedIds; /// ID numbers sorted by 
sequence number.
-sal_Bool bInit;
+bool bInit;
 
-void   Init(SwDoc& rDoc, SwDoc& rDestDoc, sal_Bool bField );
+void   Init(SwDoc& rDoc, SwDoc& rDestDoc, bool bField );
 void   GetNoteIdsFromDoc( SwDoc& rDoc, std::set &rIds );
 void   GetFieldIdsFromDoc( SwDoc& rDoc, std::set &rIds );
 void   AddId( sal_uInt16 id, sal_uInt16 seqNum );
 sal_uInt16 GetFirstUnusedId( std::set &rIds );
 
 public:
-_RefIdsMap( const String& rName ) : aName( rName ), bInit( sal_False ) {}
+_RefIdsMap( const String& rName ) : aName( rName ), bInit( false ) {}
 
-void Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld, sal_Bool 
bField );
+void Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld, bool bField 
);
 
 String GetName() { return aName; }
 };
@@ -992,7 +992,7 @@ void _RefIdsMap::GetNoteIdsFromDoc( SwDoc& rDoc, 
std::set &rIds)
 /// @param[in] rDoc The source document.
 /// @param[in] rDestDoc The destination document.
 /// @param[in] bField   True if we're interested in all fields, false for 
footnotes.
-void _RefIdsMa

[Libreoffice-commits] .: sw/source

2012-11-23 Thread Libreoffice Gerrit user
 sw/source/filter/html/css1atr.cxx  |   24 +---
 sw/source/filter/html/htmlfldw.cxx |   10 +-
 2 files changed, 18 insertions(+), 16 deletions(-)

New commits:
commit 13fe193ae9f03c4bcc2fa22993470b8c37cc3c6d
Author: Caolán McNamara 
Date:   Fri Nov 23 12:46:34 2012 +

Resolves: fdo#57236 crash on export to html

SfxItemSet takes a sequence of (start, end) property ranges
not a sequence of isolated properties

reading 1b0f7ee1e04d7b0fe81f7458ae2116615e0f6889 it appears that the 
properties
the new code wanted to query are included in the original ranges already

Change-Id: Ifecdf23270d7f3d875d1c0cd942bab659bbabf29

diff --git a/sw/source/filter/html/css1atr.cxx 
b/sw/source/filter/html/css1atr.cxx
index e973a64..2876912 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1356,11 +1356,16 @@ sal_Bool SwHTMLWriter::HasScriptDependentItems( const 
SfxItemSet& rItemSet,
 const SwCharFmt *pDCCharFmt = pDrop->GetCharFmt();
 if( pDCCharFmt )
 {
-//Some items occured twice, and I have no idea why.
+//sequence of (start, end) property ranges we want to
+//query
 SfxItemSet aTstItemSet( *pDCCharFmt->GetAttrSet().GetPool(),
-RES_CHRATR_FONT,RES_CHRATR_POSTURE, 
RES_CHRATR_WEIGHT,
-RES_CHRATR_CJK_FONT,RES_CHRATR_CJK_POSTURE, 
RES_CHRATR_CJK_WEIGHT,
-RES_CHRATR_CTL_FONT,RES_CHRATR_CTL_POSTURE, 
RES_CHRATR_CTL_WEIGHT,
+RES_CHRATR_FONT,RES_CHRATR_FONT,
+RES_CHRATR_POSTURE, RES_CHRATR_POSTURE,
+RES_CHRATR_WEIGHT,  RES_CHRATR_WEIGHT,
+RES_CHRATR_CJK_FONT,RES_CHRATR_CJK_FONT,
+RES_CHRATR_CJK_POSTURE, RES_CHRATR_CJK_WEIGHT,
+RES_CHRATR_CTL_FONT,RES_CHRATR_CTL_FONT,
+RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT,
 0 );
 aTstItemSet.Set( pDCCharFmt->GetAttrSet(), sal_True );
 return HasScriptDependentItems( aTstItemSet, sal_False );
@@ -1402,16 +1407,13 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, 
const String& rSelector,
 rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
 }
 
+//sequence of (start, end) property ranges we want to
+//query
 SfxItemSet aScriptItemSet( *rItemSet.GetPool(),
RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
RES_CHRATR_LANGUAGE, RES_CHRATR_POSTURE,
-   RES_CHRATR_WEIGHT,
-   RES_CHRATR_CJK_FONT, 
RES_CHRATR_CJK_FONTSIZE,
-   RES_CHRATR_CJK_LANGUAGE, 
RES_CHRATR_CJK_POSTURE,
-   RES_CHRATR_CJK_WEIGHT,
-   RES_CHRATR_CTL_FONT, 
RES_CHRATR_CTL_FONTSIZE,
-   RES_CHRATR_CTL_LANGUAGE, 
RES_CHRATR_CTL_POSTURE,
-   RES_CHRATR_CTL_WEIGHT,
+   RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT,
+   RES_CHRATR_CJK_FONT, 
RES_CHRATR_CTL_WEIGHT,
0 );
 aScriptItemSet.Put( rItemSet );
 
diff --git a/sw/source/filter/html/htmlfldw.cxx 
b/sw/source/filter/html/htmlfldw.cxx
index 36e5b42..48fccdc 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -333,13 +333,13 @@ static Writer& OutHTML_SwField( Writer& rWrt, const 
SwField* pFld,
 
 if( bNeedsCJKProcessing )
 {
+//sequence of (start, end) property ranges we want to
+//query
 SfxItemSet aScriptItemSet( rWrt.pDoc->GetAttrPool(),
RES_CHRATR_FONT, RES_CHRATR_FONTSIZE,
-   RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT,
-   RES_CHRATR_CJK_FONT, 
RES_CHRATR_CJK_FONTSIZE,
-   RES_CHRATR_CJK_POSTURE, 
RES_CHRATR_CJK_WEIGHT,
-   RES_CHRATR_CTL_FONT, 
RES_CHRATR_CTL_FONTSIZE,
-   RES_CHRATR_CTL_POSTURE, 
RES_CHRATR_CTL_WEIGHT,
+   RES_CHRATR_POSTURE, RES_CHRATR_POSTURE,
+   RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT,
+   RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT,
0 );
 rTxtNd.GetAttr( aScriptItemSet, nFldPos, nFldPos+1 );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-11-23 Thread Libreoffice Gerrit user
 sw/source/core/edit/autofmt.cxx  |  128 +++
 sw/source/core/edit/edatmisc.cxx |2 
 sw/source/core/edit/edattr.cxx   |   18 ++---
 sw/source/core/edit/eddel.cxx|6 -
 sw/source/core/edit/edfld.cxx|8 +-
 sw/source/core/edit/edglbldc.cxx |8 +-
 sw/source/core/edit/editsh.cxx   |   20 +++---
 sw/source/core/edit/edlingu.cxx  |8 +-
 sw/source/core/edit/ednumber.cxx |   12 +--
 sw/source/core/edit/edtab.cxx|8 +-
 sw/source/core/edit/edtox.cxx|   10 +--
 sw/source/core/edit/edundo.cxx   |6 -
 12 files changed, 117 insertions(+), 117 deletions(-)

New commits:
commit 10ffbbd269ae14677e7fced9da0268146faae919
Author: Takeshi Abe 
Date:   Fri Nov 23 11:06:51 2012 +0900

sal_Bool to bool

Change-Id: I5f454a00d10264adc0c7312459ca0a7ad261c3ad

diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index e5ac1db..8c3096b 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -164,9 +164,9 @@ class SwAutoFormat
 bool IsSpace( const sal_Unicode c ) const
 { return (' ' == c || '\t' == c || 0x0a == c|| 0x3000 == c /* Jap. 
space */); }
 
-void SetColl( sal_uInt16 nId, sal_Bool bHdLineOrText = sal_False );
+void SetColl( sal_uInt16 nId, bool bHdLineOrText = false );
 String GoNextPara();
-sal_Bool HasObjects( const SwNode& rNd );
+bool HasObjects( const SwNode& rNd );
 
 // TxtNode methods
 const SwTxtNode* GetNextNode() const;
@@ -187,7 +187,7 @@ class SwAutoFormat
 xub_StrLen GetLeadingBlanks( const String& rStr ) const;
 xub_StrLen GetTrailingBlanks( const String& rStr ) const;
 
-sal_Bool IsFirstCharCapital( const SwTxtNode& rNd ) const;
+bool IsFirstCharCapital( const SwTxtNode& rNd ) const;
 sal_uInt16 GetDigitLevel( const SwTxtNode& rTxtNd, xub_StrLen& rPos,
 String* pPreFix = 0, String* pPostFix = 0,
 String* pNumTypes = 0 ) const;
@@ -201,16 +201,16 @@ class SwAutoFormat
 void BuildNegIndent( SwTwips nSpaces );
 void BuildHeadLine( sal_uInt16 nLvl );
 
-sal_Bool HasSelBlanks( SwPaM& rPam ) const;
-sal_Bool HasBreakAttr( const SwTxtNode& ) const;
+bool HasSelBlanks( SwPaM& rPam ) const;
+bool HasBreakAttr( const SwTxtNode& ) const;
 void DeleteSel( SwPaM& rPam );
-sal_Bool DeleteAktNxtPara( const String& rNxtPara );
+bool DeleteAktNxtPara( const String& rNxtPara );
 // delete in the node start and/or end
-void DeleteAktPara( sal_Bool bStart = sal_True, sal_Bool nEnd = sal_True );
-void DelEmptyLine( sal_Bool bTstNextPara = sal_True );
+void DeleteAktPara( bool bStart = true, bool nEnd = true );
+void DelEmptyLine( bool bTstNextPara = true );
 // when using multiline paragraphs delete the "left" and/or
 // "right" margins
-void DelMoreLinesBlanks( sal_Bool bWithLineBreaks = sal_False );
+void DelMoreLinesBlanks( bool bWithLineBreaks = false );
 // delete the previous paragraph
 void DelPrevPara();
 // execute AutoCorrect on current TextNode
@@ -228,10 +228,10 @@ class SwAutoFormat
 }
 
 // is a dot at the end ??
-sal_Bool IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const;
+bool IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const;
 
-sal_Bool DoUnderline();
-sal_Bool DoTable();
+bool DoUnderline();
+bool DoTable();
 
 void _SetRedlineTxt( sal_uInt16 nId );
 bool SetRedlineTxt( sal_uInt16 nId )
@@ -361,11 +361,11 @@ String SwAutoFormat::GoNextPara()
 return pAktTxtNd->GetTxt();
 }
 
-sal_Bool SwAutoFormat::HasObjects( const SwNode& rNd )
+bool SwAutoFormat::HasObjects( const SwNode& rNd )
 {
 // Is there something bound to the paragraph in the paragraph
 // like borders, DrawObjects, ...
-sal_Bool bRet = sal_False;
+bool bRet = false;
 const SwFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
 for( sal_uInt16 n = 0; n < rFmts.size(); ++n )
 {
@@ -374,7 +374,7 @@ sal_Bool SwAutoFormat::HasObjects( const SwNode& rNd )
 rAnchor.GetCntntAnchor() &&
 &rAnchor.GetCntntAnchor()->nNode.GetNode() == &rNd )
 {
-bRet = sal_True;
+bRet = true;
 break;
 }
 }
@@ -544,10 +544,10 @@ sal_Bool SwAutoFormat::IsNoAlphaLine( const SwTxtNode& 
rNd ) const
 
 
 
-sal_Bool SwAutoFormat::DoUnderline()
+bool SwAutoFormat::DoUnderline()
 {
 if( !aFlags.bSetBorder )
-return sal_False;
+return false;
 
 const sal_Unicode* pStr = pAktTxtNd->GetTxt().GetBuffer();
 int eState = 0;
@@ -564,12 +564,12 @@ sal_Bool SwAutoFormat::DoUnderline()
 case '~': eTmp = 5; break;
 case '#': eTmp = 6; break;
 default:
-return sal_False;
+return false;
 }
 if( 0 == eState )
 eState = eTmp;
 else if( eState != eTmp )
-return sal_False

[Libreoffice-commits] .: sw/source

2012-11-21 Thread Libreoffice Gerrit user
 sw/source/core/crsr/bookmrk.cxx   |1 -
 sw/source/core/crsr/findtxt.cxx   |1 -
 sw/source/core/doc/docedt.cxx |6 +-
 sw/source/core/doc/docnum.cxx |2 --
 sw/source/core/draw/dflyobj.cxx   |1 -
 sw/source/core/layout/pagechg.cxx |1 -
 sw/source/core/layout/wsfrm.cxx   |1 -
 sw/source/core/unocore/unochart.cxx   |6 --
 sw/source/filter/html/htmlcss1.cxx|1 -
 sw/source/filter/html/htmlform.cxx|3 ---
 sw/source/filter/html/htmlftn.cxx |2 +-
 sw/source/filter/html/svxcss1.cxx |2 +-
 sw/source/filter/xml/xmltexti.cxx |1 -
 sw/source/ui/app/docsh.cxx|2 --
 sw/source/ui/config/fontcfg.cxx   |1 -
 sw/source/ui/config/mailconfigpage.cxx|1 -
 sw/source/ui/config/modcfg.cxx|2 --
 sw/source/ui/config/optpage.cxx   |6 --
 sw/source/ui/dbui/createaddresslistdialog.cxx |3 ---
 sw/source/ui/dbui/dbmgr.cxx   |2 --
 sw/source/ui/dbui/mailmergechildwindow.cxx|1 -
 sw/source/ui/dbui/mmconfigitem.cxx|1 -
 sw/source/ui/dbui/mmoutputpage.cxx|1 -
 sw/source/ui/dochdl/gloshdl.cxx   |1 -
 sw/source/ui/docvw/romenu.cxx |2 --
 sw/source/ui/fldui/flddok.cxx |1 -
 sw/source/ui/misc/glosbib.cxx |1 -
 sw/source/ui/misc/insrule.cxx |1 -
 sw/source/ui/misc/redlndlg.cxx|3 ---
 sw/source/ui/shells/frmsh.cxx |1 -
 sw/source/ui/shells/textfld.cxx   |1 -
 sw/source/ui/table/tautofmt.cxx   |1 -
 sw/source/ui/utlui/condedit.cxx   |1 -
 sw/source/ui/utlui/navipi.cxx |3 +--
 sw/source/ui/vba/vbaselection.cxx |1 -
 35 files changed, 4 insertions(+), 61 deletions(-)

New commits:
commit c1200f5eeed0d1ce974dd551c330f72546317630
Author: Luboš Luňák 
Date:   Wed Nov 21 16:04:11 2012 +0100

unused variables

Change-Id: I216b6ddff479ecf45a9950c05d4d65d55afbc7a1

diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 75f58ca..fa209c9 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -191,7 +191,6 @@ namespace sw { namespace mark
 if(nCount == SAL_MAX_INT32)
 {
 sal_Int32 nRandom;
-::rtl::OUStringBuffer sUniquePostfixBuffer;
 rtl_random_getBytes(aPool, &nRandom, sizeof(nRandom));
 sUniquePostfix = 
::rtl::OUStringBuffer(13).append('_').append(static_cast(abs(nRandom))).makeStringAndClear();
 nCount = 0;
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 76c843b..e9c40d7 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -665,7 +665,6 @@ String *ReplaceBackReferences( const SearchOptions& 
rSearchOpt, SwPaM* pPam )
 {
 utl::TextSearch aSTxt( rSearchOpt );
 String aStr( pPam->GetTxt() );
-String aSearchStr( rSearchOpt.searchString );
 String aReplaceStr( rSearchOpt.replaceString );
 aStr = comphelper::string::remove(aStr, CH_TXTATR_BREAKWORD);
 aStr = comphelper::string::remove(aStr, CH_TXTATR_INWORD);
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 9bd0196..dc6ae1d 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -757,9 +757,6 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr 
)
 SwIndex& rIdx = rPt.nContent;
 xub_StrLen nStart = 0;
 
-sal_Unicode c;
-String aStr;
-
 bool bOldExpFlg = pNode->IsIgnoreDontExpand();
 pNode->SetIgnoreDontExpand( true );
 
@@ -771,7 +768,7 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr 
)
 {
 lcl_SkipAttr( pNode, rIdx, nStart );
 }
-c = rStr.GetChar( nCnt );
+sal_Unicode c = rStr.GetChar( nCnt );
 if (GetIDocumentUndoRedo().DoesUndo())
 {
 bool bMerged(false);
@@ -1949,7 +1946,6 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
 uno::Reference< linguistic2::XProofreadingIterator 
>  xGCIterator( GetGCIterator() );
 if (xGCIterator.is())
 {
-String aText( 
((SwTxtNode*)pNd)->GetTxt().Copy( nBeginGrammarCheck, nEndGrammarCheck - 
nBeginGrammarCheck ) );
 uno::Reference< lang::XComponent > xDoc( 
((SwDocShell*)GetDocShell())->GetBaseModel(), uno::UNO_QUERY );
 // Expand the string:
 const ModelToViewHelper 
aConversionMap(*(SwTxtNode*)pNd);
diff --git a/sw/source/

[Libreoffice-commits] .: sw/source

2012-11-20 Thread Libreoffice Gerrit user
 sw/source/ui/utlui/poolfmt.src |   38 +++---
 1 file changed, 19 insertions(+), 19 deletions(-)

New commits:
commit 783d13a9276931e274a90b9b53de2c92dc8c055e
Author: Jan Holesovsky 
Date:   Tue Nov 20 12:03:18 2012 +0100

Rename style called "Default" to "Default Style" + First Cap Some Others 
too.

Change-Id: I71b74ceabfdaced541529143d15d020ac17d2e26

diff --git a/sw/source/ui/utlui/poolfmt.src b/sw/source/ui/utlui/poolfmt.src
index e3afdd9..f20c110 100644
--- a/sw/source/ui/utlui/poolfmt.src
+++ b/sw/source/ui/utlui/poolfmt.src
@@ -70,19 +70,19 @@ String STR_POOLPAGE_LANDSCAPE
 };
 String STR_POOLCHR_LINENUM
 {
-Text [ en-US ] = "Line numbering" ;
+Text [ en-US ] = "Line Numbering" ;
 };
 String STR_POOLCHR_IDX_MAIN_ENTRY
 {
-Text [ en-US ] = "Main index entry";
+Text [ en-US ] = "Main Index Entry";
 };
 String STR_POOLCHR_FOOTNOTE_ANCHOR
 {
-Text [ en-US ] = "Footnote anchor";
+Text [ en-US ] = "Footnote Anchor";
 };
 String STR_POOLCHR_ENDNOTE_ANCHOR
 {
-Text [ en-US ] = "Endnote anchor";
+Text [ en-US ] = "Endnote Anchor";
 };
 
  // Zeichenvorlagen fuer HTML
@@ -157,27 +157,27 @@ String STR_POOLFRM_LABEL
  // -
 String STR_POOLCOLL_STANDARD
 {
-Text [ en-US ] = "Default" ;
+Text [ en-US ] = "Default Style" ;
 };
 String STR_POOLCOLL_TEXT
 {
-Text [ en-US ] = "Text body" ;
+Text [ en-US ] = "Text Body" ;
 };
 String STR_POOLCOLL_TEXT_IDENT
 {
-Text [ en-US ] = "First line indent" ;
+Text [ en-US ] = "First Line Indent" ;
 };
 String STR_POOLCOLL_TEXT_NEGIDENT
 {
-Text [ en-US ] = "Hanging indent" ;
+Text [ en-US ] = "Hanging Indent" ;
 };
 String STR_POOLCOLL_TEXT_MOVE
 {
-Text [ en-US ] = "Text body indent" ;
+Text [ en-US ] = "Text Body Indent" ;
 };
 String STR_POOLCOLL_GREETING
 {
-Text [ en-US ] = "Complimentary close" ;
+Text [ en-US ] = "Complimentary Close" ;
 };
 String STR_POOLCOLL_SIGNATURE
 {
@@ -409,11 +409,11 @@ String STR_POOLCOLL_HEADER
 };
 String STR_POOLCOLL_HEADERL
 {
-Text [ en-US ] = "Header left" ;
+Text [ en-US ] = "Header Left" ;
 };
 String STR_POOLCOLL_HEADERR
 {
-Text [ en-US ] = "Header right" ;
+Text [ en-US ] = "Header Right" ;
 };
 String STR_POOLCOLL_FOOTER
 {
@@ -421,11 +421,11 @@ String STR_POOLCOLL_FOOTER
 };
 String STR_POOLCOLL_FOOTERL
 {
-Text [ en-US ] = "Footer left" ;
+Text [ en-US ] = "Footer Left" ;
 };
 String STR_POOLCOLL_FOOTERR
 {
-Text [ en-US ] = "Footer right" ;
+Text [ en-US ] = "Footer Right" ;
 };
 String STR_POOLCOLL_TABLE
 {
@@ -437,7 +437,7 @@ String STR_POOLCOLL_TABLE_HDLN
 };
 String STR_POOLCOLL_FRAME
 {
-Text [ en-US ] = "Frame contents" ;
+Text [ en-US ] = "Frame Contents" ;
 };
 String STR_POOLCOLL_FOOTNOTE
 {
@@ -593,19 +593,19 @@ String STR_POOLCOLL_TOX_ILLUS1
 };
 String STR_POOLCOLL_TOX_OBJECTH
 {
-Text [ en-US ] = "Object index heading";
+Text [ en-US ] = "Object Index Heading";
 };
 String STR_POOLCOLL_TOX_OBJECT1
 {
-Text [ en-US ] = "Object index 1";
+Text [ en-US ] = "Object Index 1";
 };
 String STR_POOLCOLL_TOX_TABLESH
 {
-Text [ en-US ] = "Table index heading";
+Text [ en-US ] = "Table Index Heading";
 };
 String STR_POOLCOLL_TOX_TABLES1
 {
-Text [ en-US ] = "Table index 1";
+Text [ en-US ] = "Table Index 1";
 };
 String STR_POOLCOLL_TOX_AUTHORITIESH
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   3   4   >