- Version bump to 4.3.0beta2:

* major version bump with fixes all around everywhere
- Added dependencies over glew and glm
- Removed patches that were upstreamed:
  * set-language-in-impress.diff
  * text-alignment-in-shape.diff
  * kde4-4.2.3.3-timer-mutex.patch
  * impress-table-performance.patch
  * import-gradfill-for-text-colors.diff
  * fix-text-rotation.diff
  * fix-python-wizzards.patch
  * docx-brightness-contrast-2.diff
  * docx-brightness-contrast-1.diff
  * doc-brightness-contrast.diff
  * discard-more-header-footer-stuff.patch
  * disable-firebird-unit-test.diff
  * direct-format-numbering.patch
  * WW8-import-fix-upper-margin-of-multi-page.patch
  * VBA-macro-modification-warning.diff
  * Use-varying-aElement-name.patch
  * 0001-std-strlen-requires-cstring-include-to-build.patch
Temporary switches until upstream allows system version:
  * --disable-gltf
  * --disable-coinmp

OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=160
This commit is contained in:
Tomáš Chvátal 2014-06-16 10:43:39 +00:00 committed by Git OBS Bridge
parent 3f4d87b018
commit 3c13328974
25 changed files with 52 additions and 1887 deletions

View File

@ -1,44 +0,0 @@
From f12631e960a2b4123c96e96d2af7d43741d8e6a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@collabora.com>
Date: Wed, 12 Mar 2014 13:44:29 +0100
Subject: [PATCH] std::strlen requires cstring include to build
Or, even simpler, don't bother with the needless namespacing.
Change-Id: I4bbb115c1c2c89881a0bf88ccd54b0f5cb8b3518
(cherry picked from commit da9bd301c6f62e829daadb2af6a6b9633d4f1cb9)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
---
sc/source/filter/excel/xestream.cxx | 2 +-
sc/source/filter/qpro/qpro.cxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 035a827..df08d2c 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -985,7 +985,7 @@ sax_fastparser::FSHelperPtr& XclExpXmlStream::WriteAttributesInternal( sal_Int32
rStream->write( " " )
->writeId( nAttribute )
->write( "=\"" )
- ->writeEscaped( OUString(pValue, std::strlen(pValue), RTL_TEXTENCODING_UTF8) )
+ ->writeEscaped( OUString(pValue, strlen(pValue), RTL_TEXTENCODING_UTF8) )
->write( "\"" );
}
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index c370492..793412a 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -229,7 +229,7 @@ void ScQProReader::readString( OUString &rString, sal_uInt16 nLength )
sal_Char* pText = new sal_Char[ nLength + 1 ];
mpStream->Read( pText, nLength );
pText[ nLength ] = 0;
- rString = OUString( pText, std::strlen(pText), mpStream->GetStreamCharSet() );
+ rString = OUString( pText, strlen(pText), mpStream->GetStreamCharSet() );
delete [] pText;
}
--
1.8.4.5

View File

