[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 3 commits - cui/source solenv/gbuild writerfilter/source
Michael Stahl
mst at kemper.freedesktop.org
Mon Apr 2 13:10:22 PDT 2012
cui/source/inc/border.hxx | 3 +--
cui/source/tabpages/border.cxx | 15 +++++++++------
solenv/gbuild/filter-showIncludes.pl | 19 +++++++++++++------
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 8 ++++++++
4 files changed, 31 insertions(+), 14 deletions(-)
New commits:
commit b2d8d2d3cacbfc6d505248b81ea0e94272def439
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Fri Mar 23 12:47:41 2012 +0100
fdo#47326 fix RTF import of mixed super/nonsuper text
In most cases \super has its own group, but it's valid to have mixed
super and non-super text in a single group, as long as \super and
\nosupersub keywords are used: handle this.
(backport of f84e0e6b1b0ec5f52ee963a62ac420cd872a771e)
Signed-off-by: Michael Stahl <mstahl at redhat.com>
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 241e05d..d5d8ee6 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1950,6 +1950,14 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
m_aStates.top().aCharacterSprms->push_back(make_pair(NS_ooxml::LN_EG_RPrBase_vertAlign, pValue));
}
break;
+ case RTF_NOSUPERSUB:
+ if (m_pCurrentBuffer == &m_aSuperBuffer)
+ {
+ replayBuffer(m_aSuperBuffer);
+ m_pCurrentBuffer = 0;
+ }
+ m_aStates.top().aCharacterSprms.erase(NS_ooxml::LN_EG_RPrBase_vertAlign);
+ break;
case RTF_LINEPPAGE:
case RTF_LINECONT:
{
commit b2a20dad907bfd6ca14847d548b44ad8b9ee5321
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Apr 2 17:20:26 2012 +0200
show synchronized checked only if all margins are the same, related fdo#44337
(cherry picked from commit 149650b087ab5b15ef23e4ac6af5368b2820af1e)
Signed-off-by: Michael Stahl <mstahl at redhat.com>
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 7766ec9..ecb6c9e 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -125,8 +125,7 @@ private:
bool mbTLBREnabled; /// true = Top-left to bottom-right border enabled.
bool mbBLTREnabled; /// true = Bottom-left to top-right border enabled.
bool mbUseMarginItem;
-
- static sal_Bool bSync;
+ bool mbSync;
#ifdef _SVX_BORDER_CXX
// Handler
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index d6c474f..709d04b 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -86,8 +86,6 @@ static sal_uInt16 pRanges[] =
0
};
-sal_Bool SvxBorderTabPage::bSync = sal_True;
-
// -----------------------------------------------------------------------
void lcl_SetDecimalDigitsTo1(MetricField& rField)
{
@@ -147,7 +145,8 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent,
mbVerEnabled( false ),
mbTLBREnabled( false ),
mbBLTREnabled( false ),
- mbUseMarginItem( false )
+ mbUseMarginItem( false ),
+ mbSync(true)
{
// diese Page braucht ExchangeSupport
@@ -217,7 +216,6 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent,
SetFieldUnit(aRightMF, eFUnit);
SetFieldUnit(aTopMF, eFUnit);
SetFieldUnit(aBottomMF, eFUnit);
- aSynchronizeCB.Check(bSync);
aSynchronizeCB.SetClickHdl(LINK(this, SvxBorderTabPage, SyncHdl_Impl));
aLeftMF.SetModifyHdl(LINK(this, SvxBorderTabPage, ModifyDistanceHdl_Impl));
aRightMF.SetModifyHdl(LINK(this, SvxBorderTabPage, ModifyDistanceHdl_Impl));
@@ -571,6 +569,11 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet )
}
LinesChanged_Impl( 0 );
+ if(aLeftMF.GetValue() == aRightMF.GetValue() && aTopMF.GetValue() == aBottomMF.GetValue() && aTopMF.GetValue() == aLeftMF.GetValue())
+ mbSync = true;
+ else
+ mbSync = false;
+ aSynchronizeCB.Check(mbSync);
}
// -----------------------------------------------------------------------
@@ -1153,7 +1156,7 @@ IMPL_LINK( SvxBorderTabPage, LinesChanged_Impl, void*, EMPTYARG )
IMPL_LINK( SvxBorderTabPage, ModifyDistanceHdl_Impl, MetricField*, pField)
{
- if ( bSync )
+ if ( mbSync )
{
sal_Int64 nVal = pField->GetValue();
if(pField != &aLeftMF)
@@ -1170,7 +1173,7 @@ IMPL_LINK( SvxBorderTabPage, ModifyDistanceHdl_Impl, MetricField*, pField)
IMPL_LINK( SvxBorderTabPage, SyncHdl_Impl, CheckBox*, pBox)
{
- bSync = pBox->IsChecked();
+ mbSync = pBox->IsChecked();
return 0;
}
commit 9d8662264abfad3da87e1662abda4556333889f0
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri Mar 30 13:44:33 2012 +0200
filter-showIncludes.pl: Attempt to prevent creating incomplete .d files.
(cherry picked from commit 3cf66a899ec1c8eed3a95b7f08824d5c8db0d0a8)
Signed-off-by: Michael Stahl <mstahl at redhat.com>
diff --git a/solenv/gbuild/filter-showIncludes.pl b/solenv/gbuild/filter-showIncludes.pl
index ee9a34b..d7082a2 100755
--- a/solenv/gbuild/filter-showIncludes.pl
+++ b/solenv/gbuild/filter-showIncludes.pl
@@ -13,6 +13,10 @@
#
# Original author: Jan Holesovsky <kendy at suse.cz>
+use File::Basename;
+use File::Copy;
+use File::Temp qw/tempfile/;
+
my $outfile = $ARGV[0];
my $objfile = $ARGV[1];
my $srcfile = $ARGV[2];
@@ -25,8 +29,9 @@ if ( !defined( $showincludes_prefix ) || $showincludes_prefix eq "" ) {
$showincludes_prefix = 'Note: including file:';
}
-open( OUT, "> $outfile" ) or die "Cannot open $outfile for writing.";
-print OUT "$objfile: \\\n $srcfile";
+my ($OUT, $tmp_filename) = tempfile( 'showIncludesXXXXXX', DIR => dirname( $outfile ) ) or die "Cannot create a temp file.";
+
+print $OUT "$objfile: \\\n $srcfile";
my %seen;
my $first_line = 1;
@@ -45,7 +50,7 @@ while ( <STDIN> ) {
if ( !defined $seen{$_} ) {
$seen{$_} = 1;
- print OUT " \\\n $_";
+ print $OUT " \\\n $_";
}
}
else {
@@ -56,7 +61,7 @@ while ( <STDIN> ) {
$first_line = 0;
}
-print OUT "\n";
+print $OUT "\n";
# fdo#40099 if header.h does not exist, it will simply be considered out of
# date and any targets that use it as a prerequisite will be updated,
@@ -64,9 +69,11 @@ print OUT "\n";
# as an include
# see http://www.makelinux.net/make3/make3-CHP-8-SECT-3
foreach my $key ( keys %seen ) {
- print OUT "\n$key:\n";
+ print $OUT "\n$key:\n";
}
-close( OUT ) or die "Cannot close $outfile.";
+close( $OUT ) or die "Cannot close $tmp_filename.";
+
+move( $tmp_filename, $outfile ) or die "Cannot move $tmp_filename to $outfile.";
# vim: shiftwidth=4 softtabstop=4 expandtab:
More information about the Libreoffice-commits
mailing list