[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - 18 commits - connectivity/source desktop/source embedserv/source filter/source fpicker/source framework/source i18npool/source sc/source sd/source solenv/bin svx/source sw/inc sw/source vcl/source wizards/com wizards/source
Andras Timar
andras.timar at collabora.com
Thu Nov 21 02:55:18 PST 2013
connectivity/source/commontools/FValue.cxx | 8
desktop/source/app/cmdlineargs.cxx | 2
embedserv/source/embed/docholder.cxx | 2
filter/source/msfilter/msdffimp.cxx | 5
fpicker/source/win32/filepicker/asyncrequests.cxx | 45 +---
fpicker/source/win32/filepicker/asyncrequests.hxx | 4
framework/source/uiconfiguration/uiconfigurationmanager.cxx | 4
i18npool/source/localedata/data/en_CA.xml | 3
i18npool/source/localedata/data/fr_CA.xml | 3
i18npool/source/localedata/data/shs_CA.xml | 3
sc/source/ui/view/formatsh.cxx | 59 ------
sd/source/filter/eppt/epptbase.hxx | 3
sd/source/filter/eppt/pptx-stylesheet.cxx | 4
sd/source/filter/eppt/pptx-text.cxx | 41 +++-
sd/source/filter/eppt/text.hxx | 28 +--
solenv/bin/modules/installer/download.pm | 6
svx/source/unodraw/UnoGraphicExporter.cxx | 91 +++++++---
sw/inc/anchoredobject.hxx | 7
sw/source/core/inc/layfrm.hxx | 14 +
sw/source/core/layout/anchoredobject.cxx | 13 +
sw/source/core/layout/ssfrm.cxx | 8
vcl/source/filter/wmf/emfwr.cxx | 19 --
wizards/com/sun/star/wizards/agenda/AgendaDocument.py | 33 ---
wizards/com/sun/star/wizards/document/OfficeDocument.py | 2
wizards/com/sun/star/wizards/letter/LetterWizardDialog.py | 32 +--
wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py | 3
wizards/com/sun/star/wizards/ui/event/DataAware.py | 16 +
wizards/com/sun/star/wizards/ui/event/UnoDataAware.py | 21 +-
wizards/source/formwizard/dbwizres.src | 5
29 files changed, 265 insertions(+), 219 deletions(-)
New commits:
commit 8ed8d251893f2d74416b7cf102ec9d51cad58a58
Author: Andras Timar <andras.timar at collabora.com>
Date: Mon Nov 18 12:12:49 2013 +0100
fdo#69500: Revert "fix bug #60700 - de-crutify ODF files"
This reverts commit da06166015689eca260c702602bef4cea58afbd3.
Change-Id: I8f88b68a9ab7bd8c95aad90984ddca20e3ca9d13
Reviewed-on: https://gerrit.libreoffice.org/6709
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index c32e2d9..a2469e0 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -540,6 +540,8 @@ void UIConfigurationManager::impl_Initialize()
// Initialize the top-level structures with the storage data
if ( m_xDocConfigStorage.is() )
{
+ long nModes = m_bReadOnly ? ElementModes::READ : ElementModes::READWRITE;
+
// Try to access our module sub folder
for ( sal_Int16 i = 1; i < ::com::sun::star::ui::UIElementType::COUNT;
i++ )
@@ -547,7 +549,7 @@ void UIConfigurationManager::impl_Initialize()
Reference< XStorage > xElementTypeStorage;
try
{
- xElementTypeStorage = m_xDocConfigStorage->openStorageElement( OUString::createFromAscii( UIELEMENTTYPENAMES[i] ), ElementModes::READ );
+ xElementTypeStorage = m_xDocConfigStorage->openStorageElement( OUString::createFromAscii( UIELEMENTTYPENAMES[i] ), nModes );
}
catch ( const com::sun::star::container::NoSuchElementException& )
{
commit 94b4f03739636c4036c260b9b635169fdea1d4a3
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed Nov 20 20:05:56 2013 +0000
fpicker: cleanup async requests, dung out comments.
Change-Id: I016145d315ae1c4b5376e43583e2546a2b7f7b07
(cherry picked from commit acc0fcd96c940e42da27bb58ba1c89ae5de5a5b8)
Reviewed-on: https://gerrit.libreoffice.org/6736
Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
Tested-by: Kohei Yoshida <libreoffice at kohei.us>
diff --git a/fpicker/source/win32/filepicker/asyncrequests.cxx b/fpicker/source/win32/filepicker/asyncrequests.cxx
index 8ceea51..e3b43cb 100644
--- a/fpicker/source/win32/filepicker/asyncrequests.cxx
+++ b/fpicker/source/win32/filepicker/asyncrequests.cxx
@@ -25,9 +25,8 @@ namespace fpicker{
namespace win32{
namespace vista{
-//-----------------------------------------------------------------------------
-void lcl_sleep(::osl::Condition& aCondition ,
- ::sal_Int32 nMilliSeconds)
+static void lcl_sleep( ::osl::Condition& aCondition,
+ ::sal_Int32 nMilliSeconds )
{
sal_uLong nAcquireCount = Application::ReleaseSolarMutex();
@@ -44,26 +43,23 @@ void lcl_sleep(::osl::Condition& aCondition ,
Application::AcquireSolarMutex( nAcquireCount );
}
-//-----------------------------------------------------------------------------
-void Request::wait(::sal_Int32 nMilliSeconds)
+void Request::wait( ::sal_Int32 nMilliSeconds )
{
- lcl_sleep(m_aJoiner, nMilliSeconds);
+ lcl_sleep( m_aJoiner, nMilliSeconds );
}
void Request::waitProcessMessages()
{
SolarMutexGuard aGuard;
- while (!m_aJoiner.check())
+ while ( !m_aJoiner.check() )
Application::Yield();
}
-//-----------------------------------------------------------------------------
void Request::notify()
{
m_aJoiner.set();
}
-//-----------------------------------------------------------------------------
AsyncRequests::AsyncRequests(const RequestHandlerRef& rHandler)
: ::cppu::BaseMutex( )
, ::osl::Thread ( )
@@ -73,7 +69,6 @@ AsyncRequests::AsyncRequests(const RequestHandlerRef& rHandler)
{
}
-//-----------------------------------------------------------------------------
AsyncRequests::~AsyncRequests()
{
// SYNCHRONIZED ->
@@ -85,6 +80,14 @@ AsyncRequests::~AsyncRequests()
join();
}
+void AsyncRequests::triggerJobExecution()
+{
+ if ( ! isRunning())
+ create();
+ else
+ maWait.set();
+}
+
void AsyncRequests::triggerRequestProcessMessages (const RequestRef& rRequest)
{
// SYNCHRONIZED ->
@@ -93,13 +96,9 @@ void AsyncRequests::triggerRequestProcessMessages (const RequestRef& rRequest)
aLock.clear();
// <- SYNCHRONIZED
- if ( ! isRunning())
- create();
-
rRequest->waitProcessMessages();
}
-//-----------------------------------------------------------------------------
void AsyncRequests::triggerRequestBlocked(const RequestRef& rRequest)
{
// SYNCHRONIZED ->
@@ -108,13 +107,11 @@ void AsyncRequests::triggerRequestBlocked(const RequestRef& rRequest)
aLock.clear();
// <- SYNCHRONIZED
- if ( ! isRunning())
- create();
+ triggerJobExecution();
rRequest->wait(Request::WAIT_INFINITE);
}
-//-----------------------------------------------------------------------------
void AsyncRequests::triggerRequestNonBlocked(const RequestRef& rRequest)
{
// SYNCHRONIZED ->
@@ -123,11 +120,9 @@ void AsyncRequests::triggerRequestNonBlocked(const RequestRef& rRequest)
aLock.clear();
// <- SYNCHRONIZED
- if ( ! isRunning())
- create();
+ triggerJobExecution();
}
-//-----------------------------------------------------------------------------
void AsyncRequests::triggerRequestDirectly(const RequestRef& rRequest)
{
// SYNCHRONIZED ->
@@ -140,7 +135,6 @@ void AsyncRequests::triggerRequestDirectly(const RequestRef& rRequest)
rHandler->doRequest(rRequest);
}
-//-----------------------------------------------------------------------------
void AsyncRequests::triggerRequestThreadAware(const RequestRef& rRequest,
::sal_Int16 nWait )
{
@@ -156,10 +150,6 @@ void AsyncRequests::triggerRequestThreadAware(const RequestRef& rRequest,
triggerRequestNonBlocked(rRequest);
}
-//-----------------------------------------------------------------------------
-
-
-//-----------------------------------------------------------------------------
void SAL_CALL AsyncRequests::run()
{
static const ::sal_Int32 TIME_TO_WAIT_FOR_NEW_REQUESTS = 250;
@@ -174,8 +164,6 @@ void SAL_CALL AsyncRequests::run()
if (rHandler != NULL)
rHandler->before();
- ::osl::Condition aWait;
-
while ( ! bFinished)
{
// SYNCHRONIZED ->
@@ -194,7 +182,8 @@ void SAL_CALL AsyncRequests::run()
if (rRequest == NULL)
{
- lcl_sleep(aWait, TIME_TO_WAIT_FOR_NEW_REQUESTS);
+ lcl_sleep(maWait, TIME_TO_WAIT_FOR_NEW_REQUESTS);
+ maWait.reset();
continue;
}
diff --git a/fpicker/source/win32/filepicker/asyncrequests.hxx b/fpicker/source/win32/filepicker/asyncrequests.hxx
index 5ed844e..6653a6c 100644
--- a/fpicker/source/win32/filepicker/asyncrequests.hxx
+++ b/fpicker/source/win32/filepicker/asyncrequests.hxx
@@ -148,6 +148,9 @@ class AsyncRequests : private ::cppu::BaseMutex
m_rHandler = rHandler;
}
+ /// ensure the execution thread gets going.
+ void triggerJobExecution();
+
//---------------------------------------------------------------------
/** does nothing special / excepting to make sure our class wont be inline .-)
*/
@@ -194,6 +197,7 @@ class AsyncRequests : private ::cppu::BaseMutex
::sal_Bool m_bFinish;
RequestHandlerRef m_rHandler;
RequestQueue m_lRequests;
+ osl::Condition maWait;
};
} // namespace vista
commit 2fe5bfc0b3f3fd6b2efb78e944d6b885b2d495bb
Author: Arnaud Versini <arnaud.versini at libreoffice.org>
Date: Tue Nov 19 12:36:33 2013 +0100
Writer : Fix fdo#71694 by clearing old anchor frame before setting new
Needed as otherwise AnchoredObjects can be in more than one SwLayoutFrm.
See also 7eae50f9ff5877ef880be9a85d3f7e52b1fec49f ( Access by AnchoredObject of a deleted SwLayoutFrm ).
Change-Id: I54582d6f9fb8b6f853352af27706faabe610874b
Reviewed-on: https://gerrit.libreoffice.org/6720
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 7726339a648ac94bb7c365950f23dabec5aa52e7)
Reviewed-on: https://gerrit.libreoffice.org/6732
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index 77cf548..9e6dc5e 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -246,8 +246,9 @@ void SwAnchoredObject::ResetLastCharRectHeight()
// =============================================================================
void SwAnchoredObject::SetVertPosOrientFrm( const SwLayoutFrm& _rVertPosOrientFrm )
{
- mpVertPosOrientFrm = &_rVertPosOrientFrm;
+ ClearVertPosOrientFrm();
+ mpVertPosOrientFrm = &_rVertPosOrientFrm;
const_cast<SwLayoutFrm*>(mpVertPosOrientFrm)->SetVertPosOrientFrmFor(this);
// #i28701# - take over functionality of deleted method
commit f38f59ea3aee39dd7fc905dfdfab0e5933c357d9
Author: Andras Timar <andras.timar at collabora.com>
Date: Wed Nov 20 14:54:38 2013 +0100
fdo#67060 do not package RPM-only install script to DEB packs
Change-Id: I90c74f0d00804b80daeca2c69d1f12e094243a81
Reviewed-on: https://gerrit.libreoffice.org/6734
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/solenv/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm
index ec54049..699e399 100644
--- a/solenv/bin/modules/installer/download.pm
+++ b/solenv/bin/modules/installer/download.pm
@@ -535,6 +535,12 @@ sub create_tar_gz_file_from_directory
$installer::globals::downloadfilename = $downloadfilename . $installer::globals::downloadfileextension;
my $targzname = $downloaddir . $installer::globals::separator . $installer::globals::downloadfilename;
+ # fdo#67060 - install script is for RPM only
+ if ( -e "$installdir/install" && !$installer::globals::isrpmbuild )
+ {
+ unlink("$installdir/install");
+ }
+
my $systemcall = "cd $changedir; $ldpreloadstring tar -cf - $packdir | gzip > $targzname";
my $returnvalue = system($systemcall);
commit 797d1f2aca0e1474da3985458ba1b9864616f298
Author: Andras Timar <andras.timar at collabora.com>
Date: Tue Nov 19 11:08:09 2013 +0100
fdo#66854 keep shadow distance of non-supported MSO shadow type
this is a slight improvement of d7367b709dc4e97714fb2084b872a96389e768fb
the rendering of star from #i119634# bugdoc was kept
the rendering of the yellow circle shadows from fdo#66854 bugdoc
was improved
Change-Id: Ife53328ef665131fb954eb33c2e8269ad10da0fe
Reviewed-on: https://gerrit.libreoffice.org/6719
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index b02d599..dfbcab1 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -2521,6 +2521,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const
void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObjData& rObjData ) const
{
sal_Bool bHasShadow = sal_False;
+ bool bNonZeroShadowOffset = false;
if ( IsProperty( DFF_Prop_gtextSize ) )
rSet.Put( SvxFontHeightItem( rManager.ScalePt( GetPropertyValue( DFF_Prop_gtextSize ) ), 100, EE_CHAR_FONTHEIGHT ) );
@@ -2553,12 +2554,14 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj
sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetX ) );
rManager.ScaleEmu( nVal );
rSet.Put( SdrShadowXDistItem( nVal ) );
+ bNonZeroShadowOffset = ( nVal > 0 );
}
if ( IsProperty( DFF_Prop_shadowOffsetY ) )
{
sal_Int32 nVal = static_cast< sal_Int32 >( GetPropertyValue( DFF_Prop_shadowOffsetY ) );
rManager.ScaleEmu( nVal );
rSet.Put( SdrShadowYDistItem( nVal ) );
+ bNonZeroShadowOffset = ( nVal > 0 );
}
if ( IsProperty( DFF_Prop_fshadowObscured ) )
{
@@ -2574,7 +2577,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj
if ( IsProperty( DFF_Prop_shadowType ) )
{
MSO_ShadowType eShadowType = static_cast< MSO_ShadowType >( GetPropertyValue( DFF_Prop_shadowType ) );
- if( eShadowType != mso_shadowOffset )
+ if( eShadowType != mso_shadowOffset && !bNonZeroShadowOffset )
{
//0.12" == 173 twip == 302 100mm
sal_uInt32 nDist = rManager.pSdrModel->GetScaleUnit() == MAP_TWIP ? 173: 302;
commit 62c5e71292d8c9589cd99e1060238a3a5bb25a66
Author: Eike Rathke <erack at redhat.com>
Date: Tue Nov 19 17:35:00 2013 +0100
added date acceptance patterns to Canadian locales, fdo#71664
Complete set is now Y-M-D;M-D;M/D/Y;M/D
Change-Id: I42ed59fb325b391943608a10ded7ce74c80656e1
(cherry picked from commit 2d8cac51c6d5205a27d90bd9237c8ed1e4b8deea)
Reviewed-on: https://gerrit.libreoffice.org/6726
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/i18npool/source/localedata/data/en_CA.xml b/i18npool/source/localedata/data/en_CA.xml
index ebb3064..5321210 100644
--- a/i18npool/source/localedata/data/en_CA.xml
+++ b/i18npool/source/localedata/data/en_CA.xml
@@ -52,6 +52,9 @@
<MeasurementSystem>metric</MeasurementSystem>
</LC_CTYPE>
<LC_FORMAT>
+ <DateAcceptancePattern>M-D</DateAcceptancePattern>
+ <DateAcceptancePattern>M/D/Y</DateAcceptancePattern>
+ <DateAcceptancePattern>M/D</DateAcceptancePattern>
<FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
<FormatCode>General</FormatCode>
</FormatElement>
diff --git a/i18npool/source/localedata/data/fr_CA.xml b/i18npool/source/localedata/data/fr_CA.xml
index b76c6e9..c98ec23 100644
--- a/i18npool/source/localedata/data/fr_CA.xml
+++ b/i18npool/source/localedata/data/fr_CA.xml
@@ -55,6 +55,9 @@
<MeasurementSystem>metric</MeasurementSystem>
</LC_CTYPE>
<LC_FORMAT>
+ <DateAcceptancePattern>M-D</DateAcceptancePattern>
+ <DateAcceptancePattern>M/D/Y</DateAcceptancePattern>
+ <DateAcceptancePattern>M/D</DateAcceptancePattern>
<FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
<FormatCode>Standard</FormatCode>
</FormatElement>
diff --git a/i18npool/source/localedata/data/shs_CA.xml b/i18npool/source/localedata/data/shs_CA.xml
index baece18..dac14e7 100644
--- a/i18npool/source/localedata/data/shs_CA.xml
+++ b/i18npool/source/localedata/data/shs_CA.xml
@@ -52,6 +52,9 @@
<MeasurementSystem>metric</MeasurementSystem>
</LC_CTYPE>
<LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$$-648]">
+ <DateAcceptancePattern>M-D</DateAcceptancePattern>
+ <DateAcceptancePattern>M/D/Y</DateAcceptancePattern>
+ <DateAcceptancePattern>M/D</DateAcceptancePattern>
<FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
<FormatCode>General</FormatCode>
</FormatElement>
commit d2b8d21867aee8795afdca3ed4a32d8888428d10
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Nov 19 14:03:54 2013 +0100
rhbz#1031989 Accept --pt in addition to deprecated -pt
Change-Id: I3593b3fc7e0ad405612216fb07e8632050b75cee
(cherry picked from commit 5cb10c4c99e46c97984e4e1c1bca5915f83f0a1d)
Reviewed-on: https://gerrit.libreoffice.org/6723
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index ca92a8d..f9baa07 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -186,7 +186,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bStartEvent = false;
bDisplaySpec = false;
}
- else if ( aArg.equalsIgnoreAsciiCase("-pt"))
+ else if ( oArg.equalsIgnoreAsciiCase("pt"))
{
// Print to special printer
bPrintToEvent = true;
commit 4f94a07038e8734116d560f2e110c346c5ecf2df
Author: Eike Rathke <erack at redhat.com>
Date: Tue Oct 29 18:17:18 2013 +0100
resolved fdo#70750 reverted inappropriate implementation of fdo#63546
This is a combination of 2 commits.
Revert "fdo#63546: set appropriate alignment when wrt direction of cells is changed."
This reverts commit 706e3b8e43df94310b2fe8458da67875073a046c.
Related previous commits that commit depends on will also be reverted.
Triggered by fdo#70750 inspecting the code it turned out that the
changes for fdo#63546 did several things wrong:
* looping over individual cells of a large selected range results in
slicing and merging ScAttrArray for each row in each column which is
utterly slow (the reason for fdo#70750)
* instead of executing the changes in ScFormatShell calls should had
been forwarded through ScTabViewShell to be passed down to ScViewFunc,
ScDocFunc, ScDocument, ...
* setting hard attributes on all cells (except if already centered or
block justified) is not wanted
* value cells for example should stay automatically right justified if
no justification is given yet
* overwriting already existing left or right justification may not be
what the user expects
* applied styles' justification is overridden this way
(cherry picked from commit 2f29e544932633a01162ecb80e50872eabdd2bc1)
Revert "fix fdo#63546 : set appropriate alignment when writing direction is changed."
This reverts commit 16f508686c29bfa244ca6f81b5ab3bbaf5fef2a7.
(cherry picked from commit 955281e50e2728932edc3b688ce3cf235bdfd0c9)
Conflicts:
sc/source/ui/view/formatsh.cxx
Change-Id: I53fc56a09f2b396577fff3ec679b39837fc2f649
Reviewed-on: https://gerrit.libreoffice.org/6691
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 4749116..526d717 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2540,66 +2540,7 @@ void ScFormatShell::ExecuteTextDirection( SfxRequest& rReq )
{
SvxFrameDirection eDirection = ( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT ) ?
FRMDIR_HORI_LEFT_TOP : FRMDIR_HORI_RIGHT_TOP;
-
- String aUndo = ScGlobal::GetRscString( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT ?
- STR_UNDO_L2R : STR_UNDO_R2L );
- ScDocShell* pDocSh = GetViewData()->GetDocShell();
- pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo );
-
pTabViewShell->ApplyAttr( SvxFrameDirectionItem( eDirection, ATTR_WRITINGDIR ) );
-
- const SfxPoolItem* pItem = NULL;
- const SvxHorJustifyItem* pHorJustify = NULL;
- SvxCellHorJustify eHorJustify = SVX_HOR_JUSTIFY_STANDARD;
- ScRange aRange;
- GetViewData()->GetMarkData().GetMarkArea(aRange);
- ScMarkData aMark = GetViewData()->GetMarkData();
- ScDocument * pDoc = GetViewData()->GetDocument();
- if (aMark.IsMultiMarked())
- {
- SCCOL nCol = aRange.aStart.Col();
- SCROW nRow = aRange.aStart.Row();
- for ( ; nCol <= aRange.aEnd.Col(); nCol++ )
- {
- for ( ; nRow <= aRange.aEnd.Row(); nRow++ )
- {
- pItem = pDoc->GetAttr( nCol, nRow, aMark.GetFirstSelected(), ATTR_HOR_JUSTIFY );
- pHorJustify = (const SvxHorJustifyItem*)pItem;
- eHorJustify = SvxCellHorJustify( pHorJustify->GetValue() );
-
- if( eHorJustify != SVX_HOR_JUSTIFY_CENTER && eHorJustify != SVX_HOR_JUSTIFY_BLOCK )
- {
- if( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT )
- pDoc->ApplyAttr( nCol, nRow, aMark.GetFirstSelected(), SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY ) );
- else
- pDoc->ApplyAttr( nCol, nRow, aMark.GetFirstSelected(), SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY ) );
- }
- }
- nRow = 0;
- }
- }
- else
- {
- const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
- if( rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, sal_True, &pItem) == SFX_ITEM_SET )
- {
- pHorJustify = (const SvxHorJustifyItem*)pItem;
- eHorJustify = SvxCellHorJustify( pHorJustify->GetValue() );
- }
-
- if( eHorJustify != SVX_HOR_JUSTIFY_CENTER && eHorJustify != SVX_HOR_JUSTIFY_BLOCK )
- {
- if( nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT )
- rReq.AppendItem( SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, SID_H_ALIGNCELL ) );
- else
- rReq.AppendItem( SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, SID_H_ALIGNCELL ) );
-
- rReq.SetSlot( SID_H_ALIGNCELL );
- ExecuteSlot( rReq, GetInterface() );
- }
- }
-
- pDocSh->GetUndoManager()->LeaveListAction();
}
break;
}
commit 4e0f5f93e5455820cecc659cc85ccaa6b7b534d2
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Mon Nov 18 22:15:29 2013 +0100
Fix some wrong copy paste
Change-Id: I3ad6f62393cb22b350d6b50086963ebc7d2a8f5e
Reviewed-on: https://gerrit.libreoffice.org/6715
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
Tested-by: Lionel Elie Mamane <lionel at mamane.lu>
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 57d4623..b9099c6 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -1551,9 +1551,9 @@ sal_uInt32 ORowSetValue::getUInt32() const
break;
case DataType::BIGINT:
if ( m_bSigned )
- nRet = static_cast<sal_Int32>(m_aValue.m_nInt64);
+ nRet = static_cast<sal_uInt32>(m_aValue.m_nInt64);
else
- nRet = static_cast<sal_Int32>(m_aValue.m_uInt64);
+ nRet = static_cast<sal_uInt32>(m_aValue.m_uInt64);
break;
default:
{
@@ -1682,7 +1682,7 @@ sal_uInt64 ORowSetValue::getULong() const
if ( m_bSigned )
nRet = m_aValue.m_nInt8;
else
- nRet = m_aValue.m_uInt16;
+ nRet = m_aValue.m_uInt8;
break;
case DataType::SMALLINT:
if ( m_bSigned )
commit 4ea6909966a867cc93a5acb9c9713b0fa2c6e679
Author: Andras Timar <andras.timar at collabora.com>
Date: Tue Nov 19 12:40:38 2013 +0100
fdo#66232 fix opening files via COM server
Thanks to Noel Grandin & Stephan Bergmann for the hint on IRC.
Change-Id: I2b407a53b02a7ecdbff553ad47674c1e00455180
Reviewed-on: https://gerrit.libreoffice.org/6721
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx
index 488451e..af0add9 100644
--- a/embedserv/source/embed/docholder.cxx
+++ b/embedserv/source/embed/docholder.cxx
@@ -354,7 +354,7 @@ HRESULT DocumentHolder::InPlaceActivate(
m_xFrame->registerDispatchProviderInterceptor( CreateNewInterceptor() );
- m_xLayoutManager.set( m_xFrame->getLayoutManager(), uno::UNO_QUERY_THROW );
+ m_xLayoutManager.set( m_xFrame->getLayoutManager(), uno::UNO_QUERY );
if(m_xLayoutManager.is())
m_xLayoutManager->setDockingAreaAcceptor(this);
commit a4d76f1195ea59f3eb29e87e0b6ffd4954ba908c
Author: Xisco Fauli <anistenis at gmail.com>
Date: Mon Nov 18 23:57:47 2013 +0100
fdo#68788: Don't use systemPathToFileUrl here
it works on Linux but not on Windows.
Change-Id: Ia9af362c09d46c678fa4ebe8cf4922dae3dddccf
Signed-off-by: Andras Timar <andras.timar at collabora.com>
diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py
index eb6fb0a..35d3183 100644
--- a/wizards/com/sun/star/wizards/document/OfficeDocument.py
+++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py
@@ -105,7 +105,7 @@ class OfficeDocument(object):
xComponent = None
try:
xComponent = frame.loadComponentFromURL(
- systemPathToFileUrl(sURL), "_self", 0, tuple(loadValues))
+ sURL, "_self", 0, tuple(loadValues))
except Exception:
traceback.print_exc()
commit e3af01e66ee3c88834f03775a0891311c3c3101a
Author: Xisco Fauli <anistenis at gmail.com>
Date: Sun Nov 17 19:17:12 2013 +0100
fdo#69025 Remove unused text
Change-Id: I9fc60d52e1bc4b38b79e3e29ed1b04b3e8a777a1
Signed-off-by: Andras Timar <andras.timar at collabora.com>
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
index e73142a..3176abd 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialog.py
@@ -580,7 +580,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, HelpIds.getHelpIdString(HID + 22),
self.resources.reschkUseLogo_value,
- "chkUseLogo", 97, 54, 0, 3, 22, 212), self)
+ "chkUseLogo", 97, 34, 0, 3, 22, 212), self)
self.chkUseAddressReceiver = self.insertCheckBox(
"chkUseAddressReceiver",
LetterWizardDialogConst.CHKUSEADDRESSRECEIVER_ITEM_CHANGED,
@@ -596,7 +596,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, HelpIds.getHelpIdString(HID + 23),
self.resources.reschkUseAddressReceiver_value,
- "chkUseAddressReceiver", 97, 69, 0, 3, 23, 212), self)
+ "chkUseAddressReceiver", 97, 49, 0, 3, 23, 212), self)
self.chkUseSigns = self.insertCheckBox(
"chkUseSigns",
LetterWizardDialogConst.CHKUSESIGNS_ITEM_CHANGED,
@@ -612,7 +612,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, HelpIds.getHelpIdString(HID + 24),
self.resources.reschkUseSigns_value,
- "chkUseSigns", 97, 82, 0, 3, 24, 212), self)
+ "chkUseSigns", 97, 62, 0, 3, 24, 212), self)
self.chkUseSubject = self.insertCheckBox(
"chkUseSubject",
LetterWizardDialogConst.CHKUSESUBJECT_ITEM_CHANGED,
@@ -628,7 +628,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, HelpIds.getHelpIdString(HID + 25),
self.resources.reschkUseSubject_value,
- "chkUseSubject", 97, 98, 0, 3, 25, 212), self)
+ "chkUseSubject", 97, 78, 0, 3, 25, 212), self)
self.chkUseSalutation = self.insertCheckBox(
"chkUseSalutation",
LetterWizardDialogConst.CHKUSESALUTATION_ITEM_CHANGED,
@@ -644,7 +644,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, HelpIds.getHelpIdString(HID + 26),
self.resources.reschkUseSalutation_value,
- "chkUseSalutation", 97, 113, 0, 3, 26, 66), self)
+ "chkUseSalutation", 97, 93, 0, 3, 26, 66), self)
self.lstSalutation = self.insertComboBox(
"lstSalutation",
LetterWizardDialogConst.LSTSALUTATION_ACTION_PERFORMED,
@@ -660,7 +660,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(True, 12, HelpIds.getHelpIdString(HID + 27),
- "lstSalutation", 210, 110, 3, 27, 74), self)
+ "lstSalutation", 210, 90, 3, 27, 74), self)
self.chkUseBendMarks = self.insertCheckBox(
"chkUseBendMarks",
LetterWizardDialogConst.CHKUSEBENDMARKS_ITEM_CHANGED,
@@ -676,7 +676,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, HelpIds.getHelpIdString(HID + 28),
self.resources.reschkUseBendMarks_value,
- "chkUseBendMarks", 97, 127, 0, 3, 28, 212), self)
+ "chkUseBendMarks", 97, 107, 0, 3, 28, 212), self)
self.chkUseGreeting = self.insertCheckBox(
"chkUseGreeting",
LetterWizardDialogConst.CHKUSEGREETING_ITEM_CHANGED,
@@ -692,7 +692,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, HelpIds.getHelpIdString(HID + 29),
self.resources.reschkUseGreeting_value,
- "chkUseGreeting", 97, 142, 0, 3, 29, 66), self)
+ "chkUseGreeting", 97, 122, 0, 3, 29, 66), self)
self.lstGreeting = self.insertComboBox(
"lstGreeting",
LetterWizardDialogConst.LSTGREETING_ACTION_PERFORMED,
@@ -708,7 +708,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_TABINDEX,
PropertyNames.PROPERTY_WIDTH),
(True, 12, HelpIds.getHelpIdString(HID + 30),
- "lstGreeting", 210, 141, 3, 30, 74), self)
+ "lstGreeting", 210, 121, 3, 30, 74), self)
self.chkUseFooter = self.insertCheckBox(
"chkUseFooter",
LetterWizardDialogConst.CHKUSEFOOTER_ITEM_CHANGED,
@@ -724,19 +724,7 @@ class LetterWizardDialog(WizardDialog):
PropertyNames.PROPERTY_WIDTH),
(8, HelpIds.getHelpIdString(HID + 31),
self.resources.reschkUseFooter_value,
- "chkUseFooter", 97, 158, 0, 3, 31, 212), self)
- self.insertLabel("lblLetterNorm",
- (PropertyNames.PROPERTY_HEIGHT,
- PropertyNames.PROPERTY_LABEL,
- PropertyNames.PROPERTY_MULTILINE,
- PropertyNames.PROPERTY_NAME,
- PropertyNames.PROPERTY_POSITION_X,
- PropertyNames.PROPERTY_POSITION_Y,
- PropertyNames.PROPERTY_STEP,
- PropertyNames.PROPERTY_TABINDEX,
- PropertyNames.PROPERTY_WIDTH),
- (16, self.resources.reslblLetterNorm_value, True,
- "lblLetterNorm", 97, 28, 3, 50, 109))
+ "chkUseFooter", 97, 138, 0, 3, 31, 212), self)
self.insertLabel("lblTitle3",
(
"FontDescriptor", PropertyNames.PROPERTY_HEIGHT,
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
index b884246..a59ba71 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogResources.py
@@ -154,9 +154,6 @@ class LetterWizardDialogResources(Resource):
self.reslblFooterHeight_value = \
self.getResText(
LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 40)
- self.reslblLetterNorm_value = \
- self.getResText(
- LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 41)
self.reslblSenderAddress_value = \
self.getResText(
LetterWizardDialogResources.RID_LETTERWIZARDDIALOG_START + 42)
diff --git a/wizards/source/formwizard/dbwizres.src b/wizards/source/formwizard/dbwizres.src
index be86337..c68036c 100644
--- a/wizards/source/formwizard/dbwizres.src
+++ b/wizards/source/formwizard/dbwizres.src
@@ -2066,11 +2066,6 @@ String RID_LETTERWIZARDDIALOG_START + 40
Text [ en-US] = "Height:";
};
-String RID_LETTERWIZARDDIALOG_START + 41
-{
- Text [ en-US] = "Use a typical letter format for this country:";
-};
-
String RID_LETTERWIZARDDIALOG_START + 42
{
Text [ en-US] = "Sender's address";
commit 850b79a65cbce157a154a709eb71806c35e19570
Author: Xisco Fauli <anistenis at gmail.com>
Date: Sun Sep 8 19:56:06 2013 +0200
pywizards: Fix date and time fields
Change-Id: I7be16558bab7c4dde2d326808b9fb115a6878894
Signed-off-by: Andras Timar <andras.timar at collabora.com>
diff --git a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
index 2a74597..a8dcece 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaDocument.py
@@ -22,7 +22,7 @@ from ..text.TextDocument import TextDocument
from ..text.TextSectionHandler import TextSectionHandler
from ..common.FileAccess import FileAccess
-from datetime import date as dateTimeObject
+from datetime import datetime
from com.sun.star.text.PlaceholderType import TEXT
from com.sun.star.i18n.NumberFormatIndex import TIME_HHMM, DATE_SYSTEM_LONG
@@ -142,7 +142,7 @@ class AgendaDocument(TextDocument):
except Exception:
traceback.print_exc()
self.xTextDocument.unlockControllers()
-
+
'''
checks the data model if the
item corresponding to the given string should be shown
@@ -367,8 +367,7 @@ class AgendaDocument(TextDocument):
self.getDateString(self.agenda.cp_Date)
self.teDate.write(self.trDate)
elif controlName == "txtTime":
- self.teTime.placeHolderText = \
- self.getTimeString(self.agenda.cp_Time)
+ self.teTime.placeHolderText = self.agenda.cp_Time
self.teTime.write(self.trTime)
elif controlName == "cbLocation":
self.teLocation.placeHolderText = self.agenda.cp_Location
@@ -378,25 +377,12 @@ class AgendaDocument(TextDocument):
except Exception:
traceback.print_exc()
- def getDateString(self, d):
- if not d:
+ def getDateString(self, date):
+ if not date:
return ""
- date = int(d)
- year = int(date / 10000)
- month = int((date % 10000) / 100)
- day = int(date % 100)
- dateObject = dateTimeObject(year, month, day)
+ dateObject = datetime.strptime(date, '%d/%m/%y').date()
return self.dateUtils.format(self.dateFormat, dateObject)
- def getTimeString(self, s):
- if s is None or s == "":
- return ""
- time = int(s)
- t = ((time / float(1000000)) / float(24)) \
- + ((time % 1000000) / float(1000000)) / float(35)
- return self.formatter.convertNumberToString(
- self.timeFormat, t)
-
def finish(self, topics):
self.createMinutes(topics)
self.deleteHiddenSections()
@@ -468,8 +454,7 @@ class AgendaDocument(TextDocument):
self.resources.resPlaceHolderDate)
elif itemText == \
self.templateConsts.FILLIN_MINUTES_TIME:
- self.fillMinutesItem(
- item, getTimeString(self.agenda.cp_Time),
+ self.fillMinutesItem( item, self.agenda.cp_Time,
self.resources.resPlaceHolderTime)
self.items.clear()
@@ -510,9 +495,9 @@ class AgendaDocument(TextDocument):
if topicTime == 0 or topicStartTime == 0:
time = topic[3].Value
else:
- time = getTimeString(str(topicStartTime)) + " - "
+ time = str(topicStartTime) + " - "
topicStartTime += topicTime * 1000
- time += getTimeString(str(topicStartTime))
+ time += str(topicStartTime)
fillMinutesItem(item, time, "")
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py
index 9628f0c..0fae91a 100644
--- a/wizards/com/sun/star/wizards/ui/event/DataAware.py
+++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py
@@ -20,6 +20,10 @@ import uno
from abc import ABCMeta, abstractmethod
from ...common.PropertyNames import PropertyNames
+from com.sun.star.util import Date
+from com.sun.star.util import Time
+from datetime import datetime
+
'''
@author rpiterman
DataAware objects are used to live-synchronize UI and DataModel/DataObject.
@@ -118,9 +122,12 @@ class DataAware(object):
data = uno.invoke(self._dataObject, "get" + self._field, ())
ui = self.getFromUI()
if data is not ui:
- #if isinstance(ui,tuple):
- #Selected Element listbox
- # ui = ui[0]
+ if isinstance(ui,Date):
+ d = datetime(ui.Year, ui.Month, ui.Day)
+ ui = d.strftime('%d/%m/%y')
+ elif isinstance(ui,Time):
+ t = datetime(1, 1, 1, ui.Hours, ui.Minutes)
+ ui = t.strftime('%H:%M')
if useUno:
uno.invoke(self._dataObject, "set" + self._field, (ui,))
else:
diff --git a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
index ea728b9..1ed80a1 100644
--- a/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
+++ b/wizards/com/sun/star/wizards/ui/event/UnoDataAware.py
@@ -17,7 +17,9 @@
#
import uno
from .CommonListener import ItemListenerProcAdapter, TextListenerProcAdapter
-from .DataAware import DataAware, PropertyNames
+from .DataAware import DataAware, PropertyNames, datetime, Date, Time
+
+from com.sun.star.script import CannotConvertException
'''
@author rpiterman
@@ -47,14 +49,21 @@ class UnoDataAware(DataAware):
def setToUI(self, value):
if (isinstance(value, list)):
- length = len(value)
value = tuple(value)
elif self.isShort:
value = uno.Any("[]short", (value,))
- if (hasattr(self.unoModel, self.unoPropName)):
- setattr(self.unoModel, self.unoPropName, value)
- else:
- uno.invoke(self.unoModel, "set" + self.unoPropName, (value,))
+ if value:
+ if(hasattr(self.unoModel, self.unoPropName)):
+ if self.unoPropName == "Date":
+ d = datetime.strptime(value, '%d/%m/%y')
+ value = Date(d.day, d.month, d.year)
+ elif self.unoPropName == "Time":
+ t = datetime.strptime(value, '%H:%M')
+ value = Time(0, 0, t.minute, t.hour, False)
+
+ setattr(self.unoModel, self.unoPropName, value)
+ else:
+ uno.invoke(self.unoModel, "set" + self.unoPropName, (value,))
# Try to get from an arbitrary object a boolean value.
# Null returns Boolean.FALSE;
commit 13f764fd91307b168da1a2336beabe47d42d4be4
Author: Xisco Fauli <anistenis at gmail.com>
Date: Tue Sep 10 21:09:09 2013 +0200
pywizards: fix the switch between elements in the listboxs
Change-Id: I4603232d158ad3adb60697dbf1425eb5dfe5d71f
Signed-off-by: Andras Timar <andras.timar at collabora.com>
diff --git a/wizards/com/sun/star/wizards/ui/event/DataAware.py b/wizards/com/sun/star/wizards/ui/event/DataAware.py
index 5c8c5aa..9628f0c 100644
--- a/wizards/com/sun/star/wizards/ui/event/DataAware.py
+++ b/wizards/com/sun/star/wizards/ui/event/DataAware.py
@@ -124,6 +124,9 @@ class DataAware(object):
if useUno:
uno.invoke(self._dataObject, "set" + self._field, (ui,))
else:
+ if isinstance(ui,tuple):
+ #Listbox Element
+ ui = ui[0]
setattr(self._dataObject, self._field, ui)
self.enableControls(ui)
except Exception:
commit 0b3210f497ff4d51387029c109cd8758659e0c30
Author: Armin Le Grand <alg at apache.org>
Date: Mon Sep 2 12:13:37 2013 +0000
Resolves: #i122820# Corrected graphics creation...
allow bigger limits if directly requested
(cherry picked from commit 50f1445bda91cb44a1a1e8636ab0bcb6a8c4f381)
Signed-off-by: Andras Timar <andras.timar at collabora.com>
Conflicts:
svx/source/unodraw/UnoGraphicExporter.cxx
Change-Id: I33576ef9f95b9f8a9fa0ab6f6d83c93ecec8da9f
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index fb9e790..5480f24 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -210,6 +210,7 @@ namespace svx
{
// use new primitive conversion tooling
basegfx::B2DRange aRange(basegfx::B2DPoint(0.0, 0.0));
+ sal_uInt32 nMaximumQuadraticPixels(500000);
if(pSize)
{
@@ -218,6 +219,10 @@ namespace svx
const Size aSize100th(Application::GetDefaultDevice()->PixelToLogic(*pSize, MapMode(MAP_100TH_MM)));
aRange.expand(basegfx::B2DPoint(aSize100th.Width(), aSize100th.Height()));
+
+ // when explicitely pixels are requested from the GraphicExporter, use a *very* high limit
+ // of 16gb (4096x4096 pixels), else use the default for the converters
+ nMaximumQuadraticPixels = std::min(sal_uInt32(4096 * 4096), sal_uInt32(pSize->Width() * pSize->Height()));
}
else
{
@@ -227,13 +232,42 @@ namespace svx
aRange.expand(basegfx::B2DPoint(aSize100th.Width(), aSize100th.Height()));
}
- aBmpEx = convertMetafileToBitmapEx(rMtf, aRange);
+ aBmpEx = convertMetafileToBitmapEx(rMtf, aRange, nMaximumQuadraticPixels);
}
else
{
const SvtOptionsDrawinglayer aDrawinglayerOpt;
+ Size aTargetSize(0, 0);
+
+ if(pSize)
+ {
+ // #i122820# If a concrete target size in pixels is given, use it
+ aTargetSize = *pSize;
+
+ // get hairline and full bound rect to evtl. reduce given target pixel size when
+ // it is known that it will be expanded to get the right and bottom hairlines right
+ Rectangle aHairlineRect;
+ const Rectangle aRect(rMtf.GetBoundRect(*Application::GetDefaultDevice(), &aHairlineRect));
+
+ if(!aRect.IsEmpty() && !aHairlineRect.IsEmpty())
+ {
+ if(aRect.Right() == aHairlineRect.Right() || aRect.Bottom() == aHairlineRect.Bottom())
+ {
+ if(aTargetSize.Width())
+ {
+ aTargetSize.Width() -= 1;
+ }
+
+ if(aTargetSize.Height())
+ {
+ aTargetSize.Height() -= 1;
+ }
+ }
+ }
+ }
+
const GraphicConversionParameters aParameters(
- pSize ? *pSize : Size(0, 0),
+ aTargetSize,
true, // allow unlimited size
aDrawinglayerOpt.IsAntiAliasing(),
aDrawinglayerOpt.IsSnapHorVerLinesToDiscrete());
@@ -414,26 +448,39 @@ VirtualDevice* GraphicExporter::CreatePageVDev( SdrPage* pPage, sal_uIntPtr nWid
}
pVDev->SetMapMode( aMM );
-#ifdef DBG_UTIL
- bool bAbort = !
-#endif
- pVDev->SetOutputSize(aPageSize);
- DBG_ASSERT(!bAbort, "virt. Device nicht korrekt erzeugt");
-
- SdrView* pView = new SdrView(mpDoc, pVDev);
- pView->SetPageVisible( sal_False );
- pView->SetBordVisible( sal_False );
- pView->SetGridVisible( sal_False );
- pView->SetHlplVisible( sal_False );
- pView->SetGlueVisible( sal_False );
- pView->ShowSdrPage(pPage);
- Region aRegion (Rectangle( aPoint, aPageSize ) );
-
- ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage );
-
- pView->CompleteRedraw(pVDev, aRegion, &aRedirector);
-
- delete pView;
+ bool bSuccess(false);
+
+ // #i122820# If available, use pixel size directly
+ if(nWidthPixel && nHeightPixel)
+ {
+ bSuccess = pVDev->SetOutputSizePixel(Size(nWidthPixel, nHeightPixel));
+ }
+ else
+ {
+ bSuccess = pVDev->SetOutputSize(aPageSize);
+ }
+
+ if(bSuccess)
+ {
+ SdrView* pView = new SdrView(mpDoc, pVDev);
+ pView->SetPageVisible( sal_False );
+ pView->SetBordVisible( sal_False );
+ pView->SetGridVisible( sal_False );
+ pView->SetHlplVisible( sal_False );
+ pView->SetGlueVisible( sal_False );
+ pView->ShowSdrPage(pPage);
+ Region aRegion (Rectangle( aPoint, aPageSize ) );
+
+ ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage );
+
+ pView->CompleteRedraw(pVDev, aRegion, &aRedirector);
+ delete pView;
+ }
+ else
+ {
+ OSL_ENSURE(false, "Could not get a VirtualDevice of requested size (!)");
+ }
+
return pVDev;
}
commit 121df1b45c60674a11f2ebc9dd21baf4785fae83
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Nov 15 17:06:21 2013 +0000
Related: rhbz#1014990 valgrind reports uninitialized variable
(cherry picked from commit f3660062ce8a2c65d483b83c2800d9b958d12f08)
Conflicts:
sd/source/filter/eppt/epptbase.hxx
Change-Id: Ibaa2ed0ee2f1f3f00bceec91ccced968e4913e47
Related: rhbz#1014990 valgrind reports uninitialized another variable
Change-Id: I77f082ea145b0f20daa93c3ee04067ecb6c3b108
(cherry picked from commit b7069ad07dc651f5326cd3a671588d8c1ecf2534)
Related: rhbz#1014990 valgrind reports yet another uninitialized variable
Change-Id: Idf15ee825a34aa7788c422475aa6cea8ff802581
(cherry picked from commit e0840f70565062b712e544f952640ee35cfb6a27)
Related: rhbz#1014990 valgrind reports yet another unint variable
Change-Id: Idf6a0a1e12fffee6c090add41247723f1d9cf576
(cherry picked from commit b211b8b2e14bd961a7b32033468a94cbff52b5c4)
Reviewed-on: https://gerrit.libreoffice.org/6712
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sd/source/filter/eppt/epptbase.hxx b/sd/source/filter/eppt/epptbase.hxx
index f84360d..2566b98 100644
--- a/sd/source/filter/eppt/epptbase.hxx
+++ b/sd/source/filter/eppt/epptbase.hxx
@@ -157,6 +157,9 @@ struct FontCollectionEntry
FontCollectionEntry( const String& rName ) :
Scaling ( 1.0 ),
+ Family ( 0 ),
+ Pitch ( 0 ),
+ CharSet ( 0 ),
Original( rName )
{
ImplInit( rName );
diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx
index d9fd8fd..24e98f1 100644
--- a/sd/source/filter/eppt/pptx-stylesheet.cxx
+++ b/sd/source/filter/eppt/pptx-stylesheet.cxx
@@ -286,8 +286,8 @@ void PPTExParaSheet::SetStyleSheet( const ::com::sun::star::uno::Reference< ::co
if ( !nLevel )
{
- if ( ( aParagraphObj.meBullet == ::com::sun::star::beans::PropertyState_DIRECT_VALUE )
- && aParagraphObj.bExtendedParameters )
+ if (aParagraphObj.bExtendedParameters &&
+ aParagraphObj.meBullet == ::com::sun::star::beans::PropertyState_DIRECT_VALUE)
{
for ( sal_Int16 i = 0; i < 5; i++ )
{
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 4461468..ca0bc9c 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -628,10 +628,21 @@ PortionObj& PortionObj::operator=( const PortionObj& rPortionObj )
return *this;
}
-ParagraphObj::ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
- PPTExBulletProvider& rProv ) :
- maMapModeSrc ( MAP_100TH_MM ),
- maMapModeDest ( MAP_INCH, Point(), Fraction( 1, 576 ), Fraction( 1, 576 ) )
+ParagraphObj::ParagraphObj(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
+ PPTExBulletProvider& rProv)
+ : maMapModeSrc(MAP_100TH_MM)
+ , maMapModeDest(MAP_INCH, Point(), Fraction( 1, 576 ), Fraction( 1, 576 ))
+ , mnTextSize(0)
+ , mbFirstParagraph(false)
+ , mbLastParagraph(false)
+ , mnTextAdjust(0)
+ , mnLineSpacing(0)
+ , mbFixedLineSpacing(false)
+ , mnLineSpacingTop(0)
+ , mnLineSpacingBottom(0)
+ , mbForbiddenRules(false)
+ , mbParagraphPunctation(false)
+ , mnBiDi(0)
{
mXPropSet = rXPropSet;
@@ -644,12 +655,22 @@ ParagraphObj::ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun::
ImplGetParagraphValues( rProv, sal_False );
}
- ParagraphObj::ParagraphObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & rXTextContent,
- ParaFlags aParaFlags, FontCollection& rFontCollection, PPTExBulletProvider& rProv ) :
- maMapModeSrc ( MAP_100TH_MM ),
- maMapModeDest ( MAP_INCH, Point(), Fraction( 1, 576 ), Fraction( 1, 576 ) ),
- mbFirstParagraph ( aParaFlags.bFirstParagraph ),
- mbLastParagraph ( aParaFlags.bLastParagraph )
+ParagraphObj::ParagraphObj(::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & rXTextContent,
+ ParaFlags aParaFlags, FontCollection& rFontCollection, PPTExBulletProvider& rProv )
+ : maMapModeSrc(MAP_100TH_MM)
+ , maMapModeDest(MAP_INCH, Point(), Fraction( 1, 576 ), Fraction( 1, 576 ))
+ , mnTextSize(0)
+ , mbIsBullet(false)
+ , mbFirstParagraph( aParaFlags.bFirstParagraph )
+ , mbLastParagraph( aParaFlags.bLastParagraph )
+ , mnTextAdjust(0)
+ , mnLineSpacing(0)
+ , mbFixedLineSpacing(false)
+ , mnLineSpacingTop(0)
+ , mnLineSpacingBottom(0)
+ , mbForbiddenRules(false)
+ , mbParagraphPunctation(false)
+ , mnBiDi(0)
{
bExtendedParameters = sal_False;
diff --git a/sd/source/filter/eppt/text.hxx b/sd/source/filter/eppt/text.hxx
index 06bc4e0..c60ae43 100644
--- a/sd/source/filter/eppt/text.hxx
+++ b/sd/source/filter/eppt/text.hxx
@@ -26,6 +26,7 @@
#include <rtl/textenc.h>
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/lang/Locale.hpp>
+#include <editeng/svxenum.hxx>
#include <boost/shared_ptr.hpp>
@@ -62,17 +63,24 @@ struct SOParagraph
sal_Bool bNumberingIsNumber;
SOParagraph()
+ : bExtendedParameters(false)
+ , nParaFlags(0)
+ , nBulletFlags(0)
+ , nNumberingType(SVX_NUM_NUMBER_NONE)
+ , nHorzAdjust(0)
+ , nBulletColor(0)
+ , nBulletOfs(0)
+ , nStartWith(0)
+ , nTextOfs(0)
+ , nBulletRealSize(0)
+ , nDepth(0)
+ , cBulletId(0)
+ , bExtendedBulletsUsed(false)
+ , nBulletId(0xffff)
+ , nMappedNumType(0)
+ , bNumberingIsNumber(true)
{
- nDepth = 0;
- bExtendedParameters = sal_False;
- nParaFlags = 0;
- nBulletFlags = 0;
- nBulletOfs = 0;
- nTextOfs = 0;
- bExtendedBulletsUsed = sal_False;
- nBulletId = 0xffff;
- bNumberingIsNumber = sal_True;
- };
+ }
};
class PropStateValue : public PropValue
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index e4e3e51..841aa98 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -282,21 +282,18 @@ sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pFilter
{
const sal_uLong nHeaderPos = m_rStm.Tell();
- mpHandlesUsed = new sal_Bool[ MAXHANDLES ];
- memset( mpHandlesUsed, 0, MAXHANDLES * sizeof( sal_Bool ) );
- mnHorTextAlign = mnHandleCount = mnLastPercent = mnRecordPos = mnRecordCount = 0;
- mnRecordPlusPos = 0;
- mnLineHandle = mnFillHandle = mnTextHandle = HANDLE_INVALID;
- mbRecordOpen = sal_False;
- mbRecordPlusOpen = false;
-
-
maVDev.EnableOutput( sal_False );
maVDev.SetMapMode( rMtf.GetPrefMapMode() );
- mpFilterConfigItem = pFilterConfigItem;
-
// don't work with pixel as destination map mode -> higher resolution preferrable
maDestMapMode.SetMapUnit( MAP_100TH_MM );
+ mpFilterConfigItem = pFilterConfigItem;
+ mpHandlesUsed = new sal_Bool[ MAXHANDLES ];
+ memset( mpHandlesUsed, 0, MAXHANDLES * sizeof( sal_Bool ) );
+ mnHandleCount = mnLastPercent = mnRecordCount = mnRecordPos = mnRecordPlusPos = 0;
+ mbRecordOpen = mbRecordPlusOpen = false;
+ mbLineChanged = mbFillChanged = mbTextChanged = false;
+ mnLineHandle = mnFillHandle = mnTextHandle = HANDLE_INVALID;
+ mnHorTextAlign = 0;
const Size aMtfSizePix( maVDev.LogicToPixel( rMtf.GetPrefSize(), rMtf.GetPrefMapMode() ) );
const Size aMtfSizeLog( maVDev.LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_100TH_MM ) );
commit 4c1d28a4f035463655e14666d58e24254066f26a
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Nov 17 22:18:49 2013 +0100
m_uInt8 not m_nInt8
Change-Id: I54524b6c7c19202bee049b61edc3f8e0a1e4fde0
Reviewed-on: https://gerrit.libreoffice.org/6705
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
Tested-by: Lionel Elie Mamane <lionel at mamane.lu>
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 0dd208c..57d4623 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -444,7 +444,7 @@ ORowSetValue& ORowSetValue::operator=(const ORowSetValue& _rRH)
if ( _rRH.m_bSigned )
m_aValue.m_nInt8 = _rRH.m_aValue.m_nInt8;
else
- m_aValue.m_nInt8 = _rRH.m_aValue.m_uInt8;
+ m_aValue.m_uInt8 = _rRH.m_aValue.m_uInt8;
break;
case DataType::SMALLINT:
if ( _rRH.m_bSigned )
commit 9acb23e7634aefc88e63e7b5895b3e7f99aaaff1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Nov 8 14:53:42 2013 +0000
Access by AnchoredObject of a deleted SwLayoutFrm
as demonstrated by abi10075-1.doc
just register the AnchoredObjects in the SwLayoutFrm and
inform them when the SwLayoutFrm goes away.
This crash was triggered by "1e113cb7604e1509e7d598a9be329f1f7b6e9322" import
different first page header/footer from doc. But that commit is blameless.
Change-Id: Ia079cc635a81dff1ccbf740641f441aa784328a4
(cherry picked from commit b376eacdfae11f5d39eb7011efe67390d9f495e7)
Reviewed-on: https://gerrit.libreoffice.org/6622
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx
index cc5edbf..ff4b88ad 100644
--- a/sw/inc/anchoredobject.hxx
+++ b/sw/inc/anchoredobject.hxx
@@ -269,15 +269,12 @@ class SW_DLLPUBLIC SwAnchoredObject
// accessors to data of position calculation:
// frame vertical position is orient at
- inline const SwLayoutFrm* GetVertPosOrientFrm() const
+ const SwLayoutFrm* GetVertPosOrientFrm() const
{
return mpVertPosOrientFrm;
}
// method to clear member <mpVertPosOrientFrm>
- inline void ClearVertPosOrientFrm()
- {
- mpVertPosOrientFrm = 0L;
- }
+ void ClearVertPosOrientFrm();
/** check anchor character rectangle and top of line
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index fdd6b7c..d17b6e5 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -21,6 +21,7 @@
#include "frame.hxx"
+class SwAnchoredObject;
class SwCntntFrm;
class SwFlowFrm;
class SwFmtCol;
@@ -53,6 +54,7 @@ protected:
virtual void MakeAll();
SwFrm *pLower;
+ std::vector<SwAnchoredObject*> aVertPosOrientFrmsFor;
virtual SwTwips ShrinkFrm( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
virtual SwTwips GrowFrm ( SwTwips, sal_Bool bTst = sal_False, sal_Bool bInfo = sal_False );
@@ -164,6 +166,18 @@ public:
inline SwFrm* GetLastLower();
virtual void PaintBreak() const;
+
+ void SetVertPosOrientFrmFor(SwAnchoredObject *pObj)
+ {
+ aVertPosOrientFrmsFor.push_back(pObj);
+ }
+
+ void ClearVertPosOrientFrmFor(SwAnchoredObject *pObj)
+ {
+ aVertPosOrientFrmsFor.erase(
+ std::remove(aVertPosOrientFrmsFor.begin(),
+ aVertPosOrientFrmsFor.end(), pObj), aVertPosOrientFrmsFor.end());
+ }
};
//Um doppelte Implementierung zu sparen wird hier ein bischen gecasted
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index ab4a193..77cf548 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -107,8 +107,18 @@ SwAnchoredObject::SwAnchoredObject() :
{
}
+void SwAnchoredObject::ClearVertPosOrientFrm()
+{
+ if (mpVertPosOrientFrm)
+ {
+ const_cast<SwLayoutFrm*>(mpVertPosOrientFrm)->ClearVertPosOrientFrmFor(this);
+ mpVertPosOrientFrm = NULL;
+ }
+}
+
SwAnchoredObject::~SwAnchoredObject()
{
+ ClearVertPosOrientFrm();
}
// =============================================================================
@@ -238,6 +248,8 @@ void SwAnchoredObject::SetVertPosOrientFrm( const SwLayoutFrm& _rVertPosOrientFr
{
mpVertPosOrientFrm = &_rVertPosOrientFrm;
+ const_cast<SwLayoutFrm*>(mpVertPosOrientFrm)->SetVertPosOrientFrmFor(this);
+
// #i28701# - take over functionality of deleted method
// <SwFlyAtCntFrm::AssertPage()>: assure for at-paragraph and at-character
// an anchored object, that it is registered at the correct page frame
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 4ae962e..1fc5ff0 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -557,6 +557,14 @@ void SwCntntFrm::DelFrms( const SwCntntNode& rNode )
void SwLayoutFrm::Destroy()
{
+ while (!aVertPosOrientFrmsFor.empty())
+ {
+ SwAnchoredObject *pObj = *aVertPosOrientFrmsFor.begin();
+ pObj->ClearVertPosOrientFrm();
+ }
+
+ assert(aVertPosOrientFrmsFor.empty());
+
SwFrm *pFrm = pLower;
if( GetFmt() && !GetFmt()->GetDoc()->IsInDtor() )
More information about the Libreoffice-commits
mailing list