@ -1,26 +0,0 @@
From eeac58b5261e80ded0381e2be7f1fa3e6f0e9bb4 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Tue, 20 May 2014 14:55:40 +0200
Subject: [PATCH] Use varying aElement name
Change-Id: Idc135ef5031a01961cc18d897a734b598bc833f4
---
sfx2/source/doc/docmacromode.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 39d2b6d..8f87197 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -343,7 +343,7 @@ namespace sfx2
if( aElement == aStdLibName || aElement == aVBAProject )
{
Reference < XNameAccess > xLib;
- Any aAny = xContainer->getByName( aStdLibName );
+ Any aAny = xContainer->getByName( aElement );
aAny >>= xLib;
if ( xLib.is() && xLib->hasElements() )
return sal_True;
--
1.8.4.5

View File

@ -1,144 +0,0 @@
From cfc71b418d27bbfaec195238764078fd5881bab3 Mon Sep 17 00:00:00 2001
From: Jan Holesovsky <kendy@collabora.com>
Date: Thu, 22 May 2014 17:29:56 +0200
Subject: [PATCH] bnc#467278: Introduce a warning that changes to VBA macros
cannot be saved.
As an InfoBar, so hopefully not annoying...
Conflicts:
basctl/source/basicide/basidesh.cxx
Change-Id: I5d4e79273edc03829fdab2d6d5a291576c954e4b
---
basctl/inc/basidesh.hrc | 1 +
basctl/source/basicide/basidesh.cxx | 9 +++++++++
basctl/source/basicide/basidesh.src | 4 ++++
include/sfx2/viewfrm.hxx | 2 +-
4 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc
index 623cb0e..a40f788 100644
--- a/basctl/inc/basidesh.hrc
+++ b/basctl/inc/basidesh.hrc
@@ -68,6 +68,7 @@
#define RID_STR_OPEN ( RID_BASICIDE_START + 20 )
#define RID_STR_SAVE ( RID_BASICIDE_START + 21 )
#define RID_STR_RUNTIMEERROR ( RID_BASICIDE_START + 22 )
+#define RID_STR_CANNOTSAVEVBA ( RID_BASICIDE_START + 23 )
#define RID_STR_STDDIALOGNAME ( RID_BASICIDE_START + 24 )
#define RID_STR_STDMODULENAME ( RID_BASICIDE_START + 27 )
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 674775b..f95e6f4 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -35,6 +35,7 @@
#include <sfx2/app.hxx>
#include <sfx2/dinfdlg.hxx>
#include <sfx2/dispatch.hxx>
+#include <sfx2/infobar.hxx>
#include <sfx2/minfitem.hxx>
#include <sfx2/objface.hxx>
#include <svl/aeitem.hxx>
@@ -137,6 +138,7 @@ SFX_IMPL_INTERFACE( basctl_Shell, SfxViewShell, IDEResId( RID_STR_IDENAME ) )
{
SFX_CHILDWINDOW_REGISTRATION( SID_SEARCH_DLG );
SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_SHOW_PROPERTYBROWSER, BASICIDE_UI_FEATURE_SHOW_BROWSER);
+ SFX_CHILDWINDOW_REGISTRATION(SfxInfoBarContainerChild::GetChildWindowId());
SFX_POPUPMENU_REGISTRATION( IDEResId( RID_POPUP_DLGED ) );
}
@@ -250,7 +252,14 @@ Shell::~Shell()
void Shell::onDocumentCreated( const ScriptDocument& /*_rDocument*/ )
{
if (pCurWin)
+ {
pCurWin->OnNewDocument();
+
+ // for VBA documents, show a warning that we can save them only in ODF
+ if (pCurWin->GetDocument().isInVBAMode())
+ GetViewFrame()->AppendInfoBar("vba_save", IDE_RESSTR(RID_STR_CANNOTSAVEVBA));
+ }
+
UpdateWindows();
}
diff --git a/basctl/source/basicide/basidesh.src b/basctl/source/basicide/basidesh.src
index 6876130..5e019fd 100644
--- a/basctl/source/basicide/basidesh.src
+++ b/basctl/source/basicide/basidesh.src
@@ -216,6 +216,10 @@ String RID_STR_CANNOTCLOSE
{
Text [ en-US ] = "The window cannot be closed while BASIC is running." ;
};
+String RID_STR_CANNOTSAVEVBA
+{
+ Text [ en-US ] = "You are editing a VBA macro. Changes can be saved only in OpenDocument Format." ;
+};
String RID_STR_REPLACESTDLIB
{
Text [ en-US ] = "The default library cannot be replaced." ;
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index cf316b7..8541397 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -190,7 +190,7 @@ public:
The buttons will be added from Right to Left at the right of the info bar. The parent, size
and position of each button will be changed: only the width will remain unchanged.
*/
- void AppendInfoBar( const OUString& sId, const OUString& sMessage, std::vector< PushButton* > aButtons );
+ void AppendInfoBar( const OUString& sId, const OUString& sMessage, std::vector< PushButton* > aButtons = std::vector< PushButton* >() );
void RemoveInfoBar( const OUString& sId );
SAL_DLLPRIVATE void SetDowning_Impl();
--
1.8.4.5
From 39a589e1cf9340e95d63602afd272faccbaac9a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@collabora.com>
Date: Fri, 23 May 2014 18:48:53 +0200
Subject: [PATCH] force posted events before timer timeouts in KDE4 event loop
(bnc#467278)
In this particular case, basctl::Shell::onDocumentCreated() and pretty much
everything in basctl/ it seems operate on the current window. The "OnNew"
event that triggers this comes from a timeout generated who knows where
for whatever reason. However, the code "knows" what the current window
is by having basctl::Shell::SetCurWindow() react on events about the current
window changing ... which come from posted events.
So, unless it's defined somewhere that an ordering here must exist, this
is inherently racy. At least generic and Gtk event loops appear to always
deliver the posted event first, so force the same ordering in the KDE
event loop handling.
Change-Id: Ia098f6b45e6b5a5133a12a9172eb09069e6362f9
---
vcl/unx/kde4/KDEXLib.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 2630c0c..9d2949e 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -349,6 +349,16 @@ void KDEXLib::StopTimer()
void KDEXLib::timeoutActivated()
{
+ // HACK? Always process posted events before timer timeouts.
+ // There are places that may watch both both (for example, there's a posted
+ // event about change of the current active window and there's a timeout
+ // event informing that a document has finished loading). This is of course
+ // racy, but both generic and gtk event loops manage to deliver posted events
+ // first, so it's at least consistent, and it probably kind of makes at least
+ // some sense (timeouts should be more ok to wait and be triggered somewhen).
+ while( SalKDEDisplay::self()->HasUserEvents() )
+ SalKDEDisplay::self()->DispatchInternalEvent();
+
X11SalData *pData = (X11SalData*)ImplGetSVData()->mpSalData;
pData->Timeout();
// QTimer is not single shot, so will be restarted immediatelly
--
1.8.4.5

View File

@ -1,171 +0,0 @@
From 9d981abc3f310adf9af3454dd515ea356b31d3c1 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.co.uk>
Date: Mon, 26 May 2014 12:04:39 +0200
Subject: [PATCH] bnc#863018 WW8 import: fix upper margin of multi-page
floating table
A vert orient position was already handled in case a floating table was
imported as a TextFrame, but in case we didn't do that, the vert orient
position was simply lost.
Fix this by importing it as the upper margin of the table (assuming that
the position is relative from the anchor position).
(cherry picked from commit 3755c87d0426a499d4755e82d8fbc77caa240764)
Change-Id: I3e96f3068605fd6313dfb3e55483e1bce6c063a5
Reviewed-on: https://gerrit.libreoffice.org/9487
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
---
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 213e996..0725a9a 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2726,9 +2726,13 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
maApos[nInTable] = false;
}
+ // So that SwWW8ImplReader::StartApo() can write into this, and
+ // WW8TabDesc::CreateSwTable() can read it, if necessary.
+ SvxULSpaceItem aULSpaceItem(RES_UL_SPACE);
+
if (aApo.mbStartApo)
{
- maApos[nInTable] = StartApo(aApo, pTabPos);
+ maApos[nInTable] = StartApo(aApo, pTabPos, &aULSpaceItem);
// We need an ReSync after StartApo
// (actually only if the Apo extends past a FKP border)
rbReSync = true;
@@ -2744,7 +2748,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
if(nInTable < nCellLevel)
{
- if (StartTable(nStartCp))
+ if (StartTable(nStartCp, &aULSpaceItem))
++nInTable;
else
break;
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 28dca2e..772da4c 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1473,7 +1473,7 @@ private:
WW8FlyPara *ConstructApo(const ApoTestResults &rApo,
const WW8_TablePos *pTabPos);
- bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos);
+ bool StartApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos, SvxULSpaceItem* pULSpaceItem = 0);
void StopApo();
bool TestSameApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos);
ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd,
@@ -1523,7 +1523,7 @@ private:
void ReadDocVars();
- bool StartTable(WW8_CP nStartCp);
+ bool StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem = 0);
bool InEqualApo(int nLvl) const;
bool InLocalApo() const { return InEqualApo(nInTable); }
bool InEqualOrHigherApo(int nLvl) const;
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index f94e055..fcb5b50 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -29,6 +29,7 @@
#include <editeng/brushitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/hyphenzoneitem.hxx>
#include <editeng/frmdiritem.hxx>
@@ -178,7 +179,7 @@ public:
WW8TabDesc( SwWW8ImplReader* pIoClass, WW8_CP nStartCp );
bool Ok() const { return bOk; }
- void CreateSwTable();
+ void CreateSwTable(SvxULSpaceItem* pULSpaceItem = 0);
void UseSwTable();
void SetSizePosition(SwFrmFmt* pFrmFmt);
void TableCellEnd();
@@ -2324,7 +2325,7 @@ void wwSectionManager::PrependedInlineNode(const SwPosition &rPos,
maSegments.back().maStart = SwNodeIndex(rNode);
}
-void WW8TabDesc::CreateSwTable()
+void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem)
{
::SetProgressState(pIo->nProgress, pIo->mpDocShell); // Update
@@ -2380,6 +2381,9 @@ void WW8TabDesc::CreateSwTable()
if (!pTable || !pTable->GetFrmFmt())
return;
+ if (pULSpaceItem && pULSpaceItem->GetUpper() != 0)
+ aItemSet.Put(*pULSpaceItem);
+
SwTableNode* pTableNode = pTable->GetTableNode();
OSL_ENSURE(pTableNode, "no table node!");
if (pTableNode)
@@ -3319,7 +3323,7 @@ void WW8TabDesc::SetNumRuleName( const OUString& rName )
aNumRuleNames[nCol] = rName;
}
-bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
+bool SwWW8ImplReader::StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem)
{
// Entering a table so make sure the FirstPara flag gets set
bFirstPara = true;
@@ -3395,7 +3399,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
"Not the anchor type requested!" );
MoveInsideFly(pTableDesc->pFlyFmt);
}
- pTableDesc->CreateSwTable();
+ pTableDesc->CreateSwTable(pULSpaceItem);
if (pTableDesc->pFlyFmt)
{
pTableDesc->SetSizePosition(pTableDesc->pFlyFmt);
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 43c93cd..066b8db 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2286,7 +2286,8 @@ bool SwWW8ImplReader::IsDropCap()
}
bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
- const WW8_TablePos *pTabPos)
+ const WW8_TablePos *pTabPos,
+ SvxULSpaceItem* pULSpaceItem)
{
if (0 == (pWFlyPara = ConstructApo(rApo, pTabPos)))
return false;
@@ -2321,7 +2322,24 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
WW8FlySet aFlySet(*this, pWFlyPara, pSFlyPara, false);
if (pTabPos && pTabPos->bNoFly)
+ {
pSFlyPara->pFlyFmt = 0;
+ if (pULSpaceItem)
+ {
+ // Word positioned tables can have a position (like a
+ // fly-frame), but they also support flowing accross multiple
+ // pages. If we decide to import this as a normal table (so it
+ // can flow accross multiple pages), then turn the vertical
+ // orientation position of the fly into a table upper margin.
+ const SfxPoolItem* pItem = 0;
+ if (aFlySet.HasItem(RES_VERT_ORIENT, &pItem))
+ {
+ const SwFmtVertOrient* pOrient = static_cast<const SwFmtVertOrient*>(pItem);
+ if (pOrient->GetPos() != 0)
+ pULSpaceItem->SetUpper(pOrient->GetPos());
+ }
+ }
+ }
else
{
pSFlyPara->pFlyFmt = rDoc.MakeFlySection( pSFlyPara->eAnchor,
--
1.8.4.5

View File

@ -1,232 +0,0 @@
From 2d89b1a029514935b60fbd3f7f7c5341a329bfc8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@collabora.com>
Date: Thu, 29 May 2014 14:31:20 +0200
Subject: [PATCH] handle direct formatting for numbering in .docx (bnc#875717)
Change-Id: I3ed0f926e79f3878c5702c2becae97d99d00e201
(cherry picked from commit c2ac2ced0d51200a62f7436144f0d89cfcd15eed)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
---
sw/inc/IDocumentSettingAccess.hxx | 3 ++-
sw/inc/doc.hxx | 1 +
sw/source/core/doc/doc.cxx | 4 ++++
sw/source/core/doc/docnew.cxx | 1 +
sw/source/core/text/txtfld.cxx | 31 ++++++++++++++++++++++++++++
sw/source/ui/uno/SwXDocumentSettings.cxx | 16 +++++++++++++-
writerfilter/source/dmapper/DomainMapper.cxx | 3 +++
writerfilter/source/dmapper/PropertyIds.cxx | 1 +
writerfilter/source/dmapper/PropertyIds.hxx | 1 +
9 files changed, 59 insertions(+), 2 deletions(-)
diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
index 6e66fd0..4e94a1e 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -92,7 +92,8 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
STYLES_NODEFAULT,
FLOATTABLE_NOMARGINS,
EMBED_FONTS,
- EMBED_SYSTEM_FONTS
+ EMBED_SYSTEM_FONTS,
+ APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
};
public:
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 987d0ab..b872119 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -581,6 +581,7 @@ private:
bool mbBackgroundParaOverDrawings;
bool mbTabOverMargin;
bool mbSurroundTextWrapSmall;
+ bool mApplyParagraphMarkFormatToNumbering;
bool mbLastBrowseMode : 1;
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index e1d84f3..d3c74e9 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -206,6 +206,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const
case FLOATTABLE_NOMARGINS: return mbFloattableNomargins;
case EMBED_FONTS: return mEmbedFonts;
case EMBED_SYSTEM_FONTS: return mEmbedSystemFonts;
+ case APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING: return mApplyParagraphMarkFormatToNumbering;
default:
OSL_FAIL("Invalid setting id");
}
@@ -400,6 +401,9 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
case EMBED_SYSTEM_FONTS:
mEmbedSystemFonts = value;
break;
+ case APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING:
+ mApplyParagraphMarkFormatToNumbering = value;
+ break;
default:
OSL_FAIL("Invalid setting id");
}
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 5385509..a97e616 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -313,6 +313,7 @@ SwDoc::SwDoc()
mbBackgroundParaOverDrawings(false),
mbTabOverMargin(false),
mbSurroundTextWrapSmall(false),
+ mApplyParagraphMarkFormatToNumbering(false),
mbLastBrowseMode( false ),
mn32DummyCompatabilityOptions1(0),
mn32DummyCompatabilityOptions2(0),
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 22058c3..35471f41 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -48,6 +48,7 @@
#include "pagedesc.hxx"
#include <pormulti.hxx>
#include "fmtmeta.hxx"
+#include "fmtautofmt.hxx"
/*************************************************************************
@@ -382,6 +383,32 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
*************************************************************************/
+// OOXML spec says that w:rPr inside w:pPr specifies formatting for the paragraph mark symbol (i.e. the control
+// character than can be configured to be shown). However, in practice MSO also uses it as direct formatting
+// for numbering in that paragraph. I don't know if the problem is in the spec or in MSWord.
+static void checkApplyParagraphMarkFormatToNumbering( SwFont* pNumFnt, SwTxtFormatInfo& rInf, const IDocumentSettingAccess* pIDSA )
+{
+ SwTxtNode* node = rInf.GetTxtFrm()->GetTxtNode();
+ if( !pIDSA->get(IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING ))
+ return;
+ if( SwpHints* hints = node->GetpSwpHints())
+ {
+ for( int i = 0; i < hints->Count(); ++i )
+ {
+ SwTxtAttr* hint = hints->GetTextHint( i );
+ // Formatting for the paragraph mark is set to apply only to the (non-existent) extra character
+ // the at end of the txt node.
+ if( hint->Which() == RES_TXTATR_AUTOFMT && hint->GetStart() != NULL && hint->GetEnd() != NULL
+ && *hint->GetStart() == *hint->GetEnd() && *hint->GetStart() == node->Len())
+ {
+ boost::shared_ptr<SfxItemSet> pSet(hint->GetAutoFmt().GetStyleHandle());
+ pNumFnt->SetDiffFnt( pSet.get(), pIDSA );
+ }
+ }
+ }
+}
+
+
SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
{
if( rInf.IsNumDone() || rInf.GetTxtStart() != nStart
@@ -470,6 +497,8 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
if( pFmt )
pNumFnt->SetDiffFnt( pFmt, pIDSA );
+ checkApplyParagraphMarkFormatToNumbering( pNumFnt, rInf, pIDSA );
+
if ( pFmtFnt )
{
const sal_uInt8 nAct = pNumFnt->GetActual();
@@ -529,6 +558,8 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
if( pFmt )
pNumFnt->SetDiffFnt( pFmt, pIDSA );
+ checkApplyParagraphMarkFormatToNumbering( pNumFnt, rInf, pIDSA );
+
// we do not allow a vertical font
pNumFnt->SetVertical( pNumFnt->GetOrientation(), pFrm->IsVertical() );
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index c10ddfd..8a218a1 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -123,7 +123,8 @@ enum SwDocumentSettingsPropertyHandles
HANDLE_EMBED_FONTS,
HANDLE_EMBED_SYSTEM_FONTS,
HANDLE_TAB_OVER_MARGIN,
- HANDLE_SURROUND_TEXT_WRAP_SMALL
+ HANDLE_SURROUND_TEXT_WRAP_SMALL,
+ HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
};
static MasterPropertySetInfo * lcl_createSettingsInfo()
@@ -194,6 +195,7 @@ static MasterPropertySetInfo * lcl_createSettingsInfo()
{ RTL_CONSTASCII_STRINGPARAM("EmbedSystemFonts"), HANDLE_EMBED_SYSTEM_FONTS, CPPUTYPE_BOOLEAN, 0, 0},
{ RTL_CONSTASCII_STRINGPARAM("TabOverMargin"), HANDLE_TAB_OVER_MARGIN, CPPUTYPE_BOOLEAN, 0, 0},
{ RTL_CONSTASCII_STRINGPARAM("SurroundTextWrapSmall"), HANDLE_SURROUND_TEXT_WRAP_SMALL, CPPUTYPE_BOOLEAN, 0, 0},
+ { RTL_CONSTASCII_STRINGPARAM("ApplyParagraphMarkFormatToNumbering"), HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, CPPUTYPE_BOOLEAN, 0, 0},
/*
* As OS said, we don't have a view when we need to set this, so I have to
* find another solution before adding them to this property set - MTG
@@ -797,6 +799,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
mpDoc->set(IDocumentSettingAccess::SURROUND_TEXT_WRAP_SMALL, bTmp);
}
break;
+ case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING:
+ {
+ bool bTmp = *(sal_Bool*)rValue.getValue();
+ mpDoc->set(IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, bTmp);
+ }
+ break;
default:
throw UnknownPropertyException();
}
@@ -1217,6 +1225,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
rValue.setValue( &bTmp, ::getBooleanCppuType() );
}
break;
+ case HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING:
+ {
+ sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING );
+ rValue.setValue( &bTmp, ::getBooleanCppuType() );
+ }
+ break;
default:
throw UnknownPropertyException();
}
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 4a520c8..98b6f9e 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -106,6 +106,9 @@ LoggedStream(dmapper_logger, "DomainMapper"),
m_pImpl->SetDocumentSettingsProperty(
PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_SURROUND_TEXT_WRAP_SMALL ),
uno::makeAny( true ) );
+ m_pImpl->SetDocumentSettingsProperty(
+ PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING ),
+ uno::makeAny( true ) );
//import document properties
try
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index 12f28aa..bacbcd3 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -345,6 +345,7 @@ const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const
case PROP_PARA_SHADOW_FORMAT: sName = "ParaShadowFormat"; break;
case PROP_FOOTNOTE_LINE_RELATIVE_WIDTH: sName = "FootnoteLineRelativeWidth"; break;
case PROP_HORIZONTAL_MERGE: sName = "HorizontalMerge"; break;
+ case PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING : sName = "ApplyParagraphMarkFormatToNumbering"; break;
}
::std::pair<PropertyNameMap_t::iterator,bool> aInsertIt =
m_pImpl->aNameMap.insert( PropertyNameMap_t::value_type( eId, sName ));
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index 9cdc085..a4e3621 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -316,6 +316,7 @@ enum PropertyIds
,PROP_PARA_TOP_MARGIN_BEFORE_AUTO_SPACING
,PROP_PARA_BOTTOM_MARGIN_AFTER_AUTO_SPACING
,PROP_HORIZONTAL_MERGE
+ ,PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING
};
struct PropertyNameSupplier_Impl;
class PropertyNameSupplier
--
1.8.4.5

View File

@ -1,17 +0,0 @@
diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk
index b9d7d56..146c6ee 100644
--- a/dbaccess/Module_dbaccess.mk
+++ b/dbaccess/Module_dbaccess.mk
@@ -34,12 +34,6 @@ $(eval $(call gb_Module_add_l10n_targets,dbaccess,\
UIConfig_dbtdata \
))
-ifeq ($(ENABLE_FIREBIRD_SDBC),TRUE)
-$(eval $(call gb_Module_add_check_targets,dbaccess,\
- CppunitTest_dbaccess_firebird_test \
-))
-endif
-
$(eval $(call gb_Module_add_check_targets,dbaccess,\
CppunitTest_dbaccess_dialog_save \
CppunitTest_dbaccess_macros_test \

View File

@ -1,80 +0,0 @@
From b6e5b90899f9adb62556538583763871999aa544 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@collabora.com>
Date: Sat, 24 May 2014 00:36:06 +0200
Subject: [PATCH] discard more header/footer stuff when discarding
headers/footers (bnc#875718)
782adba4d436c65cdf85d48f28486321873b15ed discards unneeded headers/footers,
but only the text, not e.g. frames or fields. The test document therefore
ends up with a frame with a page number inside the body text, because the text
in the footer it should be anchored to was discarded. This commit fixes
this by discarding more (although probably the whole header/footer
shouldn't even be parsed to begin with).
The test from b349d2483e1fe64316d87b55d0b3b4c8f2293e2e actually checked
for this incorrect frame, so change that (the whole test is suspicious, as
the end result is quite far away from what the original doc looks like).
(cherry picked from commit 5510f563502168defa4ccfc54214d781a7c92868)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I2e7192e00237db1f030d0524c5667fe92c9e496b
---
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 7f61328..2e6538a 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2293,6 +2293,8 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::FindOrCreateFieldMaster
-----------------------------------------------------------------------*/
void DomainMapper_Impl::PushFieldContext()
{
+ if(m_bDiscardHeaderFooter)
+ return;
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->element("pushFieldContext");
#endif
@@ -2980,6 +2982,8 @@ void DomainMapper_Impl::handleToc
-----------------------------------------------------------------------*/
void DomainMapper_Impl::CloseFieldCommand()
{
+ if(m_bDiscardHeaderFooter)
+ return;
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->element("closeFieldCommand");
#endif
@@ -3660,6 +3664,8 @@ void DomainMapper_Impl::SetFieldFFData(FFDataHandler::Pointer_t pFFDataHandler)
-----------------------------------------------------------------------*/
void DomainMapper_Impl::PopFieldContext()
{
+ if(m_bDiscardHeaderFooter)
+ return;
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->element("popFieldContext");
#endif
@@ -3955,7 +3961,7 @@ void DomainMapper_Impl::RegisterFrameConversion(
bool DomainMapper_Impl::ExecuteFrameConversion()
{
bool bRet = false;
- if( m_xFrameStartRange.is() && m_xFrameEndRange.is() )
+ if( m_xFrameStartRange.is() && m_xFrameEndRange.is() && !m_bDiscardHeaderFooter )
{
bRet = true;
try
@@ -3971,10 +3977,10 @@ bool DomainMapper_Impl::ExecuteFrameConversion()
SAL_WARN( "writerfilter", "Exception caught when converting to frame: " + rEx.Message );
bRet = false;
}
- m_xFrameStartRange = 0;
- m_xFrameEndRange = 0;
- m_aFrameProperties.realloc( 0 );
}
+ m_xFrameStartRange = 0;
+ m_xFrameEndRange = 0;
+ m_aFrameProperties.realloc( 0 );
return bRet;
}
--
1.8.4.5

View File

@ -1,249 +0,0 @@
From 85e088c70aa3cfdd638276a2555b35ed1275c352 Mon Sep 17 00:00:00 2001
From: Luboš Luňák <l.lunak@collabora.com>
Date: Fri, 18 Apr 2014 18:46:34 +0000
Subject: handle strange brightness+contrast adjustment from msoffice (fdo#38410)
LO uses basically the formula "newpixel=(oldpixel-128)*contrast+128+brightness",
i.e. contrast is applied first. It looks like there's no "oficial" formula for this,
so a formula that applies brightness first would be ok too. MSO for some weird reason
apparently uses a formula that applies half of brightness before contrast and
half afterwards (insert funny political correctness or compromise joke here).
While the result is the same like with the LO formula if only either brightness
or contrast is adjusted, the result is different if both are involved. Just modify
the image using the MSO algorithm if this is the case.
Conflicts:
filter/source/msfilter/msdffimp.cxx
include/vcl/bitmap.hxx
include/vcl/bitmapex.hxx
include/vcl/gdimtf.hxx
vcl/source/gdi/bitmap3.cxx
vcl/source/gdi/bitmapex.cxx
vcl/source/gdi/gdimtf.cxx
Change-Id: I55fe8f395832685b90f024cf2f58b0797c1ba588
Reviewed-on: https://gerrit.libreoffice.org/9099
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
---
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 63847b3..472e1a5 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3817,7 +3817,12 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
if ( nContrast || nBrightness || ( nGamma != 0x10000 ) || ( eDrawMode != GRAPHICDRAWMODE_STANDARD ) )
{
- if ( ( rObjData.nSpFlags & SP_FOLESHAPE ) == 0 )
+ // MSO uses a different algorithm for contrast+brightness, LO applies contrast before brightness,
+ // while MSO apparently applies half of brightness before contrast and half after. So if only
+ // contrast or brightness need to be altered, the result is the same, but if both are involved,
+ // there's no way to map that, so just force a conversion of the image.
+ bool needsConversion = nContrast != 0 && nBrightness != 0;
+ if ( ( rObjData.nSpFlags & SP_FOLESHAPE ) == 0 && !needsConversion )
{
if ( nBrightness )
rSet.Put( SdrGrafLuminanceItem( nBrightness ) );
@@ -3842,7 +3847,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
{
BitmapEx aBitmapEx( aGraf.GetBitmapEx() );
if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
- aBitmapEx.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, sal_False );
+ aBitmapEx.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, false, true );
if ( eDrawMode == GRAPHICDRAWMODE_GREYS )
aBitmapEx.Convert( BMP_CONVERSION_8BIT_GREYS );
else if ( eDrawMode == GRAPHICDRAWMODE_MONO )
@@ -3856,7 +3861,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
{
GDIMetaFile aGdiMetaFile( aGraf.GetGDIMetaFile() );
if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
- aGdiMetaFile.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, sal_False );
+ aGdiMetaFile.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, false, true );
if ( eDrawMode == GRAPHICDRAWMODE_GREYS )
aGdiMetaFile.Convert( MTF_CONVERSION_8BIT_GREYS );
else if ( eDrawMode == GRAPHICDRAWMODE_MONO )
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index adf6b63..621fceb 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -779,6 +779,9 @@ public:
If sal_True, invert the channel values with the logical 'not' operator
@return sal_True, if the operation was completed successfully.
+
+ @param msoBrightness
+ Use the same formula for brightness as used by MSOffice.
*/
sal_Bool Adjust( short nLuminancePercent = 0,
short nContrastPercent = 0,
@@ -786,7 +789,8 @@ public:
short nChannelGPercent = 0,
short nChannelBPercent = 0,
double fGamma = 1.0,
- sal_Bool bInvert = sal_False );
+ bool bInvert = false,
+ bool msoBrightness = false );
/** Apply specified filter to the bitmap
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index da23547..8ac6325 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -343,6 +343,10 @@ public:
If sal_True, invert the channel values with the logical 'not' operator
@return sal_True, if the operation was completed successfully.
+
+ @param msoFormula
+ Use the same formula for brightness as used by MSOffice.
+
*/
sal_Bool Adjust( short nLuminancePercent = 0,
short nContrastPercent = 0,
@@ -350,7 +354,8 @@ public:
short nChannelGPercent = 0,
short nChannelBPercent = 0,
double fGamma = 1.0,
- sal_Bool bInvert = sal_False );
+ bool bInvert = false,
+ bool msoBrightness = false );
/** Apply specified filter to the bitmap
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index 8afdc14..d38f863 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -150,7 +150,7 @@ public:
void Adjust( short nLuminancePercent = 0, short nContrastPercent = 0,
short nChannelRPercent = 0, short nChannelGPercent = 0,
short nChannelBPercent = 0, double fGamma = 1.0,
- sal_Bool bInvert = sal_False
+ bool bInvert = false, bool msoBrightness = false
);
void Convert( MtfConversion eConversion );
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 5c4905a..4fbe1b8 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -3250,7 +3250,7 @@ sal_Bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFla
sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent, short nChannelBPercent,
- double fGamma, sal_Bool bInvert )
+ double fGamma, bool bInvert, bool msoBrightness )
{
sal_Bool bRet = sal_False;
@@ -3282,8 +3282,11 @@ sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
else
fM = ( 128.0 + 1.27 * MinMax( nContrastPercent, -100L, 0L ) ) / 128.0;
- // total offset = luminance offset + contrast offset
- fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0;
+ if(!msoBrightness)
+ // total offset = luminance offset + contrast offset
+ fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0;
+ else
+ fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55;
// channel offset = channel offset + total offset
fROff = nChannelRPercent * 2.55 + fOff;
@@ -3297,10 +3300,21 @@ sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent,
// create mapping table
for( nX = 0L; nX < 256L; nX++ )
{
- cMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
- cMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
- cMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
-
+ if(!msoBrightness)
+ {
+ cMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
+ cMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
+ cMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
+ }
+ else
+ {
+ // LO simply uses (in a somewhat optimized form) "newcolor = (oldcolor-128)*contrast+brightness+128"
+ // as the formula, i.e. contrast first, brightness afterwards. MSOffice, for whatever weird reason,
+ // use neither first, but apparently it applies half of brightness before contrast and half afterwards.
+ cMapR[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fROff/2-128) * fM + 128 + fROff/2 ), 0L, 255L );
+ cMapG[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fGOff/2-128) * fM + 128 + fGOff/2 ), 0L, 255L );
+ cMapB[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fBOff/2-128) * fM + 128 + fBOff/2 ), 0L, 255L );
+ }
if( bGamma )
{
cMapR[ nX ] = GAMMA( cMapR[ nX ], fGamma );
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 6deb1db..98c6b24 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -633,11 +633,11 @@ sal_Bool BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceCol
sal_Bool BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent, short nChannelBPercent,
- double fGamma, sal_Bool bInvert )
+ double fGamma, bool bInvert, bool msoBrightness )
{
return( !!aBitmap ? aBitmap.Adjust( nLuminancePercent, nContrastPercent,
nChannelRPercent, nChannelGPercent, nChannelBPercent,
- fGamma, bInvert ) : sal_False );
+ fGamma, bInvert, msoBrightness ) : false );
}
sal_Bool BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress )
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 2e74172..12ad981 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2175,7 +2175,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
short nChannelRPercent, short nChannelGPercent,
- short nChannelBPercent, double fGamma, sal_Bool bInvert )
+ short nChannelBPercent, double fGamma, bool bInvert, bool msoBrightness )
{
// nothing to do? => return quickly
if( nLuminancePercent || nContrastPercent ||
@@ -2196,8 +2196,11 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
else
fM = ( 128.0 + 1.27 * MinMax( nContrastPercent, -100L, 0L ) ) / 128.0;
- // total offset = luminance offset + contrast offset
- fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0;
+ if(!msoBrightness)
+ // total offset = luminance offset + contrast offset
+ fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55 + 128.0 - fM * 128.0;
+ else
+ fOff = MinMax( nLuminancePercent, -100L, 100L ) * 2.55;
// channel offset = channel offset + total offset
fROff = nChannelRPercent * 2.55 + fOff;
@@ -2211,10 +2214,18 @@ void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent,
// create mapping table
for( long nX = 0L; nX < 256L; nX++ )
{
- aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
- aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
- aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
-
+ if(!msoBrightness)
+ {
+ aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fROff ), 0L, 255L );
+ aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fGOff ), 0L, 255L );
+ aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( nX * fM + fBOff ), 0L, 255L );
+ }
+ else
+ {
+ aColParam.pMapR[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fROff/2-128) * fM + 128 + fROff/2 ), 0L, 255L );
+ aColParam.pMapG[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fGOff/2-128) * fM + 128 + fGOff/2 ), 0L, 255L );
+ aColParam.pMapB[ nX ] = (sal_uInt8) MinMax( FRound( (nX+fBOff/2-128) * fM + 128 + fBOff/2 ), 0L, 255L );
+ }
if( bGamma )
{
aColParam.pMapR[ nX ] = GAMMA( aColParam.pMapR[ nX ], fGamma );
--
cgit v0.9.0.2-2-gbebe

View File

@ -1,30 +0,0 @@
From 02dcf4a9b7387f6675324245ab2fa5b7eabf0d12 Mon Sep 17 00:00:00 2001
From: Luboš Luňák <l.lunak@collabora.com>
Date: Wed, 30 Apr 2014 19:52:28 +0000
Subject: actually read brightness/contrast when reading docx (bnc#875713)
It's read for the shape in oox/ , but it didn't make it any further apparently.
Change-Id: I0885a675f72d63b3d262f1ef7e42f5d2e03588b6
(cherry picked from commit 804da2a977989ba1f046847b9e00f00c83749e30)
Reviewed-on: https://gerrit.libreoffice.org/9216
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
---
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 304a3d2..607d92b 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -924,6 +924,10 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
xShapeProps->getPropertyValue("ShadowTransparence") >>= m_pImpl->nShadowTransparence;
}
+ xShapeProps->getPropertyValue("GraphicColorMode") >>= m_pImpl->eColorMode;
+ xShapeProps->getPropertyValue("AdjustLuminance") >>= m_pImpl->nBrightness;
+ xShapeProps->getPropertyValue("AdjustContrast") >>= m_pImpl->nContrast;
+
// fdo#70457: transform XShape into a SwXTextGraphicObject only if there's no rotation
if ( nRotation == 0 )
m_xGraphicObject = createGraphicObject( aMediaProperties );
--
cgit v0.9.0.2-2-gbebe

View File

@ -1,143 +0,0 @@
From 75a839188d1cac5f0ac602e59462b32879d2242a Mon Sep 17 00:00:00 2001
From: Luboš Luňák <l.lunak@collabora.com>
Date: Wed, 30 Apr 2014 20:19:08 +0000
Subject: handle brightness+contrast from msoffice (bnc#875713)
This is the same like 1139d618b8bc6ab823a96184bd0f0257980aad24, for docx.
(cherry picked from commit 893fe88469dec5b727d96f8ea1b4edb9e88288a7)
Conflicts:
oox/source/drawingml/fillproperties.cxx
Change-Id: I1ef4e18444e8c60e9ae8f67249bcef1053f0d62d
Reviewed-on: https://gerrit.libreoffice.org/9217
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
---
diff --git a/offapi/com/sun/star/graphic/XGraphicTransformer.idl b/offapi/com/sun/star/graphic/XGraphicTransformer.idl
index d1a6ddf..dbd9c8d 100644
--- a/offapi/com/sun/star/graphic/XGraphicTransformer.idl
+++ b/offapi/com/sun/star/graphic/XGraphicTransformer.idl
@@ -51,6 +51,16 @@ interface XGraphicTransformer : ::com::sun::star::uno::XInterface
com::sun::star::graphic::XGraphic applyDuotone( [ in ] com::sun::star::graphic::XGraphic In,
[ in ] long ColorOne, [ in ] long ColorTwo )
raises( ::com::sun::star::lang::IllegalArgumentException );
+
+ /** changes brightness/contrast
+
+ @param mso whether to use MSOffice brightness/contrast formula
+ @returns
+ The modified graphic
+ */
+ com::sun::star::graphic::XGraphic applyBrightnessContrast( [ in ] com::sun::star::graphic::XGraphic In,
+ [ in ] long brightness, [ in ] long contrast, [ in ] boolean mso )
+ raises( ::com::sun::star::lang::IllegalArgumentException );
};
} ; } ; } ; } ;
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index c96c77a..99026a9 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -92,6 +92,18 @@ Reference< XGraphic > lclCheckAndApplyChangeColorTransform( const BlipFillProper
return xGraphic;
}
+Reference< XGraphic > applyBrightnessContrast( Reference< XGraphic > xGraphic, sal_Int32 brightness, sal_Int32 contrast )
+{
+ try
+ {
+ Reference< XGraphicTransformer > xTransformer( xGraphic, UNO_QUERY_THROW );
+ xGraphic = xTransformer->applyBrightnessContrast( xGraphic, brightness, contrast, true );
+ }
+ catch( Exception& )
+ {
+ }
+ return xGraphic;
+}
BitmapMode lclGetBitmapMode( sal_Int32 nToken )
@@ -501,12 +513,24 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr ) const
{
+ sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 );
+ sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 );
if( maBlipProps.mxGraphic.is() )
{
// created transformed graphic
Reference< XGraphic > xGraphic = lclCheckAndApplyDuotoneTransform( maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, nPhClr );
xGraphic = lclCheckAndApplyChangeColorTransform( maBlipProps, xGraphic, rGraphicHelper, nPhClr );
+ // MSO uses a different algorithm for contrast+brightness, LO applies contrast before brightness,
+ // while MSO apparently applies half of brightness before contrast and half after. So if only
+ // contrast or brightness need to be altered, the result is the same, but if both are involved,
+ // there's no way to map that, so just force a conversion of the image.
+ if( nBrightness != 0 && nContrast != 0 )
+ {
+ xGraphic = applyBrightnessContrast( xGraphic, nBrightness, nContrast );
+ nBrightness = 0;
+ nContrast = 0;
+ }
rPropMap[ PROP_Graphic ] <<= xGraphic;
// do we still need to set GraphicURL as well? (TODO)
@@ -545,10 +569,8 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
rPropMap[ PROP_GraphicColorMode ] <<= eColorMode;
// brightness and contrast
- sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 );
if( nBrightness != 0 )
rPropMap[ PROP_AdjustLuminance ] <<= nBrightness;
- sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 );
if( nContrast != 0 )
rPropMap[ PROP_AdjustContrast ] <<= nContrast;
diff --git a/svtools/source/graphic/transformer.cxx b/svtools/source/graphic/transformer.cxx
index 30f07c7..bf63621 100644
--- a/svtools/source/graphic/transformer.cxx
+++ b/svtools/source/graphic/transformer.cxx
@@ -159,6 +159,23 @@ uno::Reference< graphic::XGraphic > SAL_CALL GraphicTransformer::applyDuotone(
return xRet;
}
+uno::Reference< graphic::XGraphic > SAL_CALL GraphicTransformer::applyBrightnessContrast(
+ const uno::Reference< graphic::XGraphic >& rxGraphic, sal_Int32 nBrightness, sal_Int32 nContrast, sal_Bool mso )
+ throw ( lang::IllegalArgumentException, uno::RuntimeException, std::exception)
+{
+ const uno::Reference< uno::XInterface > xIFace( rxGraphic, uno::UNO_QUERY );
+ ::Graphic aGraphic( *::unographic::Graphic::getImplementation( xIFace ) );
+
+ BitmapEx aBitmapEx( aGraphic.GetBitmapEx() );
+ aBitmapEx.Adjust( nBrightness, nContrast, 0, 0, 0, 0, false, mso );
+ aGraphic = ::Graphic( aBitmapEx );
+
+ ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic();
+ pUnoGraphic->init( aGraphic );
+ uno::Reference< graphic::XGraphic > xRet( pUnoGraphic );
+ return xRet;
+}
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/graphic/transformer.hxx b/svtools/source/graphic/transformer.hxx
index e57b8fa..1707183 100644
--- a/svtools/source/graphic/transformer.hxx
+++ b/svtools/source/graphic/transformer.hxx
@@ -51,6 +51,11 @@ class GraphicTransformer : public GraphicTransformer_UnoImplHelper1
sal_Int32 nColorOne, sal_Int32 nColorTwo )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL applyBrightnessContrast(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& rxGraphic,
+ sal_Int32 nBrightness, sal_Int32 nContrast, sal_Bool mso )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+
};
}
--
cgit v0.9.0.2-2-gbebe

