[ooo-build-commit] Branch 'ooo/OOO320' - 2 commits - sc/source

Jan Holesovsky kendy at kemper.freedesktop.org
Wed Dec 9 19:26:28 PST 2009


 sc/source/core/tool/reftokenhelper.cxx |   29 +++++++++++++++++------------
 sc/source/filter/xml/xmlwrap.cxx       |    8 ++------
 2 files changed, 19 insertions(+), 18 deletions(-)

New commits:
commit d2eab6d0eeb12df38439db057c4bb35632d02a94
Author: Oliver Bolte <obo at openoffice.org>
Date:   Wed Dec 9 09:26:11 2009 +0000

    CWS-TOOLING: integrate CWS os139
    2009-12-03 10:21:21 +0100 os  r277706 : #i107401# page number of page bound frames fixed
    2009-11-30 13:44:26 +0100 dr  r277673 : #i107275# accept OPCODE_SEP and OPCODE_LIST as range list separator
    2009-11-30 13:28:12 +0100 dr  r277672 : #i107275# ScRefTokenHelper::compileRangeRepresentation - allow parentheses enclosing the entire expression
    2009-11-27 14:45:30 +0100 os  r277669 : #i101821# find correct frame and SwPageFrame to print (or PDF export) selections

diff --git a/sc/source/core/tool/reftokenhelper.cxx b/sc/source/core/tool/reftokenhelper.cxx
index 8157d29..53a8766 100644
--- a/sc/source/core/tool/reftokenhelper.cxx
+++ b/sc/source/core/tool/reftokenhelper.cxx
@@ -1,7 +1,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2008 by Sun Microsystems, Inc.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -54,20 +54,25 @@ void ScRefTokenHelper::compileRangeRepresentation(
     const sal_Unicode cSep = GetScCompilerNativeSymbol(ocSep).GetChar(0);
     const sal_Unicode cQuote = '\'';
 
+    // #i107275# ignore parentheses
+    OUString aRangeStr = rRangeStr;
+    while( (aRangeStr.getLength() >= 2) && (aRangeStr[ 0 ] == '(') && (aRangeStr[ aRangeStr.getLength() - 1 ] == ')') )
+        aRangeStr = aRangeStr.copy( 1, aRangeStr.getLength() - 2 );
+
     bool bFailure = false;
     sal_Int32 nOffset = 0;
     while (nOffset >= 0 && !bFailure)
     {
         OUString aToken;
-        ScRangeStringConverter::GetTokenByOffset(aToken, rRangeStr, nOffset, cSep, cQuote);
+        ScRangeStringConverter::GetTokenByOffset(aToken, aRangeStr, nOffset, cSep, cQuote);
         if (nOffset < 0)
             break;
-        
+
         ScCompiler aCompiler(pDoc, ScAddress(0,0,0));
         aCompiler.SetGrammar(eGrammar);
         auto_ptr<ScTokenArray> pArray(aCompiler.CompileString(aToken));
 
-        // There MUST be exactly one reference per range token and nothing 
+        // There MUST be exactly one reference per range token and nothing
         // else, and it MUST be a valid reference, not some #REF!
         USHORT nLen = pArray->GetLen();
         if (!nLen)
@@ -298,9 +303,9 @@ namespace {
 class JoinRefTokenRanges
 {
 public:
-    /** 
-     * Insert a new reference token into the existing list of reference tokens, 
-     * but in that process, try to join as many adjacent ranges as possible. 
+    /**
+     * Insert a new reference token into the existing list of reference tokens,
+     * but in that process, try to join as many adjacent ranges as possible.
      *
      * @param rTokens existing list of reference tokens
      * @param rToken new token
@@ -312,8 +317,8 @@ public:
 
 private:
 
-    /** 
-     * Check two 1-dimensional ranges to see if they overlap each other. 
+    /**
+     * Check two 1-dimensional ranges to see if they overlap each other.
      *
      * @param nMin1 min value of range 1
      * @param nMax1 max value of range 1
@@ -367,7 +372,7 @@ private:
             ScSharedTokenRef& pOldToken = *itr;
 
             if (!ScRefTokenHelper::isRef(pOldToken))
-                // A non-ref token should not have been added here in the first 
+                // A non-ref token should not have been added here in the first
                 // place!
                 continue;
 
@@ -405,13 +410,13 @@ private:
             if (bSameRows)
             {
                 bJoinRanges = overlaps(
-                    aData.Ref1.nCol, aData.Ref2.nCol, aOldData.Ref1.nCol, aOldData.Ref2.nCol, 
+                    aData.Ref1.nCol, aData.Ref2.nCol, aOldData.Ref1.nCol, aOldData.Ref2.nCol,
                     aNewData.Ref1.nCol, aNewData.Ref2.nCol);
             }
             else if (bSameCols)
             {
                 bJoinRanges = overlaps(
-                    aData.Ref1.nRow, aData.Ref2.nRow, aOldData.Ref1.nRow, aOldData.Ref2.nRow, 
+                    aData.Ref1.nRow, aData.Ref2.nRow, aOldData.Ref1.nRow, aOldData.Ref2.nRow,
                     aNewData.Ref1.nRow, aNewData.Ref2.nRow);
             }
 
commit 27d905094bbb0b1117bba4fe9efcd34c1bee3ebf
Author: Oliver Bolte <obo at openoffice.org>
Date:   Wed Dec 9 08:32:23 2009 +0000

    CWS-TOOLING: integrate CWS fwk129
    2009-12-07 14:19:39 +0100 mba  r277741 : #i106367#: typo again
    2009-12-02 10:32:30 +0100 jsk  r277700 : fwk129: #i105719 - Fixed file size, wording and timing
    2009-11-25 13:25:48 +0100 mav  r277632 : #i107047# let the temporary stream be flushed in time
    2009-11-25 13:17:36 +0100 mav  r277631 : #i105719# switch to temporary file ealier to allow storing to the same location
    2009-11-23 14:47:02 +0100 mav  r277596 : #i105343# no outdated info in the buffer
    2009-11-23 14:09:49 +0100 os  r277595 : #i107064# copy styles in SwDoc::CreateCopy()
    2009-11-23 10:38:29 +0100 mba  r277592 : #i104338#: fix build without Java
    2009-11-20 10:22:11 +0100 cd  r277572 : #i107003# Make toolbar invisible before calling doLazyDelete. This prevents possible crashes in scenarios where a modal dialog is visible.
    2009-11-19 18:30:33 +0100 mav  r277569 : #i107035# let the temporary file be removed after the stream has been closed
    2009-11-19 18:06:21 +0100 mba  r277565 : #i106390#: crash caused by optimization
    2009-11-19 17:58:34 +0100 mba  r277564 : #i106367#: typo prevents correct asian language fallback
    2009-11-19 17:57:16 +0100 mba  r277563 : #i106390#: crash caused by optimization
    2009-11-19 16:35:41 +0100 nn  r277561 : #i106854# get source stream directly from document's storage instead of a temporary SfxMedium
    2009-11-19 12:36:38 +0100 mav  r277558 : #i106854# check the date of the original file

diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 0784df1..1446153 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -737,12 +737,8 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(uno::Reference<lang::XMultiServic
         {
             // old stream is still in this file's storage - open read-only
 
-            SfxMedium* pSrcMed = rDoc.GetDocumentShell()->GetMedium();
-            String aSrcURL = pSrcMed->GetOrigURL();
-
-            // SfxMedium must not be read-only, or it will create a temp file in GetStorage
-            SfxMedium aTmpMedium( aSrcURL, STREAM_READWRITE, FALSE, NULL, NULL );
-            uno::Reference<embed::XStorage> xTmpStorage = aTmpMedium.GetStorage();
+            // #i106854# use the document's storage directly, without a temporary SfxMedium
+            uno::Reference<embed::XStorage> xTmpStorage = rDoc.GetDocumentShell()->GetStorage();
             uno::Reference<io::XStream> xSrcStream;
             uno::Reference<io::XInputStream> xSrcInput;
             try


More information about the ooo-build-commit mailing list