[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: koffice/kspread
From: Ariya Hidayat <ariya () kde ! org>
Date: 2004-08-24 12:14:33
Message-ID: 20040824121433.4E6B616B53 () office ! kde ! org
[Download RAW message or body]
CVS commit by ariya:
load and save sheet's layout direction
CCMAIL: 46831@bugs.kde.org
CCMAIL: koffice-devel@mail.kde.org
M +20 -4 kspread_sheet.cc 1.618
--- koffice/kspread/kspread_sheet.cc #1.617:1.618
@@ -6420,4 +6420,5 @@ QDomElement KSpreadSheet::saveXML( QDomD
QDomElement table = doc.createElement( "table" );
table.setAttribute( "name", d->name );
+ table.setAttribute( "layoutDirection", (d->layoutDirection == RightToLeft) ? "rtl" : "ltr" );
table.setAttribute( "columnnumber", (int)d->showColumnNumber);
table.setAttribute( "borders", (int)d->showPageBorders);
@@ -7670,4 +7671,23 @@ bool KSpreadSheet::loadXML( const QDomEl
}
+ bool detectDirection = true;
+ d->layoutDirection = LeftToRight;
+ QString layoutDir = table.attribute( "layoutDirection" );
+ if( !layoutDir.isEmpty() )
+ {
+ if( layoutDir == "rtl" )
+ {
+ detectDirection = false;
+ d->layoutDirection = RightToLeft;
+ }
+ else if( layoutDir == "ltr" )
+ {
+ detectDirection = false;
+ d->layoutDirection = LeftToRight;
+ }
+ }
+ if( detectDirection )
+ checkContentDirection( d->name );
+
/* older versions of KSpread allowed all sorts of characters that
the parser won't actually understand. Replace these with '_'
@@ -7962,6 +7982,4 @@ bool KSpreadSheet::loadXML( const QDomEl
}
- checkContentDirection( d->name );
-
return true;
}
@@ -8292,6 +8310,4 @@ bool KSpreadSheet::setTableName( const Q
emit sig_nameChanged( this, old_name );
- checkContentDirection( name );
-
setName(name.utf8());
(dynamic_cast<KSpreadSheetIface*>(dcopObject()))->tableNameHasChanged();
_______________________________________________
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