View File

@ -1,74 +0,0 @@
From bf355f47f49eb352985c129544c60c27814f450b Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Mon, 03 Mar 2014 10:57:34 +0000
Subject: Resolves: fdo#77899 fax etc wizards don't start
Wizards should look for templates in Template_internal, not Template_user
...as only the former reliably denotes the share/template tree where the
wizard templates are stored. (Presumably the latter defaulted to the former as
long as it wasn't explicitly set in the past, but is now always explicitly set
since 838b77f5f3d6d8fd98891e99a23ff78a6a357cb2 "Resolves: rhbz#1065807 use xdg
~/Templates for default Template location.")
Change-Id: I7d1ac47d821c778fe342865465d0505a94b824bf
(cherry picked from commit 97822e3cbc63d3bd110bc3c654b3fbb4d4d1904c)
actively search for wizards dir in all internal templates
(cherry picked from commit 5fa18dc21644f2a719bf39ec948a586fa8837b6a)
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Conflicts:
wizards/com/sun/star/wizards/ui/WizardDialog.py
Change-Id: I4ef6da4d9d1931917e0aaa6e110fd273bd917b26
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
---
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
index 1ff5f1c..76921d0 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
@@ -773,7 +773,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
return None
def initializeTemplates(self, xMSF):
- sLetterPath = self.sTemplatePath + "/../common/wizard/letter"
+ sLetterPath = self.sTemplatePath + "/wizard/letter"
self.BusinessFiles = \
FileAccess.getFolderTitles(
xMSF, "bus", sLetterPath, self.resources.dictBusinessTemplate)
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py
index fc1ce41..08a8c2d 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.py
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py
@@ -23,6 +23,7 @@ from .UnoDialog2 import UnoDialog2, Desktop, PropertyNames, UIConsts, \
from .event.CommonListener import TerminateListenerProcAdapter
from ..common.Resource import Resource
from ..common.HelpIds import HelpIds
+from ..common.FileAccess import FileAccess
from ..document.OfficeDocument import OfficeDocument
from ..text.TextDocument import TextDocument
@@ -114,10 +115,17 @@ class WizardDialog(UnoDialog2):
def initializePaths(self):
xPropertySet = \
self.xMSF.createInstance("com.sun.star.util.PathSettings")
- self.sTemplatePath = \
- xPropertySet.getPropertyValue("Template_user")[0]
self.sUserTemplatePath = \
xPropertySet.getPropertyValue("Template_writable")
+ myFA = FileAccess(self.xMSF)
+ aInternalPaths = xPropertySet.getPropertyValue("Template_internal")
+ self.sTemplatePath = ""
+ for path in aInternalPaths:
+ if myFA.exists(path + "/wizard", False):
+ self.sTemplatePath = path
+ break
+ if self.sTemplatePath == "":
+ raise Exception("could not find wizard templates")
def addRoadmap(self):
try:
--
cgit v0.9.0.2-2-gbebe

View File

@ -1,26 +0,0 @@
From e3e12b1d1e36e1a0d4fc4c6423b584d677693897 Mon Sep 17 00:00:00 2001
From: Muthu Subramanian <sumuthu@collabora.com>
Date: Wed, 26 Mar 2014 10:35:44 +0000
Subject: n#862510: Fix text rotation.
Fix breaks document in n#783433 - the one there is
damaged - resaving it using mso 2010 should fix the problem there.
Change-Id: Ib2ee7ab20489d716dc189ac6810d705763a16476
---
diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx
index e232b4d..0a1bb59 100644
--- a/oox/source/drawingml/transform2dcontext.cxx
+++ b/oox/source/drawingml/transform2dcontext.cxx
@@ -46,7 +46,8 @@ Transform2DContext::Transform2DContext( ContextHandler2Helper& rParent, const At
}
else
{
- mrShape.getTextBody()->getTextProperties().moRotation = rAttribs.getInteger( XML_rot );
+ if( rAttribs.hasAttribute( XML_rot ) )
+ mrShape.getTextBody()->getTextProperties().moRotation = -rAttribs.getInteger( XML_rot ).get();
}
}
--
cgit v0.9.0.2-2-gbebe

