[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: koffice/filters/kword/kword1.3/import
From: Nicolas Goutte <nicolasg () snafu ! de>
Date: 2004-01-15 19:25:21
Message-ID: 20040115192521.1D4DD8FF9 () office ! kde ! org
[Download RAW message or body]
CVS commit by goutte:
Fix handling of one picture used more than one time in the document
This could be ported to libexport and could be backported. Any volunteer?
CCMAIL:koffice-devel@kde.org
M +21 -11 KWEFKWordLeader.cc 2.7
--- koffice/filters/kword/kword1.3/import/KWEFKWordLeader.cc #2.6:2.7
@@ -639,21 +639,31 @@ static void ProcessPixmapsKeyTag ( QDomN
// Let KoPicture do most of the loading
key.loadAttributes(myNode.toElement());
- QString name(myNode.toElement().attribute("name"));
+ const QString name(myNode.toElement().attribute("name"));
- // TODO/FIXME: an image could be re-used a few times!
- FrameAnchor *frameAnchor = findAnchor (key, *paraList);
+ kdDebug(30508) << "search anchors: " << key.toString() << endl;
+ bool found = false;
+ QValueList<ParaData>::Iterator paraIt;
- if ( frameAnchor )
+ for ( paraIt = paraList->begin(); paraIt != paraList->end(); paraIt++ )
{
-#if 0
- kdDebug (30508) << "DEBUG: ProcessPixmapsKeyTag (): koStore for picture "
- << fileName << " is " << name << endl;
-#endif
+ ValueListFormatData::Iterator formattingIt;
- frameAnchor->picture.koStoreName = name;
+ for ( formattingIt = (*paraIt).formattingList.begin();
+ formattingIt != (*paraIt).formattingList.end();
+ formattingIt++ )
+ {
+ if ( (*formattingIt).id == 6 &&
+ (*formattingIt).frameAnchor.key == key )
+ {
+ kdDebug(30508) << "Found anchor " << (*formattingIt).frameAnchor.key.toString() << endl;
+ (*formattingIt).frameAnchor.picture.koStoreName = name;
+ found = true;
}
- else
+ }
+ }
+
+ if ( !found )
{
- kdWarning (30508) << "Could find anchor for picture " << key.toString() << endl;
+ kdWarning (30508) << "Could not find any anchor for picture " << key.toString() << endl;
}
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic