Re: TINYINT set as signed in formcontrolfactory.cxx

2013-01-19 Thread Lionel Elie Mamane
On Sat, Jan 19, 2013 at 09:52:08AM +0100, Alex Thurgood wrote:
> On 01/19/2013 04:40 AM, Lionel Elie Mamane wrote:

>> The central question is: what are the consequences of this code? If it

> I seem to recall that using TINYINT as a boolean field (...)

Well, hmmm, from a "standard SQL" point of view, boolean fields should
be ... of type boolean. Now, indeed MySQL does not support that, and
TINYINT(1) is the "suggested" replacement. However, since 5.0.x for
some x, BIT(1) is probably a better choice.

Since TINYINT(1) is historically popular in MySQL, I'm open to any
patch that improves the seamless support of this in LibreOffice,
without breaking other things.

> OOo with the tristate nature of its boolean form control (and I
> presume LO, but haven't checked recently) set the default value to
> -127, or 0 or 127 - very strange, at least, it seemed that way to
> me.

Hmm... I have in mind that a tristate boolean form control should in
general be TRUE / FALSE / NULL. If it can be manually forced to be
three different non-NULL values, that's nice, but not by default.

-- 
Lionel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Replace the frequent functioncalls

2013-01-19 Thread Karthikeyan Krishnamurthi (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/1777

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/77/1777/1

Replace the frequent functioncalls

The function getHorizontalEdge contains more function calls to the
getRowCount().  Instead we store the return value of getRowCount()
value in a const integer varible nRowCount and use it.

Change-Id: I3e1460913099d1060d5005329e0b63e5ebcd362c
---
M svx/source/table/tablelayouter.cxx
1 file changed, 6 insertions(+), 5 deletions(-)



diff --git a/svx/source/table/tablelayouter.cxx 
b/svx/source/table/tablelayouter.cxx
index 27bf185..d01a993 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -222,15 +222,16 @@
 sal_Int32 TableLayouter::getHorizontalEdge( int nEdgeY, sal_Int32* pnMin /*= 
0*/, sal_Int32* pnMax /*= 0*/ )
 {
 sal_Int32 nRet = 0;
-if( (nEdgeY >= 0) && (nEdgeY <= getRowCount() ) )
-nRet = maRows[std::min((sal_Int32)nEdgeY,getRowCount()-1)].mnPos;
+const sal_Int32 nRowCount = getRowCount();
+if( (nEdgeY >= 0) && (nEdgeY <= nRowCount ) )
+nRet = maRows[std::min((sal_Int32)nEdgeY,nRowCount-1)].mnPos;
 
-if( nEdgeY == getRowCount() )
+if( nEdgeY == nRowCount )
 nRet += maRows[nEdgeY - 1].mnSize;
 
 if( pnMin )
 {
-if( (nEdgeY > 0) && (nEdgeY <= getRowCount() ) )
+if( (nEdgeY > 0) && (nEdgeY <= nRowCount ) )
 {
 *pnMin = maRows[nEdgeY-1].mnPos + 600; // todo
 }
@@ -265,7 +266,7 @@
 }
 else
 {
-if( nEdgeX == getColumnCount() )
+if( nEdgeX == nColCount )
 nRet += maColumns[nEdgeX - 1].mnSize;
 }
 

-- 
To view, visit https://gerrit.libreoffice.org/1777
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e1460913099d1060d5005329e0b63e5ebcd362c
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Karthikeyan Krishnamurthi 

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Weird localization

2013-01-19 Thread James Cloos
I'm not sure whether this is an upstream bug or Gentoo-specific, so it
seemed best to talk about it here before I open a bugz report on it.

I have lo 4.0.0.1 on an amd64 Gentoo box.

The UI is, as it should be, in English except that one toolbar in draw,
which identifies itself as Gdmath Addon if I move the bar to its own X
window (via d-n-d) has tooltips auf Deutsch and the tools pop up dialogs
where are all en Français.  I don't think I've seen a bug quite like
this one before -- it can't even decide *which* fremdsprach to use. :-/

Now that I see that this is an addon, is there a more-specific place to
post a bug report?  The toolbar was default on so I had presumed it to
be (a new) part of the main release.

-JimC
-- 
James Cloos  OpenPGP: 1024D/ED7DAEA6
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 54157] LibreOffice 3.7/4.0 most annoying bugs

2013-01-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=54157

--- Comment #83 from Joren De Cuyper  ---
I nominate "Bug 58978 - [FILEOPEN][FILESAVE]: General Error while
opening/closing .odt files" because of an error message every time you
open/save an ODT file (Mac osx only)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 54157] LibreOffice 3.7/4.0 most annoying bugs

2013-01-19 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=54157

Joren De Cuyper  changed:

   What|Removed |Added

 Depends on||58978

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: vcl/aqua

2013-01-19 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/atsui/salgdi.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit dc44862f0e711fe0cf93063f72ebe1dec598d922
Author: Tor Lillqvist 
Date:   Sun Jan 20 00:47:24 2013 +0200

Fix fallout from my earlier vcl changes today

Change-Id: Iee869d254944383994d9c8da73603b71cafe85b8

diff --git a/vcl/aqua/source/gdi/atsui/salgdi.cxx 
b/vcl/aqua/source/gdi/atsui/salgdi.cxx
index 44281fb..904ba91 100644
--- a/vcl/aqua/source/gdi/atsui/salgdi.cxx
+++ b/vcl/aqua/source/gdi/atsui/salgdi.cxx
@@ -35,9 +35,7 @@
 #include "vcl/sysdata.hxx"
 #include "vcl/svapp.hxx"
 
-#include "aqua/salconst.h"
 #include "aqua/atsui/salgdi.h"
-#include "aqua/salbmp.h"
 #include "aqua/salframe.h"
 #include "aqua/salcolorutils.hxx"
 #include "aqua/atsui/salatsuifontutils.hxx"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Duplicated default templates

2013-01-19 Thread Xisco Faulí
Hello again,

I found out why agenda templates are duplicated. The reason is we need a
reference template to link the different sections of the template to toggle
their text. The java code is here:
http://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/text/TextSectionHandler.java#175

Regards,
Xisco

2013/1/18 Xisco Faulí 

> Hello everybody,
>
> working on agenda wizard I came across this
> folder install/share/template/common/wizard/agenda where all default agenda
> templates are duplicated. Is there any reason why they are duplicated ?
> None of the other wizard's templates are. If noone yeld about it I'd like
> to proceed and delete them. It'll let us save ~180kb.
>
> Regards,
> Xisco
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: 2 commits - cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UI_cui.mk vcl/inc vcl/source

2013-01-19 Thread Libreoffice Gerrit user
 cui/AllLangResTarget_cui.mk |1 
 cui/UI_cui.mk   |1 
 cui/source/dialogs/splitcelldlg.cxx |   57 +++
 cui/source/dialogs/splitcelldlg.hrc |   29 ---
 cui/source/dialogs/splitcelldlg.src |  118 ---
 cui/source/inc/splitcelldlg.hxx |   14 -
 cui/uiconfig/ui/splitcellsdialog.ui |  275 
 vcl/inc/vcl/builder.hxx |   17 +-
 vcl/source/control/button.cxx   |4 
 vcl/source/window/builder.cxx   |   43 -
 10 files changed, 359 insertions(+), 200 deletions(-)

New commits:
commit 621d1fba84e13a28843fb7a7befb28e26a6d0a15
Author: Caolán McNamara 
Date:   Sat Jan 19 16:22:18 2013 +

convert split cells dialog to our 99th .ui file

Change-Id: If1a37074400540e3adce42de2bb7c88c2c599382

diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index f8a133e..967d702 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -73,7 +73,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
 cui/source/dialogs/scriptdlg.src \
 cui/source/dialogs/sdrcelldlg.src \
 cui/source/dialogs/showcols.src \
-cui/source/dialogs/splitcelldlg.src \
 cui/source/dialogs/srchxtra.src \
 cui/source/dialogs/svuidlg.src \
 cui/source/dialogs/tbxform.src \
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index d041c02..e67ffac 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/select_persona_dialog \
cui/uiconfig/ui/specialcharacters \
cui/uiconfig/ui/spellingdialog \
+   cui/uiconfig/ui/splitcellsdialog \
cui/uiconfig/ui/thesaurus \
cui/uiconfig/ui/twolinespage \
cui/uiconfig/ui/zoomdialog \
diff --git a/cui/source/dialogs/splitcelldlg.cxx 
b/cui/source/dialogs/splitcelldlg.cxx
index d1566a5..f8d37b9 100644
--- a/cui/source/dialogs/splitcelldlg.cxx
+++ b/cui/source/dialogs/splitcelldlg.cxx
@@ -23,40 +23,33 @@
 #include "dialmgr.hxx"
 #include "splitcelldlg.hxx"
 #include "cuires.hrc"
-#include "splitcelldlg.hrc"
 
-SvxSplitTableDlg::SvxSplitTableDlg( Window *pParent, bool bIsTableVertical, 
long nMaxVertical, long nMaxHorizontal )
-: SvxStandardDialog(pParent, CUI_RES(RID_SVX_SPLITCELLDLG))
-, maCountFL(this, CUI_RES(FL_COUNT))
-, maCountLbl(this, CUI_RES(FT_COUNT))
-, maCountEdit(this, CUI_RES(ED_COUNT))
-, maDirFL(this, CUI_RES(FL_DIR))
-, maHorzBox(this, CUI_RES(RB_HORZ))
-, maVertBox(this, CUI_RES(RB_VERT))
-, maPropCB(this, CUI_RES(CB_PROP))
-, maOKBtn(this, CUI_RES(BT_OK))
-, maCancelBtn(this, CUI_RES(BT_CANCEL))
-, maHelpBtn( this, CUI_RES( BT_HELP ) )
-, mnMaxVertical( nMaxVertical )
-, mnMaxHorizontal( nMaxHorizontal )
+SvxSplitTableDlg::SvxSplitTableDlg( Window *pParent, bool bIsTableVertical,
+long nMaxVertical, long nMaxHorizontal )
+: SvxStandardDialog(pParent, "SplitCellsDialog", 
"cui/ui/splitcellsdialog.ui")
+, mnMaxVertical(nMaxVertical)
+, mnMaxHorizontal(nMaxHorizontal)
 {
-FreeResource();
-maHorzBox.SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
-maPropCB.SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
-maVertBox.SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
+get(m_pCountEdit, "countnf");
+get(m_pHorzBox, "hori");
+get(m_pVertBox, "vert");
+get(m_pPropCB, "prop");
+m_pHorzBox->SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
+m_pPropCB->SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
+m_pVertBox->SetClickHdl( LINK( this, SvxSplitTableDlg, ClickHdl ));
 
 if( mnMaxVertical < 2 )
-maVertBox.Enable(sal_False);
+m_pVertBox->Enable(sal_False);
 
 //exchange the meaning of horizontal and vertical for vertical text
 if(bIsTableVertical)
 {
-Image aTmpImg(maHorzBox.GetModeRadioImage());
-String sTmp(maHorzBox.GetText());
-maHorzBox.SetText(maVertBox.GetText());
-maHorzBox.SetModeRadioImage(maVertBox.GetModeRadioImage());
-maVertBox.SetText(sTmp);
-maVertBox.SetModeRadioImage(aTmpImg);
+Image aTmpImg(m_pHorzBox->GetModeRadioImage());
+String sTmp(m_pHorzBox->GetText());
+m_pHorzBox->SetText(m_pVertBox->GetText());
+m_pHorzBox->SetModeRadioImage(m_pVertBox->GetModeRadioImage());
+m_pVertBox->SetText(sTmp);
+m_pVertBox->SetModeRadioImage(aTmpImg);
 }
 }
 
@@ -66,26 +59,26 @@ SvxSplitTableDlg::~SvxSplitTableDlg()
 
 IMPL_LINK( SvxSplitTableDlg, ClickHdl, Button *, pButton )
 {
-const bool bIsVert =  pButton == &maVertBox ;
+const bool bIsVert =  pButton == m_pVertBox ;
 long nMax = bIsVert ? mnMaxVertical : mnMaxHorizontal;
-maPropCB.Enable(!bIsVert);
-maCountEdit.SetMax( nMax );
+m_pPropCB->Enable(!bIsVert);
+m_pCountEdit->SetMax( nMax );
 return 0;
 }
 
 bool SvxSplitTableDlg::IsHorizontal() const
 {
-return maHorzBox.IsChecked();
+return m_pHorzBox->IsChecked();

[PATCH] Update default dictionaries set for Lithuanian (related to f...

2013-01-19 Thread via Code Review
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/1776

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/76/1776/1

Update default dictionaries set for Lithuanian (related to fdo#59380)

Change-Id: I42a2032e03035b0e45a800c068879e9820471dfc
---
M setup_native/source/packinfo/spellchecker_selection.txt
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/setup_native/source/packinfo/spellchecker_selection.txt 
b/setup_native/source/packinfo/spellchecker_selection.txt
index 2ae0e47..3763771a 100644
--- a/setup_native/source/packinfo/spellchecker_selection.txt
+++ b/setup_native/source/packinfo/spellchecker_selection.txt
@@ -54,7 +54,7 @@
 ja = "EMPTY"
 ko = "EMPTY"
 ku = "ku-TR"
-lt = "lt"
+lt = "lt,de,pl,ru"
 lv = "lv"
 nb = "no,fr,de,es"
 ne = "ne"

-- 
To view, visit https://gerrit.libreoffice.org/1776
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42a2032e03035b0e45a800c068879e9820471dfc
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Aurimas Fišeras 

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Add Lithuanian translations of keyboard shortcuts (related t...

2013-01-19 Thread via Code Review
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/1775

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/75/1775/1

Add Lithuanian translations of keyboard shortcuts (related to fdo#54165)

Change-Id: I0e9460adeebb2e2a46ca3cd0e683cd4f0026916b
---
M vcl/win/source/window/keynames.cxx
1 file changed, 22 insertions(+), 0 deletions(-)



diff --git a/vcl/win/source/window/keynames.cxx 
b/vcl/win/source/window/keynames.cxx
index dc58acd..a8c1287 100755
--- a/vcl/win/source/window/keynames.cxx
+++ b/vcl/win/source/window/keynames.cxx
@@ -94,10 +94,32 @@
 { KEY_SPACEBAR, "Tühik" },
 };
 
+static const struct KeysNameReplacement aImplReplacements_Lithuanian[] =
+{
+{ KEY_ESC, "Gr" },
+{ KEY_BACK, "Naikinti" },
+{ KEY_ENTER, "Įvesti" },
+{ KEY_SPACEBAR, "Tarpas" },
+{ KEY_HOME, "Prad" },
+{ KEY_UP, "Aukštyn" },
+{ KEY_PAGEUP, "Psl↑" },
+{ KEY_LEFT, "Kairėn" },
+{ KEY_RIGHT, "Dešinėn" },
+{ KEY_END, "Pab" },
+{ KEY_DOWN, "Žemyn" },
+{ KEY_PAGEDOWN, "Psl↓" },
+{ KEY_INSERT, "Įterpti" },
+{ KEY_DELETE, "Šal" },
+{ KEY_CONTROL, "Vald" },
+{ KEY_SHIFT, "Lyg2" },
+{ KEY_ALT, "Alt" },
+};
+
 static const struct KeyboardReplacements aKeyboards[] =
 {
 { "ca", aImplReplacements_Catalan, 
SAL_N_ELEMENTS(aImplReplacements_Catalan) },
 { "et", aImplReplacements_Estonian, 
SAL_N_ELEMENTS(aImplReplacements_Estonian) },
+{ "lt", aImplReplacements_Lithuanian, 
SAL_N_ELEMENTS(aImplReplacements_Lithuanian) },
 };
 
 // translate keycodes, used within the displayed menu shortcuts

-- 
To view, visit https://gerrit.libreoffice.org/1775
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e9460adeebb2e2a46ca3cd0e683cd4f0026916b
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Aurimas Fišeras 

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Add Lithuanian translations of keyboard shortcuts (related t...

2013-01-19 Thread via Code Review
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/1774

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/74/1774/1

Add Lithuanian translations of keyboard shortcuts (related to fdo#50415)

Change-Id: Ie5df8819c59135625f504f7d5b6736ddab7aab53
---
M vcl/unx/generic/app/keysymnames.cxx
1 file changed, 37 insertions(+), 0 deletions(-)



diff --git a/vcl/unx/generic/app/keysymnames.cxx 
b/vcl/unx/generic/app/keysymnames.cxx
index 05c37d4..3a6c602 100644
--- a/vcl/unx/generic/app/keysymnames.cxx
+++ b/vcl/unx/generic/app/keysymnames.cxx
@@ -371,6 +371,42 @@
 { SunXK_Cut,   "Retalla" },
 };
 
+static const struct KeysymNameReplacement aImplReplacements_Lithuanian[] =
+{
+{ XK_Control_L, "Vald" },
+{ XK_Control_R, "Vald" },
+{ XK_Shift_L, "Lyg2" },
+{ XK_Shift_R, "Lyg2" },
+{ XK_Alt_L, "Alt" },
+{ XK_Alt_R, "Lyg3" },
+{ XK_Page_Up, "Psl↑" },
+{ XK_Page_Down, "Psl↓" },
+{ XK_End, "Pab" },
+{ XK_Home, "Prad" },
+{ XK_Insert, "Įterpti" },
+{ XK_Delete, "Šal" },
+{ XK_Escape, "Gr" },
+{ XK_Right, "Dešinėn" },
+{ XK_Left, "Kairėn" },
+{ XK_Up, "Aukštyn" },
+{ XK_Down, "Žemyn" },
+{ XK_BackSpace, "Naikinti" },
+{ XK_Return, "Įvesti" },
+{ XK_asterisk, "Žvaigždutė" },
+{ XK_slash, "Dešininis brūkšnys" },
+{ XK_space, "Tarpas" },
+{ SunXK_Stop,  "Stabdyti" },
+{ SunXK_Again, "Kartoti" },
+{ SunXK_Props, "Savybės" },
+{ SunXK_Undo,  "Atšaukti" },
+{ SunXK_Front, "Priekinis planas" },
+{ SunXK_Copy,  "Kopijuoti" },
+{ SunXK_Open,  "Atverti" },
+{ SunXK_Paste, "Įdėti" },
+{ SunXK_Find,  "Ieškoti" },
+{ SunXK_Cut,   "Iškirpti" },
+};
+
 static const struct KeyboardReplacements aKeyboards[] =
 {
 { "ca", aImplReplacements_Catalan, 
SAL_N_ELEMENTS(aImplReplacements_Catalan) },
@@ -379,6 +415,7 @@
 { "et", aImplReplacements_Estonian, 
SAL_N_ELEMENTS(aImplReplacements_Estonian) },
 { "fr", aImplReplacements_French, 
SAL_N_ELEMENTS(aImplReplacements_French) },
 { "it", aImplReplacements_Italian, 
SAL_N_ELEMENTS(aImplReplacements_Italian) },
+{ "lt", aImplReplacements_Lithuanian, 
SAL_N_ELEMENTS(aImplReplacements_Lithuanian) },
 { "nl", aImplReplacements_Dutch, 
SAL_N_ELEMENTS(aImplReplacements_Dutch) },
 { "no", aImplReplacements_Norwegian, 
SAL_N_ELEMENTS(aImplReplacements_Norwegian) },
 { "pt", aImplReplacements_Portuguese, 
SAL_N_ELEMENTS(aImplReplacements_Portuguese) },

-- 
To view, visit https://gerrit.libreoffice.org/1774
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5df8819c59135625f504f7d5b6736ddab7aab53
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Aurimas Fišeras 

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Remove some unneeded variables in filter

2013-01-19 Thread Marcos Souza (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/1773

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/73/1773/1

Remove some unneeded variables in filter

Change-Id: Ia2963498a197a795155a42b2588f983019d89f35
---
M filter/source/graphicfilter/eps/eps.cxx
1 file changed, 7 insertions(+), 12 deletions(-)



diff --git a/filter/source/graphicfilter/eps/eps.cxx 
b/filter/source/graphicfilter/eps/eps.cxx
index 9405328..58c56f5 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -298,26 +298,21 @@
 
 if( pResMgr )
 {
-String aPreviewStr( "Preview" );
-String aVersionStr( "Version" );
-String aColorStr( "ColorFormat" );
-String aComprStr( "CompressionMode" );
 #ifdef UNX // don't put binary tiff preview ahead of postscript code by 
default on unix as ghostscript is unable to read it
-mnPreview = pFilterConfigItem->ReadInt32( aPreviewStr, 0 );
+mnPreview = pFilterConfigItem->ReadInt32( "Preview", 0 );
 #else
-mnPreview = pFilterConfigItem->ReadInt32( aPreviewStr, 1 );
+mnPreview = pFilterConfigItem->ReadInt32( "Preview", 1 );
 #endif
-mnLevel = pFilterConfigItem->ReadInt32( aVersionStr, 2 );
+mnLevel = pFilterConfigItem->ReadInt32( "Version", 2 );
 if ( mnLevel != 1 )
 mnLevel = 2;
-mbGrayScale = pFilterConfigItem->ReadInt32( aColorStr, 1 ) == 2;
+mbGrayScale = pFilterConfigItem->ReadInt32( "ColorFormat", 1 ) == 
2;
 #ifdef UNX // don't compress by default on unix as ghostscript is unable to 
read LZW compressed eps
-mbCompression = pFilterConfigItem->ReadInt32( aComprStr, 0 ) != 0;
+mbCompression = pFilterConfigItem->ReadInt32( "CompressionMode", 0 
) != 0;
 #else
-mbCompression = pFilterConfigItem->ReadInt32( aComprStr, 1 ) == 1;
+mbCompression = pFilterConfigItem->ReadInt32( "CompressionMode", 1 
) == 1;
 #endif
-String sTextMode( "TextMode" );
-mnTextMode = pFilterConfigItem->ReadInt32( sTextMode, 0 );
+mnTextMode = pFilterConfigItem->ReadInt32( "TextMode", 0 );
 if ( mnTextMode > 2 )
 mnTextMode = 0;
 delete pResMgr;

-- 
To view, visit https://gerrit.libreoffice.org/1773
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2963498a197a795155a42b2588f983019d89f35
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Marcos Souza 

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: 2 commits - solenv/bin

2013-01-19 Thread Libreoffice Gerrit user
 solenv/bin/modules/installer/download.pm  |5 +
 solenv/bin/modules/installer/parameter.pm |2 +-
 solenv/bin/modules/installer/simplepackage.pm |6 ++
 3 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit e3dfe8905fc3d7ec1d0dd0fc20ac1189d2636e53
Author: Tor Lillqvist 
Date:   Sat Jan 19 21:10:29 2013 +0200

Handle unxmacxx, too

diff --git a/solenv/bin/modules/installer/download.pm 
b/solenv/bin/modules/installer/download.pm
index 6d370ae..ca39a96 100644
--- a/solenv/bin/modules/installer/download.pm
+++ b/solenv/bin/modules/installer/download.pm
@@ -422,6 +422,10 @@ sub get_download_architecture
 {
 $arch = "x86";
 }
+elsif ( $installer::globals::compiler =~ /^unxmacxx/ )
+{
+$arch = "x86-64";
+}
 elsif ( $installer::globals::compiler =~ /^unxmacxp/ )
 {
 $arch = "PPC";
@@ -596,6 +600,7 @@ sub resolve_variables_in_downloadname
 elsif ( $installer::globals::issolarisx86build ) { $os = "solia"; }
 elsif ( $installer::globals::islinuxbuild ) { $os = "linux"; }
 elsif ( $installer::globals::compiler =~ /unxmacxi/ ) { $os = "macosxi"; }
+elsif ( $installer::globals::compiler =~ /unxmacxx/ ) { $os = "macosxx"; }
 elsif ( $installer::globals::compiler =~ /unxmacxp/ ) { $os = "macosxp"; }
 else { $os = ""; }
 $downloadname =~ s/\{os\}/$os/;
diff --git a/solenv/bin/modules/installer/parameter.pm 
b/solenv/bin/modules/installer/parameter.pm
index 2aa0a28..deda9d3 100644
--- a/solenv/bin/modules/installer/parameter.pm
+++ b/solenv/bin/modules/installer/parameter.pm
@@ -268,7 +268,7 @@ sub setglobalvariables
 }
 }
 
-if (( $installer::globals::compiler =~ /unxmacxi/ ) || ( 
$installer::globals::compiler =~ /unxmacxp/ ))
+if ( $installer::globals::compiler =~ /unxmacx/ )
 {
 $installer::globals::ismacbuild = 1;
 
commit c7e3f88b1291c35e09d08d14f82eadf60f7063cd
Author: Tor Lillqvist 
Date:   Sat Jan 19 21:05:59 2013 +0200

Fix Mac build fallout from PRODUCTEXTENSION change

PRODUCTEXTENSION used to be empty. (No idea for how long it had been
empty.) And apparently some of the "installer" Perl code implicitly
assumed PRODUCTEXTENSION was empty. At least, producing the langpack
dmg for Mac started to fail when PRODUCTEXTENSION was no longer empty.

diff --git a/solenv/bin/modules/installer/simplepackage.pm 
b/solenv/bin/modules/installer/simplepackage.pm
index c9ce580..55e65bd 100755
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -278,13 +278,11 @@ sub create_package
 $folder = $packagename;
 }
 
-# my $volume_name = $allvariables->{'PRODUCTNAME'} . ' ' . 
$allvariables->{'PRODUCTVERSION'}; # Adding PRODUCTVERSION makes this difficult 
to maintain!
 my $volume_name = $allvariables->{'PRODUCTNAME'};
 my $volume_name_classic = $allvariables->{'PRODUCTNAME'} . ' ' . 
$allvariables->{'PRODUCTVERSION'};
 my $volume_name_classic_app = $volume_name;  # "app" should not 
contain version number
-# $volume_name = $volume_name . ' ' . 
$allvariables->{'PRODUCTEXTENSION'} if $allvariables->{'PRODUCTEXTENSION'}; # 
Adding PRODUCTEXTENSION makes this difficult to maintain!
-$volume_name_classic = $volume_name_classic . ' ' . 
$allvariables->{'PRODUCTEXTENSION'} if $allvariables->{'PRODUCTEXTENSION'};
-$volume_name_classic_app = $volume_name_classic_app . ' ' . 
$allvariables->{'PRODUCTEXTENSION'} if $allvariables->{'PRODUCTEXTENSION'};
+$volume_name_classic = $volume_name_classic;
+$volume_name_classic_app = $volume_name_classic_app;
 if ( $allvariables->{'DMG_VOLUMEEXTENSION'} ) {
 $volume_name = $volume_name . ' ' . 
$allvariables->{'DMG_VOLUMEEXTENSION'};
 $volume_name_classic = $volume_name_classic . ' ' . 
$allvariables->{'DMG_VOLUMEEXTENSION'};
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


About parenthesis problem in testintrosp.cxx

2013-01-19 Thread julien2412
Hello,

Here's a problem in stoc/test/testintrosp.cxx, line 182
aRetStr = aRetStr + OUString( OUString(" (Typ: ") ) + xIdlClass->getName() +
OUString(""));

By taking a look at git history, I found that it was:
aRetStr = aRetStr + OUString( OUString(RTL_CONSTASCII_USTRINGPARAM(" (Typ:
")) ) + xIdlClass->getName() + OUString(RTL_CONSTASCII_USTRINGPARAM(")"));
before 02/06/2012

If testintrosp.cxx is still used, an idea how to make this line more clear
(and perhaps removing the double use of OUString)?

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/About-parenthesis-problem-in-testintrosp-cxx-tp4030420.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


About ucbdemo (still used?)

2013-01-19 Thread julien2412
Hello,

Cppcheck detected this:
ucb/workben/ucb/ucbdemo.cxx
1735syntaxError error   Invalid number of character (() when these 
macros are
defined: ''.

I fixed parenthesis (there was not just one problem) but I don't know how to
check this since "make ucbdemo" tells:
make: *** No rule to make target `ucbdemo'.  Stop.
(even if I run this in /ucb/workben/ucb

Is ucbdemo still used? How to build it?

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/About-ucbdemo-still-used-tp4030414.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Cppcheck : Variable 'nMode' is reassigned in fstat.cxx

2013-01-19 Thread julien2412
Hello,

Cppcheck reported this: 



Indeed, we can see this:
109 if (bRO)
110 {
111 nMode = aBuf.st_mode & ~S_IWUSR;
112 nMode = aBuf.st_mode & ~S_IWGRP;
113 nMode = aBuf.st_mode & ~S_IWOTH;
114 }

see
http://opengrok.libreoffice.org/xref/core/tools/source/fsys/fstat.cxx#109

Any idea about this?

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/Cppcheck-Variable-nMode-is-reassigned-in-fstat-cxx-tp4030405.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: 3 commits - lotuswordpro/source oox/source svgio/source

2013-01-19 Thread Libreoffice Gerrit user
 lotuswordpro/source/filter/lwpborderstuff.cxx |   12 
 lotuswordpro/source/filter/lwpmargins.hxx |4 
 oox/source/ppt/conditioncontext.cxx   |1 -
 oox/source/ppt/layoutfragmenthandler.cxx  |1 -
 oox/source/ppt/slidefragmenthandler.cxx   |1 -
 oox/source/ppt/timenodelistcontext.cxx|3 ---
 svgio/source/svgreader/svgstyleattributes.cxx |3 ---
 svgio/source/svgreader/svgtools.cxx   |4 
 8 files changed, 29 deletions(-)

New commits:
commit 8ab3715d8e622d06cfaa404842de2d9f8ea66ef5
Author: Julien Nabet 
Date:   Sat Jan 19 17:14:01 2013 +0100

Again Fix others Consecutive return, break

Change-Id: I67a453bb09b794c996f5f02a065abe8cef6ca3b6

diff --git a/lotuswordpro/source/filter/lwpborderstuff.cxx 
b/lotuswordpro/source/filter/lwpborderstuff.cxx
index 89f4062..69591b4 100644
--- a/lotuswordpro/source/filter/lwpborderstuff.cxx
+++ b/lotuswordpro/source/filter/lwpborderstuff.cxx
@@ -167,16 +167,12 @@ sal_uInt16  LwpBorderStuff::GetSideType(sal_uInt16 side)
 {
 case LEFT:
 return m_nBoderGroupIDLeft;
-break;
 case RIGHT:
 return m_nBoderGroupIDRight;
-break;
 case TOP:
 return m_nBoderGroupIDTop;
-break;
 case BOTTOM:
 return m_nBoderGroupIDBottom;
-break;
 }
 // FIXME: this is needed to avoid warning: control reaches end of non-void 
function
 //a better solution would be to enum value for the parameter side
@@ -189,16 +185,12 @@ LwpColorLwpBorderStuff::GetSideColor(sal_uInt16 side)
 {
 case LEFT:
 return m_aColorLeft;
-break;
 case RIGHT:
 return m_aColorRight;
-break;
 case TOP:
 return m_aColorTop;
-break;
 case BOTTOM:
 return m_aColorBottom;
-break;
 }
 // FIXME: this is needed to avoid warning: control reaches end of non-void 
function
 //a better solution would be to enum value for the parameter side
@@ -211,16 +203,12 @@ float   LwpBorderStuff::GetSideWidth(sal_uInt16 side)
 {
 case LEFT:
 return 
LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(m_nWidthLeft));
-break;
 case RIGHT:
 return 
LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(m_nWidthRight));
-break;
 case TOP:
 return 
LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(m_nWidthTop));
-break;
 case BOTTOM:
 return 
LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(m_nWidthBottom));
-break;
 }
 // FIXME: this is needed to avoid warning: control reaches end of non-void 
function
 //a better solution would be to enum value for the parameter side
diff --git a/oox/source/ppt/conditioncontext.cxx 
b/oox/source/ppt/conditioncontext.cxx
index 8ef4881..2fa15d2 100644
--- a/oox/source/ppt/conditioncontext.cxx
+++ b/oox/source/ppt/conditioncontext.cxx
@@ -178,7 +178,6 @@ namespace oox { namespace ppt {
 // add a condition to the list
 maConditions.push_back( AnimationCondition() );
 return new CondContext( *this, rAttribs.getFastAttributeList(), 
mpNode, maConditions.back() );
-break;
 default:
 break;
 }
diff --git a/oox/source/ppt/layoutfragmenthandler.cxx 
b/oox/source/ppt/layoutfragmenthandler.cxx
index d2e72e6..40c8f2a 100644
--- a/oox/source/ppt/layoutfragmenthandler.cxx
+++ b/oox/source/ppt/layoutfragmenthandler.cxx
@@ -66,7 +66,6 @@ ContextHandlerRef LayoutFragmentHandler::onCreateContext( 
sal_Int32 aElementToke
 }
 case PPT_TOKEN( hf ):   // CT_HeaderFooter
 return new HeaderFooterContext( *this, rAttribs, 
mpSlidePersistPtr->getHeaderFooter() );
-break;
 default:
 return SlideFragmentHandler::onCreateContext( aElementToken, 
rAttribs );
 }
diff --git a/oox/source/ppt/slidefragmenthandler.cxx 
b/oox/source/ppt/slidefragmenthandler.cxx
index 8caa1a7..12b0ebb 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -185,7 +185,6 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
 return this;
 case PPT_TOKEN( txStyles ): // CT_SlideMasterTextStyles
 return new SlideMasterTextStylesContext( *this, mpSlidePersistPtr );
-break;
 case PPT_TOKEN( custDataLst ):  // CT_CustomerDataList
 case PPT_TOKEN( tagLst ):   // CT_TagList
 return this;
diff --git a/oox/source/ppt/timenodelistcontext.cxx 
b/oox/source/ppt/timenodelistcontext.cxx
index 72c6beb..5e7227a 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -147,7 +147,6 @@ namespace oox { namespace ppt {
 {
 case PPT_TOKEN( cBhvr ):
 return new CommonBehaviorContext ( *this, 
rAttribs.getFastAttributeList(), mpNode );
-  

Re: [Libreoffice-qa] Bug 59481 - FILEOPEN: Linux rpm: Native MySQL-connector aoo-my-sdbc-1.1.0 didn't work any more with LO 4.0

2013-01-19 Thread Terrence Enger
On Fri, 2013-01-18 at 08:04 -0800, Joel Madero wrote:
> Can someone triage this one? Thanks in advance!

And there has been quit a bit of subsequent discussion.

I wonder just what Lionel was proposing [1] after the announcement [2]
of changed licence for the mariadb / mysql client library.  How would
this compare in effort and benefit to the job of making the mysql
extension work with LibreOffice 4.0?

Just by the way, does this change of licence return mysql to
consideration for LO's built-in database [4]?

Terry.


References
--

[1]

"minutes of ESC call ...".  Search for "LGPL"

[2]

Reporting "503 - Service Not Available" as I write this".

[4] 
fdo# 51781 "Select a good replacement for embedded HSQLDB 1.8"


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2013-01-19 Thread Libreoffice Gerrit user
 sw/UI_swriter.mk   |1 
 sw/inc/globals.hrc |3 
 sw/inc/helpid.h|4 
 sw/source/ui/inc/outline.hxx   |5 
 sw/source/ui/misc/outline.cxx  |  124 +++
 sw/source/ui/misc/outline.hrc  |   14 -
 sw/source/ui/misc/outline.src  |  101 
 sw/uiconfig/swriter/ui/outlinenumbering.ui |  238 +
 vcl/inc/vcl/builder.hxx|   20 ++
 vcl/source/window/builder.cxx  |4 
 10 files changed, 323 insertions(+), 191 deletions(-)

New commits:
commit 55786395b56e365cb0d6663f4d375b37aaf79228
Author: Caolán McNamara 
Date:   Sat Jan 19 12:08:26 2013 +

convert outline numbering tabdialog to .ui

Change-Id: I233c43132fe82f65f2f2dda9fc1afee0237610bd

diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk
index f3a3735..a35b38f 100644
--- a/sw/UI_swriter.mk
+++ b/sw/UI_swriter.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/insertscript \
sw/uiconfig/swriter/ui/inserttable \
sw/uiconfig/swriter/ui/linenumbering \
+   sw/uiconfig/swriter/ui/outlinenumbering \
sw/uiconfig/swriter/ui/outlinenumberingpage \
sw/uiconfig/swriter/ui/outlinepositionpage \
sw/uiconfig/swriter/ui/printoptionspage \
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 5e1a49c..e70f6e4 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -178,13 +178,10 @@
 #define TP_FLD_REF  (RC_GLOBALS_BEGIN +  69)
 
 #define TP_OPTSHDWCRSR  (RC_GLOBALS_BEGIN +  70)
-#define TP_NUM_POSITION (RC_GLOBALS_BEGIN +  72)
 #define TP_NUMPARA  (RC_GLOBALS_BEGIN +  73)
 
 #define TP_REDLINE_OPT  (RC_GLOBALS_BEGIN +  74)
 
-#define TP_OUTLINE_NUM  (RC_GLOBALS_BEGIN +  76)
-
 #define TP_OPTCAPTION_PAGE  (RC_GLOBALS_BEGIN +  78)
 #define DLG_SVXTEST_NUM_BULLET  (RC_GLOBALS_BEGIN +  79)
 #define TP_OPTLOAD_PAGE (RC_GLOBALS_BEGIN +  80)
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index ad87626..a09ad84 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -114,9 +114,6 @@
 #define HID_GLBLTREE_UPD_IDX
"SW_HID_GLBLTREE_UPD_IDX"
 #define HID_GLBLTREE_UPD_LINK   
"SW_HID_GLBLTREE_UPD_LINK"
 #define HID_GLBLTREEUPD_ALL 
"SW_HID_GLBLTREEUPD_ALL"
-#define HID_NUM_OUTL_NAMED_NUMS 
"SW_HID_NUM_OUTL_NAMED_NUMS"
-#define HID_NUM_OUTL_NUM_SAVEAS 
"SW_HID_NUM_OUTL_NUM_SAVEAS"
-#define HID_NUM_NAMED_NUMS  
"SW_HID_NUM_NAMED_NUMS"
 #define HID_NAVI_CONTENT
"SW_HID_NAVI_CONTENT"
 #define HID_NAVI_GLOBAL 
"SW_HID_NAVI_GLOBAL"
 #define HID_LTEMPL_NUMBERING
"SW_HID_LTEMPL_NUMBERING"
@@ -355,7 +352,6 @@
 #define HID_SELECT_TEMPLATE 
"SW_HID_SELECT_TEMPLATE"
 
 #define HID_AP_INSERT_DB_SEL
"SW_HID_AP_INSERT_DB_SEL"
-#define HID_OUTLINE_FORM
"SW_HID_OUTLINE_FORM"
 #define HID_NUM_RESET   
"SW_HID_NUM_RESET"
 
 #define HID_AUTOFORMAT_REJECT   
"SW_HID_AUTOFORMAT_REJECT"
diff --git a/sw/source/ui/inc/outline.hxx b/sw/source/ui/inc/outline.hxx
index 8ffadb3..0e2fa18 100644
--- a/sw/source/ui/inc/outline.hxx
+++ b/sw/source/ui/inc/outline.hxx
@@ -47,9 +47,10 @@ class SwOutlineTabDialog : public SfxTabDialog
 {
 static sal_uInt16nNumLevel;
 
-String  aNullStr;
+sal_uInt16 m_nNumPosId;
+sal_uInt16 m_nOutlineId;
+
 String  aCollNames[MAXLEVEL];
-PopupMenu   aFormMenu;
 
 SwWrtShell& rWrtSh;
 SwNumRule*  pNumRule;
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index b146b97..5a4d9e3 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -160,31 +160,23 @@ static sal_uInt16 lcl_BitToLevel(sal_uInt16 nActLevel)
 }
 
 sal_uInt16 SwOutlineTabDialog::nNumLevel = 1;
-SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent,
-const SfxItemSet* pSwItemSet,
-SwWrtShell &rSh) :
-// the UserString is set correctly 
afterwards
-SfxTabDialog(pParent, SW_RES(DLG_TAB_OUTLINE), pSwItemSet, sal_False, 
&aEmptyStr),
-aNullStr(rtl::OUString("")),
-aFormMenu(SW_RES(MN_FORM)),
-rWrtSh(rSh),
-pChapterNumRules(SW_MOD()->GetChapterNumRules()),
-bModified(rWrtSh.IsModified())
+SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, const Sfx

[PATCH] Remove more STRINGPARAM macros from dbaccess

2013-01-19 Thread Marcos Souza (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/1771

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/71/1771/1

Remove more STRINGPARAM macros from dbaccess

Change-Id: I5a5af27d7c980f6b71011c33531a49a82d79fbc8
---
M dbaccess/source/core/dataaccess/ContentHelper.cxx
M dbaccess/source/core/dataaccess/ModelImpl.cxx
M dbaccess/source/core/dataaccess/ModelImpl.hxx
M dbaccess/source/core/dataaccess/SharedConnection.hxx
M dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
M dbaccess/source/core/dataaccess/commandcontainer.cxx
M dbaccess/source/core/dataaccess/commanddefinition.cxx
M dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
8 files changed, 48 insertions(+), 77 deletions(-)



diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx 
b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index 20a535f..87b6480 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -93,10 +93,8 @@
 Reference< XContentIdentifier > SAL_CALL OContentHelper::getIdentifier(  ) 
throw (RuntimeException)
 {
 ::osl::MutexGuard aGuard(m_aMutex);
-::rtl::OUStringBuffer aIdentifier;
-aIdentifier.appendAscii( "private:" );
-aIdentifier.append( impl_getHierarchicalName( true ) );
-return new ::ucbhelper::ContentIdentifier( 
aIdentifier.makeStringAndClear() );
+OUString aIdentifier( "private:" + impl_getHierarchicalName( true ) );
+return new ::ucbhelper::ContentIdentifier( aIdentifier );
 }
 
 ::rtl::OUString OContentHelper::impl_getHierarchicalName( bool 
_includingRootContainer ) const
@@ -114,9 +112,7 @@
 xProp->getPropertyValue( PROPERTY_NAME ) >>= sName;
 
 ::rtl::OUString sPrevious = aHierarchicalName.makeStringAndClear();
-aHierarchicalName.append( sName );
-aHierarchicalName.append( sal_Unicode( '/' ) );
-aHierarchicalName.append( sPrevious );
+aHierarchicalName.append( sName + "/" + sPrevious );
 }
 }
 ::rtl::OUString sHierarchicalName( aHierarchicalName.makeStringAndClear() 
);
@@ -352,28 +348,19 @@
 if ( rValue.Name == "ContentType" )
 {
 // Read-only property!
-aRet[ n ] <<= IllegalAccessException(
-::rtl::OUString(
-RTL_CONSTASCII_USTRINGPARAM("Property is 
read-only!")
-),
+aRet[ n ] <<= IllegalAccessException("Property is read-only!",
 static_cast< cppu::OWeakObject * >( this ) );
 }
 else if ( rValue.Name == "IsDocument" )
 {
 // Read-only property!
-aRet[ n ] <<= IllegalAccessException(
-::rtl::OUString(
-RTL_CONSTASCII_USTRINGPARAM("Property is 
read-only!")
-),
+aRet[ n ] <<= IllegalAccessException("Property is read-only!",
 static_cast< cppu::OWeakObject * >( this ) );
 }
 else if ( rValue.Name == "IsFolder" )
 {
 // Read-only property!
-aRet[ n ] <<= IllegalAccessException(
-::rtl::OUString(
-RTL_CONSTASCII_USTRINGPARAM("Property is 
read-only!")
-),
+aRet[ n ] <<= IllegalAccessException("Property is read-only!",
 static_cast< cppu::OWeakObject * >( this ) );
 }
 else if ( rValue.Name == "Title" )
@@ -407,20 +394,14 @@
 }
 else
 {
-aRet[ n ] <<= IllegalTypeException(
-::rtl::OUString(
-RTL_CONSTASCII_USTRINGPARAM("Property 
value has wrong type!")
-),
+aRet[ n ] <<= IllegalTypeException("Property value has wrong 
type!",
 static_cast< cppu::OWeakObject * >( this ) );
 }
 }
 
 else
 {
-aRet[ n ] <<= Exception(
-::rtl::OUString(
-RTL_CONSTASCII_USTRINGPARAM("No property 
set for storing the value!")
-),
+aRet[ n ] <<= Exception("No property set for storing the value!",
 static_cast< cppu::OWeakObject * >( this ) );
 }
 }
@@ -478,28 +459,24 @@
 {
 // Append all Core Properties.
 xRow->appendString (
-Property( 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")),
-  -1,
+Property( "ContentType", -1,
   getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
   PropertyAttribute::BOUND
 | PropertyAttribute::RE

Re: -Wsign-promo (Re: [BUILD FAILS DEBUG MODE] with test_strings_valuex.cxx)

2013-01-19 Thread Michael Stahl
On 19/01/13 11:28, Lubos Lunak wrote:
>  -Wsign-promo is a rather pointless warning these days (the section in the 
> gcc 
> manpage is a funny read and not only because it talks about Cfront). I've 
> added more overloads to silence it, but I rather wonder why we have this 
> explicitly enabled at all.
> 
>  My hypothesis is like this:
> - the idea behind the warning is just nonsense (who cares to what integer 
> type 
> the value is promoted)

overflow for unsigned integral types is defined by the C and C++
standards, while overflow for signed types is explicitly undefined.
some implementations therefore assume that it does not occur and may
remove tests on signed integers from the code that could only evaluate
to true in case of an overflow in order to improve the all-important
SPEC benchmark scores.

-Wsign-promo is specifically about overload resolution, i'm not sure if
that overflow problem would be relevant in this case but this is C++ so
i'm never sure about anything :)

> - but it incidentally triggers when passing bool to SvStream, because it 
> doesn't have any overload for operator<<(bool), and int is chosen over 
> unsigned char AKA sal_Bool , so Caolan added it in 
> e8bbb76827dd7a0e30d7d1db34a812a84d85f390
> - if SvStream gets overload for bool, the warning can be dumped
> 
>  Or am I missing something there?

maybe there are more overloaded identifiers that simply haven't been
called with wrongly promoted parameters yet?


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: sal/inc

2013-01-19 Thread Libreoffice Gerrit user
 sal/inc/rtl/string.hxx  |   10 --
 sal/inc/rtl/ustring.hxx |   10 --
 2 files changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 06e76156d2ea1ce8a112f9e2312d6074478de648
Author: Luboš Luňák 
Date:   Sat Jan 19 13:54:40 2013 +0100

microoptimization for "" OUString ctor

Now 'OUString()' and '""' should be exactly the same, and thus the latter 
better :).

Change-Id: If42b2ca5889967aaa8ccdaf531b45c75c12d54fd

diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 6b3d2ff..11a7bf7 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -205,7 +205,10 @@ public:
 {
 assert( strlen( literal ) == internal::ConstCharArrayDetector< T 
>::size - 1 );
 pData = 0;
-rtl_string_newFromLiteral( &pData, literal, 
internal::ConstCharArrayDetector< T, void >::size - 1, 0 );
+if( internal::ConstCharArrayDetector< T, void >::size - 1 == 0 ) // 
empty string
+rtl_string_new( &pData );
+else
+rtl_string_newFromLiteral( &pData, literal, 
internal::ConstCharArrayDetector< T, void >::size - 1, 0 );
 #ifdef RTL_STRING_UNITTEST
 rtl_string_unittest_const_literal = true;
 #endif
@@ -304,7 +307,10 @@ public:
 {
 RTL_STRING_CONST_FUNCTION
 assert( strlen( literal ) == internal::ConstCharArrayDetector< T 
>::size - 1 );
-rtl_string_newFromLiteral( &pData, literal, 
internal::ConstCharArrayDetector< T, void >::size - 1, 0 );
+if( internal::ConstCharArrayDetector< T, void >::size - 1 == 0 ) // 
empty string
+rtl_string_new( &pData );
+else
+rtl_string_newFromLiteral( &pData, literal, 
internal::ConstCharArrayDetector< T, void >::size - 1, 0 );
 return *this;
 }
 
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index a4051ac..69b8ab8 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -231,7 +231,10 @@ public:
 {
 assert( strlen( literal ) == internal::ConstCharArrayDetector< T 
>::size - 1 );
 pData = 0;
-rtl_uString_newFromLiteral( &pData, literal, 
internal::ConstCharArrayDetector< T, void >::size - 1, 0 );
+if( internal::ConstCharArrayDetector< T, void >::size - 1 == 0 ) // 
empty string
+rtl_uString_new( &pData );
+else
+rtl_uString_newFromLiteral( &pData, literal, 
internal::ConstCharArrayDetector< T, void >::size - 1, 0 );
 #ifdef RTL_STRING_UNITTEST
 rtl_string_unittest_const_literal = true;
 #endif
@@ -393,7 +396,10 @@ public:
 typename internal::ConstCharArrayDetector< T, OUString& >::Type operator=( 
T& literal )
 {
 assert( strlen( literal ) == internal::ConstCharArrayDetector< T 
>::size - 1 );
-rtl_uString_newFromLiteral( &pData, literal, 
internal::ConstCharArrayDetector< T, void >::size - 1, 0 );
+if( internal::ConstCharArrayDetector< T, void >::size - 1 == 0 ) // 
empty string
+rtl_uString_new( &pData );
+else
+rtl_uString_newFromLiteral( &pData, literal, 
internal::ConstCharArrayDetector< T, void >::size - 1, 0 );
 return *this;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[PATCH] Change in core[libreoffice-4-0]: resolve fdo#59240 - FORMATTING: Thai number shown as Arabic ...

2013-01-19 Thread Joren De Cuyper (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/1770

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/70/1770/1

resolve fdo#59240 - FORMATTING: Thai number shown as Arabic numerals

Change-Id: Ia0d1089d90a6b2196d45da63afbb7d8fa80e4658
---
M svl/source/numbers/zformat.cxx
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 01f38a2..9709110 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -5282,7 +5282,7 @@
 com::sun::star::lang::Locale aLocale( LanguageTag( rNum.GetLang() 
).getLocale() );
 
 OUString sTemp(rStr.makeStringAndClear());
-GetFormatter().GetNatNum()->getNativeNumberString( sTemp, aLocale, 
rNum.GetNatNum() );
+sTemp = GetFormatter().GetNatNum()->getNativeNumberString( sTemp, aLocale, 
rNum.GetNatNum() );
 rStr.append(sTemp);
 }
 

-- 
To view, visit https://gerrit.libreoffice.org/1770
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0d1089d90a6b2196d45da63afbb7d8fa80e4658
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Joren De Cuyper 

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] resolve fdo#59240 - FORMATTING: Thai number shown as Arabic ...

2013-01-19 Thread Joren De Cuyper (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/1769

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/69/1769/1

resolve fdo#59240 - FORMATTING: Thai number shown as Arabic numerals

Change-Id: I6123f8924d7502d3b97b3254ce4e5df724e4370d
---
M svl/source/numbers/zformat.cxx
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 01f38a2..9709110 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -5282,7 +5282,7 @@
 com::sun::star::lang::Locale aLocale( LanguageTag( rNum.GetLang() 
).getLocale() );
 
 OUString sTemp(rStr.makeStringAndClear());
-GetFormatter().GetNatNum()->getNativeNumberString( sTemp, aLocale, 
rNum.GetNatNum() );
+sTemp = GetFormatter().GetNatNum()->getNativeNumberString( sTemp, aLocale, 
rNum.GetNatNum() );
 rStr.append(sTemp);
 }
 

-- 
To view, visit https://gerrit.libreoffice.org/1769
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6123f8924d7502d3b97b3254ce4e5df724e4370d
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Joren De Cuyper 

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: src/docrecord.py src/docstream.py test/doc

2013-01-19 Thread Miklos Vajna
 src/docrecord.py  |   27 +--
 src/docstream.py  |   23 +++
 test/doc/bookmark.doc |binary
 test/doc/bookmark.rtf |7 +++
 test/doc/test.py  |   11 +++
 5 files changed, 62 insertions(+), 6 deletions(-)

New commits:
commit 8f7af80bf491794f9b1781157cceb25783227741
Author: Miklos Vajna 
Date:   Sat Jan 19 14:25:33 2013 +0100

doc: dump bookmarks

diff --git a/src/docrecord.py b/src/docrecord.py
index f277196..36b29c3 100644
--- a/src/docrecord.py
+++ b/src/docrecord.py
@@ -202,11 +202,12 @@ class PlcFld(DOCDirStream, PLC):
 
 class PlcfBkl(DOCDirStream, PLC):
 """The Plcfbkl structure is a PLC that contains only CPs and no additional 
data."""
-def __init__(self, mainStream, offset, size):
+def __init__(self, mainStream, offset, size, start):
 DOCDirStream.__init__(self, 
mainStream.doc.getDirectoryStreamByName("1Table").bytes, mainStream = 
mainStream)
 PLC.__init__(self, size, 0) # 0 is defined by 2.8.12
 self.pos = offset
 self.size = size
+self.start = start
 
 def dump(self):
 print '' % 
(self.pos, self.size)
@@ -216,7 +217,7 @@ class PlcfBkl(DOCDirStream, PLC):
 # aCp
 end = offset + self.getuInt32(pos = pos)
 print '' % (i, end)
-start = self.mainStream.plcfAtnBkf.aCP[i]
+start = self.start.aCP[i]
 print '' % 
self.quoteAttr(self.mainStream.retrieveText(start, end))
 pos += 4
 print ''
@@ -2609,4 +2610,26 @@ class SttbSavedBy(DOCDirStream):
 assert self.pos == self.mainStream.fcSttbSavedBy + self.size
 print ''
 
+class SttbfBkmk(DOCDirStream):
+"""The SttbfBkmk structure is an STTB structure whose strings specify the 
names of bookmarks."""
+def __init__(self, mainStream):
+DOCDirStream.__init__(self, 
mainStream.doc.getDirectoryStreamByName("1Table").bytes)
+self.pos = mainStream.fcSttbfBkmk
+self.size = mainStream.lcbSttbfBkmk
+self.mainStream = mainStream
+
+def dump(self):
+print '' % 
(self.pos, self.size)
+self.printAndSet("fExtended", self.readuInt16())
+self.printAndSet("cData", self.readuInt16())
+self.printAndSet("cbExtra", self.readuInt16())
+for i in range(self.cData):
+cchData = self.readuInt16()
+print '' % (i, 
self.pos, cchData)
+print '' % 
globals.encodeName(self.bytes[self.pos:self.pos+2*cchData].decode('utf-16'), 
lowOnly = True)
+self.pos += 2*cchData
+print ''
+assert self.pos == self.mainStream.fcSttbfBkmk + self.size
+print ''
+
 # vim:set filetype=python shiftwidth=4 softtabstop=4 expandtab:
diff --git a/src/docstream.py b/src/docstream.py
index 7633ccc..d9003aa 100644
--- a/src/docstream.py
+++ b/src/docstream.py
@@ -253,11 +253,11 @@ class WordDocumentStream(DOCDirStream):
 ["fcPlcfFldMcr"],
 ["lcbPlcfFldMcr"],
 ["fcSttbfBkmk"],
-["lcbSttbfBkmk"],
+["lcbSttbfBkmk", self.handleLcbSttbfBkmk],
 ["fcPlcfBkf"],
-["lcbPlcfBkf"],
+["lcbPlcfBkf", self.handleLcbPlcfBkf],
 ["fcPlcfBkl"],
-["lcbPlcfBkl"],
+["lcbPlcfBkl", self.handleLcbPlcfBkl],
 ["fcCmds"],
 ["lcbCmds", self.handleLcbCmds],
 ["fcUnused1"],
@@ -489,7 +489,19 @@ class WordDocumentStream(DOCDirStream):
 def handleLcbPlcfAtnBkl(self):
 offset = self.fcPlcfAtnBkl
 size = self.lcbPlcfAtnBkl
-plcfBkl = docrecord.PlcfBkl(self, offset, size)
+plcfBkl = docrecord.PlcfBkl(self, offset, size, start = 
self.plcfAtnBkf)
+plcfBkl.dump()
+
+def handleLcbPlcfBkf(self):
+offset = self.fcPlcfBkf
+size = self.lcbPlcfBkf
+self.plcfBkf = docrecord.PlcfBkf(self, offset, size)
+self.plcfBkf.dump()
+
+def handleLcbPlcfBkl(self):
+offset = self.fcPlcfBkl
+size = self.lcbPlcfBkl
+plcfBkl = docrecord.PlcfBkl(self, offset, size, start = self.plcfBkf)
 plcfBkl.dump()
 
 def handleLcbPlcfSed(self):
@@ -537,6 +549,9 @@ class WordDocumentStream(DOCDirStream):
 def handleLcbSttbListNames(self):
 docrecord.SttbListNames(self).dump()
 
+def handleLcbSttbfBkmk(self):
+docrecord.SttbfBkmk(self).dump()
+
 def dumpFibRgFcLcb97(self, name):
 print '<%s type="FibRgFcLcb97" size="744 bytes">' % name
 self.__dumpFibRgFcLcb97()
diff --git a/test/doc/bookmark.doc b/test/doc/bookmark.doc
new file mode 100755
index 000..6d32ff6
Binary files /dev/null and b/test/doc/bookmark.doc differ
diff --git a/test/doc/bookmark.rtf b/test/doc/bookmark.rtf
new file mode 100644
index 000..05b3d42
--- /dev/null
+++ b/test/doc/bookmark.rtf
@@ -0,0 +1,7 @@
+{\rtf1
+{\*\bkmkstart firstword}
+Hello
+{\*\bkmkend firstword}
+ world!
+\par
+}
diff -

Re: [PATCH] Consolidated branding in configure

2013-01-19 Thread Mat M

Hello

This is a proposal with many goals:
1- lessen configure options
2- consolidate default values locations
3- consolidate data origin

1- This patch will remove
--with-intro*,--with-startcenter*,--with-about-background-svg,--with-flat-logo-svg
and will expand --with-branding to this regard

2- In configure.ac, we set default settings for PROGRESSBARCOLOR
PROGRESSSIZE
PROGRESSPOSITION PROGRESSFRAMECOLOR PROGRESSTEXTCOLOR PROGRESSTEXTBASELINE.
The 4 first are also defined with Globals in
instsetoo_native/util/openoffice.lst, but with different values.
Since configure values only purpose is to override the ones in
openoffice.lst, I moved PROGRESSTEXTCOLOR PROGRESSTEXTBASELINE to it,
and remove default values from configure

3- The rationale here is that all these options are mostly related. Moving
some settings to a text file could look weird but is sensible in the way
they are often (> 99%) related to the delivery of alternate pictures. So
all pictures and progress bar settings go in the same directory and that's
it.

I am conscious there may be some work for distros-maintainers, but i think
it is a good trade-off.
And more, if this is accepted, there may be some consolidation in the
scripts that handle filenames since they all are standardized with this
patch.

Regards


Le Wed, 16 Jan 2013 00:43:59 +0100, Mathias M (via Code Review)
 a écrit:


Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/1704

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core  
refs/changes/04/1704/1


Consolidated branding in configure

Removed individual options (intro* and startcenter* + images) in favor  
of a folder with graceful fallback.
Grouped progress bar intro settings in a text file into the branding  
folder


Change-Id: Ib56b80e43c474a944ac79c0a842d66487e9f91d5
---
M configure.ac
M instsetoo_native/util/openoffice.lst.in
2 files changed, 81 insertions(+), 303 deletions(-)







--
Mat M
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] fdo#57950: Remove some chained appends in connectivity and..

2013-01-19 Thread Marcos Souza (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/1768

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/68/1768/1

fdo#57950: Remove some chained appends in connectivity and..

... remove some RTL* macros.

Change-Id: I919d17e14334c9220b47775355512df8dfa00bca
---
M connectivity/source/drivers/postgresql/pq_xkeys.cxx
M connectivity/source/drivers/postgresql/pq_xtable.cxx
M connectivity/source/drivers/postgresql/pq_xtables.cxx
M connectivity/source/drivers/postgresql/pq_xuser.cxx
M connectivity/source/drivers/postgresql/pq_xusers.cxx
M connectivity/source/drivers/postgresql/pq_xview.cxx
M connectivity/source/drivers/postgresql/pq_xviews.cxx
7 files changed, 75 insertions(+), 215 deletions(-)



diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.cxx 
b/connectivity/source/drivers/postgresql/pq_xkeys.cxx
index 314924d..2a8d521 100644
--- a/connectivity/source/drivers/postgresql/pq_xkeys.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xkeys.cxx
@@ -98,7 +98,6 @@
 
 namespace pq_sdbc_driver
 {
-#define ASCII_STR(x) OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
 
 Keys::Keys(
 const ::rtl::Reference< RefCountedMutex > & refMutex,
@@ -127,57 +126,16 @@
 static sal_Int32 string2keyrule( const rtl::OUString & rule )
 {
 sal_Int32 ret = com::sun::star::sdbc::KeyRule::NO_ACTION;
-if( rule.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "r" ) ) == 0 )
+if( rule == "r" )
 ret = com::sun::star::sdbc::KeyRule::RESTRICT;
-else if( rule.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "c" ) ) == 0 )
+else if( rule == "c" )
 ret = com::sun::star::sdbc::KeyRule::CASCADE;
-else if( rule.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "n" ) ) == 0 )
+else if( rule == "n" )
 ret = com::sun::star::sdbc::KeyRule::SET_NULL;
-else if( rule.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "d" ) ) == 0 )
+else if( rule == "d" )
 ret = com::sun::star::sdbc::KeyRule::SET_DEFAULT;
 return ret;
 }
-
-
-
-// static void fillAttnum2attnameMap(
-// Int2StringMap &map,
-// const Reference< com::sun::star::sdbc::XConnection > &conn,
-// const rtl::OUString &schema,
-// const rtl::OUString &table )
-// {
-// Reference< XPreparedStatement > prep = conn->prepareStatement(
-// ASCII_STR( "SELECT attname,attnum "
-//"FROM pg_attribute "
-//  "INNER JOIN pg_class ON attrelid = pg_class.oid "
-//  "INNER JOIN pg_namespace ON pg_class.relnamespace 
= pg_namespace.oid "
-//"WHERE relname=? AND nspname=?" ) );
-
-// Reference< XParameters > paras( prep, UNO_QUERY );
-// paras->setString( 1 , table );
-// paras->setString( 2 , schema );
-// Reference< XResultSet > rs = prep->executeQuery();
-
-// Reference< XRow > xRow( rs , UNO_QUERY );
-// while( rs->next() )
-// {
-// map[ xRow->getInt(2) ] = xRow->getString(1);
-// }
-// }
-
-// static Sequence< rtl::OUString > resolveColumnNames(
-// const Int2StringMap &map, const rtl::OUString &array )
-// {
-// Sequence< sal_Int32 > intArray = string2intarray( array );
-// Sequence< ::rtl::OUString > ret( intArray.getLength() );
-// for( int i = 0; i < intArray.getLength() ; i ++ )
-// {
-// Int2StringMap::const_iterator ii = map.find( intArray[i] );
-// if( ii != map.end() )
-// ret[i] = ii->second;
-// }
-// return ret;
-// }
 
 void Keys::refresh()
 throw (::com::sun::star::uno::RuntimeException)
@@ -186,12 +144,10 @@
 {
 if( isLog( m_pSettings, LogLevel::INFO ) )
 {
-rtl::OStringBuffer buf;
-buf.append( "sdbcx.Keys get refreshed for table " );
-buf.append( OUStringToOString( m_schemaName, m_pSettings->encoding 
) );
-buf.append( "." );
-buf.append( OUStringToOString( m_tableName,m_pSettings->encoding ) 
);
-log( m_pSettings, LogLevel::INFO, 
buf.makeStringAndClear().getStr() );
+OString buf( "sdbcx.Keys get refreshed for table " +
+ OUStringToOString( m_schemaName, 
m_pSettings->encoding ) +
+ "." + OUStringToOString( 
m_tableName,m_pSettings->encoding ));
+log( m_pSettings, LogLevel::INFO, buf.getStr() );
 }
 
 osl::MutexGuard guard( m_refMutex->mutex );
@@ -201,7 +157,6 @@
 fillAttnum2attnameMap( mainMap, m_origin, m_schemaName, m_tableName );
 
 Reference< XPreparedStatement > stmt = m_origin->prepareStatement(
-ASCII_STR(
 "SELECT  conname, "// 1
 "contype, "// 2
 "confupdtype, "// 3
@@ -214,7 +169,7 @@
   "INNER JOIN pg_namespace ON pg_class.relnamespace = 
pg_namespace.oid "
   "LEFT JOIN pg_class AS class2 ON 

[Libreoffice-commits] .: cui/source

2013-01-19 Thread Libreoffice Gerrit user
 cui/source/inc/backgrnd.hxx  |1 -
 cui/source/tabpages/backgrnd.cxx |1 -
 2 files changed, 2 deletions(-)

New commits:
commit c34cad49fadd376a61904e2201d85fbe908c348b
Author: Stephan Bergmann 
Date:   Sat Jan 19 12:27:14 2013 +0100

-Werror,-Wunused-private-field

Change-Id: I4d340043d7af96dec4f56b28eae1dd727e241da7

diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx
index 67247d3..42975d9 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -110,7 +110,6 @@ private:
 sal_BoolbAllowShowSelector  : 1;
 sal_BoolbIsGraphicValid : 1;
 sal_BoolbLinkOnly   : 1;
-sal_BoolbResized: 1;
 sal_BoolbColTransparency: 1;
 sal_BoolbGraphTransparency  : 1;
 Graphic aBgdGraphic;
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index a9c3934..1151fb5 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -347,7 +347,6 @@ SvxBackgroundTabPage::SvxBackgroundTabPage(Window* pParent, 
const SfxItemSet& rC
 , bAllowShowSelector(true)
 , bIsGraphicValid(false)
 , bLinkOnly(false)
-, bResized(false)
 , bColTransparency(false)
 , bGraphTransparency(false)
 , pPageImpl(new SvxBackgroundPage_Impl)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-01-19 Thread Libreoffice Gerrit user
 sw/UI_swriter.mk  |1 
 sw/inc/chrdlg.hrc |1 
 sw/inc/globals.hrc|1 
 sw/inc/helpid.h   |1 
 sw/inc/swabstdlg.hxx  |4 
 sw/source/ui/chrdlg/chardlg.cxx   |   88 +---
 sw/source/ui/chrdlg/chardlg.src   |   50 --
 sw/source/ui/dialog/swdlgfact.cxx |   21 --
 sw/source/ui/dialog/swdlgfact.hxx |4 
 sw/source/ui/envelp/envfmt.cxx|2 
 sw/source/ui/inc/chrdlg.hxx   |   11 +
 sw/source/ui/shells/annotsh.cxx   |2 
 sw/source/ui/shells/drwtxtex.cxx  |2 
 sw/source/ui/shells/textsh1.cxx   |4 
 sw/uiconfig/swriter/ui/characterproperties.ui |  189 ++
 15 files changed, 256 insertions(+), 125 deletions(-)

New commits:
commit 70467371485ada5a30b88968607b93dd62b3383c
Author: Caolán McNamara 
Date:   Fri Jan 18 20:22:27 2013 +

convert character properties tabdialog to .ui

Change-Id: I73fc5fc19ae75971b0569b708f4104c79b9a9cc2

diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk
index b7f8f74..f3a3735 100644
--- a/sw/UI_swriter.mk
+++ b/sw/UI_swriter.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/bibliographyentry \
sw/uiconfig/swriter/ui/bulletsandnumbering \
sw/uiconfig/swriter/ui/captionoptions \
+   sw/uiconfig/swriter/ui/characterproperties \
sw/uiconfig/swriter/ui/charurlpage \
sw/uiconfig/swriter/ui/columndialog \
sw/uiconfig/swriter/ui/columnpage \
diff --git a/sw/inc/chrdlg.hrc b/sw/inc/chrdlg.hrc
index 5bbe3d6..48f8a95 100644
--- a/sw/inc/chrdlg.hrc
+++ b/sw/inc/chrdlg.hrc
@@ -21,7 +21,6 @@
 
 #include "rcid.hrc"
 
-#define DLG_CHAR(RC_CHRDLG_BEGIN +  1)
 #define DLG_PARA(RC_CHRDLG_BEGIN +  2)
 #define DLG_DROPCAPS(RC_CHRDLG_BEGIN +  8)
 #define DLG_DRAWCHAR(RC_CHRDLG_BEGIN +  9)
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 21c1232..5e1a49c 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -157,7 +157,6 @@
 
 #define TP_MACRO_ASSIGN (RC_GLOBALS_BEGIN +  40)
 #define TP_FRM_URL  (RC_GLOBALS_BEGIN +  42)
-#define TP_CHAR_URL (RC_GLOBALS_BEGIN +  43)
 
 #define TP_CONTENT_OPT  (RC_GLOBALS_BEGIN +  45)
 #define TP_STD_FONT (RC_GLOBALS_BEGIN +  47)
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index bb1816b..ad87626 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -134,7 +134,6 @@
 #define HID_DLG_FLDEDT_PREV 
"SW_HID_DLG_FLDEDT_PREV"
 #define HID_DLG_FLDEDT_ADDRESS  
"SW_HID_DLG_FLDEDT_ADDRESS"
 
-#define HID_FILEDLG_CHARDLG 
"SW_HID_FILEDLG_CHARDLG"
 #define HID_FILEDLG_LOADTEMPLATE
"SW_HID_FILEDLG_LOADTEMPLATE"
 #define HID_FILEDLG_MAILMRGE1   
"SW_HID_FILEDLG_MAILMRGE1"
 #define HID_FILEDLG_MAILMRGE2   
"SW_HID_FILEDLG_MAILMRGE2"
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index f5aa68c..b672f66 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -355,8 +355,8 @@ public:
 
 virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell 
&rSh) = 0; // add for SwBreakDlg
 virtual VclAbstractDialog   * CreateSwChangeDBDlg(SwView& rVw) = 0; //add 
for SwChangeDBDlg
-virtual SfxAbstractTabDialog *  CreateSwCharDlg( Window* pParent, SwView& 
pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
-const String* pFmtStr = 0, 
sal_Bool bIsDrwTxtDlg = sal_False) = 0;
+virtual SfxAbstractTabDialog *  CreateSwCharDlg(Window* pParent, SwView& 
pVw, const SfxItemSet& rCoreSet,
+const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False) = 0;  // 
add for SwCharDlg
 virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, 
bool bToTable) = 0; //add for SwConvertTableDlg
 virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, 
SwView &rV,int nResId) = 0; //add for SwCaptionDialog
 
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index dfccdec..e7efa91 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -58,13 +58,12 @@ using namespace ::com::sun::star::uno;
 using namespace ::sfx2;
 
 SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
- const String* pStr, sal_Bool bIsDrwTxtDlg) :
-SfxTabDialog(pParent, SW_RES(DLG_CHAR), &rCoreSet, pStr != 0),
-rView(rVw),
-bIsDrwTxtMode(bIsDrwTxtDlg)
+const String* pStr, bool bIsDrwTxtDlg)
+: SfxTabDialog(0, pParent, "Charac

[PUSHED] Remove some RTL_* macdros from connectivity and..

2013-01-19 Thread Olivier Hallot (via Code Review)
Hi,

Thank you for your patch!  It has been merged to LibreOffice.

If you are interested in details, please visit

https://gerrit.libreoffice.org/1767

Approvals:
  Olivier Hallot: Verified; Looks good to me, approved


-- 
To view, visit https://gerrit.libreoffice.org/1767
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I07029055a7cbe0d1ea2e6c891e6c7347e3a370a9
Gerrit-PatchSet: 2
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Marcos Souza 
Gerrit-Reviewer: Olivier Hallot 

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: connectivity/source

2013-01-19 Thread Libreoffice Gerrit user
 connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx |  608 
++
 1 file changed, 140 insertions(+), 468 deletions(-)

New commits:
commit 494fa01eb08ebb251934fe1a868a702dfa19aca4
Author: Marcos Paulo de Souza 
Date:   Sat Jan 19 08:55:29 2013 -0200

Remove some RTL_* macdros from connectivity and..

...also simplify a lot some functions calls.

Change-Id: I07029055a7cbe0d1ea2e6c891e6c7347e3a370a9
Reviewed-on: https://gerrit.libreoffice.org/1767
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git 
a/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx 
b/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
index 54dffa5..470d27a 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
@@ -30,11 +30,10 @@ using namespace ::com::sun::star::sdbc;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 
-// -
 ODatabaseMetaDataResultSetMetaData::~ODatabaseMetaDataResultSetMetaData()
 {
 }
-// -
+
 sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnDisplaySize( 
sal_Int32 column ) throw(SQLException, RuntimeException)
 {
 if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
@@ -42,7 +41,6 @@ sal_Int32 SAL_CALL 
ODatabaseMetaDataResultSetMetaData::getColumnDisplaySize( sal
 
 return 0;
 }
-// -
 
 sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnType( 
sal_Int32 column ) throw(SQLException, RuntimeException)
 {
@@ -50,13 +48,11 @@ sal_Int32 SAL_CALL 
ODatabaseMetaDataResultSetMetaData::getColumnType( sal_Int32
 return (*m_mColumnsIter).second.getColumnType();
 return 1;
 }
-// -
 
 sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnCount(  ) 
throw(SQLException, RuntimeException)
 {
 return m_mColumns.size();
 }
-// -
 
 sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCaseSensitive( 
sal_Int32 column ) throw(SQLException, RuntimeException)
 {
@@ -64,13 +60,11 @@ sal_Bool SAL_CALL 
ODatabaseMetaDataResultSetMetaData::isCaseSensitive( sal_Int32
 return (*m_mColumnsIter).second.isCaseSensitive();
 return sal_True;
 }
-// -
 
 ::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getSchemaName( 
sal_Int32 /*column*/ ) throw(SQLException, RuntimeException)
 {
 return ::rtl::OUString();
 }
-// -
 
 ::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnName( 
sal_Int32 column ) throw(SQLException, RuntimeException)
 {
@@ -78,40 +72,39 @@ sal_Bool SAL_CALL 
ODatabaseMetaDataResultSetMetaData::isCaseSensitive( sal_Int32
 return (*m_mColumnsIter).second.getColumnName();
 return ::rtl::OUString();
 }
-// -
+
 ::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getTableName( 
sal_Int32 column ) throw(SQLException, RuntimeException)
 {
 if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
 return (*m_mColumnsIter).second.getTableName();
 return ::rtl::OUString();
 }
-// -
+
 ::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getCatalogName( 
sal_Int32 /*column*/ ) throw(SQLException, RuntimeException)
 {
 return ::rtl::OUString();
 }
-// -
+
 ::rtl::OUString SAL_CALL 
ODatabaseMetaDataResultSetMetaData::getColumnTypeName( sal_Int32 column ) 
throw(SQLException, RuntimeException)
 {
 if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
 return (*m_mColumnsIter).second.getColumnTypeName();
 return ::rtl::OUString();
 }
-// -
+
 ::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnLabel( 
sal_Int32 column ) throw(SQLException, RuntimeException)
 {
 if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
 return (*m_mColumnsIter).second.getColumnLabel();
 return getColumnName(column);
 }
-// -
+
 ::rtl::OUString SAL_CALL 
ODatabaseMetaDataResultSetMetaData::getColumnServiceName( sal_Int32 colum

[PATCH] Remove some RTL_* macdros from connectivity and..

2013-01-19 Thread Marcos Souza (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/1767

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/67/1767/1

Remove some RTL_* macdros from connectivity and..

...also simplify a lot some functions calls.

Change-Id: I07029055a7cbe0d1ea2e6c891e6c7347e3a370a9
---
M connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
1 file changed, 138 insertions(+), 466 deletions(-)



diff --git 
a/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx 
b/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
index 54dffa5..470d27a 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSetMetaData.cxx
@@ -30,11 +30,10 @@
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 
-// -
 ODatabaseMetaDataResultSetMetaData::~ODatabaseMetaDataResultSetMetaData()
 {
 }
-// -
+
 sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnDisplaySize( 
sal_Int32 column ) throw(SQLException, RuntimeException)
 {
 if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
@@ -42,7 +41,6 @@
 
 return 0;
 }
-// -
 
 sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnType( 
sal_Int32 column ) throw(SQLException, RuntimeException)
 {
@@ -50,13 +48,11 @@
 return (*m_mColumnsIter).second.getColumnType();
 return 1;
 }
-// -
 
 sal_Int32 SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnCount(  ) 
throw(SQLException, RuntimeException)
 {
 return m_mColumns.size();
 }
-// -
 
 sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCaseSensitive( 
sal_Int32 column ) throw(SQLException, RuntimeException)
 {
@@ -64,13 +60,11 @@
 return (*m_mColumnsIter).second.isCaseSensitive();
 return sal_True;
 }
-// -
 
 ::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getSchemaName( 
sal_Int32 /*column*/ ) throw(SQLException, RuntimeException)
 {
 return ::rtl::OUString();
 }
-// -
 
 ::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnName( 
sal_Int32 column ) throw(SQLException, RuntimeException)
 {
@@ -78,40 +72,39 @@
 return (*m_mColumnsIter).second.getColumnName();
 return ::rtl::OUString();
 }
-// -
+
 ::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getTableName( 
sal_Int32 column ) throw(SQLException, RuntimeException)
 {
 if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
 return (*m_mColumnsIter).second.getTableName();
 return ::rtl::OUString();
 }
-// -
+
 ::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getCatalogName( 
sal_Int32 /*column*/ ) throw(SQLException, RuntimeException)
 {
 return ::rtl::OUString();
 }
-// -
+
 ::rtl::OUString SAL_CALL 
ODatabaseMetaDataResultSetMetaData::getColumnTypeName( sal_Int32 column ) 
throw(SQLException, RuntimeException)
 {
 if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
 return (*m_mColumnsIter).second.getColumnTypeName();
 return ::rtl::OUString();
 }
-// -
+
 ::rtl::OUString SAL_CALL ODatabaseMetaDataResultSetMetaData::getColumnLabel( 
sal_Int32 column ) throw(SQLException, RuntimeException)
 {
 if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
 return (*m_mColumnsIter).second.getColumnLabel();
 return getColumnName(column);
 }
-// -
+
 ::rtl::OUString SAL_CALL 
ODatabaseMetaDataResultSetMetaData::getColumnServiceName( sal_Int32 column ) 
throw(SQLException, RuntimeException)
 {
 if(m_mColumns.size() && (m_mColumnsIter = m_mColumns.find(column)) != 
m_mColumns.end())
 return (*m_mColumnsIter).second.getColumnServiceName();
 return ::rtl::OUString();
 }
-// -
 
 sal_Bool SAL_CALL ODatabaseMetaDataResultSetMetaData::isCurrency( sal_Int32 
column ) throw(SQLException, RuntimeException)
 {
@@ -119,7 +112,6 

-Wsign-promo (Re: [BUILD FAILS DEBUG MODE] with test_strings_valuex.cxx)

2013-01-19 Thread Lubos Lunak
On Friday 18 of January 2013, julien2412 wrote:
> Hello,
>
> On pc Debian x86-64 with master sources after having runned "make clean",
> I've got this:
> /home/julien/compile-libreoffice/libo/sal/qa/rtl/strings/test_strings_value
>x.cxx: In instantiation of ‘void testInt() [with T = rtl::OUString]’:
> /home/julien/compile-libreoffice/libo/sal/qa/rtl/strings/test_strings_value
>x.cxx:77:28: required from here
> /home/julien/compile-libreoffice/libo/sal/qa/rtl/strings/test_strings_value
>x.cxx:48:5: error: passing ‘unsigned char’ chooses ‘int’ over ‘unsigned int’
> [-Werror=sign-promo]

 -Wsign-promo is a rather pointless warning these days (the section in the gcc 
manpage is a funny read and not only because it talks about Cfront). I've 
added more overloads to silence it, but I rather wonder why we have this 
explicitly enabled at all.

 My hypothesis is like this:
- the idea behind the warning is just nonsense (who cares to what integer type 
the value is promoted)
- but it incidentally triggers when passing bool to SvStream, because it 
doesn't have any overload for operator<<(bool), and int is chosen over 
unsigned char AKA sal_Bool , so Caolan added it in 
e8bbb76827dd7a0e30d7d1db34a812a84d85f390
- if SvStream gets overload for bool, the warning can be dumped

 Or am I missing something there?

-- 
 Lubos Lunak
 l.lu...@suse.cz
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: vcl/aqua vcl/inc vcl/ios

2013-01-19 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx |6 -
 vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx|   55 --
 vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx |   16 ++---
 vcl/aqua/source/gdi/coretext/salgdi.cxx   |   30 -
 vcl/inc/aqua/common.h |6 -
 vcl/inc/ios/common.h  |6 -
 vcl/ios/source/gdi/salcoretextfontutils.cxx   |6 -
 vcl/ios/source/gdi/salcoretextlayout.cxx  |   55 --
 vcl/ios/source/gdi/salcoretextstyle.cxx   |   16 ++---
 vcl/ios/source/gdi/salgdi.cxx |   30 -
 10 files changed, 100 insertions(+), 126 deletions(-)

New commits:
commit fcf7f3596054f24bebf767f9cabfc96dfa577480
Author: Tor Lillqvist 
Date:   Sat Jan 19 10:44:33 2013 +0200

Use SAL_INFO instead of home-grown msgs_debug

If there is a need to optionally get a thread identifier or the
function name into logging output (as msgs_debug did), we should
figure out a way to do that in some elegant fashion in the sal logging
macros instead of using some local solution in just one place in the
code.

Yes, the iOS and OS X CoreText code should be de-duplicated. Will
happen soon.

diff --git a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx 
b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
index 4646e77..f14e9c7 100644
--- a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
+++ b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
@@ -274,7 +274,7 @@ CoreTextPhysicalFontFace::CoreTextPhysicalFontFace( const 
ImplDevFontAttributes&
 ,   m_bHasCJKSupport( false )
 ,   m_bFontCapabilitiesRead( false )
 {
-msgs_debug(font,"retain %p as %p",font, m_CTFontRef);
+SAL_INFO( "vcl.coretext.font", "retain " << font << " as " << m_CTFontRef 
);
 }
 
 CoreTextPhysicalFontFace::~CoreTextPhysicalFontFace()
@@ -283,7 +283,7 @@ CoreTextPhysicalFontFace::~CoreTextPhysicalFontFace()
 {
 m_pCharMap->DeReference();
 }
-msgs_debug(font,"release font %p", m_CTFontRef);
+SAL_INFO( "vcl.coretext.font", "release " << m_CTFontRef );
 SafeCFRelease(m_CTFontRef);
 }
 
@@ -297,7 +297,7 @@ PhysicalFontFace* CoreTextPhysicalFontFace::Clone() const
 if( m_CTFontRef )
 {
 pClone->m_CTFontRef = (CTFontRef)CFRetain(m_CTFontRef);
-msgs_debug(font,"clone ref %p into %p", m_CTFontRef, 
pClone->m_CTFontRef);
+SAL_INFO( "vcl.coretext.font", "clone " << m_CTFontRef << " into " << 
pClone->m_CTFontRef );
 }
 return pClone;
 }
diff --git a/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx 
b/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx
index 32b547b..e20bcba 100644
--- a/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx
+++ b/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx
@@ -53,14 +53,14 @@ CoreTextLayout::~CoreTextLayout()
 
 void CoreTextLayout::AdjustLayout( ImplLayoutArgs& /*rArgs*/ )
 {
-msgs_debug(layout,"-->");
-msgs_debug(layout,"<--");
+SAL_INFO( "vcl.coretext.layout", "-->" );
+SAL_INFO( "vcl.coretext.layout", "<--" );
 /* TODO */
 }
 
 void CoreTextLayout::Clean()
 {
-msgs_debug(layout,"-->");
+SAL_INFO( "vcl.coretext.layout", "-->" );
 if(m_glyphs)
 {
 delete[] m_glyphs;
@@ -94,12 +94,12 @@ void CoreTextLayout::Clean()
 SafeCFRelease(m_typesetter);
 SafeCFRelease(m_line);
 m_has_bound_rec = false;
-msgs_debug(layout,"<--");
+SAL_INFO( "vcl.coretext.layout", "<--" );
 }
 
 void CoreTextLayout::DrawText( SalGraphics& rGraphics ) const
 {
-msgs_debug(layout,"-->");
+SAL_INFO( "vcl.coretext.layout", "-->" );
 AquaSalGraphics& gr = static_cast(rGraphics);
 if(m_chars_count <= 0 || !gr.CheckContext())
 {
@@ -108,19 +108,18 @@ void CoreTextLayout::DrawText( SalGraphics& rGraphics ) 
const
 CGContextSaveGState( gr.mrContext );
 Point pos = GetDrawPosition(Point(0,0));
 #if 0
-msgs_debug(layout,"at pos (%ld, %ld)", pos.X(), pos.Y());
+SAL_INFO( "vcl.coretext.layout", "at pos (" << pos.X() << "," << pos.Y() 
<< ")" );
 CGContextSetTextMatrix(gr.mrContext, CGAffineTransformMakeScale(1.0, 
-1.0));
 CGContextSetShouldAntialias( gr.mrContext, !gr.mbNonAntialiasedText );
 CGContextSetTextPosition(gr.mrContext, pos.X(), pos.Y());
 CTLineDraw(m_line, gr.mrContext);
 #else
 InitGIA();
-msgs_debug(layout,"at- pos (%ld, %ld) ctfont=%p", pos.X(), pos.Y(),
-   m_style->GetFont());
+SAL_INFO( "vcl.coretext.layout", "at pos (" << pos.X() << "," << pos.Y() 
<<") ctfont=" << m_style->GetFont() );
 CGFontRef cg_font = CTFontCopyGraphicsFont(m_style->GetFont(), NULL);
 if(!cg_font)
 {
-msgs_debug(layout, "Error cg_font is %s", "NULL");
+SAL_INFO( "vcl.coretext.layout", "Error cg_font is NULL" );
 return;
 }
 CGContextSetFont(gr.mrContext, cg_font);
@@ -144,7 +

[SOLVED] Re: Cppcheck : Variable 'bRet' is reassigned a value in autoform.cxx

2013-01-19 Thread Julien Nabet

On 18/01/2013 12:01, Caolán McNamara wrote:

On Thu, 2013-01-17 at 13:54 -0800, julien2412 wrote:

What should we do with bRet value, after line 1102?

bRet is supposed to return true if the save succeeded s


a) changing all the bRets after the initial initialization from

bRet = foo
to
bRet&= foo

would ensure that the failed state of any check is kept

b) alternatively, could change the
bool bRet = ...
if (bRet)
{
 bRet = foo
 bRet = bar
}

to something like

bool bRet = true;
do
{
 bRet = foo;
 if (!bRet)
 break;

 bRet = bar;
 if (!bRet)
break;

} while(0);

c) just do one bRet = (rStream.GetError() == 0); before the Flush and
remove the other ones inside the bRet block


Also, notice the line 1107 "++it" to skip the first item. Shouldn't we add a
wrapper if(it != itEnd) for the "for loop" to be sure?

Yeah, I think you definitely should
Thank you again Caolán, I pushed a fix on master (see 
http://cgit.freedesktop.org/libreoffice/core/commit/?id=c228103ce6a5efe60de553073a9b20d977478bf5)


Julien
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[SOLVED] Re: Cppcheck : unused "pUnicodes" variable in pdfwriter_impl.cxx

2013-01-19 Thread Julien Nabet

On 18/01/2013 12:08, Caolán McNamara wrote:

On Thu, 2013-01-17 at 13:43 -0800, julien2412 wrote:

Hello,

Cppcheck reported this:
vcl/source/gdi/pdfwriter_impl.cxx
3203unreadVariable  style   Variable 'pUnicodes' is assigned a value that is
never used
Can we just remove it or something lacking?

Go ahead and remove the pUnicodes, its been unused since the initial
commit in 2009, and there isn't anything local to that code that seems
to have an intent to consume it.
Thank you Caolán, I pushed a fix on master (see 
http://cgit.freedesktop.org/libreoffice/core/commit/?id=8a894b4af476641062bf340a2fb802558bf1cbe3)


Julien
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: sc/source

2013-01-19 Thread Libreoffice Gerrit user
 sc/source/core/tool/autoform.cxx |   14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit c228103ce6a5efe60de553073a9b20d977478bf5
Author: Julien Nabet 
Date:   Sat Jan 19 10:11:24 2013 +0100

2 small fixes

Variable 'bRet' is reassigned
++it without checking it != itEnd

Change-Id: I3bdb8fa723cca8a132dc7aa6b5c5e3c7bd0861cf

diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 54ee367..4e14754 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -1099,13 +1099,19 @@ bool ScAutoFormat::Save()
 osl_getThreadTextEncoding() );
 m_aVersions.Write(rStream, fileVersion);
 
-bRet = (rStream.GetError() == 0);
+bRet &= (rStream.GetError() == 0);
+
 //---
 rStream << (sal_uInt16)(maData.size() - 1);
-bRet = (rStream.GetError() == 0);
+bRet &= (rStream.GetError() == 0);
 MapType::iterator it = maData.begin(), itEnd = maData.end();
-for (++it; bRet && it != itEnd; ++it) // Skip the first item.
-bRet = it->second->Save(rStream, fileVersion);
+if (it != itEnd)
+{
+for (++it; bRet && it != itEnd; ++it) // Skip the first item.
+{
+bRet &= it->second->Save(rStream, fileVersion);
+}
+}
 
 rStream.Flush();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/inc vcl/ios

2013-01-19 Thread Libreoffice Gerrit user
 vcl/inc/ios/salcoretextfontutils.hxx|   12 -
 vcl/inc/ios/salcoretextstyle.hxx|6 
 vcl/inc/ios/salgdi.h|2 
 vcl/ios/source/gdi/salcoretextfontutils.cxx |  228 ++--
 vcl/ios/source/gdi/salcoretextlayout.cxx|   81 +
 vcl/ios/source/gdi/salcoretextstyle.cxx |   31 ++-
 vcl/ios/source/gdi/salgdi.cxx   |   25 ++-
 7 files changed, 201 insertions(+), 184 deletions(-)

New commits:
commit 0d816467302dae89fd2e326e97364d1d4db47e8e
Author: Tor Lillqvist 
Date:   Tue Jan 15 22:23:07 2013 +0200

Fix iOS bit-rot and unify with OS X CoreText code

Adapt to the fairly pointless privatisations here, too. Unify with the
OS X CoreText code. Yeah, probably should unify physically, i.e. use
the same source files for both, with as little ifdefs as possible.

Change-Id: I63bc477f0c979769bb995db37a3c4194e8091b30

diff --git a/vcl/inc/ios/salcoretextfontutils.hxx 
b/vcl/inc/ios/salcoretextfontutils.hxx
index d1ee1b8..6293392 100644
--- a/vcl/inc/ios/salcoretextfontutils.hxx
+++ b/vcl/inc/ios/salcoretextfontutils.hxx
@@ -20,7 +20,7 @@
 #ifndef _VCL_IOS_CORETEXT_SALCORETEXTFONTUTILS_HXX
 #define _VCL_IOS_CORETEXT_SALCORETEXTFONTUTILS_HXX
 
-class ImplCoreTextFontData;
+class CoreTextPhysicalFontFace;
 class ImplDevFontList;
 
 #include 
@@ -30,11 +30,11 @@ class ImplDevFontList;
 #include "outfont.hxx"
 #include "impfont.hxx"
 
-class ImplCoreTextFontData : public PhysicalFontFace
+class CoreTextPhysicalFontFace : public PhysicalFontFace
 {
 public:
-ImplCoreTextFontData(const ImplDevFontAttributes&, CTFontRef font);
-virtual ~ImplCoreTextFontData();
+CoreTextPhysicalFontFace(const ImplDevFontAttributes&, CTFontRef font);
+virtual ~CoreTextPhysicalFontFace();
 virtual PhysicalFontFace* Clone() const;
 virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const;
 virtual sal_IntPtr GetFontId() const { return (sal_IntPtr)m_CTFontRef;};
@@ -70,10 +70,10 @@ public:
 ~SystemFontList();
 
 void AnnounceFonts( ImplDevFontList& ) const;
-ImplCoreTextFontData* GetFontDataFromRef( CTFontRef ) const;
+CoreTextPhysicalFontFace* GetFontDataFromRef( CTFontRef ) const;
 
 private:
-typedef boost::unordered_map 
CoreTextFontContainer;
+typedef boost::unordered_map 
CoreTextFontContainer;
 CoreTextFontContainer m_aFontContainer;
 
 void InitGlyphFallbacks();
diff --git a/vcl/inc/ios/salcoretextstyle.hxx b/vcl/inc/ios/salcoretextstyle.hxx
index 37a8de3..eafba51 100644
--- a/vcl/inc/ios/salcoretextstyle.hxx
+++ b/vcl/inc/ios/salcoretextstyle.hxx
@@ -23,7 +23,7 @@
 #include "ios/salgdicommon.hxx"
 
 class FontSelectPattern;
-class ImplCoreTextFontData;
+class CoreTextPhysicalFontFace;
 
 class CoreTextStyleInfo
 {
@@ -31,6 +31,7 @@ public:
 CoreTextStyleInfo();
 ~CoreTextStyleInfo();
 CTFontRef GetFont() const { return m_CTFont; };
+CoreTextPhysicalFontFace* GetFontFace() const { return m_font_face; };
 long GetFontStretchedSize() const;
 float GetFontStretchFactor() const { return m_stretch_factor; };
 CTParagraphStyleRef GetParagraphStyle() const { return m_CTParagraphStyle; 
} ;
@@ -50,8 +51,7 @@ private:
 CTParagraphStyleRef m_CTParagraphStyle;
 CTFontRef m_CTFont;
 CGColorRef m_color;
-const ImplCoreTextFontData* m_font_data;
-
+CoreTextPhysicalFontFace* m_font_face;
 };
 
 #endif // _VCL_AQUA_CORETEXT_SALCORETEXTSTYLE_HXX
diff --git a/vcl/inc/ios/salgdi.h b/vcl/inc/ios/salgdi.h
index 51099be..ac00f8c 100644
--- a/vcl/inc/ios/salgdi.h
+++ b/vcl/inc/ios/salgdi.h
@@ -62,8 +62,6 @@ protected:
 RGBAColor maLineColor; //< pen color RGBA
 RGBAColor maFillColor; //< brush color RGBA
 
-ImplCoreTextFontData* m_pCoreTextFontData; //< Device Font settings
-
 bool mbNonAntialiasedText; //< allows text to be rendered without 
antialiasing
 
 // Graphics types
diff --git a/vcl/ios/source/gdi/salcoretextfontutils.cxx 
b/vcl/ios/source/gdi/salcoretextfontutils.cxx
index ade5711..06e2cfc 100644
--- a/vcl/ios/source/gdi/salcoretextfontutils.cxx
+++ b/vcl/ios/source/gdi/salcoretextfontutils.cxx
@@ -28,24 +28,24 @@
 
 static bool GetDevFontAttributes( CTFontDescriptorRef font_descriptor, 
ImplDevFontAttributes& rDFA  )
 {
+int value = 0;
 
 // reset the attributes
-rDFA.meFamily = FAMILY_DONTKNOW;
-rDFA.mePitch  = PITCH_VARIABLE;
-rDFA.meWidthType  = WIDTH_NORMAL;
-rDFA.meWeight = WEIGHT_NORMAL;
-rDFA.meItalic = ITALIC_NONE;
-rDFA.mbSymbolFlag = false;
+rDFA.SetFamilyType( FAMILY_DONTKNOW );
+rDFA.SetPitch( PITCH_VARIABLE );
+rDFA.SetWidthType( WIDTH_NORMAL );
+rDFA.SetWeight( WEIGHT_NORMAL );
+rDFA.SetItalic( ITALIC_NONE );
+rDFA.SetSymbolFlag( false );
 rDFA.mbOrientation = true;
 rDFA.mbDevice  = true;
 rDFA.mnQuality = 0;
 
 CFNumberRef format = 
(CFNumberRef)CTFontDescriptorCopyAttribute(font_descrip

Re: TINYINT set as signed in formcontrolfactory.cxx

2013-01-19 Thread Alex Thurgood
On 01/19/2013 04:40 AM, Lionel Elie Mamane wrote:

> 
> It sets it as *un*signed.
> 

Aarghh, yes, that's what I meant to write in my brain, and my fingers
typed otherwise.

> It is exactly the opposite of the capabilities of LibreOffice's
> internal system with 8-bit integers (most notably the "Any" type; see
> http://lists.freedesktop.org/archives/libreoffice/2012-December/043160.html )

Yes, I saw that thread, and the difficulties it can cause. The general
feeling was not to type it more strictly, then ?

> 
> In MySQL, any integer type can be signed or unsigned. Most database
> engines don't allow that choice (they simply use signed, except
> tinyint in Microsoft SQL Server which is always unsigned). See the
> first/best answer at
> http://stackoverflow.com/questions/2991405/what-is-the-difference-between-tinyint-smallint-mediumint-bigint-and-int-in-s
> 

Will check that out to further my understanding.


> 
> The central question is: what are the consequences of this code? If it

I seem to recall that using TINYINT as a boolean field caused a problem
because OOo with the tristate nature of its boolean form control (and I
presume LO, but haven't checked recently) set the default value to -127,
or 0 or 127 - very strange, at least, it seemed that way to me.


> Err... But this will not cover unsigned (32 bit) integer, and neither
> will it cover any BIGINT :-(
> 
> Pff... This could become a mess to handle.

Oh, yet another can of worms.

> Controls where? In a Form? Isn't it the default font of the underlying
> Writer document?
> 

Well that is what I thought, but I was only asking because on the users
list, someone wanted to reset the default font for all controls and
found that there was no way to do so, even if the default was reset in
the document. This led me to think that the default font properties were
stored elsewhere, and I indeed found a reference in formcontrol.cxx, but
had no idea what it meant. That's when I came across the tinyint question.

Apologies for mixing up two things in the same thread. Off to test the
tinyint thing.


Alex




___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: vcl/source

2013-01-19 Thread Libreoffice Gerrit user
 vcl/source/gdi/pdfwriter_impl.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 8a894b4af476641062bf340a2fb802558bf1cbe3
Author: Julien Nabet 
Date:   Sat Jan 19 09:28:51 2013 +0100

Fix pUnicodes unused

Change-Id: I168c84d6b64fe23c3e93e36aad31f1c74dfd547a

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 4f02f29..cf20099 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3190,17 +3190,14 @@ std::map< sal_Int32, sal_Int32 > 
PDFWriterImpl::emitSystemFont( const PhysicalFo
 osl_createTempFile( NULL, NULL, &aTmpName.pData );
 sal_Int32 pGlyphIDs[ 256 ];
 sal_uInt8 pEncoding[ 256 ];
-sal_Ucs   pUnicodes[ 256 ];
 sal_Int32 pDuWidths[ 256 ];
 
 memset( pGlyphIDs, 0, sizeof( pGlyphIDs ) );
 memset( pEncoding, 0, sizeof( pEncoding ) );
-memset( pUnicodes, 0, sizeof( pUnicodes ) );
 memset( pDuWidths, 0, sizeof( pDuWidths ) );
 
 for( sal_Ucs c = 32; c < 256; c++ )
 {
-pUnicodes[c] = c;
 pEncoding[c] = c;
 pGlyphIDs[c] = 0;
 if( aUnicodeMap.find( c ) != aUnicodeMap.end() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[SOLVED] Re: [BUILD FAILS DEBUG MODE] with test_strings_valuex.cxx

2013-01-19 Thread julien2412
Thank you for the fix Lubos! Building is ok now.

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/BUILD-FAILS-DEBUG-MODE-with-test-strings-valuex-cxx-tp4030218p4030308.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] .: 2 commits - sc/source

2013-01-19 Thread Libreoffice Gerrit user
 sc/source/core/data/table2.cxx|   26 ++
 sc/source/ui/condformat/condformatdlg.cxx |8 
 sc/source/ui/condformat/condformatmgr.cxx |   14 +++---
 sc/source/ui/view/cellsh1.cxx |5 -
 4 files changed, 45 insertions(+), 8 deletions(-)

New commits:
commit 5c8e6ccaf6ea7a187e3d16f3d865cbed5eba0874
Author: Markus Mohrhard 
Date:   Sat Jan 19 09:09:29 2013 +0100

copy styles from cond format between different docs, fdo#59159

Change-Id: I5472ab648b248d925f1f07cd4194c1201230ff20

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 2d909c0..2ad97a6 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -671,6 +671,7 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCRO
 {
 ScRange aOldRange( nCol1 - nDx, nRow1 - nDy, pTable->nTab, nCol2 - nDx, 
nRow2 - nDy, pTable->nTab);
 ScRange aNewRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab );
+bool bSameDoc = pDocument == pTable->pDocument;
 
 for(ScConditionalFormatList::const_iterator itr = 
pTable->mpCondFormatList->begin(),
 itrEnd = pTable->mpCondFormatList->end(); itr != itrEnd; ++itr)
@@ -695,6 +696,29 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCRO
 pNewFormat->SetKey(nMax + 1);
 mpCondFormatList->InsertNew(pNewFormat);
 
+if(!bSameDoc)
+{
+for(size_t i = 0, n = pNewFormat->size();
+i < n; ++i)
+{
+OUString aStyleName;
+const ScFormatEntry* pEntry = pNewFormat->GetEntry(i);
+if(pEntry->GetType() == condformat::CONDITION)
+aStyleName = static_cast(pEntry)->GetStyle();
+else if(pEntry->GetType() == condformat::DATE)
+aStyleName = static_cast(pEntry)->GetStyleName();
+
+if(!aStyleName.isEmpty())
+{
+if(pDocument->GetStyleSheetPool()->Find(aStyleName, 
SFX_STYLE_FAMILY_PARA))
+continue;
+
+pDocument->GetStyleSheetPool()->CopyStyleFrom(
+pTable->pDocument->GetStyleSheetPool(), 
aStyleName, SFX_STYLE_FAMILY_PARA );
+}
+}
+}
+
 pDocument->AddCondFormatData( pNewFormat->GetRange(), nTab, 
pNewFormat->GetKey() );
 }
 }
@@ -980,7 +1004,9 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 }
 
 if(pDestTab->pDocument->IsUndo() && (nFlags & IDF_ATTRIB))
+{
 pDestTab->mpCondFormatList.reset(new 
ScConditionalFormatList(pDestTab->pDocument, *mpCondFormatList));
+}
 
 if (pDBDataNoName)
 {
commit e2170dd77ffbeda24aabb2b704deedd4440d7620
Author: Markus Mohrhard 
Date:   Fri Jan 18 15:07:00 2013 +0100

prevent to create cond formats with empty range, fdo#58778

Change-Id: I54bac843dc60c419c23c6d3f22c8d2f4b5805327

diff --git a/sc/source/ui/condformat/condformatdlg.cxx 
b/sc/source/ui/condformat/condformatdlg.cxx
index 784f1ed..4bd4c05 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -467,12 +467,20 @@ void ScCondFormatDlg::SetReference(const ScRange& rRef, 
ScDocument*)
 ScConditionalFormat* ScCondFormatDlg::GetConditionalFormat() const
 {
 rtl::OUString aRangeStr = maEdRange.GetText();
+if(aRangeStr.isEmpty())
+return NULL;
+
 ScRangeList aRange;
 sal_uInt16 nFlags = aRange.Parse(aRangeStr, mpDoc, SCA_VALID, 
mpDoc->GetAddressConvention(), maPos.Tab());
 ScConditionalFormat* pFormat = maCondFormList.GetConditionalFormat();
 
 if(nFlags & SCA_VALID && !aRange.empty() && pFormat)
 pFormat->AddRange(aRange);
+else
+{
+delete pFormat;
+pFormat = NULL;
+}
 
 return pFormat;
 }
diff --git a/sc/source/ui/condformat/condformatmgr.cxx 
b/sc/source/ui/condformat/condformatmgr.cxx
index af9e383..977cc36 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -275,14 +275,14 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, AddBtnHdl)
 if(pDlg->Execute() == RET_OK)
 {
 ScConditionalFormat* pNewFormat = pDlg->GetConditionalFormat();
-if(!pNewFormat)
-return 0;
-
-mpFormatList->InsertNew(pNewFormat);
-pNewFormat->SetKey(FindKey(mpFormatList));
-maCtrlManager.Update();
+if(pNewFormat)
+{
+mpFormatList->InsertNew(pNewFormat);
+pNewFormat->SetKey(FindKey(mpFormatList));
+maCtrlManager.Update();
 
-mbModified = true;
+mbModified = true;
+}
 }
 Show(true, 0);
 pScMod->SetRefDialog( nId, false );
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 5c4d42b..0c96dd5 100644
--- a/sc/source/ui/view/cel