View File

@ -1,75 +0,0 @@
From ce609f477e488e9c701b2bfa893bcf01722d2a01 Mon Sep 17 00:00:00 2001
From: Muthu Subramanian <sumuthu@collabora.com>
Date: Fri, 28 Mar 2014 11:54:45 +0000
Subject: n#870234: Import gradfill for text colors.
Uses the first color from the gradfill list.
(Which is better than plain black!)
(cherry picked from commit cfc76de83e3c0a56abd30a8f3bd7c69d3500d223)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Conflicts:
oox/source/drawingml/textcharacterproperties.cxx
oox/source/drawingml/textcharacterpropertiescontext.cxx
Change-Id: I4c1c0c4b031f3681c95b75b3c0683eb4de95bffb
---
diff --git a/include/oox/drawingml/textcharacterproperties.hxx b/include/oox/drawingml/textcharacterproperties.hxx
index c079015..d2335e1 100644
--- a/include/oox/drawingml/textcharacterproperties.hxx
+++ b/include/oox/drawingml/textcharacterproperties.hxx
@@ -24,6 +24,7 @@
#include <oox/helper/propertymap.hxx>
#include <oox/drawingml/color.hxx>
#include <oox/drawingml/textfont.hxx>
+#include <oox/drawingml/fillproperties.hxx>
namespace oox { class PropertySet; }
@@ -53,6 +54,7 @@ struct TextCharacterProperties
OptValue< bool > moItalic;
OptValue< bool > moUnderlineLineFollowText;
OptValue< bool > moUnderlineFillFollowText;
+ GradientFillProperties maGradientProps; /// Properties for gradient text colors
/** Overwrites all members that are explicitly set in rSourceProps. */
void assignUsed( const TextCharacterProperties& rSourceProps );
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx
index febb28c..a7be42b 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -60,6 +60,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSource
moItalic.assignIfUsed( rSourceProps.moItalic );
moUnderlineLineFollowText.assignIfUsed( rSourceProps.moUnderlineLineFollowText );
moUnderlineFillFollowText.assignIfUsed( rSourceProps.moUnderlineFillFollowText );
+ maGradientProps.assignUsed( rSourceProps.maGradientProps );
}
void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFilterBase& rFilter, bool bUseOptional ) const
@@ -93,6 +94,8 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil
if( maCharColor.isUsed() )
rPropMap[ PROP_CharColor ] <<= maCharColor.getColor( rFilter.getGraphicHelper() );
+ if( maGradientProps.maGradientStops.size() > 0 )
+ rPropMap[ PROP_CharColor ] <<= maGradientProps.maGradientStops.begin()->second.getColor( rFilter.getGraphicHelper() );
if( moLang.has() && !moLang.get().isEmpty() )
{
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index e166e6d..6887cda 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -132,6 +132,10 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl
case A_TOKEN( hlinkClick ): // CT_Hyperlink
case A_TOKEN( hlinkMouseOver ): // CT_Hyperlink
return new HyperLinkContext( *this, rAttribs, mrTextCharacterProperties.maHyperlinkPropertyMap );
+
+ case A_TOKEN( gradFill ):
+ return new GradientFillContext( *this, rAttribs, mrTextCharacterProperties.maGradientProps );
+
}
return this;
--
cgit v0.9.0.2-2-gbebe

View File

@ -1,134 +0,0 @@
From 894594c1ff0323f537270d1ca2dec33cdbb9b19c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Kukan?= <matus.kukan@collabora.com>
Date: Tue, 27 May 2014 10:39:45 +0200
Subject: [PATCH] Related bnc#822625: Cache minimum height for table cells.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change-Id: I35e295347a046376289f5d4fd5468860d0b8f0ae
(cherry picked from commit 5792e76cb5beb630c135f57b74f57d74dd2dc2b0)
Reviewed-on: https://gerrit.libreoffice.org/9519
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
---
svx/source/table/cell.cxx | 14 +++++++++-----
svx/source/table/cell.hxx | 1 +
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index d4f199b..7e04db7 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -358,6 +358,7 @@ Cell::Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) th
, mbMerged( sal_False )
, mnRowSpan( 1 )
, mnColSpan( 1 )
+, mnCachedMinHeight( -1 )
, mxTable( rTableObj.getTable() )
{
if( rTableObj.GetModel() )
@@ -524,6 +525,7 @@ void Cell::setMerged()
void Cell::notifyModified()
{
+ mnCachedMinHeight = -1;
if( mxTable.is() )
mxTable->setModified( sal_True );
}
@@ -680,8 +682,10 @@ sal_Int32 Cell::getMinimumHeight()
if( !mpProperties )
return 0;
+ if( mnCachedMinHeight != -1 )
+ return mnCachedMinHeight;
+
SdrTableObj& rTableObj = dynamic_cast< SdrTableObj& >( GetObject() );
- sal_Int32 nMinimumHeight = 0;
Rectangle aTextRect;
TakeTextAnchorRect( aTextRect );
@@ -692,7 +696,7 @@ sal_Int32 Cell::getMinimumHeight()
if(pEditOutliner)
{
pEditOutliner->SetMaxAutoPaperSize(aSize);
- nMinimumHeight = pEditOutliner->GetTextHeight()+1;
+ mnCachedMinHeight = pEditOutliner->GetTextHeight()+1;
}
else /*if ( hasText() )*/
{
@@ -705,12 +709,12 @@ sal_Int32 Cell::getMinimumHeight()
{
rOutliner.SetText(*GetOutlinerParaObject());
}
- nMinimumHeight=rOutliner.GetTextHeight()+1;
+ mnCachedMinHeight=rOutliner.GetTextHeight()+1;
rOutliner.Clear();
}
- nMinimumHeight += GetTextUpperDistance() + GetTextLowerDistance();
- return nMinimumHeight;
+ mnCachedMinHeight += GetTextUpperDistance() + GetTextLowerDistance();
+ return mnCachedMinHeight;
}
// -----------------------------------------------------------------------------
diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx
index 1b26b1c..ba2c6f6 100644
--- a/svx/source/table/cell.hxx
+++ b/svx/source/table/cell.hxx
@@ -222,6 +222,7 @@ private:
::sal_Bool mbMerged;
::sal_Int32 mnRowSpan;
::sal_Int32 mnColSpan;
+ ::sal_Int32 mnCachedMinHeight;
Rectangle maCellRect;
--
1.8.4.5
From 20fc8dfadada521bed3cb9db672edcdf35db3c39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C3=BA=C5=A1=20Kukan?= <matus.kukan@collabora.com>
Date: Tue, 27 May 2014 16:37:30 +0200
Subject: [PATCH] Related bnc#822625: Cache FontEntry with the original
FontSelectPattern.
Otherwise we do not hit cache directly, only after expensive call to
ImplFindByFont.
(cherry picked from commits a6b00d16eb27a5e7e31c721671001a909ecef960
and 16a62079018aea0e72636bdb00576487b4e830b9)
Change-Id: If15b368feeba94c8fff8ee7cbe049fc4a2069768
---
vcl/source/gdi/outdev3.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 537f8aa..a36fc85 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -2214,6 +2214,7 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList,
ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList,
FontSelectPattern& aFontSelData, ImplDirectFontSubstitution* pDevSpecific )
{
+ FontSelectPattern aFontSelDataOrig(aFontSelData);
// check if a directly matching logical font instance is already cached,
// the most recently used font usually has a hit rate of >50%
ImplFontEntry *pEntry = NULL;
@@ -2300,8 +2301,9 @@ ImplFontEntry* ImplFontCache::GetFontEntry( ImplDevFontList* pFontList,
}
#endif
- // add the new entry to the cache
- maFontInstanceList[ aFontSelData ] = pEntry;
+ // Add the new entry to the cache with the original FontSelectPattern,
+ // so that we can find it next time as a direct cache hit.
+ maFontInstanceList[ aFontSelDataOrig ] = pEntry;
}
mpFirstEntry = pEntry;
--
1.8.4.5

View File

@ -1,71 +0,0 @@
From 71f2aff7a56cef4e133abad3c2e447c76c5ee1fe Mon Sep 17 00:00:00 2001
From: Luboš Luňák <l.lunak@collabora.com>
Date: Tue, 25 Mar 2014 11:20:16 +0000
Subject: prevent KDE/Qt from interfering with the session manager
I occassionally get lockups in IceProcessMessages() called from QtCore,
I'm actually not exactly sure why, as theoretically two connections
from one app shouldn't be a problem, but since LO does its own
session handling, there's no need to the KDE/Qt code to be involved,
so prevent it from connecting to the session manager altogether.
Change-Id: Iebe20d4cb5403e5fea8bd5d8c1f69b62d1c2907b
---
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 820d39a..e4900a7 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -166,8 +166,23 @@ void KDEXLib::Init()
KCmdLineArgs::init( m_nFakeCmdLineArgs, m_pAppCmdLineArgs, kAboutData );
+ // LO does its own session management, so prevent KDE/Qt from interfering
+ // (QApplication::disableSessionManagement(false) wouldn't quite do,
+ // since that still actually connects to the session manager, it just
+ // won't save the application data on session shutdown).
+ char* session_manager = NULL;
+ if( getenv( "SESSION_MANAGER" ) != NULL )
+ {
+ session_manager = strdup( getenv( "SESSION_MANAGER" ));
+ unsetenv( "SESSION_MANAGER" );
+ }
m_pApplication = new VCLKDEApplication();
- kapp->disableSessionManagement();
+ if( session_manager != NULL )
+ {
+ setenv( "SESSION_MANAGER", session_manager, 1 );
+ free( session_manager );
+ }
+
KApplication::setQuitOnLastWindowClosed(false);
#if KDE_HAVE_GLIB
diff --git a/vcl/unx/kde4/VCLKDEApplication.hxx b/vcl/unx/kde4/VCLKDEApplication.hxx
index 412ee34..4ce0b2c 100644
--- a/vcl/unx/kde4/VCLKDEApplication.hxx
+++ b/vcl/unx/kde4/VCLKDEApplication.hxx
@@ -21,22 +21,14 @@
#define Region QtXRegion
-#include <QSessionManager>
-
#include <kapplication.h>
#undef Region
-/* #i59042# override KApplications method for session management
- * since it will interfere badly with our own.
- */
class VCLKDEApplication : public KApplication
{
public:
VCLKDEApplication();
-
- virtual void commitData(QSessionManager&) {};
-
virtual bool x11EventFilter(XEvent* event);
};
--
cgit v0.9.0.2-2-gbebe

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d166ffa1f2cd336a2f668ea3a912aaf98873757c67e1bcde1ac6f57c6cc605a0
size 123378868

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:02bcc6d22b00a8d4cb594ea6f48c0267399f22cdef22f82584168b7a2ad50ace
size 151921492

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a372efb0f82eeed56b7232d15a2d80a522174c3127986f6210239bbbfc342a3d
size 1855080

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c9d9ee953c995a28c596e4ef2aa266274e7bb8e8e2c3c7e131cd4dedba66f0b8
size 1856076

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c457dbf874c6f59da002288e3831cdba162f18aebf36d26f2d19f468af2c32f7
size 127819696

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7ee83dc8e37e930d095dcf0be9b80b29728558b4e4bc5e933c14756242b3e512
size 126491916

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Mon Jun 16 10:39:01 UTC 2014 - tchvatal@suse.com
- Version bump to 4.3.0beta2:
* major version bump with fixes all around everywhere
- Added dependencies over glew and glm
- Removed patches that were upstreamed:
* set-language-in-impress.diff
* text-alignment-in-shape.diff
* kde4-4.2.3.3-timer-mutex.patch
* impress-table-performance.patch
* import-gradfill-for-text-colors.diff
* fix-text-rotation.diff
* fix-python-wizzards.patch
* docx-brightness-contrast-2.diff
* docx-brightness-contrast-1.diff
* doc-brightness-contrast.diff
* discard-more-header-footer-stuff.patch
* disable-firebird-unit-test.diff
* direct-format-numbering.patch
* WW8-import-fix-upper-margin-of-multi-page.patch
* VBA-macro-modification-warning.diff
* Use-varying-aElement-name.patch
* 0001-std-strlen-requires-cstring-include-to-build.patch
Temporary switches until upstream allows system version:
* --disable-gltf
* --disable-coinmp
-------------------------------------------------------------------
Thu Jun 5 14:07:31 UTC 2014 - tchvatal@suse.com

View File

@ -29,17 +29,19 @@
%define numbertext_version 0.9.5
# Urls
%define external_url http://dev-www.libreoffice.org/src/
%define tarball_url http://download.documentfoundation.org/libreoffice/src/4.2.4/
%define tarball_url http://download.documentfoundation.org/libreoffice/src/4.3.0/
# This is used due to the need for beta releases
%define realver 4.3.0.0.beta2-buildfix1
Name: libreoffice
Version: 4.2.4.2
Version: 4.3.0.0~beta2
Release: 0
Summary: A Free Office Suite (Framework)
License: Apache-2.0 and Artistic-1.0 and BSD-3-Clause and BSD-4-Clause and GPL-2.0+ and LPPL-1.3c and LGPL-2.1+ and LGPL-3.0 and MPL-1.1 and MIT and SUSE-Public-Domain and W3C
Group: Productivity/Office/Suite
Url: http://www.documentfoundation.org/
Source0: %{tarball_url}/libreoffice-%{version}.tar.xz
Source1: %{tarball_url}/libreoffice-help-%{version}.tar.xz
Source2: %{tarball_url}/libreoffice-translations-%{version}.tar.xz
Source0: %{tarball_url}/libreoffice-%{realver}.tar.xz
Source1: %{tarball_url}/libreoffice-help-%{realver}.tar.xz
Source2: %{tarball_url}/libreoffice-translations-%{realver}.tar.xz
# 256x256 desktop icons (bnc#722644)
Source20: libreoffice-desktop-icons-256x256.tar.bz2
# Prebuilt sofficerc for the noarch upstream branding package
@ -87,39 +89,6 @@ Patch12: mediawiki-no-broken-help.diff
Patch13: jvmfwk-disable-gcj.diff
# Fix running wizards in py2 as the utf is not there
Patch16: wizards-create-temlates-with-python-2.6.diff
# PATCH-FIX-UPSTREAM: fix kde hanging in 4.2.3.3
Patch18: kde4-4.2.3.3-timer-mutex.patch
# Fix build on openSUSE 12.3
Patch19: 0001-std-strlen-requires-cstring-include-to-build.patch
# disable Firebird unit test which fails on openSUSE 12.3 (it's an experimental feature anyway)
Patch20: disable-firebird-unit-test.diff
# bnc#863021 - LO-L3: Allow setting language for slide or presentation entirely
Patch21: set-language-in-impress.diff
# bnc#870228 - LO-L3: Text inside the circle is not centered
Patch22: text-alignment-in-shape.diff
# bnc#870234 - LO-L3: pptx file has text imported as black instead of white
Patch23: import-gradfill-for-text-colors.diff
# bnc#870240 - LO-L3: pptx import file has text rotated on slide
Patch24: fix-text-rotation.diff
# bnc#875712 - LO-L3: DOC import: picture brigtness/contrast not imported
Patch25: doc-brightness-contrast.diff
# bnc#875713 - LO-L3: DOCX import: picture brigtness/contrast not imported
Patch26: docx-brightness-contrast-1.diff
Patch27: docx-brightness-contrast-2.diff
# bnc#467278: Introduce a warning that changes to VBA macros cannot be saved.
Patch28: VBA-macro-modification-warning.diff
# CVE-2014-0247
Patch29: Use-varying-aElement-name.patch
# bnc#875718 - LO-L3: DOCX import: extra page numbers
Patch30: discard-more-header-footer-stuff.patch
# bnc#875717 - LO-L3: DOCX import: font size of numbering is bigger
Patch31: direct-format-numbering.patch
# bnc#863018 - LO-L3: Missing text in imported .doc file
Patch32: WW8-import-fix-upper-margin-of-multi-page.patch
# bnc#822625 - LO-L3: Table editing is a pain in Impress (performace issues)
Patch33: impress-table-performance.patch
# bnc#881294 - libreoffice python wizzards crash
Patch34: fix-python-wizzards.patch
# try to save space by using hardlinks
Patch990: install-with-hardlinks.diff
BuildRequires: ImageMagick
@ -146,6 +115,8 @@ BuildRequires: flac-devel
BuildRequires: flex
BuildRequires: flute
BuildRequires: gcc-c++
BuildRequires: glew-devel
BuildRequires: glm-devel
BuildRequires: glu-devel
BuildRequires: gnome-vfs2-devel
BuildRequires: gperf
@ -188,7 +159,7 @@ BuildRequires: libmwaw-devel
BuildRequires: libmysqlclient-devel
BuildRequires: libmysqlcppconn-devel >= 1.0.6
BuildRequires: libodfgen-devel
BuildRequires: liborcus-devel >= 0.5.0
BuildRequires: liborcus-devel >= 0.7.0
BuildRequires: libpoppler-devel
BuildRequires: libredland-devel
BuildRequires: librepository
@ -870,7 +841,7 @@ Provides additional %{langname} translations and resources for %{project}. \
%undefine langpack_lang
%prep
%setup -q -b1 -b2 -n libreoffice-%{version}
%setup -q -b1 -b2 -n libreoffice-%{realver}
%patch3 -p1
%patch5
%patch6 -p1
@ -880,23 +851,6 @@ Provides additional %{langname} translations and resources for %{project}. \
%patch12
%patch13 -p1
%patch16 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch990 -p1
# 256x256 icons
tar -xjf %{SOURCE20}
@ -994,7 +948,6 @@ export NOCONFIGURE=yes
--enable-python=system \
--enable-randr \
--enable-randr-link \
--without-afms \
--without-fonts \
--without-myspell-dicts \
--with-jdk-home=$JAVA_HOME \
@ -1027,7 +980,10 @@ export NOCONFIGURE=yes
%endif
--enable-neon \
--with-system-ucpp \
--disable-ccache
--disable-ccache \
--disable-gltf \
--disable-coinmp
# gltf and coinmp disabled until possible to use external pkgs
# hack to correctly bootstrap python stuff with system python, (deb#501028, i#90701)
sed -i -e "s|@INSTALLDIR@|%{_libdir}/%{name}|" pyuno/source/module/uno.py scripting/source/pyprov/officehelper.py

View File

@ -1,245 +0,0 @@
From d5aedeef765d60c7420ada7eba8405cfe448c6a8 Mon Sep 17 00:00:00 2001
From: Muthu Subramanian <sumuthu@collabora.com>
Date: Wed, 23 Apr 2014 18:33:22 +0530
Subject: [PATCH] fdo#64047: n#863021: Add set-all language menu.
Problems:
* Doesn't reset the spell error markers
* Modifies only at object level
* Currently has only setting for 'all text'
* Maybe provide a current slide only option?
Change-Id: I4695423fed3ed9422185b23803eedd12ef434bea
(cherry picked from commit 0833f4046a1afa77aeed97a131c5325c44be1bb3)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
---
sd/sdi/_docsh.sdi | 15 ++--
sd/source/ui/docshell/docshel3.cxx | 114 +++++++++++++++++++++++++++++++
sd/source/ui/docshell/docshell.cxx | 6 ++
sd/uiconfig/sdraw/menubar/menubar.xml | 2 +
sd/uiconfig/simpress/menubar/menubar.xml | 2 +
5 files changed, 134 insertions(+), 5 deletions(-)
diff --git a/sd/sdi/_docsh.sdi b/sd/sdi/_docsh.sdi
index 075b60a..b087723 100644
--- a/sd/sdi/_docsh.sdi
+++ b/sd/sdi/_docsh.sdi
@@ -32,11 +32,16 @@ interface DrawDocument
ExecMethod = Execute ;
StateMethod = GetState ;
]
- SID_CHINESE_CONVERSION // ole : ?, status : ?
- [
- ExecMethod = Execute ;
- StateMethod = GetState ;
- ]
+ SID_CHINESE_CONVERSION // ole : ?, status : ?
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_LANGUAGE_STATUS
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
// ?
FID_SEARCH_NOW // ole : ?, status : ?
[
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index d22f50a..cd45b39 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "Window.hxx"
#include "DrawDocShell.hxx"
#include "app.hrc"
@@ -28,11 +29,18 @@
#include <svx/svxerr.hxx>
#include <svx/dialmgr.hxx>
#include <svl/srchitem.hxx>
+#include <svl/languageoptions.hxx>
+#include <svtools/langtab.hxx>
#include <svx/srchdlg.hxx>
#include <sfx2/request.hxx>
+#include <sfx2/sfxdlg.hxx>
+#include <vcl/abstdlg.hxx>
+#include <vcl/window.hxx>
#include <svl/style.hxx>
#include <svx/drawitem.hxx>
#include <editeng/unolingu.hxx>
+#include <editeng/langitem.hxx>
+#include <editeng/eeitem.hxx>
#include <com/sun/star/i18n/TextConversionOption.hpp>
#include "strings.hrc"
@@ -55,6 +63,68 @@ using namespace ::com::sun::star::uno;
namespace sd {
+static void lcl_setLanguageForObj( SdrObject *pObj, LanguageType nLang, bool bLanguageNone = false )
+{
+ const sal_uInt16 aLangWhichId_EE[3] =
+ {
+ EE_CHAR_LANGUAGE,
+ EE_CHAR_LANGUAGE_CJK,
+ EE_CHAR_LANGUAGE_CTL
+ };
+
+ if( bLanguageNone )
+ nLang = LANGUAGE_NONE;
+
+ if( nLang != LANGUAGE_DONTKNOW )
+ {
+ if( nLang == LANGUAGE_NONE )
+ {
+ for(sal_Int32 n = 0; n < 3; n++ )
+ pObj->SetMergedItem( SvxLanguageItem( nLang, aLangWhichId_EE[n] ) );
+ }
+ else
+ {
+ sal_uInt16 nLangWhichId = 0;
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
+ switch (nScriptType)
+ {
+ case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE; break;
+ case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break;
+ case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break;
+ default:
+ OSL_FAIL("unexpected case" );
+ return;
+ }
+ pObj->SetMergedItem( SvxLanguageItem( nLang, nLangWhichId ) );
+ }
+ }
+ else // Reset to default
+ {
+ for( sal_Int32 n = 0; n < 3; n++ )
+ pObj->ClearMergedItem( aLangWhichId_EE[n] );
+ }
+}
+
+
+static void lcl_setLanguage( const SdDrawDocument *pDoc, const OUString &rLanguage, bool bLanguageNone = false )
+{
+ LanguageType nLang = SvtLanguageTable().GetType( rLanguage );
+
+ // Do it for SdDrawDocument->SetLanguage as well?
+
+ sal_uInt16 nPageCount = pDoc->GetPageCount(); // Pick All Pages
+ for( sal_uInt16 nPage = 0; nPage < nPageCount; nPage++ )
+ {
+ const SdrPage *pPage = pDoc->GetPage( nPage );
+ sal_uIntPtr nObjCount = pPage->GetObjCount();
+ for( sal_uInt16 nObj = 0; nObj < nObjCount; nObj++ )
+ {
+ SdrObject *pObj = pPage->GetObj( nObj );
+ lcl_setLanguageForObj( pObj, nLang, bLanguageNone );
+ }
+ }
+}
+
/**
* Handles SFX-Requests
*/
@@ -201,6 +271,50 @@ void DrawDocShell::Execute( SfxRequest& rReq )
}
}
break;
+ case SID_LANGUAGE_STATUS:
+ {
+ OUString aNewLangTxt;
+ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, SID_LANGUAGE_STATUS , false );
+ if (pItem)
+ aNewLangTxt = pItem->GetValue();
+ if (aNewLangTxt == "*" )
+ {
+ // open the dialog "Tools/Options/Language Settings - Language"
+ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
+ if (pFact && mpViewShell)
+ {
+ VclAbstractDialog* pDlg = pFact->CreateVclDialog( mpViewShell->GetActiveWindow(), SID_LANGUAGE_OPTIONS );
+ pDlg->Execute();
+ delete pDlg;
+ }
+ }
+ else
+ {
+ // setting the new language...
+ if (!aNewLangTxt.isEmpty())
+ {
+ const OUString aDocumentLangPrefix("Default_");
+ const OUString aStrNone("LANGUAGE_NONE");
+ const OUString aStrResetLangs("RESET_LANGUAGES");
+ sal_Int32 nPos = -1;
+ if (-1 != (nPos = aNewLangTxt.indexOf( aDocumentLangPrefix , 0 )))
+ {
+ aNewLangTxt = aNewLangTxt.replaceAt( nPos, aDocumentLangPrefix.getLength(), "" );
+ }
+ else
+ {
+ break;
+ }
+ if (aNewLangTxt == aStrNone)
+ lcl_setLanguage( mpViewShell->GetDoc(), OUString() );
+ else if (aNewLangTxt == aStrResetLangs)
+ lcl_setLanguage( mpViewShell->GetDoc(), OUString(), true );
+ else
+ lcl_setLanguage( mpViewShell->GetDoc(), aNewLangTxt );
+ }
+ }
+ }
+ break;
default:
break;
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 1553954..ee0fad0 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -270,6 +270,12 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
rSet.Put(SfxVisibilityItem(nWhich, SvtCJKOptions().IsAnyEnabled()));
}
break;
+ case SID_LANGUAGE_STATUS:
+ {
+ // Keeping this enabled for the time being
+ rSet.Put(SfxVisibilityItem(nWhich, true));
+ }
+ break;
default:
break;
diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml
index 6e8f9e4..289acf9 100644
--- a/sd/uiconfig/sdraw/menubar/menubar.xml
+++ b/sd/uiconfig/sdraw/menubar/menubar.xml
@@ -245,6 +245,8 @@
<menu:menuitem menu:id=".uno:SpellDialog"/>
<menu:menu menu:id=".uno:LanguageMenu">
<menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetLanguageAllTextMenu"/>
+ <menu:menuseparator/>
<menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
<menu:menuitem menu:id=".uno:ChineseConversion"/>
<menu:menuitem menu:id=".uno:ThesaurusDialog"/>
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml
index b2d5ae6..e8b1a6d 100644
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -273,6 +273,8 @@
<menu:menuitem menu:id=".uno:SpellDialog"/>
<menu:menu menu:id=".uno:LanguageMenu">
<menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetLanguageAllTextMenu"/>
+ <menu:menuseparator/>
<menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
<menu:menuitem menu:id=".uno:ChineseConversion"/>
<menu:menuitem menu:id=".uno:ThesaurusDialog"/>
--
1.8.4.5

View File

@ -1,58 +0,0 @@
From 709f06eb261b3225cd4b56a7efb8e2d591909960 Mon Sep 17 00:00:00 2001
From: Muthu Subramanian <sumuthu@collabora.com>
Date: Wed, 26 Mar 2014 10:43:08 +0000
Subject: n#862510: anchorCtr controls the anchoring as well.
(cherry picked from commit c17eb67460293fbe72ffa8e80cd10743df493afa)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Conflicts:
oox/source/drawingml/textbodypropertiescontext.cxx
Change-Id: Ib244d89a9f7d400b3891d477314cd5f0193552e0
---
diff --git a/include/oox/drawingml/textbodyproperties.hxx b/include/oox/drawingml/textbodyproperties.hxx
index 3fb0684..af68f20 100644
--- a/include/oox/drawingml/textbodyproperties.hxx
+++ b/include/oox/drawingml/textbodyproperties.hxx
@@ -34,6 +34,7 @@ struct TextBodyProperties
{
PropertyMap maPropertyMap;
OptValue< sal_Int32 > moRotation;
+ bool mbAnchorCtr;
OptValue< sal_Int32 > moVert;
boost::optional< sal_Int32 > moInsets[4];
boost::optional< sal_Int32 > moTextOffX;
diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx
index 36f39d9..9e53897 100644
--- a/oox/source/drawingml/textbodyproperties.cxx
+++ b/oox/source/drawingml/textbodyproperties.cxx
@@ -80,8 +80,8 @@ void TextBodyProperties::pushRotationAdjustments( sal_Int32 nRotation )
// Hack for n#760986
// TODO: Preferred method would be to have a textbox on top
// of the shape and the place it according to the (off,ext)
- if( nOff == 0 && moTextOffX ) nVal = *moTextOffX;
- if( nOff == 1 && moTextOffY ) nVal = *moTextOffY;
+ if( nOff == 0 && moTextOffX && mbAnchorCtr ) nVal = *moTextOffX;
+ if( nOff == 1 && moTextOffY && mbAnchorCtr ) nVal = *moTextOffY;
if( nVal < 0 ) nVal = 0;
if( moInsets[i] )
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx
index 358db9f..b580be3 100644
--- a/oox/source/drawingml/textbodypropertiescontext.cxx
+++ b/oox/source/drawingml/textbodypropertiescontext.cxx
@@ -56,9 +56,9 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper& rPa
mrTextBodyProp.moInsets[i] = GetCoordinate( sValue );
}
- bool bAnchorCenter = rAttribs.getBool( XML_anchorCtr, false );
+ mrTextBodyProp.mbAnchorCtr = rAttribs.getBool( XML_anchorCtr, false );
if( rAttribs.hasAttribute( XML_anchorCtr ) ) {
- if( bAnchorCenter )
+ if( mrTextBodyProp.mbAnchorCtr )
mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<=
TextHorizontalAdjust_CENTER;
}
--
cgit v0.9.0.2-2-gbebe